많은 질문과 답변이 있지만 나름대로 잘정리된 문서를 링크합니다. 와우리눅스에 있는글입니다.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
출처 : http://www.wowlinux.com/information/freshmanview.html?id=88&view=1

커널 2.4.x에서는 커널 자체적으로 ADSL을 지원하도록 하고 있기 때문에, 별다른 조작 없이 rp-pppoe 라는 프로그램을 사용하여 ADSL을 사용할 수 있게 되었다.

■ 적용 ADSL : 한국통신, 하나로 외장형 케이블 모뎀

1. rp-pppoe의 설치

기존에 rp-pppoe가 설치되어 있지만 잘 되지 않거나 업그레이드하여 사용하고 싶다면 rp-pppoe의 설치는 rpm 파일을 가져다 하면 된다.

기본적으로 RPM 파일을 제공하지만 이것은 레드햇 리눅스 6.2에 최적화 된 것이므로, 소스 파일인 src.rpm 확장자를 가진 것을 다운로드 한다.

홈페이지 : http://www.roaringpenguin.com/pppoe/

이것을 설치하는 것은 다음과 같은 과정을 거친다.

1) 소스 파일을 풀어준다.

# rpm -ivh rp-pppoe-3.1-1.src.rpm

2) spec 파일이 있는 /usr/src/redhat/SPECS 로 이동한다.

# cd /usr/src/redhat/SPECS

3) RPM 파일을 패키징한다.

# rpm -bb rp-pppoe.spec

4) RPM 파일이 패키징되어 저장된 /usr/src/redhat/RPMS/i386 으로 이동한다.

# cd /usr/src/redhat/RPMS/i386

5) 패키지를 설치한다.

# rpm -Uvh rp-pppoe-3.1-1.i386.rpm

GUI 를 사용하고 싶다면 rp-pppoe-gui-3.1-1.src.rpm 파일을 받아서 위의 과정을 취해준다.

2. ADSL 설정

ADSL 설정은 GUI 를 통한 설정은 adsl-config 명령어를 사용하고, 텍스트를 이용하여 터미널상에서 설정하고자 한다면 adsl-setup을 사용한다.

■ 먼저 adsl-setup을 이용하여 설정해 보자.

1) 터미널에서 명령을 내린다.

# adsl-setup

2) 환영 메시지와 함께 아이디를 설정하는 것이 나온다. 자신의 ADSL 아이디를 적어 넣도록 한다.

Welcome to the Roaring Penguin ADSL client setup. First, I will run

some checks on your system to make sure the PPPoE client is installed

properly...

Looks good! Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default klinuxer): klinuxer

3) 다음은 네트워크 인터페이스 설정이다. 어느 카드를 사용할 지 설정한다.

기본적으로 eth0을 사용한다.

INTERFACE

>>> Enter the Ethernet interface connected to the ADSL modem

For Solaris, this is likely to be something like /dev/hme0.

For Linux, it will be ethn, where 'n' is a number.

(default eth0): eth0

4) 다음은 링크를 유지할 것인지 설정하는 것이다. 기본적으로 no를 선택하면 연결이 지속된다.

Do you want the link to come up on demand, or stay up continuously?

If you want it to come up on demand, enter the idle time in seconds

after which the link should be dropped. If you want the link to

stay up permanently, enter 'no' (two letters, lower-case.)

NOTE: Demand-activated links do not interact well with dynamic IP

addresses. You may have some problems with demand-activated links.

>>> Enter the demand value (default no):

5) 다음은 DNS 설정이다. 자신의 서비스 업체의 DNS 정보를 적어 넣도록 한다.

1차와 2차 DNS를 모두 설정한다.

DNS

Please enter the IP address of your ISP's primary DNS server.

If your ISP claims that 'the server will provide DNS addresses',

enter 'server' (all lower-case) here.

If you just press enter, I will assume you know what you are

doing and not modify your DNS setup.

>>> Enter the DNS information here: 168.126.63.1

Please enter the IP address of your ISP's secondary DNS server.

If you just press enter, I will assume there is only one DNS server.

>>> Enter the secondary DNS server address here: 168.126.63.2

6) 다음은 패스워드 설정이다.
적어 넣어도 보이지 않으므로 타자를 잘 하도록 한다. 두번에 걸쳐 패스워드를 적어 넣는다.

PASSWORD

>>> Please enter your PPPoE password:

>>> Please re-enter your PPPoE password:

7) 다음은 방화벽 설정이다. 기본적으로 0(NONE)를 설정하면 무리가 없다.

FIREWALLING

Please choose the firewall rules to use. Note that these rules are

very basic. You are strongly encouraged to use a more sophisticated

firewall setup; however, these will provide basic security. If you

are running any servers on your machine, you must choose 'NONE' and

set up firewalling yourself. Otherwise, the firewall rules will deny

access to all standard servers like Web, e-mail, ftp, etc. If you

