Problema de rede de ponte Linux KVM / QEMU Guest

1

Eu tenho um Convidado do KVM com um adaptador conectado a uma interface de ponte, que possui um nic físico. A rede do nic físico tem DHCP no intervalo 192.168.1.0/24.

Meu convidado não obtém um endereço DHCP e, atribuindo estaticamente o IP, resulta em conectividade sem camada 2.

Meu convidado conseguiu uma rede 192.168.2.0/24, mas acho que veio por causa do KVM. Eu não quero que o host participe da rede, além de passar a camada 2 entre o adaptador físico e o guest (s), usando a bridge.

Minha configuração:

[root@host ~]# brctl show
br.4094     8000.406231001c29   yes     enp0s20u8
                                        enp1s0.4094
                                        vnet0

[root@host ~]# ip link list
~
4: enp0s20u8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br.4094 state UP mode DEFAULT group default qlen 1000
    link/ether a2:72:9f:e6:43:96 brd ff:ff:ff:ff:ff:ff
~
6: br.4094: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 40:62:31:00:1c:29 brd ff:ff:ff:ff:ff:ff
~
40: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br.4094 state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:54:00:3f:95:26 brd ff:ff:ff:ff:ff:ff

[root@host ~]# ip addr list
~
4: enp0s20u8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br.4094 state UP group default qlen 1000
    link/ether a2:72:9f:e6:43:96 brd ff:ff:ff:ff:ff:ff
~
6: br.4094: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 40:62:31:00:1c:29 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.155/24 brd 192.168.1.255 scope global dynamic br.4094
       valid_lft 55343sec preferred_lft 55343sec
    inet6 2600:380:772e:af16:4262:31ff:fe00:1c29/64 scope global mngtmpaddr dynamic 
       valid_lft 85896sec preferred_lft 13896sec
    inet6 fe80::4262:31ff:fe00:1c29/64 scope link 
       valid_lft forever preferred_lft forever
~
13: enp1s0.4094@enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br.4094 state UP group default qlen 1000
    link/ether 40:62:31:00:1c:29 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4262:31ff:fe00:1c29/64 scope link 
    valid_lft forever preferred_lft forever
~
40: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br.4094 state UNKNOWN group default qlen 1000
link/ether fe:54:00:3f:95:26 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fe3f:9526/64 scope link 
   valid_lft forever preferred_lft forever

O snippet da minha configuração para a VM:

<interface type='bridge'>
  <mac address='52:54:00:3f:95:26'/>
  <source bridge='br.4094'/>
  <model type='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
    
por user1955162 27.08.2018 / 22:21

0 respostas