Sample Header Ad - 728x90

Why I can't ping between two siblings macvlans in bridge mode?

0 votes
1 answer
849 views
In a Ubuntu 20.04 machine connected to my home LAN, I created macvlans under my ethernet device: $ sudo ip link add macvlan1 link enp37s0 type macvlan mode bridge $ sudo dhclient macvlan1 $ sudo ip link add macvlan2 link enp37s0 type macvlan mode bridge $ sudo dhclient macvlan2 By chance, they got the following addresses from DHCP: * macvlan1: 192.168.0.40 * macvlan2: 192.168.0.41 I could ping my router from each of them: $ ping 192.168.0.1 -I macvlan1 PING 192.168.0.1 (192.168.0.1) from 192.168.0.40 macvlan1: 56(84) bytes of data. 64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.713 ms 64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=1.25 ms 64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=1.20 ms ^C --- 192.168.0.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2034ms rtt min/avg/max/mdev = 0.713/1.052/1.245/0.240 ms $ ping 192.168.0.1 -I macvlan2 PING 192.168.0.1 (192.168.0.1) from 192.168.0.41 macvlan2: 56(84) bytes of data. 64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=1.15 ms 64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=1.13 ms 64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=1.07 ms 64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.548 ms 64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=0.619 ms ^C --- 192.168.0.1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4030ms rtt min/avg/max/mdev = 0.548/0.903/1.148/0.263 ms Since they are were created in bridge mode, virtual devices should be connected to each other. But I can't ping one from the other: $ ping 192.168.0.40 -I macvlan2 PING 192.168.0.40 (192.168.0.40) from 192.168.0.41 macvlan2: 56(84) bytes of data. ^C --- 192.168.0.40 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4128ms $ ping 192.168.0.41 -I macvlan1 PING 192.168.0.41 (192.168.0.41) from 192.168.0.40 macvlan1: 56(84) bytes of data. ^C --- 192.168.0.41 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2039ms Why I can't ping one from another? How to fix this?
Asked by lvella (551 rep)
Aug 1, 2020, 02:42 PM
Last activity: Aug 1, 2020, 04:37 PM