are using SSH, the rules will block outgoing SSH connections which

allocate a privileged source port.

The firewall choices are:

0 - NONE: This script will not set any firewall rules. You are responsible

for ensuring the security of your machine. You are STRONGLY

recommended to use some kind of firewall rules.

1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation

2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway

for a LAN

>>> Choose a type of firewall (0-2): 0

8) 시작시 ADSL을 시작할 것인지 설정한다. 설정해 두면 시작할 때 ADSL을 시작해줌으로 아주 편하다.

Start this connection at boot time

Do you want to start this connection at boot time?

Please enter no or yes.

yes

9) 다음은 설정한 것을 확인하고 설정 파일에 저장할 것인지 결정한다.

** Summary of what you entered **

Ethernet Interface: eth0

User name: klinuxer

Activate-on-demand: No

Primary DNS: 168.126.63.1

Secondary DNS: 168.126.63.2

Firewalling: NONE

>>> Accept these settings and adjust configuration files (y/n)?

■ 다음은 adsl-config를 통한 설정이다.

해당 명령을 내리면 다음과 같은 창이 뜨고 위 설정값대로 설정해 주면 된다.

[adsl-config 명령을 실행했을 때 나오는 설정창]

3. ADSL 연결

ADSL을 연결하는 방법으로 두가지가 있다.

■ adsl-start, adsl-connect

두가지 명령어가 동일한 역할을 한다. 단지 후자는 반복해서 연결을 시도한다.

# adsl-start [엔터]

.. Connected!

# adsl-connect &

[2] 8464

Using interface ppp0

Connect: ppp0 <--> /dev/pts/0

local IP address 211.217.42.179

remote IP address 211.217.42.1

■ 부팅시 연결

설정에서 부팅시 연결을 설정해 주면 시스템이 부팅할 때 ADSL 연결을 시도한다.

4. 관련 명령어들

■ ADSL 접속 끊기

명령어는 adsl-stop으로 동일하지만 나오는 메시지는 연결 명령어에 따라 약간 다르다.

1) adsl-start로 연결한 경우

# adsl-stop

Killing pppd (8193)

Killing adsl-connect (8177)

2) adsl-connect로 연결한 경우

[root@cyberlaw /root]# adsl-stop

Killing pppd (8273)

Terminating on signal 15.

Modem hangup

Connection terminated.

Connect time 1.1 minutes.

Sent 30 bytes, received 58 bytes.

cat: /var/run/pppoe.conf-adsl.pid.start: No such file or directory

Killing adsl-connect (8263)

■ ADSL 연결 상태 보기

# adsl-status

adsl-status: Link is up and running on interface ppp0

ppp0 Link encap:Point-to-Point Protocol

inet addr:211.217.42.179 P-t-P:211.217.42.1 Mask:255.255.255.255

UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1

RX packets:4 errors:0 dropped:0 overruns:0 frame:0

TX packets:3 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:3

5. 트러블 슈팅

■ ADSL 연결이 잘 안될 때 체크해 볼 사항들

연결이 제대로 되지 않는 경우 다음과 같은 에러 메시지가 지속적으로 나온다.

# adsl-start

................TIMED OUT

1) 패키지를 업그레이드 해본다.

커널과의 호환성등에서 이전 버전이 맞지 않을 수도 있다.

2) 커널 컴파일을 한다.

커널 설정이 잘못 되어 있을 수도 있으므로 커널 컴파일을 해준다.

이 때, ppp 설정을 제대로 해주어야 한다.

■ 부팅시 ADSL 연결이 실패하면

부팅시 연결이 되도록 설정해도 연결이 실패하는 경우가 있다.
이 경우에는 명령어를 통해 수동으로 연결해 준다.

■ 이전의 설정 파일인 options 파일을 사용하는가?

불필요하다. 전의 options 파일은 이곳에 복사해 넣는 일이 없도록 한다.
즉, 설정하지 않도록 한다. 만약 전의 것을 복사해 넣는다면 연결이 안 될 수도 있다.

■ ADSL 접속 후에 DNS를 찾을 수 없다고 에러가 뜨는 경우

/etc/reslov.conf에 DNS 등록이 되지 않았기 때문이다.
이 경우 직접 해당 파일에 DNS 정보를 등록해 주거나 netcfg 등의 프로그램을 사용하여 DNS를 등록해 준다.

글쓴이 : 강기봉 님 <freekgb [at] lvsp [sot] or [sot] kr>, <freekgb [at] hiug [dot] hanyang [dot] ac [dot] kr>

약력 : 맞춤형 리눅스 내맘대로 배우기 저자

네띠앙 Windows NT & Unix 동호회 전 대표 시삽

리눅스 공동체 세미나 제 4회, 제 5회 강사 및 스텝

LVSP(http://lvsp.or.kr) 공동 대표

관련 링크: http://www.wowlinux.com/information/freshmanview.html?id=88&view=1

+ Recent posts