Macbook12 macvlan Parent network card

Hallo,

Started to bring my home-automation via Raspberry in Docker.

Therefore I reused an old macbook12 ( 8,1 2015 ) and installed as OS Ubuntu 24 - Running well using WiFi

I installed docker and portainer. And did the first examples via homebrige and iobroker in host mode, also run.

Now I want to setup a macvlan. Used some youtube videos and a German version of a ip calculator http://jodies.de

I search for the parent network card via ifconfig:

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:7bff:fe73:92c3  prefixlen 64  scopeid 0x20<link>
        ether 02:42:7b:73:92:c3  txqueuelen 0  (Ethernet)
        RX packets 15644  bytes 26390419 (26.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18978  bytes 8837459 (8.8 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enx5c5310751877: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.153  netmask 255.255.255.0  broadcast 192.168.178.255
        inet6 fde5:af50:966a:0:41d3:8697:5386:a4cc  prefixlen 64  scopeid 0x0<global>
        inet6 2003:d8:b737:6600:994f:6662:9e25:8c0c  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::211f:5d31:417a:6758  prefixlen 64  scopeid 0x20<link>
        inet6 2003:d8:b737:6600:1533:c703:2b54:53f1  prefixlen 64  scopeid 0x0<global>
        inet6 fde5:af50:966a:0:2aae:55c9:fe59:d70  prefixlen 64  scopeid 0x0<global>
        ether 5c:53:10:75:18:77  txqueuelen 1000  (Ethernet)
        RX packets 781057  bytes 989559748 (989.5 MB)
        RX errors 0  dropped 4636  overruns 0  frame 0
        TX packets 93503  bytes 22163672 (22.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Lokale Schleife)
        RX packets 30334  bytes 31121282 (31.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30334  bytes 31121282 (31.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth250cef1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::1076:e8ff:fee0:e19  prefixlen 64  scopeid 0x20<link>
        ether 12:76:e8:e0:0e:19  txqueuelen 0  (Ethernet)
        RX packets 15644  bytes 26609435 (26.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 19046  bytes 8847036 (8.8 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.118  netmask 255.255.255.0  broadcast 192.168.178.255
        inet6 fe80::3c55:871e:142b:9a85  prefixlen 64  scopeid 0x20<link>
        inet6 fde5:af50:966a:0:b9f9:b53a:47af:fc47  prefixlen 64  scopeid 0x0<global>
        inet6 2003:d8:b737:6600:a6fb:9bd1:396f:ddac  prefixlen 64  scopeid 0x0<global>
        inet6 2003:d8:b737:6600:8df2:e1a0:81ed:b9cc  prefixlen 64  scopeid 0x0<global>
        inet6 fde5:af50:966a:0:9e61:db8b:d54b:1c56  prefixlen 64  scopeid 0x0<global>
        inet6 2003:d8:b737:6600:f62e:e278:d6bb:de9f  prefixlen 64  scopeid 0x0<global>
        inet6 fde5:af50:966a:0:d06:a11f:80b2:31e4  prefixlen 64  scopeid 0x0<global>
        ether a8:66:7f:1e:35:49  txqueuelen 1000  (Ethernet)
        RX packets 1177496  bytes 303689403 (303.6 MB)
        RX errors 0  dropped 11843  overruns 0  frame 0
        TX packets 5508362  bytes 8178628095 (8.1 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I indentify the enx5c5310751877 as LAN and the wlp1s0 as WiFi network cards there.

When I generate in portainer - network - a macvlan for LAN everything is workig and I can connect a container via the macvlan and i get a ip-adress from the range and and can ping and work from my network.

When I delete the LAN Network and want to do the same for WiFi network card. The network is setup and I also can add it to the container. But then I can’t ping in my network or also 8.8.8.8.And I’m also not reachable.

Any idea what I made wrongly?

root@a69941216712:/homebridge $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.16  netmask 255.255.255.0  broadcast 192.168.178.255
        ether 02:42:c0:a8:b2:10  txqueuelen 0  (Ethernet)
        RX packets 120  bytes 7542 (7.5 KB)
        RX errors 0  dropped 58  overruns 0  frame 0
        TX packets 42  bytes 1764 (1.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 49  bytes 5122 (5.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 49  bytes 5122 (5.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@a69941216712:/homebridge $ ping 192.168.178.1
PING 192.168.178.1 (192.168.178.1) 56(84) bytes of data.
From 192.168.178.16 icmp_seq=1 Destination Host Unreachable

As far as I know, MAcVLAN requires wired networks. Maybe IPVLan could work.

1 Like

This blog post describes it in detail:

The major takeaway is

Most likely the driver does not support the AP mode and 4addr.

2 Likes

thx for the fast answers, then I have to run the Macbook alsways on LAN. As I also need always power no problem

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.