[lxc-users] Network connection on a Debian unstable host

Geordie geordi at kos.net
Tue Mar 24 13:46:06 UTC 2015



Devon B.
Thank You  I have cleaned the host and container. 
To start with, you have inconsistencies between your config and
interfaces.  10.0.0.15/8 would be  netmask 255.0.0.0, broadcast
10.255.255.255.  I'm not sure if that makes a difference but you should

This is a supplied router by the WISP 
Now, the gateway (or router) is set to 10.0.0.1.  Is this an actual
router that will forward the routes from 10.0.0.15 to a public
interface? 

Fajar
is the a unique MAC address?
When I started playing with containers a year ago, I was looking for
information on MAC addresses and found that there was private unique
MAC address range that one could use. I used this range last year and
had no issues. I have somehow misplaced that the link that I used.

ip address is not what you usually put on /etc/lxc/default.conf
I used
lxc-create -t download -n lsmb1
and found i needed to modify the information so it would get placed
in /var/lib/lxc/lsmb1/config

/etc/network/interfaces is now
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp


auto br0
iface br0 inet dhcp
 bridge_ports eth0
 bridge_fd 0
 bridge_maxwait 0

and /var/lib/lxc/lsmb1/rootfs/etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
 address   10.0.0.15
 netmask   255.0.0.0
 network   10.0.0.0
 broadcast 10.255.255.255
 gateway   10.0.0.1

root at lsmb1:/# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000 link/ether ac:de:48:00:00:15 brd
ff:ff:ff:ff:ff:ff inet 10.0.0.15/24 brd 10.0.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::aede:48ff:fe00:15/64 scope link
       valid_lft forever preferred_lft forever
root at lsmb1:/# apt-get update
Err http://debian.yorku.ca unstable InRelease

Err http://debian.yorku.ca unstable Release.gpg
  Could not resolve 'debian.yorku.ca'

Could nor resolve intrigued me so I checked
/var/lib/lxc/lsmb1/rootfs/etc/resolv.conf
it had a nameserver of 10.0.3.0 which did not correspond to anything in
the place so I changed it to the ones supplied by the WISP This do not
change the outcome

host
# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master br0 state UP group default qlen 1000 link/ether
00:22:68:10:74:b6 brd ff:ff:ff:ff:ff:ff inet 10.0.0.13/24 brd
10.0.0.255 scope global eth0 valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000 link/ether 00:1e:65:30:e5:2c brd ff:ff:ff:ff:ff:ff
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state
UP group default link/ether 00:22:68:10:74:b6 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.13/24 brd 10.0.0.255 scope global br0
       valid_lft forever preferred_lft forever
    inet6 fe80::222:68ff:fe10:74b6/64 scope link
       valid_lft forever preferred_lft forever
6: vethYPF29L: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast master br0 state UP group default qlen 1000 link/ether
fe:f4:24:09:79:0a brd ff:ff:ff:ff:ff:ff inet6
fe80::fcf4:24ff:fe09:790a/64 scope link valid_lft forever preferred_lft
forever

Should vethYPF29L not have an ipv4 address?

 you haven't enable /proc/sys/net/ipv4/ip_forward
has been enabled 

Any other thoughts or should I try 1.1?

Thanks
Geordie


More information about the lxc-users mailing list