Macvlan based interface pings from host but not from namespace
        Posted  
        
            by 
                jtlebi
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by jtlebi
        
        
        
        Published on 2013-10-20T13:52:15Z
        Indexed on 
            2013/10/20
            15:56 UTC
        
        
        Read the original article
        Hit count: 303
        
My setup:
- Private network vboxnet110.0.7.0/24
- 1 Host, ubuntu desktop
- 1 VM, ubuntu server (VirtualBox)
Adressing layout:
- HOST: 10.0.7.1
- VM: 10.0.7.101
- VM MAC NAMESPACE: 10.0.7.102
On the VM, I ran the following commands:
ip netns add mac                        # create a new nmespace
ip link add link eth0 mac0 type macvlan # create a new macvlan interface
ip link set mac0 netns mac
On the mac namespace, inside the VM:
ip link set lo up
ip link set mac up
ip addr add 10.0.7.102/24 dev mac0
So that we basically end up with: (Like Inception ?)
+------------------------+
| Host: 10.0.7.1         |
|                        |
| +--------------------+ |
| | VM: 10.0.7.101     | |
| |                    | |
| | +----------------+ | |
| | | NS: 10.0.7.102 | | |
| | |                | | |
| | +----------------+ | |
| +--------------------+ |
+------------------------+
What works:
- Ping between HostandVM
- Ping between NSandNS
- dhclient from NS
What does not work:
- ping between NSandVM
- ping between NSandHost
Where I started to go nuts:
- tcpdump on host(the real machine) actually shows ARP request AND replies
- tcpdump on NSshows ARP requests sent to the host
- tcpdump on VMmakes the whole mess work (!) --> ping starts to get answers when tcpdump is started on the VM ?!?
So, I bet you were eager for it, my question is: how to I make it work ? I suspect something's wrong with ARP on the macvlan inside the NS but can't figure out what exactly...
Btw, I did the same expérimentations with the mac0 interface directly on the VM (no namespace) and it worked flawlessly.
© Server Fault or respective owner