Can't change state of vibr0 or vibr0-nic

Issues related to configuring your network
Post Reply
bodisha
Posts: 52
Joined: 2015/06/06 23:55:29

Can't change state of vibr0 or vibr0-nic

Post by bodisha » 2020/07/24 16:18:14

What started as a simple exercise to make sure I understood the ip command has turned into me being confused about the state of vibr0 and vibr0-nic. I understand they are part of the hypervisor, but what I'm confused about is their state. And the fact I can't change them.

Initially I was checking to see what interfaces were in an UP state with

Code: Select all

ip -4 a s up
But virbr0 came back as down

Code: Select all

4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
Obviously it still has an IP Address... Which I'm unsure what's going on here. I've tried using both

Code: Select all

ifdown virbr0
Which gives me a usage message

Code: Select all

usage: ifdown <configuration>
and

Code: Select all

ifconfig virbr0 down
It didn't come back with any errors... but neither command changes its state. Can someone explain to me what's going on here? Thanks!

User avatar
TrevorH
Forum Moderator
Posts: 29932
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Can't change state of vibr0 or vibr0-nic

Post by TrevorH » 2020/07/24 18:43:47

Do you run Virtual Machines on your computer?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 3180
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Can't change state of vibr0 or vibr0-nic

Post by jlehtone » 2020/07/25 20:09:04

First a note:
'ifconfig' is one of the commands in net-tools package.
Package iproute2 was introduced two decades ago to replace ifconfig. The 'ip' is part of iproute2.
'ifdown' is one of the scripts that used to be part of network.service. These scripts did first use net-tools, then iproute2, but ...
NetworkManager.service appeared as replacement for network.service. It's command-line tool is 'nmcli'.
I'm not sure who provides 'ifdown' in CentOS 8 and what it calls.

You should learn the 'nmcli', unless you have explicitly shifted from NetworkManager to network.service.
(The 'ip' is still great for reading what NetworkManager has set.)

Neither NetworkManager.service nor network.service (if installed) does manage virbr0*.
These interfaces are managed by libvirtd.service.
The default installation of libvirt defines a virtual network "default", which is auto-started.
The host provides DHCP and DNS (with 'dnsmasq') for VMs that are attached to the "default".

The proper way to change the state of virbr0* is to tell the libvirtd to change their state.

If you don't have VMs nor will have them, and you simply got libvirt as part of default install,
then you can disable the libvirtd.service and reboot. Since libvirtd won't start, it won't create
the virbr* interfaces.

Post Reply

Return to “CentOS 8 - Networking Support”