- 论坛徽章:
- 0
|
FreeBSD 4.9,设置了PPPoE,/etc/ppp/ppp.conf内容如下:
#################################################################
default:
set log Phase Chat LCP IPCP CCP tun command
ident user-ppp VERSION (built COMPILATIONDATE)
# Ensure that "device" references the correct serial port
# for your modem. (cuaa0 = COM1, cuaa1 = COM2)
#
set device PPPoE:lnc0
set speed sync
set mru 1492
set mtu 1492
set ctsrts off
enable dns # request DNS info (for resolv.conf)
papchap:
#
# edit the next three lines and replace the items in caps with
# the values which have been assigned by your ISP.
#
set authname *******
set authkey *******
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
add default HISADDR # Add a (sticky) default route
#########################################
ifconfig输出如下:
lnc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST>; mtu 1500
inet 192.168.100.5 netmask 0xffffff00 broadcast 192.168.100.255
inet6 fe80::250:56ff:fe40:4092%lnc0 prefixlen 64 scopeid 0x1
ether 00:50:56:40:40:92
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST>; mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010< OINTOPOINT,MULTICAST>; mtu 1500
sl0: flags=c010< OINTOPOINT,LINK2,MULTICAST>; mtu 552
faith0: flags=8002<BROADCAST,MULTICAST>; mtu 1500
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST>; mtu 1500
Opened by PID 55
照理,网络界面已经启动了。/etc/resolv.conf也已经设置了dns服务器的IP地十。ping内网可通。ping 外网,无论IP与域名都不行。
# ping www.google.com
ping: cannot resolve www.google.com: Host name lookup failure
# ping 202.96.111.2
PING 202.96.111.2 (202.96.111.2): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
^C
--- 202.96.111.2 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
注:我是通过交换机与别人共享ADSL上网的,ADSL的工作模式是桥接方式。
FreeBSD装在虚拟机中。
感谢各位高手踊跃发言。 |
|