[Lxc-users] Destination Host Unreachable from LXC guest

Luis M. Ibarra michael.ibarra at gmail.com
Mon Jul 8 19:58:40 UTC 2013


Hi,

I'm facing a connectivity problem to get connection between an lxc
guest(192.168.56.100) to a vbox host(192.68.56.1) having Destination Host
Unreachable after pinging each other.


This is my topology:

Internet ------- vBox Host(VirtualBox) ------------------------------- LXC
host------------ LXC guest
               (eth0)                     (vboxnet0)
(br0)           (eth0)       (eth0)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
VBOX

eth0      Link encap:Ethernet  HWaddr 00:90:f5:d3:be:c0
          inet addr:192.168.5.58  Bcast:192.168.5.255  Mask:255.255.255.0
          inet6 addr: fe80::290:f5ff:fed3:bec0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:185122 errors:0 dropped:315 overruns:0 frame:0
          TX packets:156027 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:191082114 (191.0 MB)  TX bytes:18932999 (18.9 MB)

vboxnet0  Link encap:Ethernet  HWaddr 0a:00:27:00:00:00
          inet addr:192.168.56.1  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:213032 (213.0 KB)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
0.0.0.0         192.168.5.1     0.0.0.0         UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.5.0     0.0.0.0         255.255.255.0   U     1      0        0
eth0          <---------------------------- Internet
192.168.56.0    0.0.0.0         255.255.255.0   U     0      0        0
vboxnet0


? (192.168.56.100) at 08:00:27:88:6f:08 [ether] on vboxnet0
? (192.168.5.1) at 00:0c:42:bc:e7:42 [ether] on eth0

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LXC HOST

/etc/sysconfig/network-scripts/ifcfg-eth0
  DEVICE=eth0
  ONBOOT=yes
  TYPE=Ethernet
  USERCTL=no
  BRIDGE=br0

/etc/sysconfig/network-scripts/ifcfg-br0
  DEVICE=br0
  TYPE=Bridge
  BOOTPROTO=static
  DNS1=8.8.8.8
  DNS2=8.8.4.4
  GATEWAY=192.168.56.1
  IPADDR=192.168.56.254
  NETMASK=255.255.255.0
  ONBOOT=yes

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric    Ref
Use Iface
192.168.56.0    0.0.0.0         255.255.255.0      U     0
0            0 br0
169.254.0.0     0.0.0.0         255.255.0.0          U     1003
0            0 br0
0.0.0.0         192.168.56.1    0.0.0.0                UG    0
0            0 br0

#brctl show
bridge name    bridge id        STP enabled    interfaces
br0        8000.080027ff67a8    no                    eth0
                                                                  veth62vD6v

#sysctl -p | grep forward
net.ipv4.ip_forward = 1

#arp -a
? (192.168.56.1) at 0a:00:27:00:00:00 [ether] on br0
? (192.168.56.100) at 0a:c8:4d:9a:e5:12 [ether] on br0


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

LXC Guest

/etc/sysconfig/network-scripts/ifcfg-eth0
  DEVICE=eth0
  ONBOOT=yes
  TYPE=Ethernet
  DNS1=8.8.8.8
  DNS2=8.8.4.4
  IPADDR=192.168.56.100
  NETMASK=255.255.255.0
  BOOTPROTO=static
  USERCTL=yes

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.56.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0

#arp -a
? (192.168.56.254) at 08:00:27:ff:67:a8 [ether] on eth0
? (192.168.56.1) at 0a:00:27:00:00:00 [ether] on eth0

#ping 192.168.56.1
PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data.
>From 192.168.56.100 icmp_seq=10 Destination Host Unreachable
>From 192.168.56.100 icmp_seq=11 Destination Host Unreachable

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Finally LXC Config:

lxc.utsname = model
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.ipv4 = 192.168.1.100
lxc.network.name = eth0
lxc.tty = 4
lxc.pts = 1024
lxc.rootfs = /var/lib/lxc/model/rootfs
lxc.mount  = /var/lib/lxc/model/fstab




I'm blocked, I don't know if it's a routing problem, a problem with virtual
box or an lxc misconfiguration. I appreciate any suggestions to get a
workaround.

Greetings,



-- 
Luis M. Ibarra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130708/6063f75b/attachment.html>


More information about the lxc-users mailing list