≡ Menu

Linux KVM: Disable virbr0 NAT Interface

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:  Bcast:  Mask:
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          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

Share this tutorial on:
{ 21 comments… add one }
  • Pankaj Gadhari September 14, 2010, 5:25 pm

    Hi Vivek,

    Whether disabling virbr0 i mean the steps you have given above needs a restart of the machine.

    • nixCraft September 14, 2010, 6:06 pm

      No just restart the libvirtd service.

      • Pankaj Gadhari September 14, 2010, 6:31 pm

        If we shutdown the libvirtd service as we are not using it, whether virbr0 interface will come down and not show up in ifconfig.

  • Simon Hamp November 25, 2010, 6:12 pm

    How would I reverse this?

  • ToddB January 2, 2011, 9:41 am

    Thanks for this tip! I was getting frustrated for a couple of hours trying to disable this nic!

  • Jony Mark February 5, 2011, 10:34 pm

    Great topic
    please tell me how I can enable virbr0 if it was disable ?
    Reply ASAP

  • MAD-Max August 2, 2011, 3:54 pm

    Thank you

  • Nignog November 28, 2011, 3:36 pm

    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”).

    • chadunplugged March 13, 2013, 10:25 pm

      Negative, this did not work for me on centos 6.3. The article steps did work though.

      • zizouya August 22, 2013, 8:35 pm

        virsh net-autostart default –-disable then reboot worked on RHEL6.4. Thanks

  • ANDRE June 16, 2012, 12:04 am

    Thank you!

    I had no idea how to disable virbr0.

    Very useful to your post.


  • jestin Paul August 1, 2012, 6:36 am

    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.


  • Manuel October 2, 2012, 9:34 pm

    Thanks, you safe me really

  • David Ramirez November 1, 2012, 3:38 pm

    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.

  • Suleman March 31, 2013, 11:12 am

    thanks, works very well

  • ndawg September 10, 2013, 10:46 pm

    This tip helped me in Red Hat 6.4 also had to reboot system
    now virbr0 is disabled.

    Thanks a lot.


  • sharif mridha August 14, 2014, 1:07 pm

    Thanks a lot now my virbr() disabled.

  • sudi July 31, 2015, 4:37 am

    to reverse this you need to recreate default virbr0

    # brctl addbr virbr0
    # ip addr add broadcast dev virbr0
    # ip link set dev virbr0 up
    # uuidgen virbr0 < gen uuid for virbr0
    # ifconfig | grep virbr0 < get the mac address
    # vim /root/default.xml
    # virsh net-list
     Name                 State      Autostart     Persistent
    # cp default.xml /var/lib/libvirt/network/
    # virsh net-define default.xml
    # virsh net-autostart default
    # service libvirtd restart
    # virsh net-list
     Name                 State      Autostart     Persistent
     default              active     yes           yes
  • fusch March 19, 2016, 4:38 pm

    Why is this enabled by default after a fresh install?
    I guess its related to a guest login ?

  • Khang February 15, 2017, 3:03 pm

    thank you so much

  • Kingneutron March 19, 2017, 9:20 pm

    Thanks, your article just helped me :)

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: