LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 10-30-2012, 01:48 PM   #1
ericcarlson
Member
 
Registered: Jan 2002
Posts: 161

Rep: Reputation: 30
Setting up bridging for KVM on a ded host


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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Physical host of KVM VMs with bonded interface - bridging necessary? slimjim Linux - Virtualization and Cloud 1 06-13-2012 03:08 PM
Bridging eth0 in KVM/qemu RHAPOLLO Linux - Virtualization and Cloud 2 05-01-2010 05:06 PM
Virtual Interfaces, Bridging, TUN, TAP question for KVM setup (ubuntu server 9.04) mogga Linux - Networking 0 06-22-2009 01:35 AM
KVM Bridging tap0 to Bonded adapters swiftnet Linux - Networking 4 03-19-2009 07:52 AM
VMWare's bridging vs Window's bridging - routing is messed up when Windows bridging brenan99 General 0 05-04-2008 10:24 PM


All times are GMT -5. The time now is 12:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration