<div>Hi,</div><div><br></div><div>... news about my IPv4 container in my IPv6-only host :</div><div><br></div><div>2012/6/9 Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" target="_blank">list@fajar.net</a>></span></div>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
The default containers created from templates uses veth and bridged<br>networking. <b>If setup correctly</b>, that would mean the host (main system,<br>as you call it) behaves pretty much similar to an L2 switch. Which<br>
means that there's no requirement that the host should be connected<br>(IP-wise) to the guest. They only need to be connected on ethernet<br>level.</blockquote><div><br></div><div><br></div><div>Now trying to setup it correctly ;)</div>
<div>Sorry for annoying you again, but I couldn't make it work...</div><div>Maybe someone could help ?</div><div><br></div><div><br></div><div><br></div><div><b>My problem :</b></div><div>I <b>can't ping my gateway</b> 91.121.99.<b>254</b> from my container 91.121.99.167.</div>
<div>In host I try to tcpdump pings from container, but nothing interesting is listed.</div><div>I tried to add a specific host route to host 91.121.99.254 in container. The command works, but still can't ping it.</div>
<div><div><br></div><div><font face="'courier new', monospace"># ping 91.121.99.254</font></div><div><font face="'courier new', monospace">PING 91.121.99.254 (91.121.99.254) 56(84) bytes of data.</font></div>
<div><font face="'courier new', monospace">From 91.121.99.167 icmp_seq=1 Destination Host Unreachable</font></div><div><font face="'courier new', monospace">From 91.121.99.167 icmp_seq=2 Destination Host Unreachable</font></div>
<div><font face="'courier new', monospace">From 91.121.99.167 icmp_seq=3 Destination Host Unreachable</font></div></div><div><font face="'courier new', monospace"><br></font></div><div><div><font face="'courier new', monospace"># route add -host 91.121.99.254 eth0</font></div>
<div><font face="'courier new', monospace"># ping 91.121.99.254</font></div><div><font face="'courier new', monospace">PING 91.121.99.254 (91.121.99.254) 56(84) bytes of data.</font></div><div><font face="'courier new', monospace">From 91.121.99.167 icmp_seq=1 Destination Host Unreachable</font></div>
<div><font face="'courier new', monospace">From 91.121.99.167 icmp_seq=2 Destination Host Unreachable</font></div><div><font face="'courier new', monospace">From 91.121.99.167 icmp_seq=3 Destination Host Unreachable</font></div>
</div><div><br></div><div><br></div><div><br></div><div><b>Host configuration : </b>cat /etc/network/interfaces</div><div><div><font face="'courier new', monospace">auto lo</font></div><div><font face="'courier new', monospace">iface lo inet loopback</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">auto br0</font></div><div><font face="'courier new', monospace">iface br0 inet6 static</font></div>
<div><font face="'courier new', monospace"> bridge_ports eth0</font></div><div><font face="'courier new', monospace"> bridge_fd 0</font></div><div><font face="'courier new', monospace"> address 2001:41d0:1:98a7::1</font></div>
<div><font face="'courier new', monospace"> netmask 64</font></div><div><font face="'courier new', monospace"> gateway 2001:41d0:1:98FF:FF:FF:FF:FF</font></div><div><br></div></div><div><br></div><div><br>
</div><div><div><b>Container configuration : </b>grep network config</div></div><div><div><font face="'courier new', monospace">lxc.network.type = veth</font></div><div><font face="'courier new', monospace">lxc.network.flags = up</font></div>
<div><font face="'courier new', monospace">lxc.network.link = br0</font></div><div><font face="'courier new', monospace"><a href="http://lxc.network.name">lxc.network.name</a> = eth0</font></div><div><font face="'courier new', monospace">lxc.network.hwaddr = 00:1C:C0:17:8B:44</font></div>
<div><font face="'courier new', monospace">lxc.network.ipv4 = <a href="http://91.121.99.167/24">91.121.99.167/24</a></font></div></div><div><br></div><div><br></div><div><br></div><div><b>Host ifconfig :</b></div>
<div><div><font face="'courier new', monospace">br0 Link encap:Ethernet HWaddr 00:1c:c0:17:8b:44 </font></div><div><font face="'courier new', monospace"> adr inet6: 2001:41d0:1:98a7::1/64 Scope:Global</font></div>
<div><font face="'courier new', monospace"> adr inet6: fe80::21c:c0ff:fe17:8b44/64 Scope:Lien</font></div><div><font face="'courier new', monospace"> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</font></div>
<div><font face="'courier new', monospace"> RX packets:1429 errors:0 dropped:0 overruns:0 frame:0</font></div><div><font face="'courier new', monospace"> TX packets:260 errors:0 dropped:0 overruns:0 carrier:0</font></div>
<div><font face="'courier new', monospace"> collisions:0 lg file transmission:0 </font></div><div><font face="'courier new', monospace"> RX bytes:179867 (175.6 KiB) TX bytes:35854 (35.0 KiB)</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">eth0 Link encap:Ethernet HWaddr 00:1c:c0:17:8b:44 </font></div><div><font face="'courier new', monospace"> adr inet6: fe80::21c:c0ff:fe17:8b44/64 Scope:Lien</font></div>
<div><font face="'courier new', monospace"> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</font></div><div><font face="'courier new', monospace"> RX packets:1750 errors:0 dropped:0 overruns:0 frame:0</font></div>
<div><font face="'courier new', monospace"> TX packets:268 errors:0 dropped:0 overruns:0 carrier:0</font></div><div><font face="'courier new', monospace"> collisions:0 lg file transmission:1000 </font></div>
<div><font face="'courier new', monospace"> RX bytes:223036 (217.8 KiB) TX bytes:36446 (35.5 KiB)</font></div><div><font face="'courier new', monospace"> Interruption:19 Adresse de base:0x2000 </font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">lo Link encap:Boucle locale </font></div><div><font face="'courier new', monospace"> inet adr:127.0.0.1 Masque:255.0.0.0</font></div>
<div><font face="'courier new', monospace"> adr inet6: ::1/128 Scope:Hôte</font></div><div><font face="'courier new', monospace"> UP LOOPBACK RUNNING MTU:16436 Metric:1</font></div><div>
<font face="'courier new', monospace"> RX packets:198 errors:0 dropped:0 overruns:0 frame:0</font></div><div><font face="'courier new', monospace"> TX packets:198 errors:0 dropped:0 overruns:0 carrier:0</font></div>
<div><font face="'courier new', monospace"> collisions:0 lg file transmission:0 </font></div><div><font face="'courier new', monospace"> RX bytes:14588 (14.2 KiB) TX bytes:14588 (14.2 KiB)</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">veth8c2b2U Link encap:Ethernet HWaddr e2:1f:1e:68:81:31 </font></div><div><font face="'courier new', monospace"> adr inet6: fe80::e01f:1eff:fe68:8131/64 Scope:Lien</font></div>
<div><font face="'courier new', monospace"> UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1</font></div><div><font face="'courier new', monospace"> RX packets:3 errors:0 dropped:0 overruns:0 frame:0</font></div>
<div><font face="'courier new', monospace"> TX packets:261 errors:0 dropped:0 overruns:0 carrier:0</font></div><div><font face="'courier new', monospace"> collisions:0 lg file transmission:1000 </font></div>
<div><font face="'courier new', monospace"> RX bytes:216 (216.0 B) TX bytes:17972 (17.5 KiB)</font></div></div><div><br></div><div><br></div><div><br></div><div><div><b>Container ifconfig :</b></div><div>
</div></div><div><div><font face="'courier new', monospace">eth0 Link encap:Ethernet HWaddr 00:1c:c0:17:8b:44 </font></div><div><font face="'courier new', monospace"> inet adr:91.121.99.167 Bcast:91.121.99.0 Masque:255.255.255.0</font></div>
<div><font face="'courier new', monospace"> adr inet6: fe80::21c:c0ff:fe17:8b44/64 Scope:Lien</font></div><div><font face="'courier new', monospace"> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</font></div>
<div><font face="'courier new', monospace"> RX packets:263 errors:0 dropped:0 overruns:0 frame:0</font></div><div><font face="'courier new', monospace"> TX packets:3 errors:0 dropped:0 overruns:0 carrier:0</font></div>
<div><font face="'courier new', monospace"> collisions:0 lg file transmission:1000 </font></div><div><font face="'courier new', monospace"> RX bytes:18212 (17.7 KiB) TX bytes:216 (216.0 B)</font></div>
<div><font face="'courier new', monospace"><br></font></div><div><font face="'courier new', monospace">lo Link encap:Boucle locale </font></div><div><font face="'courier new', monospace"> inet adr:127.0.0.1 Masque:255.0.0.0</font></div>
<div><font face="'courier new', monospace"> adr inet6: ::1/128 Scope:Hôte</font></div><div><font face="'courier new', monospace"> UP LOOPBACK RUNNING MTU:16436 Metric:1</font></div><div>
<font face="'courier new', monospace"> RX packets:0 errors:0 dropped:0 overruns:0 frame:0</font></div><div><font face="'courier new', monospace"> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0</font></div>
<div><font face="'courier new', monospace"> collisions:0 lg file transmission:0 </font></div><div><font face="'courier new', monospace"> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)</font></div>
</div><div><br></div><div><br></div><div><br></div><div><div><div><b>Host route -n :</b></div><div><div><font face="'courier new', monospace">Kernel IP routing table</font></div><div><font face="'courier new', monospace">Destination Gateway Genmask Flags Metric Ref Use Iface</font></div>
</div><div><b><br></b></div><div><b><br></b></div><div><b><br></b></div><div><b>Container route -n :</b></div><div></div></div><div></div></div><div><font face="'courier new', monospace">Kernel IP routing table</font></div>
<div><font face="'courier new', monospace">Destination Gateway Genmask Flags Metric Ref Use Iface</font></div><div><font face="'courier new', monospace">91.121.99.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0</font></div>
<div><br></div><div><br></div><div><br></div><div><b><br></b></div><br>Thank you for reading this far !<div>seb</div><div><br><br><br><div class="gmail_quote">2012/6/9 Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" target="_blank">list@fajar.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sat, Jun 9, 2012 at 7:39 PM, Sébastien Montagne<br>
<<a href="mailto:sebastien.montagne@gmail.com">sebastien.montagne@gmail.com</a>> wrote:<br>
> Hi dears,<br>
><br>
> do you think it would be easy/hard/not possible<br>
> to setup a container with an IPv4 address (optionnaly with an IPv6 address<br>
> as well)<br>
> in a IPv6-only (i.e. without an IPv4 address) main system ?<br>
<br>
</div>Should be easy.<br>
<br>
The default containers created from templates uses veth and bridged<br>
networking. If setup correctly, that would mean the host (main system,<br>
as you call it) behaves pretty much similar to an L2 switch. Which<br>
means that there's no requirement that the host should be connected<br>
(IP-wise) to the guest. They only need to be connected on ethernet<br>
level.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Fajar<br>
</font></span></blockquote></div><br></div>