在CentOS 7的安装过程中如果有选择相关虚拟化的的服务安装系统后,启动网卡时会发现有一个以网桥连接的私网地址的virbr0网卡,这个是因为在虚拟化中有使用到libvirtd服务生成的,如果不需要可以关闭后去掉:
brctl show #查看网桥状态
brctl delif <网桥名> <端口名> #卸载网桥上的端口
ifconfig #查看是否有网桥网卡名
ifconfig <网桥名> down #关闭此网卡
brctl delbr <网桥名> #删除网桥
systemctl disable libvirtd.service
#禁止开机自启动
配置实例:
[root@B06 ~]# [root@B06 ~]# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.5254007dad83 yes virbr0-nic [root@B06 ~]# [root@B06 ~]# brctl delif virbr0 virbr0-nic [root@B06 ~]# [root@B06 ~]# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.000000000000 yes [root@B06 ~]# [root@B06 ~]# ip add 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 0c:da:41:1d:49:d2 brd ff:ff:ff:ff:ff:ff inet 10.183.48.127/22 brd 10.153.51.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::270f:ed7:e55c:1130/64 scope link valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 0c:da:41:1d:95:c3 brd ff:ff:ff:ff:ff:ff inet 172.16.10.113/16 brd 172.16.255.255 scope global eth1 valid_lft forever preferred_lft forever inet6 fe80::bab4:bacc:e3ab:bef4/64 scope link valid_lft forever preferred_lft forever 4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0 valid_lft forever preferred_lft forever 5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000 link/ether 52:54:00:7d:ad:83 brd ff:ff:ff:ff:ff:ff [root@B06 ~]# ifconfig virbr0 down [root@B06 ~]# [root@B06 ~]# brctl delbr virbr0 [root@B06 ~]# [root@B06 ~]# systemctl disable libvirtd.service Removed symlink /etc/systemd/system/multi-user.target.wants/libvirtd.service. Removed symlink /etc/systemd/system/sockets.target.wants/virtlockd.socket. Removed symlink /etc/systemd/system/sockets.target.wants/virtlogd.socket. [root@B06 ~]#