VM版本:Vmware workstation 7.0
系统版本:Suse 10 sp3
VM网络:NAT
1.进入界面后,检查网卡情况,发现没有网卡信息:
suse-10-sp3:~ # ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:106 errors:0 dropped:0 overruns:0 frame.:0
TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7476 (7.3 Kb) TX bytes:7476 (7.3 Kb)
2.再次检查如下:
suse-10-sp3:/etc/sysconfig/network # ifconfig -a
eth1 Link encap:Ethernet HWaddr 00:0C:29:7F:96:96
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:59 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:106 errors:0 dropped:0 overruns:0 frame.:0
TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7476 (7.3 Kb) TX bytes:7476 (7.3 Kb)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
3.采用rcnetwork status 检查,发现如下提示:
no configrution find for eth1
从这个错误提示中,知道了没有eth1的相关配置。进入网卡配置目录发现,果然是如此:
suse-10-sp3:/etc/sysconfig/network # ls
config if-down.d ifcfg-eth0 ifcfg.template ifservices.template routes
dhcp if-up.d ifcfg-lo ifroute-lo providers scripts
4.于是拷贝、修改IP信息(直接修改eth0上的IP信息):
suse-10-sp3:/etc/sysconfig/network # cp ifcfg-eth0 ifcfg-eth1
suse-10-sp3:/etc/sysconfig/network # ls
config if-up.d ifcfg-lo ifservices.template scripts
dhcp ifcfg-eth0 ifcfg.template providers
if-down.d ifcfg-eth1 ifroute-lo routes
5.重启网卡
suse-10-sp3:/etc/sysconfig/network # rcnetwork restart
Shutting down network interfaces:
eth1 device: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 1 0)
eth1 done
Shutting down service network . . . . . . . . . . . . . done.
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
lo
lo IP address: 127.0.0.1/8
IP address: 127.0.0.2/8
Checking for network time protocol daemon (NTPD): unused
lo done
eth1 device: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 1 0)
eth1 IP address: 192.168.48.3/24
Warning: Could not set up default route via interface
Command ip route replace to default via 192.168.162.2 returned:
. RTNETLINK answers: Network is unreachable
Configuration line: default 192.168.162.2 - -
This needs NOT to be AN ERROR if you set up multiple interfaces.
See man 5 routes how to avoid this warning.
Checking for network time protocol daemon (NTPD): unused
eth1 done
Setting up service network . . . . . . . . . . . . . . done.
6.正常了显示:
suse-10-sp3:/etc/sysconfig/network # ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:7F:96:96
inet addr:192.168.48.3 Bcast:192.168.48.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe7f:9696/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame.:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:356 (356.0 b) TX bytes:666 (666.0 b)
Interrupt:59 Base address:0x2024
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:106 errors:0 dropped:0 overruns:0 frame.:0
TX packets:106 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7476 (7.3 Kb) TX bytes:7476 (7.3 Kb)
suse-10-sp3:/etc/sysconfig/network #
7.正常PING通VMNET8
suse-10-sp3:/etc/sysconfig/network # ping 192.168.48.3
PING 192.168.48.3 (192.168.48.3) 56(84) bytes of data.
64 bytes from 192.168.48.3: icmp_seq=1 ttl=64 time=0.063 ms
64 bytes from 192.168.48.3: icmp_seq=2 ttl=64 time=0.034 ms
64 bytes from 192.168.48.3: icmp_seq=3 ttl=64 time=0.037 ms
64 bytes from 192.168.48.3: icmp_seq=4 ttl=64 time=0.033 ms
64 bytes from 192.168.48.3: icmp_seq=5 ttl=64 time=0.037 ms
64 bytes from 192.168.48.3: icmp_seq=6 ttl=64 time=0.038 ms
64 bytes from 192.168.48.3: icmp_seq=7 ttl=64 time=0.036 ms
64 bytes from 192.168.48.3: icmp_seq=8 ttl=64 time=0.059 ms
64 bytes from 192.168.48.3: icmp_seq=9 ttl=64 time=0.053 ms
64 bytes from 192.168.48.3: icmp_seq=10 ttl=64 time=0.037 ms
64 bytes from 192.168.48.3: icmp_seq=11 ttl=64 time=0.038 ms
64 bytes from 192.168.48.3: icmp_seq=12 ttl=64 time=0.036 ms
64 bytes from 192.168.48.3: icmp_seq=13 ttl=64 time=0.036 ms
--- 192.168.48.3 ping statistics ---
13 packets transmitted, 13 received, 0% packet loss, time 11999ms
rtt min/avg/max/mdev = 0.033/0.041/0.063/0.010 ms
suse-10-sp3:/etc/sysconfig/network #
总结:
其实从字面上很好理解,没有eth1网卡的配置信息。直接去相关配置目录查看是否配置信息正常存在,配置信息是否正确。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16863874/viewspace-756219/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16863874/viewspace-756219/