Ubuntu 10.04.4 64
I have a ded host and was issued 8 IP addresses. I want to install KVM and use 2 of them for 2 separate hosts. I understand i have to set up bridged networking as per the guide here:
https://help.ubuntu.com/community/KVM/Networking and will end up with two new network interfaces called br0 and br1.
Before I started, I looked at the output of ifconfig -a and saw
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0
inet6 addr: xxxx::xxxx:xxxx:xxxx:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:529761837 errors:0 dropped:0 overruns:0 frame:0
TX packets:547954536 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:80377559241 (80.3 GB) TX bytes:353386793457 (353.3 GB)
Interrupt:26 Base address:0x2000
eth0:0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:1.2.3.2 Bcast:212.110.164.255 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:26 Base address:0x2000
...
eth0:5 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:1.2.3.7 Bcast:1.2.3.7 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:26 Base address:0x2000
eth0:6 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:1.2.3.8 Bcast:1.2.3.8 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:26 Base address:0x2000
I want to use those last 2 as I described, so at the end of /etc/network/interfaces added:
auto br0
iface br0 inet static
address 1.2.3.7
network 1.2.3.7
netmask 255.255.255.255
broadcast 1.2.3.7
gateway 1.1.1.1
bridge_ports eth0:5
bridge_stp off
bridge_fd 0
bridge_maxwait 0
auto br1
iface br1 inet static
address 1.2.3.8
network 1.2.3.8
netmask 255.255.255.255
broadcast 1.2.3.8
gateway 1.1.1.1
bridge_ports eth0:6
bridge_stp off
bridge_fd 0
bridge_maxwait 0
post-up ip link set br0 address xx:xx:xx:xx:xx:xx
post-up ip link set br1 address xx:xx:xx:xx:xx:xx
I hope it clear I didn't use those actual IP addresses ;-)
After a reboot, the server wouldn't let me in via SSH nor were any websites available. I used the emergency console to restore the interfaces file.
Don't overlook newbie errors! What did I do wrong please? In particular, should I also have commented out the existing eth0:5 and eth0:6 entries?