12.另开一个Terminal,运行ifconfig可以看到接口中已经出现了ppp0设备,如下图所示:
ppp0 Link encap:Point-to-Point Protocol
inet addr:220.192.68.149 P-t-P:220.192.64.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:66 (66.0 b) TX bytes:84 (84.0 b) |
可以看到已经获得了动态地址220.192.68.149
13.这时候需要手工添加一条默认路由:route add default ppp0 ,添加完成后可以ping远端的一个地址试试是否真的上网了,例如说在公网上可以ping 166.111.8.238,应该会通;
14.如果要挂断ppp联接,很简单,只要切换到wvdial所在的Terminal,然后按Ctrl + C即可,也可以给kill掉wvdial 进程,结果如下:
Caught signal #2! Attempting to exit gracefully...
--> Disconnecting at Thu JULY 13 17:58:26 2004
[root@test ppp]# ppp0 Link encap:Point-to-Point Protocol |