网卡获取ip地址失败

linux redhat虚拟机上网卡获取ip地址失败(网卡设置为自动获取ip的)

重启network服务提示如下信息:

Bringing up interface eth0:  RTNETLINK answers: No such device

查看/var/log/message下日志信息

un  9 04:06:16 rac1 nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1 ...

Jun  9 04:06:16 rac1 nm-system-settings:    ifcfg-rh:     error: Missing or invalid IP4 prefix '0'

Jun  9 04:06:16 rac1 nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1 ...

Jun  9 04:06:16 rac1 nm-system-settings:    ifcfg-rh:     error: Missing or invalid IP4 prefix '0'

Jun  9 04:06:16 rac1 nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth1 ...

Jun  9 04:06:16 rac1 nm-system-settings:    ifcfg-rh:     error: Missing or invalid IP4 prefix '0'

Jun  9 04:06:31 rac1 nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...

Jun  9 04:06:31 rac1 nm-system-settings:    ifcfg-rh:     error: Missing or invalid IP4 prefix '0'

Jun  9 04:06:31 rac1 nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...

Jun  9 04:06:31 rac1 nm-system-settings:    ifcfg-rh:     error: Missing or invalid IP4 prefix '0'

Jun  9 04:06:31 rac1 nm-system-settings:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-eth0 ...

Jun  9 04:06:31 rac1 nm-system-settings:    ifcfg-rh:     error: Missing or invalid IP4 prefix '0'

查看/etc/sysconfig/network-scripts/ifcfg-eth* 里面的文件

[root@rac1 network-scripts]# cat ifcfg-eth1

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]

DEVICE=eth1

HWADDR=00:0C:29:C9:C9:68

ONBOOT=yes

HOTPLUG=no

发现少了BOOTPROTO=dhcp这条语句

添加这句内容到配置文件就ok啦!!


你可能感兴趣的:(linux,网卡获取地址)