Axil S/E-ljs055
                                1993.1.4
                               Lee Jin-Soo


SUBJECT:   X25 ±âº» Á¤¸®






                                    <  X . 2 5  °³  ¿ä  >


	* Layer ±¸¼º

	  1. Physical Layer : x21 bit°¡ ¿À´Ã³¯ °¡ÀåÈçÈ÷ »ç¿ëµÇ´Â physical interface technique ¸ç
                              sunlink X.25¿¡ ÀÇÇØ Áö¿øµÊ
          2. Frame Level : ÀÌ ÃþÀÇ Æ¯¼ºÀº Link Access Procedures LAP ȤÀº LAPB°¡ DTE¿Í DCE»çÀÌÀÇ date
                           ±³È¯À» À§ÇØ »ç¿ëµÇ¾îÁöµµ·Ï ÇØÁØ´Ù.
                           ÈçÈ÷ X.25´Â LAPB¸¦ »ç¿ë. LAPB´Â HDLCÀÇ subsetÀÌ´Ù.
	  3. Packet Level : DTE (data Terminal Equipment)»çÀÌÀÇ Virtual circuit°³³äÀ» µµÀÔÇÏ°í ÀÖ°í
                            DTEÀÇ addressingÀ» Áö¿øÇÔ.
                            PSDNÀº SVC (Switched Virtual Circuit)°ú PVC (Permanant Virtual Circuit)¸¦ Áö¿ø.
                            SVC´Â µ¿ÀûÀ¸·Î »ý±â¸ç Æı«µÈ´Ù. PVC´Â ÇϳªÀÇ DTE°¡ ÀÚ±âÀÇ linkÀ» network
                            (DCE)¿¡ ¿¬°áµÉ¶§ ÀÚµ¿ÀûÀ¸·Î »ý±ä´Ù.
                             
	* Sunlink X.25 µµÀÔ

	  sunlink X.25´Â sun workstationÀÌ PSDN(Packet-Switching Data Networks)»ó¿¡¼­ DTE°¡ µÇµµ·Ï ÇØÁØ´Ù.
 	  X.25´Â CCITT X.29¿Í X.3¸¦ Áö¿øÇÏ°í installÈÄ¿¡´Â ±× workstationÀº X.25 gateway°¡ µÊ
	  (TCP/IP»óÀÇ ¸ðµç ±â°èµé¿¡ ´ëÇØ)
	  Sunlink X.25´Â ´ÙÀ½°ú °°Àº »ç¿ëÀ» ÇÒ¼ö ÀÖ´Ù.
	  1. X.25 Packet Service : PSDNÀ» ÅëÇØ application protocolÀ» ¼öÇàÇϱâ À§ÇØ ÇϳªÀÇ packet service
                                   ·Î¼­ X.25»ç¿ë
	  2. Internetwork Routing : Internet ProtocolȤÀº OSI Network Layer PacketµéÀ» À§ÇØ ÇϳªÀÇ 
                                    transparent datagram service·Î¼­ X.25»ç¿ë
	  3. HDLC Service : ÀÌ HDLC service´Â Ç¥ÁØ sunos programÀ» »ç¿ëÇØ Á¢±ÙÇÒ¼ö ÀÖ°í device driver
                            interfaceȤÀº programmatic interface¸¦ ÅëÇØ À¯¿ëÇÏ´Ù.
	                    ÀÌ levelÀº error°ËÃâ ±â´É Á¦°ø (¼öÁ¤ºÒ°¡)
	  4. X.29/X.3 Virtual Terminal service : X.25´Â user¿Í server±â´ÉÀ» °®´Â X.29/X.3 facility¸¦ Á¦°ø
                                                 user±â´É¸é¿¡¼­ X.29/X.3´Â sun workstaton user°¡ PSDNÀ» 
                                                 ÅëÇØ ÇϳªÀÇ terminal·Î¼­ remote host¿¡ login°¡´ÉÄÉÇÔ.
        					 À̱â´ÉÀº workstationÀÌ ÇϳªÀÇ PAD(Packet assembly/disassembly                                                 ·Î¼­ ÀÛ¿ëÇϸç,local virtual terminalÀÇ ¹®ÀÚÇ¥½Ã ¿ä±¸¿Í 
                                                 remote hosts's application¿¡ ¹ÝÀÀÇÑ´Ù.
						 server±â´ÉÀ¸·Î¼­ X.29/X.3Àº sun workstationÀÌ packet-mode 
					         host·Î¼­ÀÇ ¿ªÇÒÀ» ÇÏ°Ô ÇØÁÖ°í PSDN»ó¿¡¼­ remote ¹®ÀÚ Ç¥½Ã
 					         terminal°úÀÇ sessionµéÀ» À¯ÁöÇÑ´Ù.

	* Serial Port¿Í Modem ¿ä±¸»çÇ×µé

	  X.25´Â synchronous modem°ú cableÀ» ¿ä±¸ÇÑ´Ù.
          maximun data rates´Â cpu port»ó¿¡¼­ X.25´Â 19.2kbits/sec ÃÖ´ë data rate Áö¿ø
          MCPȤÀº SCP port»ó¿¡¼­ 64kbits/sec ÃÖ´ë data rate Áö¿ø

	* X.29/X.3 Server ±â´É

	  /etc/sunlink/x25/x29-auth ¼öÁ¤
           ´ë¹®ÀÚ -> Àüü     ¼Ò¹®ÀÚ -> ƯÁ¤ÇÑ userµéÀÇ ¼³Á¤
	         # x29    server½ÇÇà

	* X.29/X.3 user±â´É

	  pad¸¦ invokeÇϱâÀü¿¡ ¸ÕÀú local terminal typeÀ» °áÁ¤ÇØ¾ß ÇÑ´Ù.
 	        # set | grep term
                      term sun or term vt100

	* HDLC(High level Data Link Control)service¸¦ ÀÌ¿ëÇÏ·Á¸é ifd device¸¦ installÇØ¾ß ÇÑ´Ù.

	* XVC interface´Â IRÀ» À§ÇØ »ç¿ëµÊ

	* install Áõ¸íÀ» À§ÇØ »õ·Î¿î x25 kernal·Î ºÎÆÃÈÄ
		# netstat -i -a

	* 3 level 
	  1. physical level         2. HDLC level (frame layer)      3. packet level

	* x25config --> sunlink X.25 linkfmf ½ÃÀÛ½ÃÅ´. ¿©·¯ºÐÀÇ parameter settingµéÀ» X.25 3´Ü°è level·Î
                        Àû¿ë½ÃŲ´Ù.
                        ÀüÅëÀûÀ¸·Î ¿ì¸®´Â ±× fileÀ» x25params    x25paramsn (n -> link¼ö)

	* packet level¿¡¼­  host-address

            4042-3831-00    4042 -> DNIC(Data Network Identification Code)
 	                    3831 -> NTN(Netork Terminal Numbers)
			    00   -> Subaddress

	* x25route  

 	   -a  --> ¿­°ÅµÈ route add
	   -r  --> ¿­°ÅµÈ route remove
           -s  --> show all routes	
           -d  --> PSDN À» µ¿ÀϽà ÇÏ´Â DNIC¸¦ °¡¸®Å´
		Route DNIC 2345 over link 0
		Route DNIC 8344 over link 1
		# x25route -a -d2345 -l0

	* x25start´Â serial port¸¦ ÃʱâÈ­½ÃÅ°°í protocol moduleµéÀÇ ÃþÀ» ÃʱâÈ­ÇÑ´Ù.

	  link number
	  serial port driver zss0
	  data rate
	  zss0 , zss1 --> serial port
	  MCP port¸¦ À§ÇØ mcphn  n -> 0-15
          SCP port´Â dcpxn  x -> a-d  n -> 0-3

		# /usr/sunlink/x25/x25start 0 mcph3 56000
		-->
		# syncinit mcph3 56000
		# iflayer xpkt0 hdlc0 mcph3

	* x25config

	  /usr/sunlink/x25/x25config [-on|off] [-a] [-l linkid] config file
		-a : x25config°¡ sunlink X.25°¡ packet service¸¦ network¿¡ ¼³Á¤ÇÏ´Â È®ÀÎÀ» ±â´Ù¸²¾øÀÌ
                     exitÇϴ°ÍÀ» ³ªÅ¸³¿
		-llinkid : -on,-off ¿Í ÇÔ²² »ç¿ë
	 ¿¹) link2¸¦ ½ÃÀÛÇÏ°íÀÚ ÇÑ´Ù. ( -a option°ú ÇÔ²²)
             ÀÌ link¿¡ °ü°èµÈ ±¸¼º fileÀ» /etc/sunlink/x25/x25params2ÀÓ
		# x25config -a /etc/sunlink/x25/x25params2

	* pad¸í·ÉÀÇ ÀϹÝÀû ÇüÅ´Â
		# pad options serveraddress
	 ¿¹) remote host address°¡ 476507206100¿¡ ¿¬°á½Ã
		# pad -r 476507206100
	  pad´Ù¸¥ ÇüÅ´ profileÀ» »ç¿ëÇϴ°ÍÀÌ´Ù.
		# pad surya
		  surya´Â /etc/sunlink/x25/x29profile¿¡ µî·ÏµÇÀÖ´Ù
         ¸¸¾à ´ç½ÅÀÇ local terminal typeÀÌ sunÀ̸é remote prompt¿¡ ´ÙÀ½°ú °°À̼³Á¤ÇØ¾ß ÇÑ´Ù.
		remotehost# set term=sun
			  # tset
	 À§¿Í °°Àº ¸í·ÉµéÀº X.29 protocolÀÌ terminal type°ú remote host·Î Çà¼ö¸¦ Á¦°øÄ¡ ¾Ê±â ¶§¹®ÀÌ´Ù. 
         
	* IR ±¸¼º

	  X.25´Â x25enable, x25disable ·Î¼­ virtual circuits¸¦ ºÐ¸íÇÏ°Ô ¸¸µé°í ¹ö¸°´Ù.
          X.25´Â XVC interface¸¦ ÅëÇØ virtual circuitÀÇ IRÀ» Á¦°øÇÑ´Ù.
	  X.25¸¦ »ç¿ëÇÏ´Â routing gateway´Â Àû¾îµµ ÇϳªÀÇ Ethernet interface¿Í °¢°¢ÀÇ X.25 link¸¦ À§ÇÑ
          XVC interface¸¦ °¡Áü

        * network address ÇÒ´ç
     
          X.25 virtual circuit¿¡ ´ëÇÑ 2°³ÀÇ network ¿¬°á¿¹

                 Birmingham                            Framingham
                192.9.203.1  bozo                     192.9.201.1  frodo (x25 gateway)
                192.9.203.2  bilbo(x25 gateway)       192.9.201.2  freddy 
             ÀÇ network number´Â 192.9.203         ÀÇ network number´Â 192.9.201
                    
                               ÇÕº´µÈ host file
                               192.9.203.1  bozo
                               192.9.203.2  bilbo
                               192.9.201.1  frodo
                               192.9.201.2  freddy
                               192.9.202.1  bilbo-x25a
                               192.9.202.2  frodo-x25a
                               
                   /etc/network bilbo¿Í frodoÀ» À§ÇÑ
                     Birmingham  192.9.201
                     Framingham  192.9.203
                     bilbo-frodo 192.9.202

	* Routing Table

	  /etc/in.routed¿¡ ÀÇÇØ routing tableÀÌ °ü¸®µÊ
          netstat -r ·Î routing tableÈ®ÀÎ
	  . frodo·Î route¸¦ ¼³Á¤Çϱâ À§ÇØ bilbo»ó¿¡¼­ ´ÙÀ½°ú °°ÀÌ route ¸í·ÉÀ» »ç¿ëÇÑ´Ù.
		bilbo# /usr/etc/route add bilbo-x25a bilbo-x25a 1
		bilbo# /usr/etc/route add frodo-x25a bilbo-x25a 1
                                                    
          . ¹Ý´ëÀÇ °æ¿ì
                frodo# /usr/etc/route add frodo-x25a frodo-x25a 1
                frodo# /usr/etc/route add bilbo-x25a frodo-x25a 1
                
	* x25manager setup

	  x25manager´Â IRÀ» À§ÇØ »ç¿ëµÇ´Â X.25 virtual circuitÀ» °ü¸®ÇÔ
          configuration file´ÙÀ½°ú °°Àº 3°¡Áö sectionÀ» Æ÷ÇÔÇÑ´Ù.
          1. Listener Section
             listener´Â Call Request Packet¾È¿¡¼­ Ưº°ÇÑ protocol ID¸¦ °¡Áø incoming callµéÀ» À§ÇØ 
             listenÇÏ´Â entityÀÌ´Ù.
	  2. path section
	     ¿©±â¼­´Â XVC interface¸¦ Á¤ÀÇÇÔ.
             typeÀº incoming calls°úÀÇ interface¸¦ ¸ÂÃß±âÀ§ÇØ »ç¿ëµÇ´Â À̸§ÀÌ´Ù.
             sunÀº IP¸¦ ±ÇÀåÇÑ´Ù.
	  3. shell command section
             sectionÀº iflayer¿Í ifconfig ¸í·É¾î¸¦ Æ÷ÇÔÇÑ´Ù. ÀÌ°ÍÀº X.25 linkµéÀ» ÃʱâÈ­ÇÑ´Ù.

	* x25manager starting

	  x25manager´Â ÃÖ°í 16kbytes data·Î ¼³Á¤ÇÒ¼ö ÀÖ´Ù. ¸¸¾à ±× ¾çÀÌ ÃÊ°úµÇ¸é ³ª¸ÓÁö ÃÊ°úºÐÀº ¹«½ÃÇÑ´Ù.
          IP´Â º¹±¸±â´ÉÀ» »ç¿ëÇÑ´Ù.
		# x25manager x25manager.configuration &

	* Remote host Á¦¾î¸í·É

	  x25disable          x25enable
          ÀÌ ¸í·ÉµéÀº ethernet connection°ú X.25ȸ¼±¿¡¼­ ÀÛ¿ëµÊ. host¿¡ ¿¬°áÀÌ virtualȸ¼±ÀÏ °æ¿ì
          ±× ¿¬°áÀº disable½ÃÅ°±âÀ§Çؼ± x25disable¸í·É»ç¿ë.
          ´Ù½Ã Àç ¿¬°áÇÒ °æ¿ì ¹Ýµå½Ã x25manager·Î reinvokeÇؾßÇÔ.
	  x25enableÀº remote machine»óÀÇ XVC interface¸¦ 
		# x25enable bilbo 0  0 -> XVC0
              remote host bilboÀÇ XVC0 interface¸¦ °¡´ÉÄÉÇÒ °æ¿ì 

	* HDLC service ±¸¼º ¹× ¼öÇà

	  ifd device¸¦ ÃʱâÈ­ÇÏ·Á¸é ´ÙÀ½°ú °°´Ù.
                # cat /dev/null > /dev/ifd0
		# iflayer ifd0 hdlc0 zss0  --> ifd device¸¦ hdlc¿Í serial port·Î ÃþÀ» ³ª´®
	  ´ç½Å ±â°èÀÇ HDLC parameter¸¦ ¼³Á¤Çϱâ À§ÇØ hdlcconf ¸í·ÉÀ» »ç¿ëÇÑ´Ù.
		# hdlcconf /dev/ifd0

	* Serial port ÃʱâÈ­

	  syncinitÀº ¿©·¯ºÐÀÌ »ç¿ëÇÏ´Â Serial port¸¦ ÃʱâÈ­ÇÑ´Ù.
		# syncinit mcph2 9600 -> MCP board 3¹ø° port¸¦ 9600À¸·Î ÃʱâÈ­

	* link-level connection ¼³Á¤

	  link-level connectionÀ» ¼³Á¤Çϱâ À§ÇØ hdlcstart¸¦ »ç¿ë.
		# hdlcstart /dev/ifd0

	* hdlc communication ÁßÁö
	  	# hdlcstop /dev/ifd0 --> ÀÌ ¸í·ÉÀº packet transmissionÀ» ÁßÁöÇÔ

	* Configuration Commands

	  syncinit command´Â synchronous serial lineÀÇ clocking parameterµéÀ» ÃʱâÈ­ÇÏ°í Á¦¾îÇÑ´Ù.
	  syncinitÀº x25start shell script¿¡ ÀÇÇØ »ó±âµÈ´Ù.
		# syncinit mcph1
		  speed=9600 , loopback=no , nrzi=no , txc=txc , rxc=rxc
                  nrziÀº transmit¿¡¼­ÀÇ encoding°ú receive »ó¿¡¼­ÀÇ decoding¿¡¼­ 
                  nrzi(non-return-to-zero inverted)ÀÇ »ç¿ëÀ» Á¶ÀýÇÑ´Ù. 
	          nrzi encodingÀ» À§ÇÑ ±âº»°ªÀº nrzi=no·Î »ç¿ëÇϱ⸦ ±ÇÀå
		  txc=txc (³ª°¡´Â signalÀ» modemÀ¸·Î ³ª°¡´Â signal·Î »ç¿ë)
			   baud rate°¡ ÁÖ¾îÁö¸é system signal »ç¿ë)

	* iflayer´Â protocol deviceµéÀÌ layer¸¦ ÃʱâÈ­ÇÑ´Ù. ÀÌ ¸í·ÉÀº ip device°¡ XVC interface¸¦ 
          »ç¿ëÇÏ°Ô ÇØÁØ´Ù.
		# iflayer xpkt0 hdlc0 zss0
	  ¸¸¾à irÀ» À§ÇØ X.25¸¦ »ç¿ëÇÒ °æ¿ì ip device¸¦ XVC interface·Î layer ÇؾßÇÑ´Ù.
          ip0¸¦ XVC0·Î layerÇϱâ À§ÇØ 
		# iflayer ip0 XVC0
	  ¸¸¾à ifnet interface¸¦ »ç¿ëÇÏ´Â ÇϳªÀÇ HDLC service·Î¼­ X.25¸¦ »ç¿ëÇÒ°æ¿ì 
	  ifd device¸¦ hdlc device·Î layerÇÔ.
		# iflayer ifd0 hdlc0 mcph0