|
在Debian下面安装ADSL,atfa原创
1:我的使用方法是把ADSL连接到eth0,也就是网卡上的,不是连接到USB接口
2:为了保证通用性,我不介绍具体的软件,只说方法:
编译内核,2.4.20,配置文件我已经贴出来了,在最下面,文件名是“.config”,有一个点的
然后编译内核:
- make dep && make bzImage && make modules && make modules_install
复制代码
用新的内核启动(不再废话)
这个内核已经支持ppp,
对于Debian,在 /etc/ppp/peers/dsl-provider 内容如下:
- pty "/usr/sbin/pppoe -I eth0 -T 80"
- noipdefault
- defaultroute
- hide-password
- lcp-echo-interval 60
- lcp-echo-failure 3
- connect /bin/true
- noauth
- persist
- mtu 1492
- user "xxx@xxx" 这里是你的帐号
- usepeerdns
复制代码
建立/etc/ppp/pap-secrets,内容如下:
- # Every regular user can use PPP and has to use passwords from /etc/passwd
- * (none) "" *
- # UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
- # other accounts that should not be able to use pppd!
- guest (none) "*" -
- master (none) "*" -
- root (none) "*" -
- support (none) "*" -
- stats (none) "*" -
- # OUTBOUND connections
- # Here you should add your userid password to connect to your providers via
- # PAP. The * means that the password is to be used for ANY host you connect
- # to. Thus you do not have to worry about the foreign machine name. Just
- # replace password with your password.
- # If you have different providers with different passwords then you better
- # remove the following line.
- (none) * password
- xxx@xxx * xxxxx 这里是帐号密码,中间有一个*不要少
复制代码
现在用下面的方法拨号:
(Maybe all user)
或者
(Debian User)
也可以在/etc/init.d下面加入一个ppp,用来启动
- test -x /usr/sbin/pppd -a -f /etc/ppp/ppp_on_boot || exit 0
- if [ -x /etc/ppp/ppp_on_boot ]; then RUNFILE=1; fi
- case "$1" in
- start)
- echo -n "Starting up PPP link: pppd"
- if [ "$RUNFILE" = "1" ]; then
- /etc/ppp/ppp_on_boot
- else
- pppd call dsl-provider
- fi
- echo "."
- ;;
- stop)
- echo -n "Shutting down PPP link: pppd"
- if [ "$RUNFILE" = "1" ]; then
- poff
- else
- poff dsl-provider
- fi
- echo "."
- ;;
- restart|force-reload)
- echo -n "Restarting PPP link: pppd"
- if [ "$RUNFILE" = "1" ]; then
- poff
- sleep 5
- /etc/ppp/ppp_on_boot
- else
- poff provider
- sleep 5
- pppd call dsl-provider
- fi
- echo "."
- ;;
- *)
- echo "Usage: /etc/init.d/ppp {start|stop|restart|force-reload}"
- exit 1
- ;;
- esac
- exit 0
复制代码 |
|