| 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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
12-01-2011, 04:49 AM
|
#1
|
|
Member
Registered: Aug 2006
Posts: 133
Rep:
|
Changing the NIC for a guest dynamically on Cent OS 6.0
Hi,
On Cent OS 6.0 I have 2 NIC's, eth0 and eth1. I have defined a bridge br0 for eth0 and br1 for eth1.
When defining new guests, I will be able to use either br0 or br1, regarding loadbalancing and security.
I have tried to simulate that eth0 breaks down. Pulling the cable out. Now the guests on br0 of course can't be accessed. The guests on br1 still works :-)
How do I change a NIC for an existing guest from br0 to br1 ?
I have tried using Virtual Machine Manager to add new NIC card, even using same MAC address af the old NIC or changing ifcfg-eth0 on the guest to new MAC addr, but this doesn't work. There no network working. Something more must be done ?
Regards.
|
|
|
|
12-05-2011, 04:05 AM
|
#2
|
|
Member
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995
Rep: 
|
if both NICs are on the same network, you should bond them together, and use a single bridge. You could use brctl to attach NICs to bridges, but this is not an automated or in any way a correct solution.
|
|
|
|
12-05-2011, 04:13 AM
|
#3
|
|
Member
Registered: Aug 2006
Posts: 133
Original Poster
Rep:
|
Thanks.
I'm okay with the non-automated solution.
You say I can use brctl instead of the Virtual Machine Manager, that doesn't work ?
|
|
|
|
12-06-2011, 04:34 AM
|
#4
|
|
Member
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995
Rep: 
|
I can't see why you cannot use bonding
|
|
|
|
12-06-2011, 04:42 AM
|
#5
|
|
Member
Registered: Aug 2006
Posts: 133
Original Poster
Rep:
|
Because I don't know how to set it up.
;-)
|
|
|
|
12-09-2011, 09:13 AM
|
#6
|
|
Member
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995
Rep: 
|
There are tons of guides out there, bonding is just above network basics, no magic involved
|
|
|
|
12-12-2011, 06:52 AM
|
#7
|
|
Member
Registered: Aug 2006
Posts: 133
Original Poster
Rep:
|
Made it work now ! :-)
Made a ifcfg-bond0. Changed ifcfg-eth0 + 1 to be af slave and master=bond0
Made a br0 for bond0 and all works !
Increased bandwidth and redundancy :-))
|
|
|
|
12-12-2011, 10:13 AM
|
#8
|
|
Member
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995
Rep: 
|
great, and congrats on learning something new!
Which bonding mode are you using, btw?
|
|
|
|
12-13-2011, 01:51 AM
|
#9
|
|
Member
Registered: Aug 2006
Posts: 133
Original Poster
Rep:
|
At the moment, I haven't used any Bonding-options yet. I know I MUST use either arp_interval and arp_ip_target OR miimon.
Have you any recommendations ?
My 4 files look like this at the moment:
DEVICE=bond0
#IPADDR=192.168.10.40
#NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_OPTS=""
BRIDGE=br0
DEVICE=br0
NM_CONTROLLED="no"
BOOTPROTO=static
IPADDR=192.168.10.45
ONBOOT=yes
TYPE=Bridge
GATEWAY=192.168.10.1
DELAY=0
NETMASK=255.255.255.0
DEVICE=eth0
NM_CONTROLLED="no"
HWADDR=00:1B:21:C3:FD:88
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
SLAVE=yes
DEVICE=eth1
NM_CONTROLLED="no"
HWADDR=D0:27:88:33  E:51
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
SLAVE=yes
Don't it look correct ? It seems to work, but I need to study the bonding-options.
|
|
|
|
12-13-2011, 07:12 AM
|
#10
|
|
Member
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995
Rep: 
|
cat /proc/net/bonding/bond0
|
|
|
|
12-13-2011, 07:20 AM
|
#11
|
|
Member
Registered: Aug 2006
Posts: 133
Original Poster
Rep:
|
Gives me this:
Ethernet Channel Bonding Driver: v3.5.0 (November 4, 2008)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 5c:f3:fc:5b:02:08
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 5c:f3:fc:5b:02:0a
dmesg say in the end:
kvm: 16154: cpu7 unhandled wrmsr: 0x198 data 0
kvm: 16154: cpu8 unhandled wrmsr: 0x198 data 0
kvm: 16154: cpu9 unhandled wrmsr: 0x198 data 0
kvm: 16154: cpu0 unimplemented perfctr wrmsr: 0xc1 data 0x0
kvm: 16154: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x130079
kvm: 16154: cpu0 unimplemented perfctr wrmsr: 0xc1 data 0xffe18e99
kvm: 16154: cpu0 unimplemented perfctr wrmsr: 0x186 data 0x530079
kvm: 16154: cpu1 unimplemented perfctr wrmsr: 0xc1 data 0x0
kvm: 16154: cpu1 unimplemented perfctr wrmsr: 0x186 data 0x130079
kvm: 16154: cpu1 unimplemented perfctr wrmsr: 0xc1 data 0xffe18e99
kvm: 16154: cpu1 unimplemented perfctr wrmsr: 0x186 data 0x530079
kvm: 16154: cpu2 unimplemented perfctr wrmsr: 0xc1 data 0x0
kvm: 16154: cpu2 unimplemented perfctr wrmsr: 0x186 data 0x130079
bond0: received packet with own address as source address
bond0: received packet with own address as source address
bond0: received packet with own address as source address
bond0: received packet with own address as source address
bond0: received packet with own address as source address
bond0: received packet with own address as source address
bond0: received packet with own address as source address
bond0: received packet with own address as source address
bond0: received packet with own address as source address
Is it "normal" with theese messages ? Also from kvm ?
|
|
|
|
12-13-2011, 10:48 AM
|
#12
|
|
Member
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995
Rep: 
|
Quote:
|
Bonding Mode: load balancing (round-robin)
|
this is the problem - this mode is not compatible with a linux bridge. Another mode that has the same problem is balance-alb or mode - 6.
The best option for you is mode-4 or 802.3ad, but to use this mode, you need to make sure your switch supports it, and configure the switch for LACP
|
|
|
|
12-14-2011, 01:55 AM
|
#13
|
|
Member
Registered: Aug 2006
Posts: 133
Original Poster
Rep:
|
Ok..... well, the customers switch'es are not new and the one I just delivered with the server, just for the new rack isn't 802.3ad compliant.
So I must remove the bonding and go back to my first solution, with 2 bridges ? Without the increased bandwidth and redundancy :-(
|
|
|
|
12-14-2011, 02:12 AM
|
#14
|
|
Member
Registered: Aug 2006
Posts: 133
Original Poster
Rep:
|
I have google't a little, and found that some recommend using mode 5 when using bonding + bridging in a virt environment....
|
|
|
|
12-14-2011, 02:32 AM
|
#15
|
|
Member
Registered: Aug 2006
Posts: 133
Original Poster
Rep:
|
or mode 1 ....
|
|
|
|
All times are GMT -5. The time now is 04:50 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|