Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've just made the switch from Red Hat Enterprise Linux to Ubuntu Server, and need to do network configuration with static IP addresses, multiple Ethernet interfaces, channel bonding for redundancy, a bridge for VMs, etc.

In RHEL, I did this by writing configuration files in /etc/sysconfig/network-scripts. Is there a similar file or directory in Ubuntu where you can configure all network interfaces? If so, where can I find documentation for it? If not, how do I do network configuration beyond the basics? (I've seen mention of /etc/network/interfaces, but I'm not sure it does what I'm looking for.) Thanks!

Update:

Thanks to man interfaces, man bridge-utils-interfaces, and the Ubuntu community documentation page for bonding, I've mostly figured out what I need. The one thing I'm still not sure of is how to put a bridge on top of a bonded interface. Here's the relevant part of my interfaces file:

auto br0
iface br0 inet static
    address 10.1.254.101
    netmask 255.255.255.0
    network 10.1.254.0
    broadcast 10.1.254.255
    gateway 10.1.254.50
    dns-nameservers 10.1.254.252
    bridge_ports bond0
    bridge_stp off

iface bond0 inet manual
    bond-slaves eth0 eth1
    bond_mode balance-rr
    bond_miimon 100

Is this correct?

share|improve this question

1 Answer 1

Ubuntu puts all the interfaces into /etc/network/interfaces , the syntax is similar to RHEL for most of what you want.

With Debian/Ubuntu you can run commands from that file with pre-up, post-up, pre-down, post-down.

For your bridge

sudo apt-get -y install bridge-utils uml-utilities

sample /etc/network/interfaces

auto lo
iface lo inet loopback

auto br0
iface br0 inet static
address 192.168.0.10
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
bridge_ports eth0
bridge_stp off
bridge_maxwait 5

If you have a more specific question, or get stuck, post your RHEL config and we can help you convert it.

See man interfaces

share|improve this answer
    
Thanks! I do have one more specific question; see the update above. –  Taymon Dec 29 '11 at 18:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.