Hi
Am 07.09.20 um 12:49 schrieb Schuldei, Andreas:
someone recommended that i should give br0 the same hardware address
as eno2.
Not in all cases. The example attached in the quotation below looks a little bit
confused.... there is more then one Bridge.
If I create an isolated guest-network with "virsh net-start default", i.e. with
NAT/netfilter and DHCP/dnsmasq, it looks like
the following example... the virtual MAC addresses are not identical to eth0.
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0
state UP group default qlen 1000
link/ether d0:50:12:34:56:78 brd ff:ff:ff:ff:ff:ff
10: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
group default qlen 1000
link/ether 52:54:00:0a:cd:21 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
11: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state
DOWN group default qlen 1000
link/ether 52:54:00:0a:cd:21 brd ff:ff:ff:ff:ff:ff
If I set up the VM as an integrated LAN-Client, 'virbr0-nic' is not necessary,
because the virtual NICs are connected directly
to br0 as master. Then it looks different with the MACs, the virtual interface for the
running VM has its own MAC and the VM
itself can receive a regulare LAN-IP from LAN-DHCP-Server, e.g. from DSL-Router in
private.
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0
state UP group default qlen 1000
link/ether d0:50:12:34:56:78 brd ff:ff:ff:ff:ff:ff
12: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group
default qlen 1000
link/ether d0:50:12:34:56:78 brd ff:ff:ff:ff:ff:ff
inet 10.0.1.20/24 brd 10.10.1.255 scope global dynamic br0
valid_lft 862367sec preferred_lft 862367sec
13: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0
state UNKNOWN group default qlen 1000
link/ether fe:54:00:e6:57:ff brd ff:ff:ff:ff:ff:ff
Imho you have to differentiate, whether the VM is running in an isolated network or the VM
is running as a regular LAN client.
HTH & BR, Tom
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: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default
qlen 1000
   link/ether 34:48:ed:f0:a9:e8 brd ff:ff:ff:ff:ff:ff
   inet 10.12.0.13/24 brd 10.12.0.255 scope global eno1
      valid_lft forever preferred_lft forever
   inet6 fe80::3648:edff:fef0:a9e8/64 scope link
      valid_lft forever preferred_lft forever
3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP
group default qlen 1000
   link/ether 34:48:ed:f0:a9:e9 brd ff:ff:ff:ff:ff:ff
   inet6 fe80::3648:edff:fef0:a9e9/64 scope link
      valid_lft forever preferred_lft forever
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group
default qlen 1000
   link/ether 34:48:ed:f0:a9:e9 brd ff:ff:ff:ff:ff:ff
   inet6 fe80::e467:7bff:fe87:b5ca/64 scope link
      valid_lft forever preferred_lft forever
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
group default qlen 1000
   link/ether 52:54:00:2b:e3:f7 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
6: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state
DOWN group default qlen 1000
   link/ether 52:54:00:2b:e3:f7 brd ff:ff:ff:ff:ff:ff
20: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0
state UNKNOWN group default qlen 1000
   link/ether fe:54:00:29:b6:e0 brd ff:ff:ff:ff:ff:ff
   inet6 fe80::fc54:ff:fe29:b6e0/64 scope link
      valid_lft forever preferred_lft forever