[Lxc-users] IPv4 container in a non-IPv4 main system ?

Sébastien Montagne sebastien.montagne at gmail.com
Tue Jun 12 05:23:04 UTC 2012


It seems that ARP reply is not seen in guest's eth0...



2012/6/12 Fajar A. Nugraha <list at fajar.net>

> First of all, make sure the host's link actually works. The easiest
> way is to put the guest's IPv4 address on host's eth0 (if without
> bridge) or br0 (if the bridge is active).
>


*Host ping test :*
# ping -c 4 91.121.99.254
connect: Network is unreachable
# ifconfig br0 91.121.99.167
# ping -c 4 91.121.99.254
PING 91.121.99.254 (91.121.99.254) 56(84) bytes of data.
64 bytes from 91.121.99.254: icmp_req=1 ttl=255 time=3.32 ms
64 bytes from 91.121.99.254: icmp_req=2 ttl=255 time=0.550 ms
64 bytes from 91.121.99.254: icmp_req=3 ttl=255 time=0.506 ms
...

Working :)
After running this command I've rebooted the host.




> Next, do:
> - "brctl show" on the host
>

*Host brctl show, before starting container :*

ks357547:~# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.001cc0178b44 no eth0



*Host brctl show, after the container is started :*

ks357547:~# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.001cc0178b44 no eth0
 vethZkMxv3



> - "netstat -nr" on the guest
>

*Guest netstat -nr :*

# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
91.121.99.0     0.0.0.0         255.255.255.0   U         0 0          0
eth0
*
*
*
*
*Running route add -host 91.121.99.254 eth0*


*# netstat -nr*
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
91.121.99.254   0.0.0.0         255.255.255.255 UH        0 0          0
eth0
91.121.99.0     0.0.0.0         255.255.255.0   U         0 0          0
eth0


*Running route del -net 91.121.99.0/24 gw 0.0.0.0 eth0*


*# netstat -nr*
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt
Iface
91.121.99.254   0.0.0.0         255.255.255.255 UH        0 0          0
eth0



- "tcpdump -n -i eth0 host 91.121.99.254" on the guest and the host,
> and "tcpdump -n -i br0 host 91.121.99.254" on the host, to see where
> the packets start gone missing.
>


*Guest tcpdump -n -i eth0 host 91.121.99.254 :*
# tcpdump -n -i eth0 host 91.121.99.254
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
07:13:35.725768 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:13:36.741762 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:13:37.741763 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:13:38.741767 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28



*Host tcpdump -n -i br0 host 91.121.99.254 :*
# tcpdump -n -i br0 host 91.121.99.254
tcpdump: WARNING: br0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0, link-type EN10MB (Ethernet), capture size 65535 bytes
07:15:09.221773 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:15:09.222176 ARP, Reply 91.121.99.254 is-at 00:00:0c:07:ac:01, length 46
07:15:10.237765 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:15:10.238146 ARP, Reply 91.121.99.254 is-at 00:00:0c:07:ac:01, length 46
07:15:11.237775 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:15:11.238216 ARP, Reply 91.121.99.254 is-at 00:00:0c:07:ac:01, length 46
07:15:12.237772 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:15:12.238460 ARP, Reply 91.121.99.254 is-at 00:00:0c:07:ac:01, length 46



*Host tcpdump -n -i eth0 host 91.121.99.254 :*
# tcpdump -n -i eth0 host 91.121.99.254
tcpdump: WARNING: eth0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
07:15:37.381859 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:15:37.382222 ARP, Reply 91.121.99.254 is-at 00:00:0c:07:ac:01, length 46
07:15:38.381870 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:15:38.382211 ARP, Reply 91.121.99.254 is-at 00:00:0c:07:ac:01, length 46
07:15:39.381869 ARP, Request who-has 91.121.99.254 tell 91.121.99.167,
length 28
07:15:39.382320 ARP, Reply 91.121.99.254 is-at 00:00:0c:07:ac:01, length 46



Thank you Fajar !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20120612/e3e3fce9/attachment.html>


More information about the lxc-users mailing list