#### .slirprc file #### add ptyexec /usr/bin/tcsh -l:10.0.2.1:23 compress baudrate 38400 #### end
"compress"´Â CSLIP ÇÁ·ÎÅäÄÝÀ» »ç¿ëÇÒ¼ö ÀÖµµ·Ï ÇØÁØ´Ù. "add ptyexec"¸í·É¾î´Â "shell"¸í·É¾î ´ë½Å¿¡ »ç¿ëµÈ°ÍÀÌ´Ù. (¸í·É¾î ¸®½ºÆ®´Â SLiRPÀÇ dosc/CONFIG¸¦ º¸¶ó.)
¿Ö³ÄÇϸé "tcsh -l"(".login"¿¡¼) À» »ç¿ëÇÏ´Â°Í º¸´Ù ÁÁÀ¸¸ç,"shell"¸í ·É¾î´Â flagµéÀ» ¹Þ¾ÆµéÀÌÁö ¾Ê±â ¶§¹®ÀÌ´Ù.(³ ±×·¸°Ô ¹Ï´Â´Ù.) ´ç½ÅÀº ¸®¸ðÆ® ½Ã½ºÅÛ¿¡¼ "tcsh"ÇÁ·Î±×·¥¿¡ ÀÇÇØ Æ¯ÈµÈ ÁÖ¼Ò¸¦ »ç¿ëÇØ¾ß ÇÑ´Ù.(¶Ç´Â ´ç½ÅÀÌ ÁÁ¾ÆÇÏ´Â ½©À̳ª..) "baudrate"´Â ´ç½ÅÀÇ ¸ðµ© ¿¬°á¿¡ ¾Ë¸ÂÀº ¼Óµµ¸¦ »ç¿ëÇؾßÇÑ´Ù.
´ç½ÅÀÇ ¼¹ö(remote system)¿¡ ·Î±äÇÑÈÄ
% bin/slirp (¶Ç´Â "./slirp"¶ó°í ÀÔ·ÂÇÑ´Ù.:ÈÀÏ À§Ä¡¿¡ µû¶ó ´Ù¸£´Ù.)
´ç½ÅÀº ¸¶Áö¸· ÁÙ¿¡ ´ÙÀ½°ú °°Àº ¸Þ½ÃÁö¸¦ ¾ò¾î¾ßÇÑ´Ù.
[talking CSLIP, MTU 1500, MRU 1500, 38400 baud]
"slirp"¸¦ ³¡³»±â À§Çؼ´Â "0"À» õõÈ÷ ´Ù¼¸¹ø ´©¸¥´Ù.(1Ãʺ¸´Ù ÀÛÀº °£°ÝÀ¸·Î)
±Ùº»ÀûÀ¸·Î,´ç½ÅÀº Ä¿³Î¿¡¼ CSLIP°ú ³×Æ®¿÷ ÀÛµ¿ÀÌ °¡´ÉÇϵµ·Ï ÁغñÇÏ´Â ÇൿÀ» ÇØ¾ß ÇÑ´Ù.±×·±ÈÄ ´ç½ÅÀº ³×Æ®¿÷ ¼ÂÆÃÀ» ÇØ¾ß ÇÑ´Ù."src/linux"¿¡¼ "make config" ¸¦ ÇÑÈÄ ´ÙÀ½°ú °°Àº °÷¿¡ "y"¸¦ ÇØÁØ´Ù.
Networking support (CONFIG_NET) [y] TCP/IP networking (CONFIG_INET) [y] Assume subnets are local (CONFIG_INET_SNARL) [y] Network device support? (CONFIG_NETDEVICES) [y] Dummy net driver support (CONFIG_DUMMY) [y] SLIP (serial line) support (CONFIG_SLIP) [y] CSLIP compressed headers (CONFIG_SLIP_COMPRESSED) [y] PPP (point-to-point) support (CONFIG_PPP) [y]
³ª´Â 3c509 Ethernet card¸¦ »ç¿ëÇÑ´Ù.µû¶ó¼ ´ÙÀ½°ú °°Àº ¿É¼ÇÀ» ÷°¡ Çß´Ù.
3COM cards (CONFIG_NET_VENDOR_3COM) [y] 3c509/3c579 support (CONFIG_EL3) [y]NFS ¼³Ä¡¸¦ À§ÇØ ´ç½ÅÀº ´ÙÀ½°ú °°ÀÌ Ã·°¡ÇÒ¼ö ÀÖ´Ù.
NFS filesystem support (CONFIG_NFS_FS) [y]
"make config"¸¦ ¼º°øÀûÀ¸·Î ¸¶Ä£ÈÄ,"make dep;make clean;make zlilo"¸¦ ÅëÇØ Ä¿³Î ÄÄÆÄÀÏÀ» ¼öÇàÇÑ´Ù.
³×Æ®¿÷ ¼³Á¤¿¡ ÀÖ¾î¼ °¡Àå ¸ÕÀú ¾î¶² IP ÁÖ¼Ò¸¦ »ç¿ëÇÒ°ÍÀΰ¡ °áÁ¤ÇØ¾ß ÇÑ´Ù. ¸¸¾à ´ç½ÅÀÇ ÁÖ¼Ò°¡ ºÎÁ·ÇÏ´Ù¸é,RFC1597(¿ªÀÚ:ÀÌ°ÍÀÌ ¹ºÁö ¸ð¸§ ^^;)¿¡ ÀÇÇØ ·ÎÄ® ³×Æ®¿÷¿¡ Çã¶ôµÈ 192.168.1.100À» Àû¾îÁØ´Ù.
¹°·Ð ´ç½ÅÀº NET-2-HOWTO ¸¦ ÀÐÀ½À¸·Î½á ´õ Á¤È®ÇÑ Á¤º¸¸¦ ¾òÀ»¼ö ÀÖÀ¸³ª,´ÙÀ½°ú °°ÀÌ ÇÏ¸é °¡´ÉÇÒ °ÍÀÌ´Ù.
A."yourhost.linux.org"¿Í °°ÀÌ ´ç½ÅÀÇ ½Ã½ºÅÛ¿¡ ³×Æ®¿÷ À̸§À» ºÎ¿©ÇÑ´Ù. ¼¼°³ÀÇ À̸§Àº ´ç½ÅÀÇ ÀÔ¸À¿¡ ¸Â°Ô °ñ¶ó¶ó :) "/etc/HOSTNAME"¿¡ À§¿¡¼ ¼³Á¤ÇÑ À̸§À» Àû¾î³Ö´Â´Ù.
B."/etc/hosts"¿¡ ´ÙÀ½°ú °°ÀÌ Àû¾î³Ö±â ¹Ù¶õ´Ù.
192.168.1.100 yourhost.linux.org yourhost
À§¿¡¼ "yourhost.linux.org"´Â A ¹ø°¿¡ ÀûÀº À̸§°ú °°¾Æ¾ß ÇÑ´Ù.
C.¸¸¾à ·ÎÄà ÀÌ´õ³ÝÀ» ½ÇÇàÇÑ´Ù¸é(If you run local Ethernet) ´ÙÀ½À» "/etc/networks"¿¡ Àû±â ¹Ù¶õ´Ù.
yournet 192.168.1.0
D./etc/rc.d µð·ºÅ丮¿¡ ÀÖ´Â "rc.inet1" ¿¡ ´ÙÀ½À» ¼³Á¤ÇÑ´Ù.
IPADDR=yourhost NETMASK="255.255.255.0" NETWORK=yournet BROADCAST="192.168.1.255"
±×·±ÈÄ,¸¸¾à ½ÇÁ¦ ÀÌ´õ³ÝÄ«µå¸¦ °¡Áö°í ÀÖ´Ù¸é ´ÙÀ½¿¡ ÇØ´çÇÏ´Â ÇàÀÇ ÁÖ¼®Ã³ ¸®µÈ°ÍÀ» Áö¿ö¶ó.
/sbin/ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST} /sbin/route add -net ${NETWORK} netmask ${NETMASK}
E.´ç½ÅÀÇ µÎ³×ÀÓÀÎ "linux.org"(A Âü°í)¸¦ "/etc/resolv.conf"¿¡ ´ÙÀ½°ú °°ÀÌ Àû¾î ³Ö´Â´Ù.
domain linux.org
¸¶Áö¸·À¸·Î ´ç½ÅÀÇ ½Ã½ºÅÛÀ» ¸®ºÎÆÃÇÏ¸é µÈ´Ù.
syslogd(8) ÀÌ ½ÇÇàµÈ´Ù¸é °¡Àå¸ÕÀú ºÎÆø޽ÃÁö¸¦ º¸°Å³ª,"/usr/adm/messages" ÈÀÏÀ» »ìÆ캸¶ó.´ç½ÅÀº ´ÙÀ½°ú °°Àº ¸Þ½ÃÁö¸¦ º¼¼ö ÀÖÀ»°ÍÀÌ´Ù.
IP Protocols: ICMP, UDP, TCP PPP: version ... TCP compression ... PPP line discipline registered. SLIP: version ... CSLIP: code copyright ...
¸¸¾à ´ç½ÅÀÌ ÀÌ´õ³Ý ÀÎÅÍÆäÀ̽º¸¦ °¡Áö°í ÀÖ´Ù¸é ¸¶Âù°¡Áö·Î ´ÙÀ½°ú °°ÀÌ ÀÎ½ÄµÉ °ÍÀÌ´Ù.
eth0: 3c509 at 0x280 ...
´ç½ÅÀÇ ³×Æ®¿÷Àº ¼³Á¤µÇ¾ú°í ¾à°£ÀÇ ¸í·É¾î¸¦ ÅëÇØ Å×½ºÆ®ÇÒ¼ö ÀÖ´Ù.
A.¾Æ¹« ¿É¼Ç¾øÀÌ "ifconfig"¸¦ ½ÇÇàÇϸé,´ç½ÅÀº "lo"(loopback)ÀÎÅÍÆäÀ̽º°¡ È°¼ºÈµÈ°ÍÀ» ÁÖ¼Ò¿Í ÇÔ²² È®ÀÎÇÒ ¼ö ÀÖ´Ù.¸¸¾à ´ç½ÅÀÌ ½ÇÁ¦ ÀÌ´õ³ÝÀ» ¿î¿ë ÁßÀ̶ó¸é,"eth0" ÀÎÅÍÆäÀ̽º Á¤º¸µµ º¼¼ö ÀÖÀ»°ÍÀÌ´Ù. ±×¸®°í "inet addr: 192.168.1.100"µî°ú °°Àº ´«¿¡ ÀÍÀº ÁÖ¼Ò¸¦ È®ÀÎÇÒ ¼ö ÀÖ´Ù.
B.¾Æ¹«·± ¿É¼Ç¾øÀÌ "route"¸¦ ½ÇÇàÇϸé,"loopback"°ú "yournet"¿¡ ÇØ´çÇÏ´Â ÁÙÀ» º¼¼ö ÀÖ´Ù.
ÀÌÁ¦ ´ç½ÅÀÇ ¸®´ª½º ½Ã½ºÅÛÀº CSLIP°ú ÇÔ²² ÀÏÇÒ Áغñ¸¦ °®Ãè´Ù.
dip ½ºÅ©¸³Æ® ÈÀÏÀº º¸Åë ±æ¸ç º¹ÀâÇÏ´Ù.dipÀÇ "samples" µð·ºÅ丮¿¡ ¾à°£ÀÇ ¿¹¹®ÀÌ ÀÖ´Ù.(¾Æ¸¶µµ /usr/doc/dip/samples¿¡ ±ò·ÁÀÖÀ» °ÍÀÌ´Ù.)
¾Æ·¡¿¡ ³ªÀÇ "slirp.dip"¸¦ ¿¹·Î Àû¾îºÃ´Ù. #### slirp.dip ##### # # slirp.dip Dialup IP script for use with SLiRP and netcom # main: # netmask ¸¦ sl0·Î ¼³Á¤ÇÑ´Ù. netmask 255.255.255.0 # serial port ¿Í ¼Óµµ¸¦ ¼³Á¤ÇÑ´Ù. # ttyS2 ¸¦ ´ç½ÅÀÇ ¸ðµ© µð¹ÙÀ̽º¿¡ ¸Â°Ô °íÃÄ¾ß ÇÒ°ÍÀÌ´Ù. # ³ª´Â ÀÌ Æ÷Æ®¿¡¼ "mgetty"°¡ ÀßÀÛµ¿ÇÑ´Ù.µû¶ó¼ ³ª´Â "cua2" º¸´Ù´Â "ttyS2"¸¦ # »ç¿ëÇÏ±æ ¹Ù¶õ´Ù. port ttyS2 speed 38400 # ¸ðµ©°ú Å͹̳ζóÀÎÀ» ´Ù½Ã ¼ÂÆÃÇØ ÁØ´Ù. # À̺κÐÀº ¸î¸î »ç¿ëÀڵ鿡°Ô¼ ¹®Á¦°¡ »ý±â´Âµí ÇÏ´Ù. reset # ´ÙÀ̾˸µÀ» À§ÇÑ Áغñ´Ü°è. # ´ç½ÅÀÇ ¸ðµ©Àº ÀÌ°Í°ú ´Ù¸¥ ÃʱâÈÀÏÁö ¸ð¸¥´Ù´Â°É ÁÖÀÇÇ϶ó. # ³» ¸ðµ©Àº WorldBlazer ÀÌ´Ù. send AT S0=0 S11=70 S50=254 S58=2 Q0 V1 E1 X4\r wait OK 2 if $errlvl != 0 goto modem_trouble redial: # ´ç½ÅÀÇ POP#¿¡ Àüȸ¦ °Ç´Ù. # ´ÙÀ½ ÀüȹøÈ£´Â ³»°¡ Á¢¼ÓÇÏ´Â POP¹øÈ£ÀÌ´Ù. # your mileage may vary(<= ÀÌ°Å ¹«½¼¶æÀÌÁÒ?) send ATDT 274 2900\r wait CONNECT 50 if $errlvl != 0 goto dial_trouble # ¿¬°áÀÌ µÆ´Ù¸é ½Ã½ºÅÛ¿¡ ·Î±äÇÑ´Ù. login: sleep 2 send \n wait ogin: 20 if $errlvl != 0 goto login_trouble print got the login prompt, OK # ¹ØÀÇ 'zenon' À» ´ç½ÅÀÇ ·Î±ä¸íÀ¸·Î ¹Ù²Ù±â ¹Ù¶õ´Ù. sleep 2 send \n # ·Î±ä¸íÀ» ³Ö±âÀü¿¡ "\n"À» Àû¾îÁÖ´Â ÀÌÀ¯¸¦ Àß ¸ð¸£°Ú´Ù. # ÀÌ°É ¾ÈÀû¾îÁáÀ» °æ¿ì ÀÛµ¿À» ÇÏÁö ¾Ê´Â´Ù. sleep 2 send zenon\n print sent 'zenon', waiting for 'password' ... wait ord: 30 if $errlvl != 0 goto password_trouble # ¾Æ·¡ÀÇ 'blablabla'ºÎºÐ¿¡ ¿©·¯ºÐÀÇ Æнº¿öµå¸¦ ³Ö¾îÁØ´Ù. send blablabla\r # ¾Æ¸¶µµ ·Î±äµÇ¾úÀ» °ÍÀÌ´Ù. loggedin: # ¾Æ·¡ºÎºÐÀ» ´ç½ÅÀÇ ½© ÇÁ·ÒÇÁÆ®·Î ¹Ù²Û´Ù. (³»°ÍÀº <url url="mailto:zenon@netcomNN" name="zenon@netcomNN" > n%ÀÌ´Ù.) wait zenon 15 if $errlvl != 0 goto prompt_error # SLiRP°¡ ¸®¸ðÆ® machine ÀÇ IP¸¦ 10.0.2.2·Î °¡Áöµµ·Ï ÇÑ´Ù. get $remote 10.0.2.2 # Make sure 'slirp' is found on netcom and is executable # ³ª´Â"slirp"°¡ ¸®¸ðÆ®ÀÇ $HOME/bin µð·ºÅ丮¿¡ ÀνºÅç µÇ¾ú´Ù±¸ °¡Á¤ÇÑ´Ù. send exec bin/slirp\n # CSLIP ÀÛ¾÷ º¯¼ö¸¦ ¼³Á¤ÇÑ´Ù.(operating parameters.) get $mtu 1500 # Ensure "route add -net default $remote" will be done # With the dip-3.3.7n it is simple, just say "default" default # Say hello and fire up! <= ÀÌ°Å ¾î¶»°Ô Çؼ®ÇÏÁÒ?? ^^; done: print CONNECTED local: $locip ---> remote: $rmtip mode CSLIP goto exit prompt_error: print TIME-OUT waiting for SLIPlogin to fire up... goto error login_trouble: print Trouble waiting for the Login: prompt... goto error password_trouble: print Trouble waiting for the Password: prompt... goto error modem_trouble: print Trouble occurred with the modem... goto error dial_trouble: print Trouble occurred while dialing... error: print CONNECT FAILED to $remote quit exit: exit #### end
Âü°í:À§ÀÇ ½ºÅ©¸³Æ®Áß¿¡¼ ´ÙÀ½¿¡ ÇØ´çµÇ´Â »çÇ×Àº ¿©·¯ºÐ¿¡°Ô ¾Ë¸Â°Ô °íÄ¡µµ·Ï ÇÑ´Ù.
- Æ÷Æ® À̸§ (³ª´Â ttyS2¸¦ »ç¿ëÇÑ´Ù.) - Æ÷Æ® ¼Óµµ (³ª´Â 38400À¸·Î »ç¿ëÇÑ´Ù.) - ¸ðµ© ÃʱâÈ ¹®ÀÚ (³»°¡ »ç¿ëÇÏ´Â °ÍÀº WorldBlazerÀÌ´Ù.) - POP's ÀüȹøÈ£ (³»°Í°ú ´Ù¸£±æ ¹Ù¶õ´Ù :) - ·Î±ä¸í - ¾ÏÈ£ - ÇÁ·ÒÇÁÆ®(È®½ÇÈ÷ ·Î±äµÇ¾úÀ»¶§) - "slirp"ÀÇ À§Ä¡ (³»°ÍÀº $HOME/binÀÌ´Ù.)
´ç½ÅÀº ´ÙÀ½°ú °°ÀÌ verbose(¾î¶»°Ô Çؼ®ÇØ¾ß Çϳª? ^^;) »óÅ·Π"dip"À» ½ÃÀÛÇÒ¼ö ÀÖ´Ù.
% dip -v slirp.dip
The messages printed by the "dip" may suggest some modifications to the above "slirp.dip" script. ( "dip"¿¡ ÀÇÇØ ³ªÅ¸³ª´Â ¸Þ¼¼Áö´Â À§ÀÇ "slirp.dip" ½ºÅ©¸³Æ®¿¡ ÀÇÇØ º¯°æµÈ »çÇ×À» Á¦½ÃÇÒ °ÍÀÌ´Ù.?)
¸ðµç°ÍÀÌ ÀßµÈ´Ù¸é ´ç½ÅÀº ´ÙÀ½°ú °°Àº ¸Þ½ÃÁö¸¦ ¸¶Áö¸·¿¡¼ º¼¼ö ÀÖÀ» °ÍÀÌ´Ù.
CONNECTED local: 192.168.1.100 ---> remote: 10.0.2.2
"dip" ½ºÀ§Ä¡µéÀº "daemon"°ú °°ÀÌ ½ÇÇàµÇ¸ç,´ç½ÅÀÇ ÇÁ·ÒÇÁÆ®·Î µ¹¾Æ¿Â´Ù.(??) ±×·±µ¥ "dip"À» Áö±Ý ¹Ù·Î ¸ØÃß·Á¸é,´ÜÁö "dip -k"¶ó°í µÎµå¸®±â¸¸ Çϸé "dip"Àº Ãë¼ÒµÉ °ÍÀÌ°í,¸ðµ©¿¬°áµµ Ãë¼ÒµÉ °ÍÀÌ´Ù.