[Lxc-users] container hostname not visible to host, ubuntu 12.04
Li, Zeyang
a.banknote at gmail.com
Fri Jul 6 07:09:53 UTC 2012
Hi,
I ran into a problem where I cannot ssh to containers but I could do
the reverse and ssh to the host from inside containers.
I'm doing this on ubuntu 12.04 and followed official tutorial. It
looks like it should be rather painless and I should be able to access
container through hostname or ip after booting it.
Here is my container network setup, hostname "budda1"
ubuntu at budda1:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:8b:af:ba
inet addr:10.0.3.195 Bcast:10.0.3.255 Mask:255.255.255.0
inet6 addr: fe80::216:3eff:fe8b:afba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6963 (6.9 KB) TX bytes:3248 (3.2 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lxcbr0 Link encap:Ethernet HWaddr 1a:cf:ac:d0:2e:b0
inet addr:10.0.3.1 Bcast:10.0.3.255 Mask:255.255.255.0
inet6 addr: fe80::18cf:acff:fed0:2eb0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:554 (554.0 B)
Here is my host network setup.
eth1 Link encap:Ethernet HWaddr 00:0b:e0:f0:00:ed
inet addr:192.168.0.187 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20b:e0ff:fef0:ed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3774669 errors:0 dropped:0 overruns:0 frame:0
TX packets:19871338 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:325045419 (325.0 MB) TX bytes:28140974879 (28.1 GB)
Interrupt:42 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9002 errors:0 dropped:0 overruns:0 frame:0
TX packets:9002 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:895944 (895.9 KB) TX bytes:895944 (895.9 KB)
lxcbr0 Link encap:Ethernet HWaddr 42:41:2f:06:48:54
inet addr:10.0.3.1 Bcast:10.0.3.255 Mask:255.255.255.0
inet6 addr: fe80::4041:2fff:fe06:4854/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:967 errors:0 dropped:0 overruns:0 frame:0
TX packets:4742 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:265702 (265.7 KB) TX bytes:362339 (362.3 KB)
vethDRRJNv Link encap:Ethernet HWaddr ea:a8:65:4e:bc:af
inet6 addr: fe80::e8a8:65ff:fe4e:bcaf/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:25 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3506 (3.5 KB) TX bytes:8848 (8.8 KB)
vethNoOhWO Link encap:Ethernet HWaddr 42:41:2f:06:48:54
inet6 addr: fe80::4041:2fff:fe06:4854/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:169 errors:0 dropped:0 overruns:0 frame:0
TX packets:817 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29672 (29.6 KB) TX bytes:91511 (91.5 KB)
vethmo7HuT Link encap:Ethernet HWaddr ca:34:1b:41:93:74
inet6 addr: fe80::c834:1bff:fe41:9374/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:228 errors:0 dropped:0 overruns:0 frame:0
TX packets:1114 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:45992 (45.9 KB) TX bytes:110286 (110.2 KB)
virbr0 Link encap:Ethernet HWaddr 8e:24:41:13:de:9a
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
Thanks,
Zeyang
More information about the lxc-users
mailing list