CentOS配置好外网ip后,网卡也正常启动了,但是ping不通ip
本帖最后由 wq079074339 于 2013-12-02 13:44:37 编辑
在晚上找了好久,也没找到问题原因,特来此求助,希望各位前辈们帮个忙
以下是我修改过的网络配置相关文件
【/etc/sysconfig/network】
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=xzd-game
【/etc/sysconfig/network-scripts/ifcfg-eth1:1】
DEVICE=eth1:1
ONBOOT=yes
BOOTPROTO=none
HWADDR=00:25:90:01:b3:0b
NETMASK=255.255.255.192
IPADDR=218.2.177.226
GATEWAY=218.2.177.193
TYPE=Ethernet
【/etc/resolv.conf】
nameserver 8.8.8.8
route命令的结果如下
[root@xzd-game ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
218.2.177.192 * 255.255.255.192 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
192.168.0.0 * 255.255.0.0 U 0 0 0 eth1
default 218.2.177.193 0.0.0.0 UG 0 0 0 eth1
以下是重启网络服务(service network restart) 之后的显示
eth1 Link encap:Ethernet HWaddr 00:25:90:01:B3:0B
inet addr:192.168.103.7 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::225:90ff:fe01:b30b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17192 errors:0 dropped:0 overruns:0 frame:0
TX packets:2735 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1585229 (1.5 MiB) TX bytes:431478 (421.3 KiB)
Interrupt:169 Memory:fafe0000-fb000000
eth1:0 Link encap:Ethernet HWaddr 00:25:90:01:B3:0B
inet addr:192.168.103.101 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:169 Memory:fafe0000-f