Ocenite etot tekst:


     Protokol  TCP/IP  ne  obyazatel'no  trebuet  nalichiya ether­
net'noj seti. Vpolne dopustimy i  drugie  fizicheskie  nositeli,
naprimer:

  Posledovatel'nye linii s podklyucheniem cherez porty RS-232,

  Skorostnye linii s podklyucheniem cherez parallel'nye porty,
  ili skorostnye sinhronnye porty (naprimer 485, V.435).

|ti vozmozhnosti obespechivayutsya specializirovannymi realizaciyami
protokola IP:

     dlya podklyucheniya cherez RS-232
SLIP  - Serial  Line IP - samaya pervaya realizaciya  TCP/IP  "dlya
        bednyh", shiroko ispol'zuetsya do sih por.
CSLIP - Compressed  SLIP - modifikaciya protokola SLIP.
        Szhatiyu podvergayutsya zagolovki  IP-paketov. VNIMANIE: no
        ne sami dannye! V standartnom IP-pakete IP-zagolovki so
        sluzhebnoj  informaciej  zanimayut  poryadka  40  bajt.  V
        CSLIP'e eti zagolovki uzhimayutsya do 3 bajt. Pri peresyl-
        ke bol'shogo chisla melkih paketov poluchaetsya  sushchestven-
        nyj vyigrysh v skorosti. Esli pakety krupnye, to vyigry-
        sha ne budet nikakogo.
PPP   - Point-to-Point Protocol
        Eshche odna,  sovremennaya realizaciya TCP "dlya bednyh". YAv-
        lyaetsya standartnym dlya SVR4. Bolee universalen.  Pozvo-
        lyaet takzhe  organizovat'  peredachu  po posledovatel'noj
        linii protokola IPX. Podderzhivaet rezhimy emulyacii  slip
        i cslip - dlya sovmestimosti.

     dlya podklyucheniya cherez Centronix-parallel'nyj port
PLIP  - Parallel  Line IP - nekotorye skazhut - ekzotika.
        Nichut'  ne  byvalo.  Ves'ma rasprostranennaya veshch'.  Vot
        kogda TCP/IP po SCSI-shine - eto da, eto - ekzotika.
        Kstati, RFC 1149 opisyvaet peredachu paketov IP golubinoj
        pochtoj.



Teoreticheskih   trudnostej   organizaciya   svyazi  TCP/IP  cherez
sputnikovuyu antennu net - vse vyglyadit takzhe, kak pri  modemnoj
svyazi  po  telefonu.  Tehnologiya  primerno sleduyushchaya: s antenny
vyhodit  vysokochastotnyj  signal,  signal  progonyaetsya   skvoz'
sputnikovyj  modem,  iz  modema vyhodit potok dannyh po formatu
High Speed Interface - zavesti  v  komp'yuter  ego  mozhno  cherez
skorostnoj  port,  naprimer  V.435  (logicheski  on  vedet  sebya
priblizitel'no kak obychnyj posledovatel'nyj port), i so storony
hosta  -  podnimaetsya protokol PPP. Estestvenno, na "tom konce"
predpolagaetsya ta zhe shema podklyucheniya.

+-------------------+	     +-----------------+           (
|     protokol  port| dannye |port  sputnikovyj| signal   ( ><
|Host   PPP    V.435|========|V.435 modem      | ~~~~~~    (
|    -TCP/IP->      |        |                 | ~~~~~~    /\
+-------------------+        +-----------------+        Antenna

Vmesto Hosta  so  skorostnym  portom,  modem mozhno podklyuchit' k
specializirovannomu ustrojstvu  -  "Routeru",  vnutri  kotorogo
"zashit" protokol TCP/IP (PPP, Ether), i imeyutsya porty Ethernet,
i High Speed Interface. Dostatochno populyarny  dlya  takih  celej
routery "Cisco router", "NetBlaser".

+-------------------+	     +-----------------+           (
|     protokol  port| dannye |port  sputnikovyj| signal   ( ><
|Router   PPP  V.435|========|V.435 modem      | ~~~~~~    (
|    -TCP/IP->      |        |                 | ~~~~~~    /\
+-------+-----------+        +-----------------+        Antenna
	|
 ... -Ethernet------ ...




Skorost' glavnym obrazom  zavisit ot tipa i kachestva linii svya-
zi, ispol'zuemyh modemov, i tipa  porta,  v  kotoryj etot modem
votknut.

Prakticheskie ogranicheniya na skorost':

Skorost' dannyh mezhdu modemami V32bis/V42 po gorodskomu telefo-
nu, ili mezhdugorodnej linii "Iskra" do 16800 bit/sek. Real'no ~
12000 bit/s.  Nalichie  vstroennogo  protokola V42 szhatiya dannyh
pozvolyaet podnyat' real'nuyu (zamerennuyu uzhe ne mezhdu modemami, a
mezhdu  portami)  skorost' peredachi neszhatyh dannyh v 2-4  raza,
t.e. do 38400-57600 bit/s

Maksimal'naya     skorost'     priema/peredachi     dannyh     na
posledovatel'nom  portu  RS-232  zavisit  ot  nalichiya  v   onom
mikroshem UART (Universal Asyncronous Receiver-Transmitter)

  16450  - 19200 bit/s.
  16550  - 19200 bit/s. (otsutstvie bukovki "A" - fatal'no)
  16550A - 38400 bit/s.
  16550A do 115200 bit/s. (Esli operacionnaya sistema "tyanet")
                      (v chastnosti - Solaris, Unixware  - net,
                       FreeBSD, Netblaser, Cisco router - da)

   V itoge real'naya skorost' peresylki dannyh:

Telefon/"Iskra",          V32bis/V42 - 19200  bit/s.
Vydelennaya 2-h provodka,  V32bis/V42 - 38400  bit/s.
Vydelennaya 4-h provodka,  RAID,????? - 115200 bit/s.
Fizicheskaya 4-h provodka<=4km,  ?????     do 1 Mbit/s.
Optovolokno            <=?km,  ?????     ?? 2 Mbit/s.
Antenna. Sputnikovyj modem. Port V.435. PPP 64, 128, 256 Kbit/s



Dlya  etogo  soedinyaem  dva  host'a  nul'modemnym  kabelem cherez
posledovatel'nye porty, i zapuskaem fonom  programmu  slattach,
perevodyashchuyu   porty    v    rezhim  peredachi  protokola  TCP/IP.
Estestvenno, chto SLIP nado zapuskat'  s  oboih  koncov,  prichem
"odinakovyj".

        SVR4, slip

slattach /dev/comport  NASH-IP-ADRES  IH-IP-ADRES 19200 &
  # perevodit port /dev/comport v rezhim "slip" na skorosti 19200
  # i ustanavlivaet IP-adres na slip-interfejs

        SVR4, cslip

slattach -c /dev/comport  NASH-IP-ADRES  IH-IP-ADRES 38400 &
  # perevodit port /dev/comport v rezhim "Compressed-slip"
  # na skorosti 38400
  # i ustanavlivaet IP-adres na C-slip-interfejs

slattach -e /dev/comport  NASH-IP-ADRES  IH-IP-ADRES 38400 &
  # perevodit port v rezhim slip ili cslip,
  # avtomaticheski opredelyaya, kakoj imenno protokol zapushchen
  # "na tom konce", i ustanavlivaet so svoej storony takoj zhe


        Linux, SLIP.


Teper' SLIP v Linux zaryazhaetsya komandoj DIP, s konfiguracionnym fajlom:
/usr/sbin/dip    config-file-name
---------------------------------------------------------------
# pryamoj konnekt nul'modemnym kabelem
main:
  get $local  193.232.171.22
  get $remote 193.232.171.19
  port /dev/modem
  speed 9600
  mode SLIP
  exit
---------------------------------------------------------------
# slip s telefonnoj dozvonkoj
---------------------------------------------------------------
       main:
         get $local   uwalt.hacktic.nl
         get $remote xs4all.hacktic.nl
         port /dev/modem
         speed 38400
         send ATQ0V1E1X4\r
         wait OK 2
         dial p555-1234
       login:
         sleep 2
         wait ogin: 20
         send MYLOGIN\n
         wait ssword: 20
         send MYPASSWD\n
         # We are now logged in.
         wait SOMETEXT 15
         get $mtu 296
         # Ensure "route add -net default xs4all.hacktic.nl" will be done
         default
         mode SLIP
---------------------------------------------------------------


  Na oboih koncah imet' simmetrichnye fajly i zapustit' dip'y

        Linux, CSLIP.

# sperva perevodim port v rezhim "cslip"
slattach -p cslip /dev/modem &
ifconfig cs0 NASH-IP-ADRES  pointopoint  IH-IP-ADRES
route add IH-IP-ADRES
route add default gw IH-IP-ADRES

        Linux, PLIP.

ifconfig plip1 NASH-IP-ADRES  pointopoint  IH-IP-ADRES
route add IH-IP-ADRES
route add default gw IH-IP-ADRES

        Ustanovka SLIP po telefonnoj linii cherez modem.

Nado zastavit' nash modem sozvonit'sya s "tem" modemom.
Posle  etogo my poluchaem prozrachnoe soedinenie mezhdu
posledovatel'nymi portami, po kotoromu i "podnimaem"
SLIP, sm. predydushchie punkty.

  ( stty 19200 ; echo atdp9120123 ) < /dev/modem > /dev/modem
  sleep 55

Vydaem na modem komandu atdp - nabrat' telefonnyj nomer, i zhdem
55 sekund. Nadeyus', modemam  hvatit etogo vremeni, chtoby  "snyu-
hat'sya".

        Vosstanovlenie svyazi v sluchae obryva.

Kak  uznat', chto svyaz' porvalas'? Ping'anut' "tot" konec linka.
Prezhde,  chem  nabirat'  modemom  nomer  dlya   novoj   dozvonki,
neobhodimo   "snyat'"  slip  s  nashego  posledovatel'nogo  porta
(poskol'ku   v   rezhime   slip   on   funkcioniruet   ne    kak
posledovatel'nyj  port, a kak kanal peredachi TCP/IP). Kak snyat'
slip? Kil'nut' slattach.

while true   # V vechnom cikle
do sleep 60  # Podozhdat' minutku

  if  ping 107.65.8.254 | grep 'is alive' ;
    then   echo Ok > /dev/null   # Esli IH-IP-ADRES otzyvaetsya
    else
         # Inache zarubaem slattach
         slip_pid=`ps -ef | grep slattach | cut -c1-6`
         kill -9 $slip_pid
         # nabiraem tamoshnij telefonnyj nomer
        (stty 19200; echo atdp9120123) < /dev/modem > /dev/modem
         sleep 55
         # podnimaem slattach
         slattach -e /dev/modem  195.8.2.3  107.65.8.254 19200 &
  fi
done





/etc/inet/ppphosts - perechislyaet ppp-hosty

     Pravila  dozvonki i soedineniya s etimi hostami opisyvayutsya
standartnymi opisaniyami iz UUCP

     Ubedit'sya,    chto    podderzhka    ppp    prisutstvuet    v
konfiguracionnom fajle /etc/strcf

     Ubedit'sya,    chto    pri zagruzke zapuskaetsya komanda slink

        Neposredstvennoe   ppp-soedinenie   aktiviziruetsya  pri
obrashchenii ("po trebovaniyu").

    Podrobnosti iskat' v

    man ppp
    man pppd
    man ppphosts



     Vse   delaetsya  komandoj  pppd.  V  komplekt  pppd  vhodit
komandochka chat,  v  argumentah  zhe  pppd  zadayutsya  IP-adresa,
telefonnye  nomera,  inicializaciya  modema,  chat-ovyj dialog s
mashinoj provajdera.

Primer: (Pochti iz zhizni) yavno zadaem nash IP=123.456.789.12

pppd connect 'chat -v ABORT "NO DIALTONE" ABORT BUSY "" ATZ OK \
              atdp9386933 Username: ppmoshkow Passwd: mypasswd mode ;' \
    crtscts defaultroute modem noipdefault -detach mru 1500 \
    123.456.789.12:194.85.105.1 /dev/modem 38400

Primer: vzyat' adresa zadannye serverom

pppd connect 'chat -v ABORT "NO DIALTONE" ABORT BUSY "" ATZ OK \
              atdp9386933 Username: ppmoshkow Passwd: mypasswd mode ;' \
    crtscts defaultroute modem noipdefault -detach mru 1500 \
    0.0.0.0: /dev/modem 38400



Postavit'  dopoolnitel'nyj  paket  iz MS Plus - "Network dialup
script editor"

Podklyuchit' cherez nego skript:
---------------------------------------------------------------
proc main

   waitfor "login:" until 5
   transmit $USERID, raw
   transmit "^M"

   waitfor "Password:"
   transmit "password^M"

   waitfor "modem" until 5
endproc
---------------------------------------------------------------

V  zvonil'noj forme vpisat' logname, password ne vpisyvat', ibo
vse ravno on zabyvaetsya pri kazhdom perezapuske.



Na rabochih stanciyah pod HP-UX/10.20 rodnogo ppp NET. Tol'ko slip.
Mozhno sftpit' free-varnyj paket iij-ppp
http://www.verinet.com/~barthold/ftp/iij-ppp0.94beta2.hpux10.tar.gz
Dokumentaciya po konfiguracii i installyacii prilagaetsya k paketu.

Na  serverah  i  rabochih stanciyah SLIP nazvan "ppl" i vklyuchen v
standartnyj paket "LAN/9000 Link" product.

Last-modified: Thu, 09 Jul 1998 12:44:55 GMT
Ocenite etot tekst: