Saturday, 1 June 2013

/etc/network/interfaces ignored

/etc/network/interfaces ignored

I've been searching the internet for the last 2 hours and can't seem to find a solution to the following problem.
I just installed Xen in a fresh Xubuntu 13.04 and in order to setup the networking, I had to remove network_manager. So, all network configuration is done through /etc/network/interfaces. At least, that's what should happen. However, it seems what I put in there is just being ignored: my xenbr0 interface doesn't get an IPv4 address assigned, there's no default gateway and no nameserver is setup.
Here's what's in the /etc/network/interfaces file:
auto lo
iface lo inet loopback

# There are no IP configurations for eth0, it’s all defined under xenbr0:
#auto eth0

# Static configuration
auto xenbr0
iface xenbr0 inet static
  bridge_ports    eth0
  address         192.168.1.200 # the IP address of the Ethernet port
  broadcast       192.168.1.255
  netmask         255.255.255.0
  gateway         192.168.1.1   # the address of the router
  bridge_stp      off           # disable Spanning Tree Protocol - optional
  bridge_waitport 0             # no delay before a port becomes available - optional, comment out if this gives you troubles
  bridge_fd       0             # no forwarding delay - optional
  dns-nameservers 192.168.1.1
In order to fix my network connection, I run a small "fix" script:
#!/bin/bash
ifconfig xenbr0 192.168.1.200 netmask 255.255.255.0 up
route add default gw 192.168.1.1 xenbr0
I would like to fix at the core though. Right now booting takes at least 1 minute extra, because the system waits for a working network connection.

No comments:

Post a Comment