- 论坛徽章:
- 0
|
本帖最后由 383228273 于 2011-07-30 22:24 编辑
回复 14# chenyx
已解决:
/etc/rc.conf:
... ... ... 略 ... ... ...
eth0="eth0 192.168.1.200 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(eth0)
gateway="default gw 192.168.1.1"
ROUTES=(gateway)
... ... ... 略 ... ... ...
/etc/reslov.conf:
nameserver 61.128.128.68
nameserver 61.128.192.68
哈~~~能出外网了,设置后重启了下电脑后就 ping 出外网了!!!
- [root@myhost ~]# grep -v '^#' /etc/rc.conf
- LOCALE="en_US.UTF-8"
- HARDWARECLOCK="localtime"
- TIMEZONE="Asia/Chongqing"
- KEYMAP="us"
- CONSOLEFONT=
- CONSOLEMAP=
- USECOLOR="yes"
- MOD_AUTOLOAD="yes"
- MODULES=()
- USELVM="no"
- HOSTNAME="myhost"
- eth0="eth0 192.168.1.200 netmask 255.255.255.0 broadcast 192.168.1.255"
- INTERFACES=(eth0)
- gateway="default gw 192.168.1.1"
- ROUTES=(gateway)
- DAEMONS=(syslog-ng network netfs crond)
- [root@myhost ~]#
- [root@myhost ~]# grep -v '^#' /etc/reslov.conf
- nameserver 61.128.128.68
- nameserver 61.128.192.68
- [root@myhost ~]#
- [root@myhost ~]# route -n
- Kernel IP routing table
- Destination Gateway Genmask Flags Metric Ref Use Iface
- 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- 0.0.0.0 192.168.1.0 0.0.0.0 UG 0 0 0 eth0
- [root@myhost ~]#
- [root@myhost ~]# ping 192.168.1.1 -c 4
- PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
- 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.94 ms
- 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.911 ms
- 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=1.28 ms
- 64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.910 ms
- --- 192.168.1.1 ping statistics ---
- 4 packets transmitted, 4 received, 0% packet loss, time 3002ms
- rtt min/avg/max/mdev = 0.910/1.261/1.940/0.422 ms
- [root@myhost ~]#
- [root@myhost ~]# ping www.baidu.com -c 4
- PING www.a.shifen.com (119.75.217.56) 56(84) bytes of data.
- 64 bytes from 119.75.217.56: icmp_seq=1 ttl=55 time=69.1 ms
- 64 bytes from 119.75.217.56: icmp_seq=2 ttl=55 time=69.0 ms
- 64 bytes from 119.75.217.56: icmp_seq=3 ttl=55 time=68.5 ms
- 64 bytes from 119.75.217.56: icmp_seq=4 ttl=55 time=68.5 ms
- --- www.a.shifen.com ping statistics ---
- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms
- rtt min/avg/max/mdev = 68.588/68.833/69.114/0.356 ms
- [root@myhost ~]#
复制代码 谢谢楼上的各位同志了~~~
特别感谢下 chenyx 一直关注着我贴子,帮我解决问题~~~
{:3_200:} |
|