Noo*_*oob 5 linux redhat centos
我的 ifcfg-eth1 配置如下
DEVICE=eth1
TYPE=Ethernet
UUID=5e4f36f8-14eb-4f0c-8fa9-3af9be3899a7
ONBOOT=no
NM_CONTROLLED=yes
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth1"
HWADDR=00:0C:29:8A:A5:67
PEERDNS=yes
PEERROUTES=yes
Run Code Online (Sandbox Code Playgroud)
q1) ONBOOT 做什么?我已将其设置为 NO 但当我执行 IFCONFIG 时我仍然看到界面
[oracle@SJOAM network-scripts]$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0C:29:8A:A5:5D
inet addr:192.168.1.25 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe8a:a55d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:61 errors:0 dropped:0 overruns:0 frame:0
TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13496 (13.1 KiB) TX bytes:2231 (2.1 KiB)
eth1 Link encap:Ethernet HWaddr 00:0C:29:8A:A5:67
inet6 addr: fe80::20c:29ff:fe8a:a567/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:37 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2412 (2.3 KiB) TX bytes:258 (258.0 b)
Run Code Online (Sandbox Code Playgroud)
当我发出 ifdown eth1 时也是一样,ifconfig 仍然显示 eth1。
只有当我发出 ifconfig eth1 stop 时,eth1 才会从 ifconfig 中完全删除。
q2) ONBOOT=no, ifdown eth1 和 ifconfig eth1 down 有什么区别?