Hello there.
I’m having issues using macvlan or ipvlan with docker.
I am following along this video https://www.youtube.com/watch?v=bKFMS5C4CG0 to test it, but the macvlan and ipvlan ways are not working for me.
I have a manjaro system and I have 2 NICs that can see the internet ( a wifi card and a USB dongle ).
I have tested manually with docker containers on each networks, and they work fine. Both can see the internet.
When I create the macvlan or ipvlan networks, any container I put in the network, cannot see anything. nor the gateway, neither anything else.
I’m very stuck, I googled around but I cannot figure out what the issue is.
( I also set promicuous mode to the NIC and rebooted my system ).
Any idea or any help to debug this?
Thank you.
an example :
( I’m trying here to use my USB dongle internet wwp14s0u9i1
)
❯ ip route show
default via 10.135.120.1 dev wlp10s0 proto dhcp src 10.135.120.34 metric 600
default via 10.236.176.185 dev wwp14s0u9i1 proto static metric 700
10.135.120.0/24 dev wlp10s0 proto kernel scope link src 10.135.120.34 metric 600
10.236.176.184/30 dev wwp14s0u9i1 proto kernel scope link src 10.236.176.186 metric 700
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-96cf87b07d73 proto kernel scope link src 172.18.0.1 linkdown
~
❯ docker network create -d ipvlan \
--subnet 10.236.176.0/24 \
--gateway 10.236.176.185 \
-o parent=wwp14s0u9i1 \
smarty
14ec18eb6a4482ee52a1b8213a1d8ac7e6959fa4c3f894ea04b112eb217b62b5
~
❯ docker run --rm -it --network smarty --ip 10.236.176.188 alpine:latest ping 10.236.176.185
PING 10.236.176.185 (10.236.176.185): 56 data bytes
^C
--- 10.236.176.185 ping statistics ---
9 packets transmitted, 0 packets received, 100% packet loss
~ took 8s
❯ ping -I wwp14s0u9i1 10.236.176.185
PING 10.236.176.185 (10.236.176.185) from 10.236.176.186 wwp14s0u9i1: 56(84) bytes of data.
^C
--- 10.236.176.185 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4066ms
~ took 4s
❯ ping -I wwp14s0u9i1 1.1.1.1
PING 1.1.1.1 (1.1.1.1) from 10.236.176.186 wwp14s0u9i1: 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=55 time=755 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=55 time=335 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=55 time=343 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=55 time=322 ms
^C
--- 1.1.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 322.309/438.916/755.353/182.845 ms
~ took 3s
❯ docker run --rm -it --network smarty --ip 10.236.176.188 alpine:latest ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
^C
--- 1.1.1.1 ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss