You are on page 1of 8

STEK ZERNE BALANTI (DIAL ON DEMAND) stek zerine Balant, balant sunucusunun istemciden gelen istek zerine balant

kurmas; nceden saptanan bir zaman diliminde hibir veri ak olmamas durumunda da bu balanty kendiliinden koparmas esasna dayanmaktadr. Bu i iin yaygn olarak kullanlan 2 yazlm bulunmaktadr: 1- diald 2- pppd Birinci yntem, yani diald programnn kullanlmas halinde bile, pppd demon'u mutlaka kullanlmak zorundadr. Oysa pppd'nin yeni srmlerinde sadece bir parametre kullanlarak istek zerine balant kurmak olanakl hale gelmitir. Bu nedenle, yazmzda sadece pppd ile balant zerinde duracaz. Anlatacamz yntem, hem Slackware 4.0, hem de Slackware 7.0 zerinde almaktadr. Bu srmlerde /usr/sbin/ dizininde "pppsetup" isimli bir script bulunmaktadr. (RedHat'ta byle bir programck bulamadm. Dier datmlarda olup olmadn da henz bilmiyorum.) "pppsetup" scriptini altrmadan nce bilmemiz gereken baz ayrntlar var: 1- modemimizin bal olduu kap 2- Modemin hz 3- Internet Servis Salaycmzn telefon ve DNS numaralar 4- Balant ismi ve ifre "pppsetup" komutunu verdiimizde, nmze gelen ekrandan, scripti kimin yazdn ve srm numarasn reniyoruz: PPPSETUP 1.98 on Slackware Written by Robert S. Liesenfeld <xunil@bitstream.net> <IRC:Xunil> Changes for 1.98 by Kent Robotti <robotti@erols.com> Patched for Slackware by Patrick Volkerding <volkerdi@slackware.com> Enter tuu ile sonraki ekrana geiyoruz: PHONE NUMBER ... 0822 263 0010 Yeni sayfada modemimizin bal olduu kapy belirtiyoruz: ttyS3 = (COM4: under DOS) Modemin balant hzn veriyoruz( Burada 460800 baud ile 9600 baud arasnda 7 seenek var. Yanlarnda da ne tr balantlara uygun olduu belirtilmi.) Bizim kullandmz modemin hat hz 33600 baud. Bu nedenle balant hz olarak 115200 uygun: 115200 115KBps - 28.8, 33.6, or 56Kbps modem... Bu kez bize Servis Salaycmzn geri balant salayp salamad soruluyor: Does your service provider use CALLBACK? Yantmz olumsuz: NO Most Internet providers do not use callback MODEM INIT STRING ...

Kullandmz "zel" bir modem deil. Bu nedenle fabrika ndeerlerini kullanabiliriz: AT&FH0 Enter'le geiyoruz. Yeni sayfada Servis Salaycmzn domain ad soruluyor. What is your (I)nternet (S)ervice (P)rovider's domain name ? garanti.net.tr Bu kez Servis Salaycnn Ad Sunucusu'nun IP numaras (nameserver IP address) : 195.174.219.10 PAP, CHAP, or SCRIPT? ... Does your service provider use PAP or CHAP? PAP seiyoruz: PAP AUTHENTICATION PAP or CHAP LOGIN? ... xxxxxx Buraya, balant iin kullandnz kullanc adn yazn. PAP or CHAP PASSWORD? ... ????? Parolamz da buraya yazyoruz. ==================================================================== These are your PPP configuration files and instructions... ==================================================================== #This is your /etc/ppp/pppscript TIMEOUT 60 ABORT ERROR ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIALTONE" "" "AT&FH0" OK "0822 263 0010" TIMEOUT 75 CONNECT # This is your /etc/ppp/options file. .... lemler tamamland. Sistemimizi hemen kullanmaya balayabiliriz. Yine bir script kullanacaz: /usr/sbin/ppp-go Bu script ile hem dorudan, hem de istek zerine balant kurabiliriz:

ppp-go ppp-go -d lk komutu verirsek, hemen telefon numaras evrilir ve balant kurulmaya allr. -d parametreli komut ise, "istek zerine balant" ilevini tetikler. pppd demonu bellee yerletikten sonra, kullanclardan gelecek istekleri dinlemeye balar. lk istek sinyaliyle hemen telefon numaras evrilir ve balant kurulur. Bu durumda, ppp balants, /etc/ppp/options.demand dosyasnda bulunan "idle xx" satrnda belirlenen xx saniyelik bir sre boyunca hareketsiz kalrsa, telefon hatt koparlr ve yeniden dinlemeye geilir. Herey bu kadar! pppsetup scripti tarafndan oluturulan dosyalar /etc/ppp dizini altna yerleir. Yine burada yer alan pppsetup.txt isimli dosyada, oluturulan konfigrasyon dosyalarna ilikin aklayc bilgiler yer almaktadr. /etc/ppp/pppsetup.txt dosyasnn ierii aadadr. =========================================================================PPPSETU P 1.98 on SLACKWARE. Written by Robert S. Liesenfeld <xunil@bitstream.net> <IRC:Xunil> Changes for 1.98 by Kent Robotti <robotti@erols.com> Patched for Slackware by Patrick Volkerding <volkerdi@slackware.com> You should get these docs if you don't already have them: ftp://metalab.unc.edu/pub/Linux/docs/howto/PPP-HOWTO ftp://metalab.unc.edu/pub/Linux/docs/faqs/PPP-FAQ Press [Enter] to continue with pppsetup... ========================================================================= These are your PPP configuration files and instructions... ========================================================================= # This is your /etc/ppp/pppscript. TIMEOUT 60 ABORT ERROR ABORT BUSY ABORT "NO CARRIER" ABORT "NO DIALTONE" "" "AT&FH0" OK "0822 263 0010" TIMEOUT 75 CONNECT # This is your /etc/ppp/options file. # General configuration options for PPPD: lock defaultroute noipdefault modem

/dev/ttyS3 115200 crtscts # Uncomment the line below for more verbose error reporting: #debug # If you have a default route already, pppd may require the other side # to authenticate itself, which most ISPs will not do. To work around this, # uncomment the line below. Note that this may have negative side effects # on system security if you allow PPP dialins. See the docs in /usr/doc/ppp* # for more information. #noauth passive asyncmap 0 name "xxxxxx" I created the symbolic link: /dev/modem -> /dev/ttyS3 # This is your /etc/ppp/options.demand dialing file. # General configuration options for PPPD: lock defaultroute noipdefault modem /dev/ttyS3 115200 crtscts # Uncomment the line below for more verbose error reporting: #debug # If you have a default route already, pppd may require the other side # to authenticate itself, which most ISPs will not do. To work around this, # uncomment the line below. Note that this may have negative side effects # on system security if you allow PPP dialins. See the docs in /usr/doc/ppp* # for more information. #noauth passive asyncmap 0 name "xxxxxx" ipcp-accept-local ipcp-accept-remote 0.0.0.0:10.10.10.10 demand connect "/usr/sbin/chat -v -f /etc/ppp/pppscript" If you have a ethernet connection you should change the local:remote IP addresses in the options.demand file, to your actual local and remote address. Example: 215.346.117.89:312.217.187.96 # This in your /etc/resolv.conf file. search garanti.com.tr nameserver 195.174.219.10 195.174.219.10 <-IMPORTANT: This should be the IP address of your service providers nameserver.

# This is your /etc/ppp/pap-secrets file. Look at /etc/ppp/pap-secrets.

Does everything look correct? if not, run 'pppsetup' again... ========================================================================= To connect to your service provider. ========================================================================= ~# ppp-go <-Make PPP connection.)

You'll hear and see the modem dialing then once connected, logging you in Username: or Login: and Password: etc. You won't see a Username or Login: and Password: prompt if they're using PAP or CHAP to authenticate you. If they use PAP or CHAP you'll just see CONNECT -- got it. If the connection was successful you'll see the Local IP and Remote IP address printed to the screen, you can press [Enter]. If you run ppp-go in X windows you probably won't see a Local and Remote IP address printed to the screen, you'll just see the connection process come to a end, wait a few seconds and press [Enter] at that point. If you don't connect for whatever reason e.g. Failed No Dialtone, Busy, No Carrier, Whatever, Exit, just press [Enter] at that point. if you have syslogd running, you can see the output messages from pppd and chat in the /var/log/messages and or debug file. Sample /var/log/messages file. linax linax linax linax linax pppd[562]: pppd[562]: pppd[562]: pppd[562]: pppd[562]: Serial connection established. Using interface ppp0 Connect: ppp0 <--> /dev/modem local IP address 215.87.78.18 remote IP address 205.94.97.35

You don't have a successful PPP connection until you receive a local & remote IP address like above. If you have the X window system, you could connect in a Xterm. linax # startx linax # ppp-go linax # netscape mosaic etc. ~# ppp-off ~# ppp-go -h <-To end the ppp connection.) <-For help.)

There is no support in linux for "WinModems", if you have a WinModem you will not be able to use it in linux. There is support for plug n play modems, if you have a pnp modem you may need "isapnptools" to get it recognized. ========================================================================= #### Look at the /usr/doc/pppsetup/pppsetup-1.98.README. ####

#### A copy of this text can be found in: /etc/ppp/pppsetup.txt #### ========================================================================= Done... You can exit now... End... ========================================================================= PPP-2.3.0 and later has a demand dialing option, you can use it this way, the options file for demand dialing will be /etc/ppp/options.demand. Start ppp-go -d, pppd will just stay in the background until you try to connect to some site, then pppd will dial your service provider and make the ppp connection. ~# ppp-go -d # ~# # # # <-Start pppd this way for demand dialing.) <-It should drop you back to #.)

ftp ftp.funet.fi <-Pppd will start dialing.) lynx http://www.foo.com <-Pppd will start dialing etc.) ppp-off -d <-To end and restart pppd in demand dialing mode.) ppp-off <-To end the ppp connection.)

