Comment 8 for bug 692775

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

On an uptodate maverick system, I created two network namespaces,
one as dhcp server, the other as client. The client was able to
get an address from the server. What I did:

debootstrap lucid b1
debootstrap lucid b2
chroot b1
 mount -t proc proc /proc
 apt-get install vi dialog dhcp3-server
 umount /proc
 exit
chroot b2
 mount -t proc proc /proc
 apt-get install vi dialog dhcp3-client
 umount /proc
 exit
brctl addbr br0
# get ns_exec
apt-get install git gcc
git clone git://git.sr71.net/~hallyn/cr_tests.git
cd cr_tests
git checkout ns_exec
make ns_exec
cp ns_exec /bin/

# set up the networking
ip link add type veth
ip link add type veth
ifconfig veth0 up
ifconfig veth1 up
ifconfig veth2 up
ifconfig veth3 up
brctl addif br0 veth0
brctl addif br0 veth2

# create the containers
cd b1 # do this in a new terminal
 ns_exec -cmnp /bin/bash
 chroot .
 mount -t proc proc /proc
 mount -t sysfs sys /sys
 vi /etc/dhcp3/dhcpd.conf # add the same lines as in the previous comment
 # leave it running

cd b2 # do this in a new terminal
 ns_exec -cmnp /bin/bash
 chroot .
 mount -t proc proc /proc
 mount -t sysfs sys /sys
 # leave it running

# pass the interfaces to the containers.
# Find the pids of the bash shells parented by the ns_exec processes,
# i.e. 'ps -ef' will show two ns_exec's, each with a bash process following,
# call the first pid $p1 and the next $p2

ip link set veth1 netns $p1
ip link set veth3 netns $p2

# back in container b1
 ifconfig veth1 192.168.254.10 up
 /etc/init.d/dhcp3-server start

# in container b2
 dhclient

Container b2 gets an ip address served by b1.

So the kernel and bridge-utils packages in maverick appear to be fine.
Something else is going on on Thomas' system.