  Linux Dip+SLiRP+CSLIP mini-HOWTO

  Zenon Fortuna (zenon@netcom.com <mailto:zenon@netcom.com>)
  Version: 1.0  October 15th '95
  : 豤 (nownuriID:,can@nownuri.nowcom.co.kr
  <mailto:can@nownuri.nowcom.co.kr>)
  : 1996 12 25 ũ..
  ______________________________________________________________________

  

  1. "Dip+SLiRP+CSLIP mini-HOWTO" 
  2. (History of changes)
  3.  (Short description)
  4. ܰ
     4.1 SLiRP νϱ
     4.2 SLiRP ׽ϱ
     4.3  ڽ ϱ :)
     4.4  ý ׽ϱ
     4.5 DIP νϱ
     4.6 DIP ׽ϱ

  5. Ϲ ۾
     5.1 DNS ġϱ (Adding a DNS capability)

  6.  

  ______________________________________________________________________

  1.  "Dip+SLiRP+CSLIP mini-HOWTO" 

      SLIP-ͳ ῡ Ǵ  -
  ν ϰ  NET-2-HOWTO   Dip/SLiRP б ġ
  ʴ ڸ  ̴. ߴ   ڼ
   Ӹ ô̳  Ұ̴.:)

  dip337n-uri  slirp-0.95h Ű  ׽Ʈ Ǿ.
  ׽Ʈ  2.2.0 ν ¿,Ŀ1.2.13  
  .(Ȯεƴ?)

  2.  (History of changes)

  1995 10 15  :1.0    ۼ 

  3.   (Short description)

  o    ڽ(ý) (shell-account) 
     ִ ISP (ͳ  ü)   ȭ ϴٴ°
     Ѵ.  츮 "SLiRP"ƿƼ ġ ̴.

  o  츮 (remote-server) ȭ ؼ Ư ũƮ
     Բ  ڽ "dip"ƿƼ غϰ,  "SLiRP"
      ̴.

  o  "dip" ø     ̸, "SLiRP"
        IP mapping ڽ ˷ ̴.

  o  as a result the TCP/IP packets sent over the serial-line/modem
     connection will be handled by the remote server as though being
     sent locally by this server.(:ª  Ƿ´ ؼ
      عٶ :<)

     * 츮 ͳ ҽκ  ý TCP/IP 
     ִ.  * Miracle happens: we will get a TCP/IP connection of the
     Linux system * * to the Internet resources.
     *

  4.  ܰ

  4.1.  SLiRP νϱ

  o  slirp-0.95h.tar.gz   Ǵ SLiRPα׷ ؼ,Ʈ
     ȣƮ( ȭ  ý) "slirp"α׷  Ѵ.
     SLiRP docs/README.compiling  ڼ  ִ.

  o   ſ ibc.wustl.edu/pub/slirp_bin/USE_AT_OWN_RISK/
     <ftp://ibc.wustl.edu/pub/slirp_bin/USE_AT_OWN_RISK/>  ̸ 
     ϵ ̳ʸ ȭϰ,Alt.dcom.slip-emulators FAQ  
     Ҽ ִ.(:  ˾ƺ  ̰ ƹ͵ 
     ʾҴ. HTML ޶־ ̿.Ʈ °  )

  o  "slirp"ȭ   ڸ,"./bin/slirp"  "./slirp"($HOME
     丮)  ű.

  o  $HOME 丮 ".slirp"ȭ .   ɾ
     ִ´.

  #### .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"   ῡ
  ˸ ӵ ؾѴ.

  4.2.  SLiRP ׽ϱ

   (remote system) α

  % bin/slirp (Ǵ "./slirp" ԷѴ.:ȭ ġ  ٸ.)

    ٿ   ޽ Ѵ.

  [talking CSLIP, MTU 1500, MRU 1500, 38400 baud]

  "slirp"  ؼ "0" õõ ټ .(1ʺ 
  )

  4.3.   ڽ ϱ :)

  ٺ, Ŀο 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

     ý ϸ ȴ.

  4.4.   ý ׽ϱ

  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 Բ  غ .

  4.5.  DIP νϱ

  o  ¼ (it may happen),  ýۿ "dip"
     ̳ʸȭ ̹   ̴.̰  3.3.7n̶
      ̴.(̰ ֽ  Ʈ ִ.)

  o  ׷ ʴٸ dip337n-uri.tar.gz  (Ȥ  ) Dip
         ڽ  Ѵ.dip-3.3.7n
     丮  "make" Ÿϱ⸸ ϸ ȴ.

  o  /usr/local/bin/dip Ǵ $HOME/bin/dip  "dip"α׷
     Űܳ´.

  o  Ȩ丮($HOME) "slirp.dip"  dipũƮ .

  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̴.)

  4.6.  DIP ׽ϱ

     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" ҵ ̰,𵩿ᵵ ҵ ̴.

  5.  Ϲ ۾

  .   dip+slirp Ѵ.  % dip slirp.dip

  .   "CONNECTED..." ޽ Ÿ  ISP 
  ͳݿ CSLIP   ̴.  "telnet" ̿  
  Ʈ  .  % telnet 10.0.2.1 Thanks to the ".slirprc"
  configuration file, this connection should activate the "tcsh -l" and
  you should get the remote login.  (".slirprc" ȭϿ Ѵ. 
   "tcsh -l" Ȱȭ Ű  Ʈ α Ҽ ִ. ??)
  <= ؼ ̻ ^^; "ps" ϸ    
  ִ.  6019 s0 S     0:13 slirp 6075 sb IW    0:00 -/usr/bin/tcsh
  (tcsh) 16721 t6 R     0:00 ps

  .  ڳ ϰų,ƴϸ ٸ ͹̳(X shell-
  window)    FTP   ִ.  % ftp 198.86.40.81

  (?) ͸  Linux-archiveƮ
  "sunsite.unc.edu"° ߰ ̴.     ָ
  ִٸ  dip+slirp  źҰ̴.  you are on the NET. <=
  ??

    "sunsite"  "yourhost" ƿ´.  Ƹ
    ǹ ̴.

   "ftp sunsite.unc.edu" Ҽ ?  DNS (Domain Name
  Server)  ϱ Ұϴ.     CSLIP
  ϰ Ѵٸ Ʈ   Էϸ ȴ.  % dip
  -k

  5.1.  DNS ġϱ (Adding a DNS capability)

  и  Ʈ ISP DNS񽺸 Ѵ.(׷ ʴٸ
   ùٸ ͳ  Ҽ  ̴.) "dip slirp.dip" 
  "telnet 10.0.2.1" Ͽ ٽѹ Ʈ 
  "/etc/resolv.conf" ȭ д´.      ٵ
   ̴.
  nameserver  <IP-address>

  ⼭ <IP-address> Ư ̴.( Ʋ ִ.  ̷
  ٵ߿  Ѱ̻  Į ڽ
  "/etc/resolv.conf"  ش.    ý ƿͼ
  (dip+slirp  ä),DNS ۵ϴ   .  % dnsquery
  sunsite.unc.edu   Է Ʈ IPּҰ µȴٸ
   DNS񽺴 ۵ ̴. 
  "lynx","mosaic","netscape" ƿƼ  ڽ  ٷ
  ų ִ.

  6.   

    ħ̶  ⺻ dip+slirp س 
  ̴.    CSLIP ϰ ϴ ڵ 
  ؼ̴.  ߿ ణ ׶ ߰ߵȴٸ 
  ˷ֱ ٶ.ð  ̴ Ͽ ̱ ű ̴.(??)
  ð  (?)   ftp丮 ߰Ҽ ִ.
  ftp.netcom.com:/pub/ze/zenon/linux/DipSlirpCSLIP/
  <ftp://ftp.netcom.com:/pub/ze/zenon/linux/DipSlirpCSLIP/>  Ǹ
  ƿƼ "dip"  "slip" ڵ 帰.(want to??)  I am
  impressed and grateful.(<= ޾ ̴?? ^^;)

  :Zenon Fortuna    (zenon@netcom.com <mailto:zenon@netcom.com>)
  :豤 (nownuriID:,can@nownuri.nowcom.co.kr
  <mailto:can@nownuri.nowcom.co.kr>)

