分享
 
 
 

在LINUX (Mandrake 7.0)下安装ADSL

王朝system·作者佚名  2006-11-23
窄屏简体版  字體: |||超大  

环境

系统:Linux Mandrake release 7.1 (helium) Kernel 2.2.15-4mdk on an i686

ADSL客户端设备:ANT:Alcatel A1000 10/100baseT 接口的网桥;

NIC:TP-Link 8139B 10/100M网卡。

ANT与NIC用一对一五类双绞线连接。

没有固定IP地址,有局端动态分配。

所需软件包:pppoed-0.48b1.tgz,可在http://www.davin.ottawa.on.ca/pppoe/得到。

一、网卡设置

先安装一块网卡,并配置好网卡的参数(相关配置手册)。如我的网卡IP为192.168.0.8。

二、安装PPPOED软件

在安装好系统后,系统会缺省安装PPP软件,并在/usr/sbin下生成pppd,pppstats等文件,故不用安装PPP软件包了。

下载软件包pppoed-0.48b1.tgz解压到/usr/src/pppoed-0.48b1目录下:

# tar –zxvf pppoed-0.48b1.tgz

进入该目录,并运行命令:

#Install_pppoed

出现以下提示,根据提示进行安装如下:

Linux source directory[where kernel headers are found] [/usr/src/linux]:

(原码路径)(按回车)

Module install dir [/lib/modules/2.2.15-4mdk/net]:

(模块安装路径)(按回车)

RH-like init directory [/etc/rc.d/init.d]: 初始化路径)(按回车)

compiler for modules. If you have RH7.0, select kgcc instead of gcc

[gcc]:(编译时所需的

C环境,Mandrake 7.0下,是用gcc)(按回车)

Kernel source: /usr/src/linux

init_dir: /etc/rc.d/init.d

module install directory: /lib/modules/2.2.15-4mdk/net

Compiler for modules : gcc

is this correct?(answer y/n only)

[y]:(询问以上设置是否正确,如果正确就按y)

然后就进行编译过程。编译完后出现以下提示:

Do you want me to setup PPP for you?(answer y/n only)

[y]:(是否要设置PPP)(按回车)

Please enter your Username for your ISP [ ]: (输入用户名)(如 abc)

Please enter your Password for your ISP [ ]:(输入你的密码)

Please enter your domain name

This is often trailing the @ in your email address

If your email was John@Doe.com, then most often, your

domain name would be: Doe.com

domain name : [ ]: (输入你的域)(如我的是163.gd)

collected information

User Name : szourweb

passWord: ourweb

domainName: 163.gd

is this correct?(answer y/n only) [y]:

(确认你的信息是否正确,如果正确就按回车)

setting ppp-options ....

Setting /etc/ppp/pap-secrets* perms to 600

Do you want me to setup DNS for you?(answer y/n only)

[y]:(是否设置DNS,按y)

Please enter your Primary DNS server

It should be in the form ###.###.###.###

Where the "#" is either a number or blank space

Primary DNS server: [ ]:

(输入数据局提供的DNS服务起IP,如:202.96.134.133)

If you have a Secondary DNS server please enter it

If none, just press enter

Secondary DNS server: []: (如果有辅助DNS,则在此输入,如:202.96.128.68)

collected information

nameServer1 Name : 202.96.134.133

second nameserver: 202.96.128.68

is this correct?(answer y/n only) [y]:(再次确认信息是否正确,正确则按y)

would you like to start pppoed?(answer y/n only) [y]:(提示是否启动pppoed)

到此pppoed安装完成,在结束时,如果提示:

Starting pppoed: Warning: modutils is reading from /etc/modules.conf and

ignoring /etc/conf.modules. The use of /etc/conf.modules is

depreciated,

please remove /etc/conf.modules as soon as possible. Command

rm /etc/conf.modules

则请删除/etc/conf.modules.模块配置文件改用modules.conf。

三、配置相关文件

pppoe安装后,在modules.conf中加入:

alias char-major-144 pppox

并将配置信息写入/etc/sysconfig/network-scripts/ifcfg-ppp0中

更改ifcfg-ppp0中的这一句:

MODEMPORT="/dev/ppp0"

为:MODEMPORT="/dev/pppox0"

在安装完pppoed后,/etc/ppp/目录下的两个文件应该如下:

-------------------------------------options-------------------------------------

lock

local

nocrtscts

noauth

#be careful with mtu/mru if you are masquerading.

# 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 "szourweb@163.gd"

#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

----------------------------------end

options---------------------------------

-------------------------------------

pap-secrets------------------------------

# Secrets for authentication using PAP

# client server secret IP addresses

abc@163.gd * 123456

---------------------------------end

secrets----------------------------------

根据自己的实际情况更改相关项目。

至此,软件设置完成。

将ANT和NTC连接无误后运行:

# /etc/sbin/pppoed

就可以连接上了。

你可以:

# tail -f /var/log/message

看整个连接过程。

如果连接上了将出现以下类似信息:

Oct 25 01:59:59 adsl pppoed[10323]: starting /usr/sbin/pppd to interface

/dev/pp

pox0

Oct 25 01:59:59 adsl modprobe: Note: /etc/modules.conf is more recent than

/lib/

modules/2.2.15-4mdk/modules.dep

Oct 25 01:59:59 adsl kernel: registered device ppp0

Oct 25 01:59:59 adsl pppoed[10322]: Line id which died is: 0

Oct 25 01:59:59 adsl pppoed[10322]: OK we got killed

Oct 25 01:59:59 adsl pppoed[10322]: ppp_connect came back!

Oct 25 01:59:59 adsl pppd[10325]: pppd 2.3.11 started by root, uid 0

Oct 25 01:59:59 adsl pppd[10325]: Using interface ppp0

Oct 25 01:59:59 adsl pppd[10325]: Connect: ppp0 <--> /dev/pppox0

Oct 25 02:00:04 adsl kernel: PPP BSD Compression module registered

Oct 25 02:00:04 adsl kernel: PPP Deflate Compression module registered

Oct 25 02:00:04 adsl insmod: Note: /etc/modules.conf is more recent than

/lib/mo

dules/2.2.15-4mdk/modules.dep

Oct 25 02:00:05 adsl pppd[10325]: local IP address 61.141.206.79

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Oct 25 02:00:05 adsl pppd[10325]: remote IP address 61.141.204.1

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[root@adsl sysconfig]# netstat -nr

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt

Iface

192.168.0.8 0.0.0.0 255.255.255.255 UH 0 0 0

eth1

192.168.1.8 0.0.0.0 255.255.255.255 UH 0 0 0

eth0

61.141.204.1 0.0.0.0 255.255.255.255 UH 0 0 0

ppp0

192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0

eth0

192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0

eth1

127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

0.0.0.0 61.141.204.1 0.0.0.0 UG 0 0 0

ppp0

# ifconfig

ppp0 Link encap:Point-to-Point Protocol

inet addr:61.141.206.79 P-t-P:61.141.204.1 Mask:255.255.255.255

UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1490 Metric:1

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

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

collisions:0 txqueuelen:10

注意:在/usr/doc/pptp-adsl-fr-1.0.2目录中有Alcatel的ADSL.htm,如果按照该文件的做法,运行pptp

alcatel ,会出错:

# tail –f /var/log/message

Oct 25 01:04:07 adsl pptp[10036]: connect: No route to host

Oct 25 01:04:07 adsl pptp[10036]: Could not open control connection to

192.168.0.138

Oct 25 01:04:07 adsl pptp[10035]: Call manager exited with error 256

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有