LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
Search this Thread
Old 04-18-2013, 03:04 AM   #1
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Rep: Reputation: 20
Exclamation KVM networking - using VLAN and Bridges on Debian/Ubuntu


hello


i have tried to setup an environment using Debian 6 and Ubuntu 12.04 (both x64), using VLAN to manage networks between storage server and host/node servers.

i have used seem this article that describes what i have tried to achieve (option 1).
http://blog.davidvassallo.me/2012/05...to-the-guests/


i have setup:
bond for eth0 and eth1

created VLANs on the bond - bond0.10, bond0.100

then created bridges to enable guests to access the networks - br10, br1000

and a bridge to allow untagged traffic to host - br1


Problem:
guests can not receive any traffic

i have tried checking for traffic on the port connected to br10, and no packets are received.
i am checking this while testing (ping, ssh, nmap, http) to connect to this guest host.


i would really appreciate if somebody could provide a link to some other posts/article on how to get this setup working.

thanks,
 
Old 04-18-2013, 04:22 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
It sounds good to me. Can you post the full output of "ifconfig -a" and "brctl show" on the host. You've checked the port? That's as in inside the vm? What about tcpdumping on the virtual interface on the host side, and also on the bridge, and the bond (when testing from a physically remote machine)
 
Old 04-18-2013, 05:34 AM   #3
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Original Poster
Rep: Reputation: 20
hello chris

i have tried to check with tcpdump. but i am receiving a lot of traffic in the host. using like:

tcpdump -i bond.10 -A


which is printing everything
is there a better way of checking it?

however, on the guest that uses the attached bridge (br10) there is no traffic at all.

it is very puzzling for me as i am no network expert.
 
Old 04-18-2013, 05:35 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,397

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
Looking for the traffic for a specific VM guest would be a sane way to do that... just add "host a.b.c.d" to the tcpdump command.

Please provide the outputs requsted above first though.
 
Old 04-18-2013, 11:13 AM   #5
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Original Poster
Rep: Reputation: 20
Post

i will get those outputs that you asked later today.

this is the network file on one of the hosts/nodes:

Code:
# The loopback network interface
auto lo 
iface lo inet loopback

iface bond0 inet manual
        pre-down ethtool -s $IFACE wol g
        bond-slaves eth0 eth1
        bond-primary eth0
        bond-mode 1
        bond-miimon 100
        bond-downdelay 100
        bond-updelay 100

iface bond0.10 inet manual
iface bond0.100 inet manual

auto virbr1
iface virbr1 inet static
        address 192.168.1.3
        broadcast 192.168.1.255
        netmask 255.255.255.0
        gateway 192.168.1.1
        dns-search home.brain
        dns-nameservers 192.168.1.1 8.8.8.8
        bridge_ports bond0
        bridge_stp off       # disable Spanning Tree Protocol
        bridge_waitport 0    # no delay before a port becomes available
        bridge_fd 0          # no forwarding delay
        ## un-tagged packets have to have the same MAC as the bond (NICs)
        ## hwaddress ether 02:01:02:03:04:a1

auto virbr10
iface virbr10 inet static
        address 10.1.10.3
        broadcast 10.1.10.255
        netmask 255.255.255.0
        gateway 10.1.10.254
        dns-search mngt.brain
        dns-nameservers 10.1.10.253
        bridge_ports bond0.10
        bridge_stp off       # disable Spanning Tree Protocol
        bridge_waitport 0    # no delay before a port becomes available
        bridge_fd 0          # no forwarding delay
        hwaddress ether 02:01:02:03:04:a2

auto virbr100
iface virbr100 inet static
        address 10.1.100.3
        netmask 255.255.255.0
        broadcast 10.1.100.254
        network 10.1.100.0
        bridge_ports bond0.100
        bridge_stp off       # disable Spanning Tree Protocol
        bridge_waitport 0    # no delay before a port becomes available
        bridge_fd 0          # no forwarding delay
        hwaddress ether 02:01:02:03:04:a3

i have added the hwaddress ether as there were lots of entries on /var/log/syslog of packets originating with same MAC as detination. this seems to solve this issue.


thanks,

Last edited by nicolasdiogo; 04-18-2013 at 11:14 AM.
 
Old 04-19-2013, 02:45 AM   #6
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Original Poster
Rep: Reputation: 20
hello

apologies but i could not get the output of the system yet.
as it is my own system, i will have to do it later own tonight.

thanks,
 
