日期:2014-05-17  浏览次数:20723 次

路由问题
操作系统 linux(CentOS)
ADSL 共享上网 

电脑 网卡连接路由器LAN口 路由器WAN口链接 猫  
主机IP192.168.1.100 路由器IP 192.168.1.1 猫IP 192.168.1.2
网卡配置文件 /etc/sysconfig/network-scripts/ifcfg-eth0
# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth0
BOOTPROTO=static



GATEWAY=192.168.1.1
BROADCAST=192.168.1.255
HWADDR=00:E0:4D:1E:12:46
IPADDR=192.168.1.100
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes


输入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
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0



路由器里的路由表

目的IP 子网掩码 网关 metric 接口
0.0.0.0 0.0.0.0 120.32.122.1 0 ppp0
120.0.0.0 255.0.0.0 120.32.122.121 0 ppp0
120.32.122.121 255.255.255.255 120.32.122.121 0 ppp0
192.168.1.0 255.255.255.0 192.168.1.0 0 eth0


问题 我可以正常上网 但是我PING不通 猫(192.168.1.2) 为什么? 该怎么办? 谢谢!!!!!!!!!

------解决方案--------------------
路由器 WAN 口接 ADSL 猫,猫被配置为“桥接”方式了。