Hello,
I’ve a raspberry pi running Raspbian Buster with a fresh installation of LXD (3.22).
This raspberry pi has a static ip adress configured into /etc/dhcpcd.conf
I did an LXD init, created a profile, and linked my storage pool to it :
lxc profile list
+----------+---------+
| NAME | USED BY |
+----------+---------+
| default | 0 |
+----------+---------+
| rasticot | 3 |
+----------+---------+
My profile got a macvlan configuration
lxc profile show rasticot
config:
boot.autostart: "0"
description: Rasticot's profile
devices:
eth0:
nictype: macvlan
parent: eth0
type: nic
root:
path: /
pool: storage
type: disk
name: rasticot
used_by:
- /1.0/instances/najedha
- /1.0/instances/endor
- /1.0/instances/tython
The LXD configuration is the same in my other hosts, the difference is the distribution used (Ubuntu 18.04 vs Raspbian)
All of my containers are getting an IP adress from my dhcp server, which is also running inside a container on the same network
Problem
All of my containers installed into this host (raspbian) are getting trouble replying to arp request.
Example
If I do a ping from another computer into the same network
Envoi d’une requête 'Ping' 192.168.0.55 avec 32 octets de données :
Réponse de 192.168.0.110 : Impossible de joindre l’hôte de destination.
The host can see the right traffic, but the container never answer to that broadcast request.
sudo tcpdump arp host 192.168.0.110
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
13:47:18.749542 ARP, Request who-has 192.168.0.55 tell 192.168.0.110, length 46
13:47:19.554767 ARP, Request who-has 192.168.0.55 tell 192.168.0.110, length 46
13:47:20.554783 ARP, Request who-has 192.168.0.55 tell 192.168.0.110, length 46
13:47:21.562626 ARP, Request who-has 192.168.0.55 tell 192.168.0.110, length 46
13:47:22.554941 ARP, Request who-has 192.168.0.55 tell 192.168.0.110, length 46
13:47:23.555344 ARP, Request who-has 192.168.0.55 tell 192.168.0.110, length 46
Now if I go on the container and capture the same trafic
$ lxc exec tython bash
$ root@tython:~# tcpdump arp host 192.168.0.110
13:51:22.808657 ARP, Request who-has tython tell 192.168.0.110, length 46
13:51:22.808783 ARP, Reply tython is-at 00:16:3e:2a:4d:3c (oui Unknown), length 28
Envoi d’une requête 'Ping' 192.168.0.55 avec 32 octets de données :
Réponse de 192.168.0.55 : octets=32 temps<1ms TTL=64
Réponse de 192.168.0.55 : octets=32 temps<1ms TTL=64
The container is able to answer as long as I’m connected on it and use tcpdump to display traffic.
Of course, if I send a ping to 192.168.0.110 from my container, arp table of my computer will be adjusted and the container will be reacheable.
Here is the configuration of this container
lxc config show --expanded tython
architecture: armv7l
config:
boot.autostart: "0"
image.architecture: armhf
image.description: ubuntu 18.04 LTS armhf (release) (20200317)
image.label: release
image.os: ubuntu
image.release: bionic
image.serial: "20200317"
image.type: squashfs
image.version: "18.04"
security.privileged: "true"
volatile.base_image: 38acc14580aa421c9499dd64763c0ebed42b39b42612ca55bbd347ad488a0480
volatile.eth0.host_name: macef311301
volatile.eth0.hwaddr: 00:16:3e:2a:4d:3c
volatile.eth0.last_state.created: "false"
volatile.eth0.name: eth0
volatile.idmap.base: "0"
volatile.idmap.current: '[]'
volatile.idmap.next: '[]'
volatile.last_state.idmap: '[]'
volatile.last_state.power: STOPPED
devices:
eth0:
nictype: macvlan
parent: eth0
type: nic
root:
path: /
pool: storage
type: disk
ephemeral: false
profiles:
- rasticot
stateful: false
description: ""
Don’t really know where to look at, it seems to be a problem with my macvlan configuration, at least with this specific distribution.
When I use Wireshark to capture traffic on my LAN Network, there is no answer to the ARP request send by my computer. But why it works if I connect to the container and do any network manipulation ?
The hosts is blocking the traffic between the physical and the macvlan interface. How to debug the problem ?
Thank you !