Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

Howto Public IPV6 routing to Docker/LXC containers

$
0
0
I am using Ubuntu 13.10. I have a public pool of ipv6 address's provided by my
hosting provider Linode. The pool is 2600:3c01:e000:0083::/64 routed to 2600:3c01::f03c:91ff:fe6e:2563
I want to assign address from this pool to Docker/Lxc containers.
I have seen an tried several different methods from various blog posts online with no success.
Currently I am attempting to use radvd and a bridge interface.
This setup seems to assign valid addresses to the containers from the pool,
however I cannot ping them from the host or Internet.


My setup currently looks like this..


On the Host


/etc/network/interfaces
Code:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).


# The loopback network interface
auto lo
iface lo inet loopback


# The primary network interface
auto eth0
iface eth0 inet dhcp
  up /sbin/ip -6 addr add 2600:3c01::f03c:91ff:fe6e:2563/64 dev eth0




iface eth0mvlan inet static
  address 192.168.1.1
  netmask 255.255.0.0
  pre-up ip link add eth0mvlan link eth0 type macvlan mode bridge


radvd.conf
Code:

interface eth0 {
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
AdvSendAdvert on;
AdvLinkMTU 1480;
    prefix 2600:3c01:e000:0083::/64 {
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr on;
    };
};


interface eth0mvlan {
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
AdvSendAdvert on;
AdvLinkMTU 1480;
    prefix 2600:3c01:e000:0083::/64 {
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr on;
    };
};


sysctl.conf
Code:

net.ipv6.conf.all.forwarding=1

ip -6 r
Code:

2600:3c01::/64 dev eth0  proto kernel  metric 256
fe80::/64 dev eth0  proto kernel  metric 256
fe80::/64 dev eth0mvlan  proto kernel  metric 256
fe80::/64 dev veth49fa  proto kernel  metric 256


route -6 -n


Code:

Kernel IPv6 routing table
Destination                    Next Hop                  Flag Met Ref Use If
2600:3c01::/64                ::                        U    256 0    0 eth0
fe80::/64                      ::                        U    256 0    0 eth0
fe80::/64                      ::                        U    256 0    0 eth0mvlan
fe80::/64                      ::                        U    256 0    0 veth49fa
::/0                          ::                        !n  -1  1    60 lo
::1/128                        ::                        Un  0  1  834 lo
2600:3c01::/128                ::                        Un  0  1    0 lo
2600:3c01::f03c:91ff:fe6e:2563/128 ::                        Un  0  1    52 lo
fe80::/128                    ::                        Un  0  1    0 lo
fe80::/128                    ::                        Un  0  1    0 lo
fe80::/128                    ::                        Un  0  1    0 lo
fe80::485c:1eff:fe43:a186/128  ::                        Un  0  1    0 lo
fe80::5c40:b6ff:fe81:8189/128  ::                        Un  0  1    0 lo
fe80::f03c:91ff:fe6e:2563/128  ::                        Un  0  1  262 lo
ff00::/8                      ::                        U    256 1    0 eth0
ff00::/8                      ::                        U    256 1    0 eth0mvlan
ff00::/8                      ::                        U    256 0    0 veth49fa
::/0                          ::                        !n  -1  1    60 lo


And then on a container...


ip -6 r
Code:

2600:3c01:e000:83::/64 dev eth0  proto kernel  metric 256  expires 86396sec
fe80::/64 dev eth0  proto kernel  metric 256
default via fe80::485c:1eff:fe43:a186 dev eth0  proto ra  metric 1024  expires 26sec


route -6 -n


Code:

Kernel IPv6 routing table
Destination                    Next Hop                  Flag Met Ref Use If
2600:3c01:e000:83::/64        ::                        UAe  256 0    0 eth0
fe80::/64                      ::                        U    256 0    0 eth0
::/0                          fe80::485c:1eff:fe43:a186  UGDAe 1024 0    0 eth0
::/0                          ::                        !n  -1  1    1 lo
::1/128                        ::                        Un  0  1    4 lo
2600:3c01:e000:83:d82a:c7ff:fe78:68e3/128 ::                        Un  0  1    0 lo
fe80::d82a:c7ff:fe78:68e3/128  ::                        Un  0  1    0 lo
ff00::/8                      ::                        U    256 1    0 eth0
::/0                          ::                        !n  -1  1    1 lo


This is all out side my realm of expertise so any input is much appreciated.

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>