Old 04-22-2013, 04:30 PM   #7
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Original Poster
Rep: Reputation: 20
hello

i have restart the whole setup from scratch and it seems that there is an issue with the bodnding.
i can get all the VLANs and bridges working fine against eth0 or eth1.

but as i add eth0 and eth1 to a bond and then VLANs and bridge against it.
i find errors on the logs and connectivity with guests fail.

so for now i will use eth0; and revisit it in the future.


thanks for taking the time to look into it.

regards,

Nicolas
 
Old 02-03-2014, 02:53 PM   #8
cbob
LQ Newbie
 
Registered: Feb 2014
Posts: 2

Rep: Reputation: Disabled
halp

sorry to kick an old topic but did anyone ever find a resloution to this? Im having the exact same problem and i do not wish to settle for unbonded nics because a switch failure will result in the loss of the host which is the exact reason we purchase redundant switches for. i would be absolutely grateful if anyone has any futher information on this
 
Old 02-05-2014, 06:47 AM   #9
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Original Poster
Rep: Reputation: 20
hello

i will have a look on this setup; it is a while since i last checked.

and there were a number of packages updates, and other people who looked into this matter.

if there are any changes - i will post back here.

from the top of my head, i recall having somebody who was an expert on Cisco switches changing some settings trying to solve this matter.
thus keep in mind that you may find your switch not playing correctly - do not think the problem is on the box alone.


tchau

Last edited by nicolasdiogo; 02-05-2014 at 06:55 AM. Reason: english language mistakes
 
Old 02-05-2014, 11:56 AM   #10
cbob
LQ Newbie
 
Registered: Feb 2014
Posts: 2

Rep: Reputation: Disabled
re:

our problem isnt the cisco switch some of our ceph nodes use lacp bonding and that works, and we can get all of our hypervisor nodes to work on active-backup i.e. pull cables and not lose packets, we can even get to the point where some of the bridges pass traffic. here is what one of our attempts at a conf file looks like (there are many many others) this is for cloudstack btw

auto em1
iface em1 inet manual
bond-master bond0
bond-primary em1

auto em2
iface em2 inet manual
bond-master bond0

auto bond0
iface bond0 inet manual
bond-mode active-backup
bond-miimon 100
bond-slaves em1 em2

# Management
auto bond0.100
iface bond0.100 inet static
address 10.100.0.33
netmask 255.255.255.0
network 10.100.0.0
broadcast 10.100.0.255
gateway 10.100.0.1
dns-nameservers 10.100.0.4
dns-search dcnfargo.ntgcloud

auto cloudbr0
iface cloudbr0 inet manual
bridge_ports bond0
bridge_fd 5
bridge_stp off
bridge_maxwait 1
 
Old 05-13-2014, 02:04 PM   #11
nicolasdiogo
Member
 
Registered: Oct 2003
Location: UK
Distribution: debian lenny x64
Posts: 129

Original Poster
Rep: Reputation: 20
Exclamation

(with shame)

apologies for the time
probably not relevant anymore.

*but* for completeness:

this it the configuration that is working

Code:
# network interface settings
auto lo
iface lo inet loopback

#auto eth0
iface eth0 inet manual

#auto eth1
iface eth1 inet manual

auto bond0
iface bond0 inet manual
	slaves eth0 eth1
	bond_miimon 100
#	bond_mode balance-xor	# sends packets on one or another
	bond_mode broadcast	# sends packets on all interfaces

auto vmbr0
iface vmbr0 inet static
	address  192.168.1.254
	netmask  255.255.255.0
	gateway  192.168.1.1
	bridge_ports bond0
	bridge_stp off
	bridge_fd 0
best regards,


Nicolas
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: KVM Alternative?: Ravello Hypervisor Bridges Internal Ops, Public Cloud LXer Syndicated Linux News 0 02-11-2013 06:30 PM
[SOLVED] Centos 6 and KVM - how to setup bridged networking in KVM in a -Class B- environment? rylan76 Linux - Virtualization and Cloud 7 11-07-2012 06:46 AM
[Debian/Qemu/KVM] Why qemu --enable-kvm works but not kvm directly? gb2312 Linux - Virtualization and Cloud 2 03-21-2011 02:05 PM
Starting KVM with public bridge as normal user under Debian/Ubuntu sfxpt Linux - Virtualization and Cloud 3 02-10-2011 08:37 AM


All times are GMT -5. The time now is 09:17 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