58 lines
		
	
	
	
		
			815 B
		
	
	
	
		
			Text
		
	
	
	
	
	
		
		
			
		
	
	
			58 lines
		
	
	
	
		
			815 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| 
								 | 
							
								title: How to run LXC containers in IPv6 networks
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								pub_date: 2019-12-20
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								author: ungleich virtualisation team
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								twitter_handle: ungleich
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								_hidden: yes
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								_discoverable: no
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								abstract:
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								body:
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								## Assumptions
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								You have a computer with at least a /64 network routed to it.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								## Architecture
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								bridge, radvd,
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								## Configure LXC
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								[root@diamond ~]# cat /etc/lxc/default.conf
							 | 
						||
| 
								 | 
							
								#lxc.net.0.type = empty
							 | 
						||
| 
								 | 
							
								lxc.net.0.type = veth
							 | 
						||
| 
								 | 
							
								lxc.net.0.link = brlxc
							 | 
						||
| 
								 | 
							
								lxc.net.0.flags = up
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								## Create a bridge
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								## Configuring radvd
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								```
							 | 
						||
| 
								 | 
							
								interface brlxc
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								  AdvSendAdvert on;
							 | 
						||
| 
								 | 
							
								  MinRtrAdvInterval 3;
							 | 
						||
| 
								 | 
							
								  MaxRtrAdvInterval 5;
							 | 
						||
| 
								 | 
							
								  AdvDefaultLifetime 10;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  prefix 2a0a:e5c1:137:cafe::/64 {
							 | 
						||
| 
								 | 
							
								  };
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  RDNSS 2a0a:e5c0:2:1::5 2a0a:e5c0:2:1::6  { AdvRDNSSLifetime 6000; };
							 | 
						||
| 
								 | 
							
								  DNSSL nicotest.ungleich.ch {  AdvDNSSLLifetime 6000; } ;
							 | 
						||
| 
								 | 
							
								};
							 | 
						||
| 
								 | 
							
								```
							 |