/etc/sysconfig/network-scripts/ifcfg-eth0
:
EVICE=eth11
TYPE=Ethernet
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.1.7
GATEWAY=192.168.1.2
NETMASK=255.255.255.0
DNS1=192.168.1.7
DNS2=192.168.1.2
DNS3=168.126.63.1
并重新启动网络后
eth11 Link encap:Ethernet HWaddr 00:0C:29:E4:AD:EB
inet6 addr: fe80::20c:29ff:fee4:adeb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1163 errors:0 dropped:0 overruns:0 frame:0
TX packets:561 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:117996 (115.2 KiB) TX bytes:73410 (71.6 KiB)
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:65536 Metric:1
RX packets:72 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5384 (5.2 KiB) TX bytes:5384 (5.2 KiB)
eth11
不配置静态IP。任何想法?
答案1
将 onboot 值更改为是的,表示该设备应在启动时激活。
onboot=no
到
onboot=yes
该设备应在启动时激活