Groups
Groups
Sign in
Groups
Groups
∴∵∴【乌班图&曼德拉】∵∴∵
Conversations
About
Send feedback
Help
Solaris如何设置ADSL拨号上网
1 view
Skip to first unread message
Knoppix
unread,
Oct 22, 2008, 7:28:11 AM
10/22/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ∴∵∴【乌班图&曼德拉】∵∴∵
一、系统基本设置
# touch /etc/ppp/pppoe.if
重启系统后会创建拨号相关的文件
# touch /etc/gateways
重启后会添加IP路由功能
# touch /etc/hostname.hme1
重启后会添加上第二块网卡,该网卡如果已经添加,那么可省去此步。通过ifconfig -a可以查看该网卡是否启用。该网卡hme1是和adsl
modem相连的网卡。
# echo "nameserver 202.96.134.133" >; /etc/resolv.conf
添加上离你最近的DNS服务器,重启生效,可以在此文件中添加多个DNS server。
# cp /etc/nsswitch.dns /etc/nsswitch.conf
此步骤的目的是修改/etc/nsswitch.conf,当然直接改动/etc/nsswitch.conf。
二、PPPOE基本设置
确认系统中已经安装上如下的软件:
SUNWpppd - Solaris PPP Device Drivers
SUNWpppdr - Solaris PPP configuration files
SUNWpppdt - Solaris PPP Tunneling
SUNWpppdu - Solaris PPP daemon and utilities
SUNWpppdx - Solaris PPP 64-bit (ONLY needed for SPARC's with 64-bit
kernels)
如果没有,那么从solaris的第二张安装光盘盘中进行补装。有两个ppp的大软件包,选上即可。
# reboot -- -r
重新进入系统之后,going on.......
# ls /dev | grep ppp 确认存在sppp和sppptun
# grep sppp /etc/name_to_major
sppp 146
sppptun 147
编辑拨号配置文件
# vi /etc/ppp/peers/bohao 创建文件bohao,文件内容如下:
**************************************************************************************************
sppptun
plugin pppoe.so
connect "/usr/lib/inet/pppoec hme1" #hme1是与MODEM相连的网卡(查看网卡标识:#dladm
show-link)
persist #自动重播
user "USERNAME" # username(拨号用户名)
noauth
noipdefault
noccp
novj
noaccomp
nopcomp
defaultroute
***************************************************************************************************
存盘退出。
由于你的ISP需要对你进行密码验证,所以你还要编辑一下密码文件,但是ISP可能用到的文件是/etc/ppp/chap-secrets和/
etc/ppp/pap-secrets 因此分别要到这两个文件中的最后一行中追加
username[Tab]*[Tab]password
我要提醒的是:上行中的字段之间是TAB键分割的,而不是空格。到此为止,配置已经结束了,接下来就是拨号。绑定网卡
# sppptun plumb pppoed hme1
# sppptun plumb pppoe hme1
# sppptun query 检查是否绑定成功
# /usr/lib/inet/pppoec -i hme1 探测与hme1相连的ISP网卡的MAC地址信息,主要是确保物理线路是否存在问
题。
# /usr/bin/pppd call bohao bohao为/etc/ppp/peers的一个拨号配置文件。
# ifconfig -a 验证是否出现sppp0的网口,如果网络不畅,此处可能需要等一段时间。
可以把上述的操作简单的写成一个教本,如:/etc/rc2.d/bohao.sh,其内容为:
*********************************************************************************************
sppptun plumb pppoed hme1
sppptun plumb pppoe hme1
/usr/bin/pppd call bohao
*********************************************************************************************
开机自动执行:
# chmod u+x /etc/rc2.d/S48bohao
到此,服务器的拨号设置告一段落。
Reply all
Reply to author
Forward
0 new messages