[Lxc-users] Problem with network start on Arch Linux (with revised rc.conf)

lxc at jelmail.com lxc at jelmail.com
Wed Jun 29 09:29:36 UTC 2011


Hi list, 

I've just updated my container config to use the new way of configuring the
network on Arch Linux. This does not use the net-tools (ifconfig) package
any more but instead uses ip.

The container rc.conf file contains the simple static network setup:

# Static IP example
interface=eth0
address=192.168.0.2
netmask=255.255.255.0
gateway=192.168.0.1

The problem I have is that when /etc/rc.d/network tries to add the ip
address to the network this fails with a "RTNETLINK answers: file exists"
and bails out.

It would appear that the IP address is already added when the script tries
to do it. This causes it to fail and, therefore, not bother doing anything
else. This means the routes (default gatweay) don't get set up so the
network is left half-baked. 

Trying to shut down the network (/etc/rc.d/network stop) then fails because
it can't delete the route that wasn't added (RTNETLINK answers: file not
found).

If I comment out the line from /etc/rc.d/network that adds the IP address
(ip addr add...) everything then works fine when I start the container.
However, If I manually stop the network, and then manually start the
network it won't start because the IP address does not get added (due to
that line being commented out).

Very strange. 

I wondered if the LXC environment is adding the IP address when the
container starts and if there is a way to stop this so it just lets the
container do it ?

I'm looking for some advice on how to get the network setup working
correctly on Arch Linux. I may need new init scripts (rc.sysinit,
rc.shutdown) also.

Thanks in advance,
John.

--------------------------------------------------------------------
myhosting.com - Premium Microsoft® Windows® and Linux web and application
hosting - http://link.myhosting.com/myhosting






More information about the lxc-users mailing list