Redhat ¹Ì·¯»çÀÌÆ®ÀÎ º¸¶ó³Ý¿¡¼ ¹Þ½À´Ï´Ù.
ftp://ftp.bora.net/pub/Linux/redhat-contrib/libc6/i386/ ¿¡¼
diald16-0.16.5a-2.i386.rpm
diald16-config-0.16.5a-2.i386.rpm
ÈÀÏÀ» ´Ù¿î·Îµå ¹Þ½À´Ï´Ù.
[kskim@ja kskim]$ ncftp ftp.bora.net [Enter]
bora> cd /pub/Linux/redhat-contrib/libc6/i386/ [Enter]
bora> mget diald16* [Enter] <---- ÀÌ·¯¸é ¹Þ±â ½ÃÀÛÇÕ´Ï´Ù.
bora> bye {Enter] <---- ¸ðµÎ ¹Þ°í³ª¸é Á¾·áÇÕ´Ï´Ù.
[kskim@ja kskim]$ ls -l [Enter]
total 19431
-rw-r--r-- 1 kskim kskim 159038 Mar 28 20:53 diald16-0.16.5a-2.i386.rpm
-rw-r--r-- 1 kskim kskim 6233 Mar 28 20:54 diald16-config-0.16.5a-2.i386.rpm
ÀÌÁ¦ ¹Þ¾ÆÁ® ÀÖ´Â °ÍÀ» È®ÀÎÇÒ¼ö ÀÖ½À´Ï´Ù.
root °èÁ¤À¸·Î ¼³Ä¡ ÇÏ¼Å¾ß ÇÕ´Ï´Ù.
[kskim@ja kskim]$ su [Enter]
Password: <--- root Æнº¿öµåÀÔ·ÂÈÄ [¿£ÅÍ]
[root@ja kskim]# rpm -Uvh diald16* [Enter]
ÇÏ½Ã¸é ¼³Ä¡°¡ µÇ¾ú½À´Ï´Ù.
[root@ja kskim]# cd /etc/diald [Enter]
[root@ja diald]# ls -l [Enter] <--- È®ÀÎÇØ º¸¸é
total 14
-rwx------ 1 root root 3414 Apr 20 12:38 connect*
-rw-r--r-- 1 root root 1342 May 3 09:50 diald.conf
prw-rw---- 1 root wheel 0 May 3 11:46 diald.ctl|
-rw-r--r-- 1 root root 1235 Mar 28 13:51 diald.defs
-rw-r--r-- 1 root root 5905 May 3 09:56 phone.filter
±×¸®°í ³ª¼ diald.conf¸¦ /etc µð·º·Î¸®¿¡ ½Éº¼¸¯¸µÅ© ½Ãŵ´Ï´Ù.
[root@ja diald]# cd /etc [Enter]
[root@ja etc]# ln -s /etc/diald/diald.conf /etc/diald.conf [Enter]
±×·¯¸é conf ÈÀϱîÁö ³¡.
/etc/diald.conf ÈÀÏÀ» ¼öÁ¤ÇÕ´Ï´Ù.
#
# diald.conf for anathoth
#
# Select the demand dial rules you want
# Bring the link up for anything, timeout in seconds. Use this for
# when the dompute has its own phone line
accept any 420 any <---- À̺κÐÀ» '#'·Î ¸·½À´Ï´Ù.
#accept any 420 any <---- ÀÌ·¸°Ô..
# Use the filter file that comes with diald. This can be a bit drastic,
# so use the filter below
# include /usr/lib/diald/standard.filter
# or use the filter that brings the link up for use on a line shared with
# a phone
# include /etc/diald/phone.filter <---- À̺κÐÀ» '#'¸¦ Áö¿ó´Ï´Ù.
include /etc/diald/phone.filter <---- ÀÌ·¸°Ô...
# stuff to set up the diald connection
#device /dev/modem <--- À̺κÐÀ» Àڽſ¡°Ô ¸Â°Ô ¹Ù²ß´Ï´Ù.
device /dev/ttyS1 <--- ÀÌ·¸°Ô.. (ÀÚ½ÅÀÇ ISDN TA³ª ¸ðµ© ¿¬°áÆ÷Æ® ¿©±â¼´Â Com2)
speed 115200 <--- TA³ª ¸ðµ©ÀÇ ¼Óµµ ¿©±â¼´Â 115200bps
lock
mode ppp
# We may get another terminal server, thus use
# 'dynamic' and do not tell PPP the IP number of the other end
# For use with gated, comment out the 'dynamic' option, and
# set remote to be the same as local
dynamic
local 10.0.0.1
remote 10.0.0.2
# pppd-options name anappp : <---- À̺κÐÀ»
pppd-options asyncmap 00000000 name bs0600 : <---- ÀÌ·¸°Ô... ......
ÀÚ½ÅÀÌ °¡ÀÔÇÑ ISPÀÇ Á¢¼Ó ID(°èÁ¤)
# Delay sending packets for 5 seconds after PPP device opens -
# this allows routes to be established back to the appropriate dialup server.
up-delay 5
defaultroute
modem
crtscts
connect /etc/diald/connect
redial-timeout 10
fifo /etc/diald/diald.ctl
# restrict 9:00:00 17:45:00 1 * *
# or-restrict 9:00:00 17:45:00 2 * *
# or-restrict 9:00:00 17:45:00 3 * *
# or-restrict 9:00:00 17:45:00 4 * *
# or-restrict 9:00:00 17:45:00 5 * *
# up
device ¼³Á¤½Ã »ç¿ëÇÏ´Â ½Ã¸®¾óÆ÷Æ® ¼³Á¤Àº ´ÙÀ½°ú °°½À´Ï´Ù.
com1 ---> /dev/ttyS0
com2 ---> /dev/ttyS1
com3 ---> /dev/ttyS2
com4 ---> /dev/ttyS3
ÀÚ¼¼ÇÑ ³»¿ëÀº Serial-HOWTO¹®¼¸¦ Âü°íÇϽʽÿÀ.
±×¸®°í ¼öÁ¤ÇÒ ÈÀÏÀº /etc/diald/connect ÀÔ´Ï´Ù.
#!/bin/sh
# Copyright (c) 1996, Eric Schenk.
#
--- Áß°£ »ý·« ---
# The initialization string for your modem
#MODEM_INIT="ATZ&C1&D2%C0" <---- À̺κÐÀ» Àڽſ¡°Ô ¸Â°Ô ¹Ù²ß´Ï´Ù. ¸ðµ©ÃʱâÈ ¸í·É
MODEM_INIT="ATB40&J3" <---- ÀÌ·¸°Ô.. (ÀÌ°ÍÀº ISDN TAÀÇ MLPPP Á¦¾î¸í·É)
# The phone number to dial
#PHONE_NUMBER="999111999" <---- À̺κÐÀ»
PHONE_NUMBER="01414" <---- ÀÌ·¸°Ô ... (ÀÌ°ÍÀº ÄÚ³ÝISDNÁ¢¼Ó¹øÈ£)
--- Áß°£ »ý·« ---
# Success!
message "Protocol started"
ISDNÀ¸·Î ÀÎÅͳݿ¡ 128KÁ¢¼ÓÀ» ÇÏ·Á¸é ISDN TA°¡ MultiLink PPP ¸ðµå·Î ¼³Á¤µÇ¾î¾ß ÇÕ´Ï´Ù. ISDN ¿ÜÀåTAÀÇ MultiLink PPP Á¦¾î¸í·ÉÀº ´Ü¸»±âÁ¦Á¶È¸»ç¸¶´Ù Ʋ¸³´Ï´Ù. ¿©±â¼´Â ´ºÅØÀÇ ``¿È´Ï''¸ðµ¨ Ãʱâȸí·ÉÀÔ´Ï´Ù. Á¢¼ÓÀüȹøÈ£´Â ISP(ÀÎÅͳݰ¡ÀÔ¾÷ü)¸¶´Ù Ʋ¸³´Ï´Ù. ¿©±â¼´Â ÄÚ³ÝÀÇ Á¢¼Ó¹øÈ£¸¦ Àû¾ú½À´Ï´Ù.
¸ðµ©À¸·Î ¿¬°á½Ã¿¡´Â Ãʱâȸí·É¿¡ 'ATZ'¶ó°í ÀûÀ¸½Ã¸é ¹«¸®°¡ ¾ø½À´Ï´Ù.
±×¸®°í ISP Á¢¼ÓÀ» À§ÇÑ Passwd¼³Á¤À» ÇØ¾ß ÇÕ´Ï´Ù.
ÀÎÅͳÝÁ¢¼ÓÀÌ °¡´ÉÇÏ´Ù¸é À̺κÐÀº ¹ú½á ¼³Á¤ÀÌ µÇ¾î ÀÖÀ» ¼öµµ ÀÖ½À´Ï´Ù. ¸¸¾à ¼³Á¤ÀÌ ¾ÈµÇ¾îÀÖ´Ù¸é ¼³Á¤À» ÇÕ´Ï´Ù.
ISDNÀ¸·Î ISP·Î ¿¬°áÇϰųª À©µµ¿ì95·Î ¿¬°á½Ã »ç¿ëÇÏ´Â ¹æ½ÄÀÌ PAP ÀÎÁõ ¹æ½ÄÀÔ´Ï´Ù.
¼öÁ¤ÇÒ ÈÀÏÀº
/etc/ppp/pap-secrets - Passwd¸¦ ¼³Á¤ÇÏ´Â ÈÀÏ ÀÔ´Ï´Ù.
ÀÔ´Ï´Ù.
/etc/ppp/pap-secrets ÈÀÏ ³»¿ëÀÔ´Ï´Ù.
# Secrets for authentication using PAP
# client server secret IP addresses
bs0600 * 1234 - ÀÌ·±½ÄÀ¸·Î Àû¾îÁÖ¸é µË´Ï´Ù.
jungang * 1234 - ´Ù¸¥ °èÁ¤ÀÌ ¶Ç ÀÖ´Ù¸é...
jungang ppp0 1234
jungang ppp1 1234
ID°¡ bs0600 Æнº¿öµå°¡ 1234¶ó¸é À§¿Í °°ÀÌ Àû¾îÁÝ´Ï´Ù. ±×·¯¸é Çѹø È®ÀÎÇØ º¸°Ú½À´Ï´Ù.
[kskim@ja ppp]# ls -l
total 5
-rw------- 1 root daemon 78 Jun 8 1998 chap-secrets
-rwxr-xr-x 1 root root 265 Oct 16 1998 ip-down*
-rwxr-xr-x 1 root root 349 Oct 16 1998 ip-up*
-rw-r--r-- 1 root daemon 5 Jun 8 1998 options
-rw------- 1 root daemon 300 Apr 16 10:13 pap-secrets <---- ÀÌÈÀÏÀÌ ¼öÁ¤µÇ¾ú½À´Ï´Ù.
±×¸®°í ÀÎÅͳÝÀ» ¿Ã¹Ù·Î È°¿ëÇÏ·Á¸é DNS (µµ¸ÞÀγ×ÀÓ¼¹ö) ¼³Á¤À» ÇØ¾ß ÇÕ´Ï´Ù. µµ¸ÞÀÎ ÁÖ¼Ò ¿¹¸¦ µéÀÚ¸é soback.kornet.netÀ» 168.126.3.3 ¶ó´Â IPÁÖ¼Ò·Î ¹ø¿ªÀ» ÇØÁÖ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù.
¼öÁ¤ÇÒ ÈÀÏÀº /etc/resolv.conf
search kt.co.kr co.kr com <---- µÞºÎºÐÀ» »ý·«ÇßÀ» ¶§ ã¾Æº¸´Â µµ¸ÞÀÎ
nameserver 127.0.0.1 <---- ¸®´ª½º¹Ú½º¿¡¼ ÀÚü ³×ÀÓ¼¹ö¸¦ ¿î¿µÇÒ °æ¿ì
nameserver 168.126.63.1 <---- »ç¿ëÇÏ´Â ISPÀÇ DNSÁÖ¼Ò ¿©±â¼´Â ÄÚ³ÝÀÇ °æ¿ì
nameserver 168.126.63.2 <---- »ç¿ëÇÏ´Â ISPÀÇ º¸Á¶DNSÁÖ¼Ò
¸®´ª½º ¹Ú½º¿¡¼ DNS µ¥¸óÀ» ¶ç¿ìÁö ¾Ê´Â´Ù¸é 127.0.0.1 À» ÀûÁö ¸¶¼¼¿ä. ±×¸®°í ¿©±â¼ DNSÁÖ¼Ò´Â ÀÎÅͳݼºñ½º¸¦ ¹Þ´Â ISP·Î ¹®ÀÇÇÏ½Ã¸é ¾Ë¼ö ÀÖ½À´Ï´Ù.
ÇÊ¿äÇϽźÐÀº ¼öÁ¤ÇϽñ⠹ٶø´Ï´Ù. ÀÌÈÀÏÀº ``ƯÁ¤ ÆÐŶ»ç¿ëÈÄ ¾ó¸¶ÀÇ ½Ã°£ÀÌ °æ°úÇÑ ÈÄ Á¢¼ÓÀ» ²÷À» °ÍÀΰ¡?'' ¸¦ ¼³Á¤ÇÏ´Â ¿ªÇÒÀ» ÇÕ´Ï´Ù. ´ÜÀ§´Â ÃÊ ÀÔ´Ï´Ù.
À̺κÐÀº Àúµµ Á¤È®È÷ ¸ð¸£°Ú½À´Ï´Ù. /usr/doc/diald16-0.16.5a/ ¾È¿¡ ¼³¸íÀÌ ÀÖÀ¸´Ï ÂüÁ¶ÇϽñ⠹ٶø´Ï´Ù.
¼öÁ¤ÇÒ ÈÀÏÀº /etc/diald/phone.filter ÀÔ´Ï´Ù.
# This is a pretty complicated set of filter rules.
# (These are the rules I use myself.)
#
--- Áß°£»ý·« ---
# NOTE: Your /etc/services may not define the tcp service www, in which
# case you should comment out the following two lines or get a more
# up to date /etc/services file. See the FAQ for information on obtaining
# a new /etc/services file.
accept tcp 240 tcp.dest=tcp.www <--- À¥»ç¿ë½Ã »ç¿ëÀÌ ³¡³ ÈÄ 240ÃÊ°¡
accept tcp 240 tcp.source=tcp.www °æ°úÇϸé Àüȸ¦ ²÷½À´Ï´Ù.
# Once the link is no longer live, we try to shut down the connection
# quickly. Note that if the link is already down, a state change
# will not bring it back up.
keepup tcp 5 !tcp.live
ignore tcp !tcp.live
# an ftp-data or ftp connection can be expected to show reasonably frequent
# traffic.
accept tcp 240 tcp.dest=tcp.ftp <--- FTP»ç¿ëÈÄ 240ÃÊ°¡ °æ°úÇϸé Á¢¼ÓÀ» ²÷½À´Ï´Ù.
accept tcp 240 tcp.source=tcp.ftp
--- Áß°£»ý·« ---
# If we don't catch it above, give the link 10 minutes up time.
# accept tcp 600 any
accept tcp 300 any <--- 10ºÐÀÌ ±æ¾î¼ 5ºÐÀ¸·Î ¹Ù²å½À´Ï´Ù.
--- Áß°£»ý·« ---
# Anything else gest 2 minutes.
accept udp 120 any
# Catch any packets that we didn't catch above and give the connection
# 30 seconds of live time.
accept any 30 any <--- Á¤ÀǵÇÁö ¾ÊÀº °ÍµéÀº 2ºÐÈÄ Á¢¼ÓÀ» ²÷½À´Ï´Ù.
ÀÌÁ¦ Diald¸¦ ½ÇÇàÇÕ´Ï´Ù.
[root@ja diald]# /etc/rc.d/init.d/diald start [Enter]
Diald Á¾·á´Â
[root@ja diald]# /etc/rc.d/init.d/diald stop [Enter]
Ä¡½Ã¸é µË´Ï´Ù. ½ÇÇàÈÄ Á¦´ë·Î ¿¬°áµÇ¾ú´ÂÁö Ping Test¸¦ Çغ¾´Ï´Ù.
[kskim@ja kskim]$ping home.hitel.net [Enter] ÈÄ Á¶±Ý ±â´Ù¸®¼¼¿ä
PING home.hitel.net (203.245.15.254): 56 data bytes
64 bytes from 203.245.15.254: icmp_seq=0 ttl=249 time=117.7 ms
64 bytes from 203.245.15.254: icmp_seq=1 ttl=249 time=60.1 ms
64 bytes from 203.245.15.254: icmp_seq=2 ttl=249 time=60.1 ms
64 bytes from 203.245.15.254: icmp_seq=3 ttl=249 time=60.1 ms
64 bytes from 203.245.15.254: icmp_seq=4 ttl=249 time=60.1 ms
64 bytes from 203.245.15.254: icmp_seq=5 ttl=249 time=60.1 ms
64 bytes from 203.245.15.254: icmp_seq=6 ttl=249 time=60.1 ms
64 bytes from 203.245.15.254: icmp_seq=7 ttl=249 time=70.1 ms
--- home.hitel.net ping statistics ---
8 packets transmitted, 8 packets received, 0% packet loss
round-trip min/avg/max = 60.1/68.5/117.7 ms
ÀüÈ°¡ °É·Á°¡°í À§¿Í °°ÀÌ Àß µ¿ÀÛ ÇÕ´Ï´Ù. ½ÇÇàµÇ¾ú´ÂÁö´Â ¾Æ·¡ ¸í·ÉÀ¸·Î È®Àΰ¡´ÉÇÕ´Ï´Ù.
[kskim@ja kskim]$/sbin/ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:7329 errors:0 dropped:0 overruns:0 frame:0
TX packets:7329 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
eth0 Link encap:Ethernet HWaddr 00:60:97:5B:1A:BD
inet addr:168.248.138.150 Bcast:168.248.138.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:168416 errors:4 dropped:0 overruns:0 frame:7
TX packets:202300 errors:0 dropped:0 overruns:0 carrier:201
collisions:2479
Interrupt:10 Base address:0x6400
sl0 Link encap:Serial Line IP <---- ½ÇÇàµÈ°ÍÀ» ³ªÅ¸³À´Ï´Ù. °¡»ó µð¹ÙÀ̽ºÀÔ´Ï´Ù.
inet addr:10.0.0.1 P-t-P:10.0.0.2 Mask:255.0.0.0
UP POINTOPOINT RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
ppp0 Link encap:Point-to-Point Protocol <--- Áö±Ý ÀüÈ°¡ °É¸° »óÅÂÀÔ´Ï´Ù.
inet addr:168.126.43.10 P-t-P:168.126.43.2 Mask:255.255.0.0
UP POINTOPOINT RUNNING MTU:1500 Metric:1
RX packets:1204 errors:0 dropped:0 overruns:0 frame:0
TX packets:1382 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
Memory:2bd9038-2bd9c04
[kskim@ja kskim]$/sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.2 * 255.255.255.255 UH 1 0 0 sl0<p>
168.126.43.2 * 255.255.255.255 UH 0 0 0 ppp0
168.248.138.0 * 255.255.255.0 U 0 0 314 eth0
127.0.0.0 * 255.0.0.0 U 0 0 28 lo
default * 0.0.0.0 U 0 0 35 ppp0 <--- ISP¿¡ Á¢¼ÓµÊ
default * 0.0.0.0 U 1 0 80 sl0 <--- °¡»ó µð¹ÙÀ̽º