The virtual network (virbr0) used for Network address translation (NAT) which allows guests to access to network services. However, NAT slows down things and only recommended for desktop installations. To disable Network address translation (NAT) forwarding type the following commands:
Display Current Setup
Type the following command:
# ifconfig
Sample outputs:
virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:39 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:7921 (7.7 KiB)
Or use the following command:
# virsh net-list
Sample outputs:
Name State Autostart ----------------------------------------- default active yes
To disable virbr0, enter:
# virsh net-destroy default
# virsh net-undefine default
# service libvirtd restart
# ifconfig
This entry is 9 of 14 in the CentOS / Redhat (RHEL) KVM Virtulization series. Keep reading the rest of the series:
- CentOS / Redhat: Install KVM Virtualization Software
- CentOS / Redhat: KVM Bridged Network Configuration
- KVM virt-manager: Install CentOS As Guest Operating System
- KVM virt-install: Install FreeBSD / CentOS As Guest Operating System
- KVM: Install CentOS / RHEL Using Kickstart File (Automated Installation)
- Troubleshooting KVM Virtualization Problem With Log Files
- KVM Virsh: Redirect FreeBSD Console To A Serial Port
- KVM: Starting / Stopping Guest Operating Systems With virsh Command
- Linux KVM: Disable virbr0 NAT Interface
- FreeBSD / OpeBSD Running in KVM Does Not Accept FTP Traffic
- KVM: Start a Virtual Machine / Guest At Boot Time
- KVM virt-install: Install OpenBSD As Guest Operating System
- Linux KVM: OpenBSD Guest Hangs At Starting tty Flags
- KVM Virtualization: Start VNC Remote Access For Guest Operating Systems
🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 22 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Hi Vivek,
Whether disabling virbr0 i mean the steps you have given above needs a restart of the machine.
No just restart the libvirtd service.
If we shutdown the libvirtd service as we are not using it, whether virbr0 interface will come down and not show up in ifconfig.
How would I reverse this?
Thanks for this tip! I was getting frustrated for a couple of hours trying to disable this nic!
Great topic
please tell me how I can enable virbr0 if it was disable ?
Reply ASAP
Regards
Thank you
You can use “net-autostart default –disable” instead of “net-undefine default”. This keeps the config on disk so that you may reenable it later if you need it (with “net-autostart default”).
Negative, this did not work for me on centos 6.3. The article steps did work though.
virsh net-autostart default –-disable then reboot worked on RHEL6.4. Thanks
Thank you!
I had no idea how to disable virbr0.
Very useful to your post.
Hugs!
Thanks !
Worked very well.
Don’t know whether we can disable it at OS installation itself, if not required.
Found this on a machine installed by 3rd party and was taking lot of load.
regards
Thanks, you safe me really
Thanks – worked just fine on a CentOS 5.8/64 environment on a big server that I want to set up with Xen or KVM – but no NAT is needed/wanted. Next step is to set up a bridge… but not virbr0.
thanks, works very well
This tip helped me in Red Hat 6.4 also had to reboot system
now virbr0 is disabled.
Thanks a lot.
ndawg
Thanks a lot now my virbr() disabled.
to reverse this you need to recreate default virbr0
Why is this enabled by default after a fresh install?
I guess its related to a guest login ?
thank you so much
Thanks, your article just helped me :)
Thanks a lot , very precise and useful