Linux VRF e Multicast IP

1

Estou tentando usar VRFs no Xubuntu 18.04, mas não estou tendo muita sorte quando se trata de endereços IP multicast. Eu tenho usado o link como uma diretriz.

Esta é minha configuração:

sudo ip addr add 192.168.0.1/24 dev enp0s8
sudo ip li set dev enp0s8 up
sudo ip link add vrf-blue type vrf table 10
sudo ip link set dev vrf-blue up
sudo ip link set dev enp0s8 master vrf-blue

A saída de ip a é a seguinte:

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: enp0s3: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 08:00:27:0c:19:91 brd ff:ff:ff:ff:ff:ff
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master vrf-blue state UP group default qlen 1000
    link/ether 08:00:27:5e:ed:76 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.1/24 scope global enp0s8
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe5e:ed76/64 scope link 
       valid_lft forever preferred_lft forever
4: vrf-blue: <NOARP,MASTER,UP,LOWER_UP> mtu 65536 qdisc noqueue state UP group default qlen 1000
    link/ether 8a:f6:90:1c:c1:1e brd ff:ff:ff:ff:ff:ff

A saída de ip route show table 10 :

default via 192.168.0.2 dev enp0s8 
broadcast 192.168.0.0 dev enp0s8 proto kernel scope link src 192.168.0.1 
192.168.0.0/24 dev enp0s8 proto kernel scope link src 192.168.0.1 
local 192.168.0.1 dev enp0s8 proto kernel scope host src 192.168.0.1 
broadcast 192.168.0.255 dev enp0s8 proto kernel scope link src 192.168.0.1 

Quando faço ping em um endereço local, posso ver os pacotes ICMP na interface e no dispositivo mestre VRF executando tcpdump -I vrf-blue e tcpdump -I enp0s8 , no entanto, se eu fizer ping em um endereço multicast, só consigo ver os pacotes na captura correndo sobre o VRF não da interface. Eu tentei definir o sinalizador de difusão seletiva no VRF, mas tem pouco efeito.

ping 224.0.0.1 -I vrf-blue
ping 192.168.0.2 -I vrf-blue

Entendo que o ping multicast deve ser enviado em qualquer interface conectada ao VRF, alguém poderia aconselhar?

    
por JMercer 21.07.2018 / 00:38

1 resposta

0

Eu postei a mesma pergunta no fórum da Cumulus Networks; David Ahern (autor de grande parte do código VRF no kernel) respondeu:

IPv4 multicast packets can be received on a VRF device -- an unintended side effect leveraged by a user and so not able to make that change. In general multicast and linklocal (IPv6) are meant to be tied to the real device, not the VRF device. Meaning, packet transmit has to be done on the enslaved device. Trying to send packets to an mcast address via the VRF device are not replicated per enslaved device.

Or at least that is how I remember it working.

Agora tenho esse trabalho na v4.17 com o soquete vinculado à interface em vez do VRF quando o IP multicast está sendo enviado.

    
por 25.07.2018 / 14:24