9

In my CentOS 7.2, I installed the below packages:

yum install -y epel-release qemu-kvm libvirt virt-install bridge-utils

then when I show ip a:

[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e8:9a:8f:50:4a:dc brd ff:ff:ff:ff:ff:ff
    inet 13.19.241.25/29 brd 13.19.241.31 scope global em1
       valid_lft forever preferred_lft forever
    inet 13.19.241.26/8 brd 13.255.255.255 scope global em1
       valid_lft forever preferred_lft forever
    inet6 fe80::ea9a:8fff:fe50:4adc/64 scope link 
       valid_lft forever preferred_lft forever
3: em2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e8:9a:8f:50:4a:dd brd ff:ff:ff:ff:ff:ff
    inet 103.193.241.25/29 brd 103.193.241.31 scope global em2
       valid_lft forever preferred_lft forever
    inet6 fe80::ea9a:8fff:fe50:4add/64 scope link 
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:f9:a9:cf 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 master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:f9:a9:cf brd ff:ff:ff:ff:ff:ff

You see there add two network devices: virbr0 and virbr0-nic. what's them, what's the function of them?

and which package installed the two devices added?

1

1 Answer 1

9

When you installed the libvirt service, there will create the virbr0 automatically, it is a virtual network switch.

all the virtual machines will connect to the virbr0.

by default, virbr0 use NAT mode, can provide Internet access by NAT mode. by default, virbr0 assigned address 192.168.122.1, and it can provide DHCP service for other virtual interface who connected to it.

if you use brctl show, you can find a interface of virbr0 named virbr0-nic:

[root@localhost network-scripts]# brctl show
bridge name bridge id       STP enabled interfaces
...
virbr0      8000.5254003caaaa   yes     virbr0-nic 
2
  • 9
    So what is virbr0-nic ... of course I can see it with brctl, but your answer dodges the aspect of what the virb0-nic interface is (older versions of libvirt did not create it!). Commented Mar 24, 2020 at 19:44
  • 2
    Regarding the function of virbr0-nc (just to supply a MAC for the bridge) see unix.stackexchange.com/a/444863/31228 Commented Apr 17, 2020 at 6:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .