s
查看所有网口
[root@centos7 ~]$ ifconifg -a
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0 inet6 fe80::42:37ff:fe02:a1a0 prefixlen 64 scopeid 0x20<link> ether 02:42:37:02:a1:a0 txqueuelen 0 (Ethernet) RX packets 5 bytes 376 (376.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3 bytes 266 (266.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.11 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::4a2e:2ef0:7ac7:7c50 prefixlen 64 scopeid 0x20<link> inet6 240e:3a1:a54:cff0:ed44:a75d:51e8:64ca prefixlen 64 scopeid 0x0<global> ether 8c:16:45:dd:4b:11 txqueuelen 1000 (Ethernet) RX packets 22110 bytes 1952270 (1.8 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2626 bytes 297042 (290.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 17 memory 0xcc700000-cc720000 enp1s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.8 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::443b:98a:1aa7:3da7 prefixlen 64 scopeid 0x20<link> inet6 240e:3a1:a54:cff0:7bc7:996:796a:f486 prefixlen 64 scopeid 0x0<global> ether a0:36:9f:85:b9:30 txqueuelen 1000 (Ethernet) RX packets 593109 bytes 443857632 (423.2 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 421884 bytes 88356639 (84.2 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xcc280000-cc2fffff enp1s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.12 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::a155:4daa:5e79:47c4 prefixlen 64 scopeid 0x20<link> inet6 240e:3a1:a54:cff0:312e:1407:91d6:33fb prefixlen 64 scopeid 0x0<global> ether a0:36:9f:85:b9:31 txqueuelen 1000 (Ethernet) RX packets 22125 bytes 1868857 (1.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2629 bytes 287170 (280.4 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xcc200000-cc27ffff enp1s0f2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 240e:3a1:a54:cff0:346d:b5b3:dadf:5873 prefixlen 64 scopeid 0x0<global> inet6 fe80::11c9:791f:5fa6:3060 prefixlen 64 scopeid 0x20<link> ether a0:36:9f:85:b9:32 txqueuelen 1000 (Ethernet) RX packets 22129 bytes 1870074 (1.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2627 bytes 286950 (280.2 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xcc180000-cc1fffff enp1s0f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.9 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::6f0e:d:a77d:7662 prefixlen 64 scopeid 0x20<link> inet6 240e:3a1:a54:cff0:7ebb:e557:af6a:7cc9 prefixlen 64 scopeid 0x0<global> ether a0:36:9f:85:b9:33 txqueuelen 1000 (Ethernet) RX packets 22112 bytes 1864944 (1.7 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2627 bytes 286611 (279.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xcc100000-cc17ffff lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 15782 bytes 24661811 (23.5 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 15782 bytes 24661811 (23.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:c1:3b:b5 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
关闭多余网口
[root@centos7 ~]$ ifconifg down virbr0
[root@centos7 ~]$ ifconifg down enp1s0f3
[root@centos7 ~]$ ifconifg down enp1s0f2
[root@centos7 ~]$ ifconifg down enp1s0f1
[root@centos7 ~]$ ifconifg down en0
end