End... ========================================================================= These are some other ways to make a PPP connection. The best way to make a PPP connection is to create a chat script, if you're having trouble with the chat script you can use these methods below to make the PPP connection. You can also use these methods below to see what's going on when you connect to your service provider, i.e. what do they require, do they present you with a Login: or Username: and Password: prompt etc. What steps do you have to go through before they start PPP at there end? First make sure the IP address of your service providers nameserver is in the /etc/resolv.conf file. nameserver 205.117.312.56 <-For example.)

========================================================================= Using 'dip' to make the PPP connection. ========================================================================= ~# dip -tv Host name lookup failure If you get the above messgae when you start 'dip', it's because you don't have your hostname in the /etc/hosts file. ~# hostname foobar If your hostname were 'foobar' you should put it in the /etc/hosts file. 127.0.0.1 0.0.0.0 localhost foobar.localnet foobar

~# dip -tv dip> port /dev/ttyS1 can't open - problems with locking ttyS1 If you get the above message after "port /dev/modem", it means you have a lock file in /var/lock/LCK..ttyS1, remove the lock file and kill dip. ~# rm /var/lock/LCK* # killall -9 dip ~# dip -tv dip> port /dev/ttyS1 dip> speed 115200 dip> term at&fw2 atdt1234567 <-Where's the modem? ttyS0 = com1 ttyS1 = com2 etc.) <-Modem speed: 19200 38400 57600 <-Modem init string.) <-Replace 1234567 with the phone number.)

Usally you give your username and password then ppp is started, if they use PAP or CHAP you probably won't be asked for a username and password, they will just say that PPP has been started or nothing. Press Ctrl ] to exit dip term mode when PPP is started at their end. dip> default dip> mode ppp ~# ping metalab.unc.edu ~# dip -k <-Use default route.) <-Start PPP at your end.) <-To see if you're connected.) <-To kill dip and the PPP connection.)

========================================================================= Using 'minicom' to make the PPP connection. ========================================================================= Keep the /etc/ppp/options file that was created by pppsetup, it should have at least these options in it. lock defaultroute noipdefault /dev/ttyS1 57600 modem crtscts debug asyncmap 0 ~# minicom -m -s at&fw2 atdt1234567 Press Alt Q to exit minicom without reset after PPP is started at the other end. ~# pppd <-Start PPP at your end.)

<- ttyS0 = com1 ttyS1 = com2 ttyS2 = com3 ttyS3 = com4

~# ppp-off # killall -INT pppd

<-To end the PPP connection.) <-If you don't have 'ppp-off' end it this way.)

End... ========================================================================= Son olarak, ppp-go ile kurulan balanty devre d brakmak istediimizde kullanacamz scripti de belirtelim: ppp-off. Balantnn gerekleip gereklemediinden emin olmak istiyorsanz aadaki komutu seveceksiniz: tail -f /var/adm/messages & Hepsi bukadar! Umarm bir-iki sorunuzu yantlammdr! Ahmet Aksoy 19991214 neri ve eletirileriniz iin ltfen ahmetax@linux.org.tr adresini kullannz.

You might also like