Greetings, I currently have a RH 5.1 Dom0 that has one onboard NIC. I have created 2 RH virtualized guests and they are both using that same NIC. I would like to add one or two other NICs and have the guests use those instead of the onboard NIC. Can someone point me to information or assist me with the process of how to add new NICs to existing xen guests? Thanks for any help you can provide! -Joel Coopersmith Sr. Systems and Networking Analyst This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>Can someone point me to information or assist me with the process of how to add new NICs to existing xen >guests?Somone just helped me here. You need to make a wrapper for the existing scripts. Make a new file called my-network-bridge #!/bin/sh dir=$(dirname "$0") "$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=xenbr0 "$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=xenbr1 "$dir/network-bridge" "$@" vifnum=2 netdev=eth2 bridge=xenbr2 Change the names to what is applicablke for your version of xen. Open the config.sxp and point it to the new script, this one calls that old one. I think you need to make this script executable. jlc _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Apr 21, 2008 at 4:15 PM, <joel.coopersmith@accenture.com> wrote:> > > Greetings, > > I currently have a RH 5.1 Dom0 that has one onboard NIC. I have created 2 > RH virtualized guests and they are both using that same NIC. I would like > to add one or two other NICs and have the guests use those instead of the > onboard NIC. > > Can someone point me to information or assist me with the process of how to > add new NICs to existing xen guests? > > Thanks for any help you can provide!What you need is in the xen config script in /etc/xen. Look at the networking section... it gives a really clear explanation on how to configure multiple bridges and ethernet interfaces... I''ve done this before with 16 bridges, each using one of 16 ethernet devices, and it seems to work. Cheers Jeff _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
<joel.coopersmith@accenture.com>
2008-Apr-21 20:57 UTC
RE: [Xen-users] RE: adding a second NIC
So I have added a wrapper in /etc/xen with 755 permissions. I have created just like you suggested below: Here is the contents of that file: # cat /etc/xen/my-network-bridge #!/bin/sh dir=$(dirname "$0") "$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=xenbr0 "$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=xenbr1 Do I need to restart the xend service to make those changes take affect? How will I see those changes to know they are working? Then I assume to add them to each guest I modify the /etc/xen/guestname file by replacing the old vif info with the new device? I see there is a MAC address in this same /etc/xen/guestname file that does not seem to correspond to anything in an ifconfig -a. I am confused as to where this MAC comes from. -Joel -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Joseph L. Casale Sent: Monday, April 21, 2008 3:20 PM To: xen-users@lists.xensource.com Subject: [Xen-users] RE: adding a second NIC>Can someone point me to information or assist me with the process ofhow to add new NICs to existing xen >guests? Somone just helped me here. You need to make a wrapper for the existing scripts. Make a new file called my-network-bridge #!/bin/sh dir=$(dirname "$0") "$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=xenbr0 "$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=xenbr1 "$dir/network-bridge" "$@" vifnum=2 netdev=eth2 bridge=xenbr2 Change the names to what is applicablke for your version of xen. Open the config.sxp and point it to the new script, this one calls that old one. I think you need to make this script executable. jlc _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Apr 21, 2008 at 03:57:39PM -0500, joel.coopersmith@accenture.com wrote:> Do I need to restart the xend service to make those changes take affect?Yes, it is the easiest way.> How will I see those changes to know they are working?brctl show> Then I assume to add them to each guest I modify the /etc/xen/guestname > file by replacing the old vif info with the new device?With the new bridge, to be correct.> I see there is > a MAC address in this same /etc/xen/guestname file that does not seem to > correspond to anything in an ifconfig -a. I am confused as to where > this MAC comes from.The MAC in the guest''s config sets the guests''s MAC, so you have to run ifconfig in the corresponding domU. Rainer _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
<joel.coopersmith@accenture.com>
2008-Apr-21 21:54 UTC
RE: [Xen-users] RE: adding a second NIC
I have restarted the service with no apparent changes, so I took the big leap and rebooted the Dom0 server. When it came up I still could not see the additional bridged eth1. [root@testvs ~]# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.000000000000 no xenbr0 8000.feffffffffff no peth0 vif0.0 Here is the contents of my xend-config.sxp file: [root@testvs ~]# grep -v ^# /etc/xen/xend-config.sxp (xend-unix-server yes) (xend-unix-path /var/lib/xend/xend-socket) (xend-relocation-hosts-allow ''^localhost$ ^localhost\\.localdomain$'') (network-script network-bridge) (network-script my-network-bridge) (vif-script vif-bridge) (dom0-min-mem 256) (dom0-cpus 0) (vncpasswd '''') Here is my wrapper script: [root@testvs ~]# cat /etc/xen/my-network-bridge #!/bin/sh dir=$(dirname "$0") "$dir/network-bridge" "$0" vifnum=0 netdev=eth0 bridge=xenbr0 "$dir/network-bridge" "$0" vifnum=1 netdev=eth1 bridge=xenbr1 bridge=xenbr1 Here are what my system thinks it has for network interfaces: [root@testvs ~]# ifconfig -a |grep Link eth0 Link encap:Ethernet HWaddr 00:1B:78:B5:45:4F inet6 addr: fe80::21b:78ff:feb5:454f/64 Scope:Link eth1 Link encap:Ethernet HWaddr 00:50:BA:7D:6A:28 inet6 addr: fe80::250:baff:fe7d:6a28/64 Scope:Link lo Link encap:Local Loopback peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link sit0 Link encap:IPv6-in-IPv4 veth1 Link encap:Ethernet HWaddr 00:00:00:00:00:00 veth2 Link encap:Ethernet HWaddr 00:00:00:00:00:00 veth3 Link encap:Ethernet HWaddr 00:00:00:00:00:00 vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link vif0.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF vif0.2 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF vif0.3 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link xenbr0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Rainer Sokoll Sent: Monday, April 21, 2008 4:15 PM To: xen-users@lists.xensource.com Subject: Re: [Xen-users] RE: adding a second NIC On Mon, Apr 21, 2008 at 03:57:39PM -0500, joel.coopersmith@accenture.com wrote:> Do I need to restart the xend service to make those changes takeaffect? Yes, it is the easiest way.> How will I see those changes to know they are working?brctl show> Then I assume to add them to each guest I modify the > /etc/xen/guestname file by replacing the old vif info with the newdevice? With the new bridge, to be correct.> I see there is > a MAC address in this same /etc/xen/guestname file that does not seem > to correspond to anything in an ifconfig -a. I am confused as to > where this MAC comes from.The MAC in the guest''s config sets the guests''s MAC, so you have to run ifconfig in the corresponding domU. Rainer _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Apr 21, 2008 at 04:54:12PM -0500, joel.coopersmith@accenture.com wrote:> [root@testvs ~]# grep -v ^# /etc/xen/xend-config.sxp > (xend-unix-server yes) > (xend-unix-path /var/lib/xend/xend-socket) > (xend-relocation-hosts-allow ''^localhost$ ^localhost\\.localdomain$'') > (network-script network-bridge) > (network-script my-network-bridge)2 times? Rainer _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>I have restarted the service with no apparent changes, so I took the big >leap and rebooted the Dom0 server. When it came up I still could not >see the additional bridged eth1.<snip>>(network-script network-bridge) >(network-script my-network-bridge)<snip> You have: (network-script network-bridge) (network-script my-network-bridge) You dont want the first, only the second, your script calls the first, twice :) jlc _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jeff Lane wrote:> On Mon, Apr 21, 2008 at 4:15 PM, <joel.coopersmith@accenture.com> wrote: > >> Greetings, >> >> I currently have a RH 5.1 Dom0 that has one onboard NIC. I have created 2 >> RH virtualized guests and they are both using that same NIC. I would like >> to add one or two other NICs and have the guests use those instead of the >> onboard NIC. >> >> Can someone point me to information or assist me with the process of how to >> add new NICs to existing xen guests? >> >> Thanks for any help you can provide! >> > > What you need is in the xen config script in /etc/xen. Look at the > networking section... it gives a really clear explanation on how to > configure multiple bridges and ethernet interfaces... > > I''ve done this before with 16 bridges, each using one of 16 ethernet > devices, and it seems to work. > > Cheers > Jeff >Has anyone worked through setting up pair bonding for Xen? I tried it once, and got rather bogged down, but the issue may have been my upstream switches (over which I had no control!) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
<joel.coopersmith@accenture.com>
2008-Apr-22 13:45 UTC
RE: [Xen-users] RE: adding a second NIC
When I remove the first line from the /etc/xen/xend-config.sxp that is the default "(network-script network-bridge)" then all I get is this after a reboot: [root@testvs ~]# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.000000000000 no I don''t get any bridged devices that are attached to either of my network cards. Help? -Joel -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Joseph L. Casale Sent: Monday, April 21, 2008 5:15 PM To: Coopersmith, Joel; xen-users@lists.xensource.com Subject: RE: [Xen-users] RE: adding a second NIC>I have restarted the service with no apparent changes, so I took the >big leap and rebooted the Dom0 server. When it came up I still could >not see the additional bridged eth1.<snip>>(network-script network-bridge) >(network-script my-network-bridge)<snip> You have: (network-script network-bridge) (network-script my-network-bridge) You dont want the first, only the second, your script calls the first, twice :) jlc _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
>When I remove the first line from the /etc/xen/xend-config.sxp that is >the default "(network-script network-bridge)" then all I get is this >after a reboot:I got the same behavior in my CentOS setup with a srpm compiled version of Xen. I had to match the name of the bridge it originally wanted to use (eth0) instead of the name I was used to using, xenbr0. I don''t know why that is, maybe someone on the nkow can chime in. jlc _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
<joel.coopersmith@accenture.com>
2008-Apr-22 14:00 UTC
RE: [Xen-users] RE: adding a second NIC
Forgive my ignorance, but I am not sure how to do that I guess. I have 2 NICs on this machine now. [root@testvs xen]# ifconfig|grep eth eth0 Link encap:Ethernet HWaddr 00:1B:78:B5:45:4F eth1 Link encap:Ethernet HWaddr 00:50:BA:7D:6A:28 I would like to have the Dom0 on eth0 and one or both of my guests using eth1. -Joel -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Joseph L. Casale Sent: Tuesday, April 22, 2008 8:47 AM To: Xen-user List Subject: RE: [Xen-users] RE: adding a second NIC>When I remove the first line from the /etc/xen/xend-config.sxp that is >the default "(network-script network-bridge)" then all I get is this >after a reboot:I got the same behavior in my CentOS setup with a srpm compiled version of Xen. I had to match the name of the bridge it originally wanted to use (eth0) instead of the name I was used to using, xenbr0. I don''t know why that is, maybe someone on the nkow can chime in. jlc _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Apr 22, 2008 at 09:00:28AM -0500, joel.coopersmith@accenture.com wrote:> [root@testvs xen]# ifconfig|grep eth > eth0 Link encap:Ethernet HWaddr 00:1B:78:B5:45:4F > eth1 Link encap:Ethernet HWaddr 00:50:BA:7D:6A:28 > > I would like to have the Dom0 on eth0 and one or both of my guests using > eth1.ifconfig eth1 up # (you don''t have to assign an IP address) brctl addbr joelbridge brctl addif joelbridge eth1 ifconfig joelbridge up and in your domU''s config: vif=[ ''bridge=joelbridge'', ] HTH, Rainer _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
<joel.coopersmith@accenture.com>
2008-Apr-22 15:13 UTC
RE: [Xen-users] RE: adding a second NIC
Success!!! Thanks for that tip Rainer and all who have helped me. For some reason on RH 5.1 using RHs xen packages, when creating a wrapper doesn''t perform like most expect it to. I now have my Dom0 and my guests on separate NICs. Thanks again for the help! -Joel -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Rainer Sokoll Sent: Tuesday, April 22, 2008 9:10 AM To: xen-users@lists.xensource.com Subject: Re: [Xen-users] RE: adding a second NIC On Tue, Apr 22, 2008 at 09:00:28AM -0500, joel.coopersmith@accenture.com wrote:> [root@testvs xen]# ifconfig|grep eth > eth0 Link encap:Ethernet HWaddr 00:1B:78:B5:45:4F > eth1 Link encap:Ethernet HWaddr 00:50:BA:7D:6A:28 > > I would like to have the Dom0 on eth0 and one or both of my guests > using eth1.ifconfig eth1 up # (you don''t have to assign an IP address) brctl addbr joelbridge brctl addif joelbridge eth1 ifconfig joelbridge up and in your domU''s config: vif=[ ''bridge=joelbridge'', ] HTH, Rainer _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users