wanglaow请版主们看看我的网络配置问题
我有两块网卡,eth0是8109,连接网通的ip网,eth是8139,和家里的另一台电脑相连。安装了magic linux 1.2后,网关ping不通。
网通提供的网关是 10.109.218.2,DNS是 10.64.1.1
我输入ifconfig显示
ifconfig
eth0 Link encap:EthernetHWaddr 52:54:AB:DF:1B:F8
inet addr:10.109.218.11Bcast:10.109.218.255Mask:255.255.255.0
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:149 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b)TX bytes:13573 (13.2 Kb)
Interrupt:11 Base address:0xc400
eth1 Link encap:EthernetHWaddr 00:E0:4C:FF:A0:9C
inet addr:192.168.0.1Bcast:192.168.0.255Mask:255.255.255.0
UP BROADCAST MULTICASTMTU:1500Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:95 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b)TX bytes:13628 (13.3 Kb)
Interrupt:10 Base address:0xa000
lo Link encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
UP LOOPBACK RUNNINGMTU:16436Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4074 (3.9 Kb)TX bytes:4074 (3.9 Kb)
我输入route命令后显示
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
10.109.218.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.109.218.2 0.0.0.0 UG 0 0 0 eth0
输入ifconfig eth0 后显示
route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
10.109.218.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.109.218.2 0.0.0.0 UG 0 0 0 eth0
输入 netstat -rn 后显示
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Windowirtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
10.109.218.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 10.109.218.2 0.0.0.0 UG 0 0 0 eth0
我的resolve.conf内容为
nameserver 10.64.1.1
我的network 内容为
NETWORKING=yes
HOSTNAME='WGQ'
GATEWAY=10.109.218.2
FORWARD_IPV4=true
我的ifcfg-eth0 的内容为
# Unknown vendor|Generic ne2k-pci device
DEVICE='eth0'
ONBOOT=yes
BOOTPROTO='none'
IPADDR='10.109.218.11'
NETMASK='255.255.255.0'
GATEWAY='10.109.218.2'
BROADCAST='10.109.218.255'
NETWORK='10.109.218.0'
DNS1='10.64.1.1'
DEFROUTE=no
HWADDR=52:54:AB:DF:1B:F8
PEERDNS=yes
TYPE=Ethernet
USERCTL=no 对了,网通是把给我们的IP地址和eth0 网卡的mac 绑定在一起进行身份验证的。 换了块网卡。搞定
爽!
页:
[1]