I have a pool of public ipv6 address I want to use to expose lxc containers.
On the host machine I created a macvlan
interface eth0-macvlan
and bound a public address to it 2600:3c01:e000:83::1/64
. I then bound the containers eth1
to and address on the same subnet 2600:3c01:e000:83::11/64
I can ping the container address from the host machine, but not the internet. Do I need to add a route? I might be doing this completely wrong.
eth0 Link encap:Ethernet HWaddr f2:3c:91:6e:25:63
inet addr:173.230.156.218 Bcast:173.230.156.255 Mask:255.255.255.0
inet6 addr: fe80::f03c:91ff:fe6e:2563/64 Scope:Link
inet6 addr: 2600:3c01::f03c:91ff:fe6e:2563/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:955129 errors:0 dropped:0 overruns:0 frame:0
TX packets:547825 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1369203060 (1.3 GB) TX bytes:59723654 (59.7 MB)
eth0-macvlan Link encap:Ethernet HWaddr 1e:dd:2e:bf:86:3a
inet6 addr: fe80::1cdd:2eff:febf:863a/64 Scope:Link
inet6 addr: 2600:3c01:e000:83::1/64 Scope:Global
inet6 addr: 2600:3c01::1cdd:2eff:febf:863a/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3061 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:360888 (360.8 KB) TX bytes:7069 (7.0 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:196 errors:0 dropped:0 overruns:0 frame:0
TX packets:196 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:24808 (24.8 KB) TX bytes:24808 (24.8 KB)
lxcbr0 Link encap:Ethernet HWaddr 06:9d:8f:ec:b6:e1
inet addr:10.0.3.1 Bcast:10.0.3.255 Mask:255.255.255.0
inet6 addr: fe80::49d:8fff:feec:b6e1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:648 (648.0 B)
vethDqo9GU Link encap:Ethernet HWaddr 4e:e4:a8:3d:cf:f5
inet6 addr: fe80::4ce4:a8ff:fe3d:cff5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:648 (648.0 B) TX bytes:648 (648.0 B)
LXC container:
eth0 Link encap:Ethernet HWaddr da:e0:6a:b5:8b:b0
inet addr:172.17.0.2 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::d8e0:6aff:feb5:8bb0/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:648 (648.0 B) TX bytes:648 (648.0 B)
eth1 Link encap:Ethernet HWaddr 8e:29:ed:5d:0a:6d
inet6 addr: 2600:3c01::8c29:edff:fe5d:a6d/64 Scope:Global
inet6 addr: fe80::8c29:edff:fe5d:a6d/64 Scope:Link
inet6 addr: 2600:3c01:e000:83::11/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:68 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7047 (7.0 KB) TX bytes:4034 (4.0 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
UPDATE
Since the original posting I've setup radvd
and a bridge interface br0
Here is my radvd.conf
interface eth0 {
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
AdvSendAdvert on;
AdvLinkMTU 1480;
# Prefix of what i'm advertising
prefix 2600:3c01:e000:0083::/64 {
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
interface br0 {
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
AdvSendAdvert on;
AdvLinkMTU 1480;
# Prefix of what i'm advertising
prefix 2600:3c01:e000:0083::/64 {
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
ip -6 r
:
HOST:
2600:3c01::/64 dev eth0 proto kernel metric 256 expires 2545193sec
fe80::/64 dev eth0 proto kernel metric 256
fe80::/64 dev br0 proto kernel metric 256
fe80::/64 dev veth334e proto kernel metric 256
CONTAINER:
2600:3c01:e000:83::/64 dev eth0 proto kernel metric 256 expires 86395sec
fe80::/64 dev eth0 proto kernel metric 256
default via fe80::f83b:3bff:fef6:3759 dev eth0 proto ra metric 1024 expires 25sec
radvd
or just flippingnet.ipv6.conf.default.forwarding=1
ip -6 r
on both machines