>> Edit article
이름
제목
패스워드
: 레드햇 알짜 리눅스 6.1에서의 한국통신 ADSL과 IP MASQUERADING을 통한 내부공유방법 : : Linux KT-ADSL Setup User Guide Ver.0.0.1. 2000.07.17. : : OS : ALZZA 6.1 / 2.2.12-20kr : : ## 시스템 구성 : : ┏ WINDOWS박스1 : 전화국 --- ADSL 외장형모뎀 --- [eth0]리눅스박스[eth1] --- 허브 ╋ WINDOWS박스2 : ┗ WINDOWS박스3 : : ### 설치개요 : 위 사항을 만들려고 합니다. 우선은 eth0에서 인터넷이 되는것만 해볼랍니 다. : : ### 설치파일준비 : [root@laneiges /temp]# ll : total 30547 : drwxr-xr-x 2 root root 1024 Jul 18 23:45 ./ : drwxr-xr-x 18 root root 1024 Jul 18 07:14 ../ : -rw-r--r-- 1 root root 15079540 Jul 18 23:41 linux- 2.2.13.tar.gz : -rw-r--r-- 1 root root 51821 Jul 18 23:45 pppoed0.4.tgz : [root@laneiges /temp]# : : : : ### 커널 소스 풀기 : [root@laneiges /temp]# cp linux-2.2.13.tar.gz /usr/src/ : [root@laneiges /temp]# cd /usr/src/ : [root@laneiges /usr/src]# ll : total 30332 : drwxr-xr-x 4 root root 4096 Jul 18 23:56 ./ : drwxr-xr-x 21 root root 4096 Jul 18 14:20 ../ : lrwxrwxrwx 1 root root 12 Jul 18 21:04 linux -> linux-2.2.14/ : -rw-r--r-- 1 root root 15079540 Jul 18 23:56 linux- 2.2.13.tar.gz : drwxr-xr-x 15 1046 xfs 4096 Jul 18 22:31 linux-2.2.14/ : -rw-r--r-- 1 root root 15918652 Jul 18 21:04 linux- 2.2.14.tar.gz : drwxr-xr-x 7 root root 4096 Jul 18 14:24 redhat/ : [root@laneiges /usr/src]# rm -f linux : [root@laneiges /usr/src]# mkdir linux-2.2.13 : [root@laneiges /usr/src]# ln -snf linux-2.2.13 linux : [root@laneiges /usr/src]# tar xvzf linux-2.2.13.tar.gz : [root@laneiges /usr/src]# cd /usr/include : [root@laneiges /usr/include]# ll asm linux scsi : [root@laneiges /usr/include]# rm -rf asm linux scsi : [root@laneiges /usr/include]# ln -s /usr/src/linux/include/asm-i386 asm : [root@laneiges /usr/include]# ln -s /usr/src/linux/include/linux linux : [root@laneiges /usr/include]# ln -s /usr/src/linux/include/scsi scsi : [root@laneiges /usr/include]# cd /temp : : : : ### PPPoE 커널에 패치 : [root@laneiges /temp]# cp pppoed0.4.tgz /usr/local/ : [root@laneiges /temp]# cd /usr/local/ : [root@laneiges /usr/local]# tar xzvf pppoed0.4.tgz : [root@laneiges /usr/local]# cd /usr/src/linux/ : [root@laneiges /usr/src/linux]# zcat /usr/local/pppoed-0.4/2213- pppox.gz | patch -b -p1 : : : : ### 커널 컴파일 : [root@laneiges /usr/src/linux]# make mrproper : [root@laneiges /usr/src/linux]# make xconfig : : ### 커널 컴파일 옵션 : #pppoed를 사용하기 위해선 아래의 옵션들을 반드시 켜야 합니다.(Y,Yes) : Network Device support : Y "Network device support" : Y "tty support for ppp over X" : : #IP Masquerading으로 내부 공유를 하기 위해서는 아래의 옵션들을 반드 시 켜야 합니다.(Y,Yes) : Code Maturity options : Y "Prompt for development and/or incomplete code/drivers" : : Loadable module support : Y "Enable loadable module" : : General Setup : Y "Networking Suppoort" : : Networking options : Y "Network firewalls" : Y "TCP/IP Networking" : Y "IP: firewalling" : Y "IP: masquerading" : Y "IP: ICMP masquerading" : Y "IP: masquerading special modules suppport" : M "IP: ipautofw masquerade support" : M "IP: ipportfw masq support" : M "IP: ip fwmark masq-forwarding support" : : Network device support : Y "Network device support" : M "Dummy net driver support" : M "PPP (point to point) support" : : Ethernet (10 or 100Mbit) : M "RealTek 8129/8139 (not 8019/8029!) support" : M "PCI NE2000 support" <========매우 중요 : : 그외 적당한 옵션으로 자신의 시스템에 맞게 설정한 후 저장하고 나온다. : 계속진행된다 : : : : ### 커널 컴파일 실행 : [root@laneiges /usr/src/linux]# make dep : [root@laneiges /usr/src/linux]# make clean : [root@laneiges /usr/src/linux]# make bzImage : [root@laneiges /usr/src/linux]# cd arch/i386/boot : : : : ### 커널설치 : [root@laneiges /usr/src/linux/arch/i386/boot]# cp bzImage /boot/vmlinuz-2.2.13 : [root@laneiges /usr/src/linux/arch/i386/boot]# cp /usr/src/linux/System.map /boot/System.map-2.2.13 : [root@laneiges /usr/src/linux/arch/i386/boot]# cd /boot : [root@laneiges /boot]# rm -rf System.map : [root@laneiges /boot]# ln -s System.map-2.2.13 System.map : [root@laneiges /boot]# vi /etc/rc.d/init.d/syslog : daemon klogd -> daemon klogd - k /boot/System.map-'uname -r' : [root@laneiges /boot]# cd /usr/src/linux : : : : ### 모듈설치 : [root@laneiges /usr/src/linux]# make modules : [root@laneiges /usr/src/linux]# make modules_install : [root@laneiges /usr/src/linux]# depmod -a : [root@laneiges /usr/src/linux]# cd /etc : : ### lilo 설정 : [root@laneiges /etc]# vi lilo.conf : boot=/dev/hda : map=/boot/map : install=/boot/boot.b : prompt : timeout=50 : default=linux : : image=/boot/vmlinuz-2.2.12-20kr : label=linux : initrd=/boot/initrd-2.2.12-20kr.img : read-only : root=/dev/hda7 : image=/boot/vmlinuz-2.2.13 : label=linux13 : read-only : root=/dev/hda7 : : [root@laneiges /etc]# lilo : Added linux * : Added linux13 : : : ### PPPoed를 컴파일하는 절차이다. : [root@laneiges /etc]# cd /usr/local/pppoed-0.4/ : [root@laneiges /usr/local/pppoed-0.4]# make realclean : [root@laneiges /usr/local/pppoed-0.4]# make dev : [root@laneiges /usr/local/pppoed-0.4]# make depend : [root@laneiges /usr/local/pppoed-0.4]# make : [root@laneiges /usr/local/pppoed-0.4]# make install : : : : ### 새 커널로 부팅 -> 순서가 바뀌어야 될 수도 있음... : [root@laneiges /usr/local/pppoed-0.4]# reboot : lilo: linux13 : : : ### IP 설정 -> 이부분은 아무것도 하지 않았다. 그냥 내부에서 쓰는 ip 로 놔두었다. : ifconfig your ethernet device. It is not necessary you give it ip address 0.0.0.0 : (but it may be good practise). : Just make sure you dont have the default route set since PPPOE will give you one. : : ### 요구사항 : 레드햇 6.0이상에서는 pppd의 버전 2.3.7이상 요구 하지만 2.3.10이 설치 되어있음... : : : : ### PPPoE 환경설정 1 : [root@laneiges ~]# vi /etc/ppp/options : lock : local : nocrtscts : noauth : #be careful with mtu/mru if you are masquareding. : # Look at Kal Lin's page at http://www.cs.toronto.edu/~kal/hse/resource.html : mru 1490 : mtu 1490 : #please make sure you have noaccomp for now : noaccomp : #the construct below is needed by sympatico : name "********" // 보안상 *로 표시 : #you might want to change defaultroute if you have more : #than one pppoe session : defaultroute : hide-password : sync : #it might be a good idea to uncoment the debug below : #debug : #kdebug 7 : #if you use the -R option to make it persistent : #then uncomment the next two lines below : #lcp-echo-interval 240 : #lcp-echo-failure 3 : #nodetach : #add anything else you need as well : : : : ### PPPoE 환경설정 2 : [root@laneiges ~]# vi /etc/ppp/pap-secrets : # Secrets for authentication using PAP : # client server secret IP addresses : ******** * ***** // 보안상 : [root@laneiges /usr/local/pppoed-0.4]# chmod 600 /etc/ppp/pap-secrets : : : ### PPPoE 실행 : [root@laneiges ~]# cd /usr/sbin/pppoed : [root@laneiges /usr/sbin/pppoed]# ./pppoed : or : [root@laneiges /usr/sbin/pppoed]# ./pppoed -I eth0 // l은 i의 대문자 : : : ### 메세지 나오고 접속은 안됨 : : : ### vi /usr/local/pppoed-0.4/pppoed.c : 이렇게 해도 안되면 pppoed.c를 살짝 손보아서 다시 시도해 보십시오. : #define DISC_DEB2 1 <-- 이 줄 앞뒤의 주석 표시 (/*, */)를 지우고서, : make clean : make : make install : : [root@laneiges /usr/sbin/pppoed]# ./pppoed -I eth0 : ### 메세지 나옴 : Total retries to go 0 : Sending PADI : : send_packet: ifn eth0 : : Ethernet header: : h_dest: ff:ff:ff:ff:ff:ff: : h_source: 00 aa 00 6d a2 fa : h_proto: 0x8863 (PPPoE Discovery) : PPPoE header: : ver: 0x1 type: 0x1 code: 0x09 session: 0x0000 length: 0x0004 (PADI) : PPPoE tag: : type: 0101 length: 0000 (Service name) : : waiting for PADO : PADO received! : : Ethernet header: : h_dest: 00 aa 00 6d a2 fa : h_source: 00 90 39 c5 40 3d : h_proto: 0x8863 (PPPOE Discovery) : PPPoE header: : ver: 0x1 type: 0x1 code: 0x07 session: 0x0000 length: 0x0011 (PADO) : PPPoE tag: : type: 0101 length: 0000 (Service name) : PPPoE tag: : type: 0102 length: 0009 (AC name) : data (UTF-8): kangseo-1 : ^^^^^^^^^^^^^^^^^^^^^^^ <- 이거 나오면 접속된거 아닌가? : Scanning for Service Name : scan_tag: tag 0x804cd24 length 0 tag->type 101 : scan-tag data (bin) : Found it! : : Scanning for AC Name : scan_tag: tag 0x804cd28 length 0 tag->type 101 : scan-tag data (bin) : scan_tag: not matched! : scan_tag: tag 0x804cd28 length 9 tag->type 102 : scan-tag data (bin): 6b616e6773656f2d31 : Found it! : : Scanning for AC cookies : scan_tag: tag 0x804cd24 length 0 tag->type 101 : scan-tag data (bin) : scan_tag: not matched! : scan_tag: tag 0x804cd28 length 9 tag->type 102 : scan_tag data (bin): 6b616e6773656f2d31 : scan_tag: not matched! : : Sending PADR : : send_packet: ifn eth0 : : Ethernet header: : h_dest: 00 90 39 c5 40 3d : h_source: 00 aa 00 6d a2 fa : h_proto: 0x8863 (PPPoE Discovery) : PPPoE header: : ver: 0x1 type: 0x1 code: 0x19 session: 0x0000 length: 0x0011 (PADR) : PPPoE tag: : type: 0101 length: 0000 (Service name) : PPPoE tag: : type: 0102 length: 0009 (AC name) : data (UTF-8): kangseo-1 : : Waiting for PADS : OK! Discovery is completed successfully : We got session ID 1286 506 : AC MAC: 0 90 39 c5 40 3d : MAC: 0 90 39 c5 40 3d : : cntrl: SessionID (605) : : PPP started pid is: 650 : : starting pppd using options file : /etc/ppp/options to pppox interface pppox0 : : *** Child Received signal 17 PID 649 *** : status is: 0 : Line id which died is: 0 : : OK we got killed : : telnet xxx.xxx.xxx.xxx 접속안됩니다. : ### 접속안됨니다. 어디가 잘못되었는지요... : : : : : : ### 참고로 부팅시 나오는 사항입니다. : Linux version 2.2.13 (root@laneiges.interwebnetwork.com) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #1 Thu Jul 20 07:14:23 KST 2000 : Detected 451035525 Hz processor. : Console: colour VGA+ 80x25 : Calibrating delay loop... 448.92 BogoMIPS : Memory: 64004k/66496k available (1072k kernel code, 416k reserved, 940k data, 64k init) : VFS: Diskquotas version dquot_6.4.0 initialized : CPU: Intel Pentium III (Coppermine) stepping 03 : Checking 386/387 coupling... OK, FPU using exception 16 error reporting. : Checking 'hlt' instruction... OK. : Checking for popad bug... OK. : POSIX conformance testing by UNIFIX : mtrr: v1.35a (19990819) Richard Gooch (rgooch@atnf.csiro.au) : PCI: PCI BIOS revision 2.10 entry at 0xfb2b0 : PCI: Using configuration type 1 : PCI: Probing PCI hardware : Linux NET4.0 for Linux 2.2 : Based upon Swansea University Computer Society NET3.039 : NET4: Unix domain sockets 1.0 for Linux NET4.0. : NET4: Linux TCP/IP 1.0 for NET4.0 : IP Protocols: ICMP, UDP, TCP, IGMP : Initializing RT netlink socket : Starting kswapd v 1.5 : Detected PS/2 Mouse Port. : Serial driver version 4.27 with MANY_PORTS MULTIPORT SHARE_IRQ enabled : ttyS00 at 0x03f8 (irq = 4) is a 16550A : ttyS01 at 0x02f8 (irq = 3) is a 16550A : pty: 256 Unix98 ptys configured : Registering PPPoE driver : ^^^^^^^^^^^^^^^^^^^^^^^^ : apm: BIOS version 1.2 Flags 0x07 (Driver version 1.9) : Real Time Clock Driver v1.09 : RAM disk driver initialized: 16 RAM disks of 4096K size : VP_IDE: IDE controller on PCI bus 00 dev 39 : VP_IDE: not 100% native mode: will probe irqs later : ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:pio : ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:DMA, hdd:pio : hda: QUANTUM FIREBALLlct10 20, ATA DISK drive : hdc: CRD-8481B, ATAPI CDROM drive : ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 : ide1 at 0x170-0x177,0x376 on irq 15 : hda: QUANTUM FIREBALLlct10 20, 19470MB w/418kB Cache, CHS=2482/255/63 : hdc: ATAPI 48X CD-ROM drive, 128kB Cache : Uniform CDROM driver Revision: 2.56 : Floppy drive(s): fd0 is 1.44M : FDC 0 is a post-1991 82077 : md driver 0.36.6 MAX_MD_DEV=4, MAX_REAL=8 : scsi : 0 hosts. : scsi : detected total. : Partition check: : hda: hda1 hda2 < hda5 hda6 hda7 hda8 hda9 hda10 > : VFS: Mounted root (ext2 filesystem) readonly. : Freeing unused kernel memory: 64k freed : Adding Swap: 216836k swap-space (priority -1) : id: 0x34 io: 0x300 eth0: Intel EtherExpress Pro/10 ISA at 0x300, 00:aa:00:6d:a2:fa, IRQ 9, 10BaseT. : eth0: set Rx mode to 1 address. : eth0: set Rx mode to 1 address. : eth0: set Rx mode to 1 address. : : : : ### pppoed 하기전의 ifconfig : eth0 Link encap:Ethernet HWaddr 00:AA:00:6D:A2:FA : inet addr:21x.x26.x25.248 Bcast:21x.x26.x25.255 Mask:255.255.255.0 : UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 : RX packets:65 errors:0 dropped:0 overruns:0 frame:0 : TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 : collisions:0 txqueuelen:100 : Interrupt:9 Base address:0x300 : : lo Link encap:Local Loopback : inet addr:127.0.0.1 Mask:255.0.0.0 : UP LOOPBACK RUNNING MTU:3924 Metric:1 : RX packets:0 errors:0 dropped:0 overruns:0 frame:0 : TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 : collisions:0 txqueuelen:0 : : ### pppoed 하기전의 ps ax : PID TTY STAT TIME COMMAND : 1 ? S 0:04 init : 2 ? SW 0:00 [kflushd] : 3 ? SW 0:00 [kupdate] : 4 ? SW 0:00 [kpiod] : 5 ? SW 0:00 [kswapd] : 285 ? S 0:00 portmap : 301 ? S 0:00 /usr/sbin/apmd -p 10 -w 5 -W : 354 ? S 0:00 syslogd -m 0 : 365 ? S 0:00 klogd - klogd -k /boot/System.map-uname -r : 381 ? S 0:00 /usr/sbin/atd : 397 ? S 0:00 crond : 417 ? S 0:00 inetd : 433 ? S 0:00 lpd : 471 ? S 0:00 sendmail: accepting connections on port 25 : 488 ? S 0:00 gpm -t ps/2 : 504 ? S 0:00 proftpd (accepting connections) : 521 ? S 0:00 xfs -droppriv -daemon -port -1 : 556 tty1 S 0:00 login -- root : 557 tty2 S 0:00 /sbin/mingetty tty2 : 558 tty3 S 0:00 /sbin/mingetty tty3 : 559 tty4 S 0:00 /sbin/mingetty tty4 : 560 tty5 S 0:00 /sbin/mingetty tty5 : 561 tty6 S 0:00 /sbin/mingetty tty6 : 564 tty1 S 0:00 -bash : 597 tty1 R 0:00 ps ax : : : ### pppoed 한 후의 ifconfig : eth0 Link encap:Ethernet HWaddr 00:AA:00:6D:A2:FA : inet addr:21x.x26.x25.248 Bcast:21x.x26.x25.255 Mask:255.255.255.0 : UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 : RX packets:301 errors:0 dropped:0 overruns:0 frame:0 : TX packets:105 errors:0 dropped:0 overruns:0 carrier:1 : collisions:0 txqueuelen:100 : Interrupt:9 Base address:0x300 : : lo Link encap:Local Loopback : inet addr:127.0.0.1 Mask:255.0.0.0 : UP LOOPBACK RUNNING MTU:3924 Metric:1 : RX packets:0 errors:0 dropped:0 overruns:0 frame:0 : TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 : collisions:0 txqueuelen:0 : : ppp0 Link encap:Point-to-Point Protocol : inet addr:211.193.236.132 P-t-P:192.168.1.3 Mask:255.255.255.255 : UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1490 Metric:1 : RX packets:103 errors:0 dropped:0 overruns:0 frame:0 : TX packets:103 errors:0 dropped:0 overruns:0 carrier:0 : collisions:0 txqueuelen:10 : : : ### pppoed 한 후의 ps ax : PID TTY STAT TIME COMMAND : 1 ? S 0:04 init : 2 ? SW 0:00 [kflushd] : 3 ? SW 0:00 [kupdate] : 4 ? SW 0:00 [kpiod] : 5 ? SW 0:00 [kswapd] : 285 ? S 0:00 portmap : 301 ? S 0:00 /usr/sbin/apmd -p 10 -w 5 -W : 354 ? S 0:00 syslogd -m 0 : 365 ? S 0:00 klogd - klogd -k /boot/System.map-uname -r : 381 ? S 0:00 /usr/sbin/atd : 397 ? S 0:00 crond : 417 ? S 0:00 inetd : 433 ? S 0:00 lpd : 471 ? S 0:00 sendmail: accepting connections on port 25 : 488 ? S 0:00 gpm -t ps/2 : 504 ? S 0:00 proftpd (accepting connections) : 521 ? S 0:00 xfs -droppriv -daemon -port -1 : 556 tty1 S 0:00 login -- root : 557 tty2 S 0:00 login -- root : 558 tty3 S 0:00 /sbin/mingetty tty3 : 559 tty4 S 0:00 /sbin/mingetty tty4 : 560 tty5 S 0:00 /sbin/mingetty tty5 : 561 tty6 S 0:00 /sbin/mingetty tty6 : 564 tty1 S 0:00 -bash : 617 tty2 S 0:00 -bash : 654 ? S 0:00 pppd pppox0 38400 file /etc/ppp/options : 698 tty1 R 0:00 ps ax : : : ### 왜 안되는 거죠... 순서에 맞게 셋팅 해 보세요. 일단 랜카드 하나만 꽂아서(eth0) 셋팅을 합니다. 인터넷이 되는지 확인 합니다. 그런 다음 전원을 끄시고 eth1 하나를 더 꽂습니다. (참고, 같은 종류의 랜카드 2개를 사용시에 문제가 발생할 수 있습니다.) 이런건 irq,io 만 바꿔서 고쳐주면 해결이 됩니다. 메세지 상에서는 정상적입니다. 데몬도 떴구요. 654 ? S 0:00 pppd pppox0 38400 file /etc/ppp/options 이게 뜨고 ppp0 Link encap:Point-to-Point Protocol inet addr:211.193.236.132 P-t-P:192.168.1.3 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1490 Metric:1 RX packets:103 errors:0 dropped:0 overruns:0 frame:0 TX packets:103 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:10 이게 뜨면 정상적입니다. 안되는 문제는 랜카드에서 찾아 보시면 해결할 수 있습니다.
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved