发信人: mark7312(小马哥)
整理人: qiaoqian(2002-05-13 06:53:32), 站内信件
|
好啦,都准备好啦,试一下吧。
4、测试
拨号:
isdnctrl dial ippp0
看看发生了什么情况:
ifconfig
得到类似下面的信息:
eth0 Link encap:Ethernet HWaddr 00:20:AF:F1:0A:4A
inet addr:210.96.100.10 Bcast:210.96.100.255 Mask:255.255.255.0
inet6 addr: fe80::220:afff:fef1:a4a/10 Scope:Link
inet6 addr: fe80::20:aff1:a4a/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:10 Base address:0x6000
ippp0 Link encap:Point-to-Point Protocol
inet addr:61.142.84.71 P-t-P:202.105.161.206 Mask:255.0.0.0
UP POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:22 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:30
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:43 errors:0 dropped:0 overruns:0 frame:0
TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
ippp0中的本机地址(inet addr)是61.142.84.71,PPP远程服务器地址(P-t-P)是202.105.161.206,代替了原来指定的0.0.0.0,说明动态IP地址是起作用的。
route
得到类似下面的信息:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
gate.thalia.com * 255.255.255.255 UH 0 0 0 eth0
210.96.100.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
202.0.0.0 * 255.0.0.0 U 0 0 0 ippp0
default 202.105.161.206 0.0.0.0 UG 0 0 0 ippp0
default对应的gateway是202.105.161.206,代替了原来的"*",再看清楚点,它正好是ippp0的远程服务器地址。
怎么知道ISDN的状态呢?
imontty
得到类似下面的信息:
ISDN channel status:
Channel Usage Type Number
----------------------------------------------------------------------
HiSax Out Net 163
HiSax Off
HiSax1是连出去了(Out),拨打号码是163。
看到归看到,还得实际上去一把才知道行不行。
ping 168.160.224.103 (新浪网sina.com.cn)
通的。
ping sina.com.cn
不行了。域名解析的问题,找到/etc/resolv.conf文件,修改如下:
nameserver 127.0.0.1
指明域名服务器为127.0.0.1(“虚”的loopback),实际上经由路由表中的default条目,转发到远程服务器上,暗渡陈仓了。
再ping sina.com.cn,唔,OK了。
要挂断,下命令:
isdnctrl hangup ippp0
如果想要干净地恢复原状,继续下面的动作,和刚才的拨号配置正好一一相反。
kill ipppd
停止ipppd服务。(看别人写的,我试的时候却杀不掉,不知是不是因为ipppd是在后台运行的缘故。)
route del default
去掉路由表中增加的条目。
ifconfig ippp0 down
isdnctrl delif ippp0
关停并删除ippp0 Interface。
modprobe -r hisax
卸出驱动程序。(我试的时候,有时也卸不掉。)
---- 小马哥
美丽的梦和美丽的诗一样,都是可遇而不可求的,
常常在最没能料到的时候里出现
|
|