Centos7.5删除virbr0网卡

1.ifconfig查看linux网卡ip
[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.44.128 netmask 255.255.255.0 broadcast 192.168.44.255
inet6 fe80::27ec:9128:8fca:ee44 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:bc:a0:4a txqueuelen 1000 (Ethernet)
RX packets 1589 bytes 135466 (132.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 458 bytes 58192 (56.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

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 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

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:c9:f2:1e 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
2.关闭网卡virbr0
[root@localhost ~]# ifconfig virbr0 down
3.删除网卡virbr0
[root@localhost ~]# brctl delbr virbr0
4.virbr0是由libvirtd服务创建,libvirtd在guest里没啥卵用,所以干掉它,不然下次启动又创建了
[root@localhost ~]# systemctl disable libvirtd
Removed symlink /etc/systemd/system/multi-user.target.wants/libvirtd.service.
Removed symlink /etc/systemd/system/sockets.target.wants/virtlogd.socket.
Removed symlink /etc/systemd/system/sockets.target.wants/virtlockd.socket.
5.确认网卡virbr0已被删除
[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.44.128 netmask 255.255.255.0 broadcast 192.168.44.255
inet6 fe80::27ec:9128:8fca:ee44 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:bc:a0:4a txqueuelen 1000 (Ethernet)
RX packets 3624 bytes 298070 (291.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 517 bytes 66091 (64.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

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 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

社区地址:https://eco.dameng.com

 

Centos7.5删除virbr0网卡 | 达梦技术社区 (dameng.com)

 

posted @ 2024-06-23 15:34  seasonzone  阅读(17)  评论(0编辑  收藏  举报