Do you use let's encrypt?





3950 votes ~ 17 comments

 

Using multiple network cards in XEN 3.0

Posted by itsec on Tue 5 Dec 2006 at 11:04

Xen is great. But installing more than one network card became a pain when I tried it the first time. There are some documents describing the principle but I was unable to find a real life example somewhere else. So this is a summary about how it works here now.

Using a bridge for a Dom is generally a good idea but then all packets traversing the bridge can be intercepted by any Dom that is using the same bridge. Having a single network card in a Xen landscape also means that theoretically each Dom would be able to sniff all packets traversing this single network card including packets to and from other Doms. A solution is to have more than one network card attached to Xen using a single network card for a single dom.

The scenario described here has a server with 3 network cards installed. The first card should be used to access Dom0 and some other DomNs while the second and third network card should be used to purely access Dom1 rsp. Dom2. The Dom configuration file just needs to select the appropriate bridge for each dom.

Topology:
eth0 - xenbr0 - Dom0, DomN
eth1 - xenbr1 - Dom1 (cannot be sniffed by Dom0, DomN or Dom2)
eth2 - xenbr2 - Dom2 (cannot be sniffed by Dom0, Dom1 or Domn)

The benefit of using bridging is that no manual routing configuration is required as all routes are dealt with by Xen itself.

/etc/xen/xend-config.sxp:
  ...
  #(network-script network-bridge)
  (network-script my-network-script)
  ...

Change the networking to have more than a single bridge. Here we set up a new script that will start a bridge for each NIC installed:

/etc/xen/scripts/my-network-script:
#!/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
Do not forget to chmod u+x this script!

And finally this is how each DomU can be configured:

/etc/xen/anyXmDomain.cfg:
Change IP and MAC as YOU need it!
...
# use eth0 for this DomU
vif = ['ip=10.XX.XX.230,mac=00:17:de:ad:fa:ce,bridge=xenbr0']
...
or
...
# use eth1 for Dom1
vif = ['ip=10.XX.XX.234,mac=00:16:de:ad:be:ef,bridge=xenbr1']
...
or
...
# use eth2 for Dom2
vif = ['ip=10.XX.XX.238,mac=00:18:be:ef:fa:cd,bridge=xenbr2']
...

As said, there is no additional routing required in Dom0 or in DomU besides just normal routing as you would do with a single network card attached to Xen.

From DomU perspective nothing changes. Each DomU will automatically use the bridge defined in the configuration file. The only change in behavior you will notice is that the LEDs of the second and third NIC start blinking as soon as Dom1 rsp. Dom2 send or receive packets. You can even pull out the cable from the first NIC (eth0) while Dom1 (eth1) and Dom2 (eth2) continue working normally.

Dom0 routing:

# netstat -arn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.XX.XX.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         10.XX.XX.254    0.0.0.0         UG        0 0          0 eth0

The script above will create these bridges automatically for you so there is no need to manually change anything in the bridging settings.

Dom0 bridging:

# brctl show
bridge name     bridge id               STP enabled     interfaces
xenbr0          8000.feffffffffff       no              peth0
                                                        vif0.0
                                                        vif1.0
                                                        vif3.0
                                                        vif4.0
xenbr1          8000.feffffffffff       no              peth1
                                                        vif0.1
                                                        vif6.0
xenbr2          8000.feffffffffff       no              peth2
                                                        vif0.2
                                                        vif7.0

Each DomU can be used as usual. The DomU itself is not even aware that it is using another Xen bridge. From DomUs point of view there is a (virtual) NIC that will be used as eth0.

Dom1/Dom2 eth0 configuration: (HWaddr is Dom1)

# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:16:DE:ED:BE:EF
          inet addr:10.XX.XX.234  Bcast:10.XX.XX.255  Mask:255.255.255.0
          inet6 addr: fe80::216:daff:feda:ba5e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:257357 errors:0 dropped:0 overruns:0 frame:0
          TX packets:238053 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:32954128 (31.4 MiB)  TX bytes:51239288 (48.8 MiB)

There is nothing special about DomU routing. As it does not know about the Xen bridge it routes normally to the gateway which is 10.XX.XX.254 in this example.

Dom1/Dom2 routing:

# netstat -arn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.XX.XX.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         10.XX.XX.254    0.0.0.0         UG        0 0          0 eth0
Well, that is mainly IT. Easy! Starting any DomU now will use the appropriate interface. So each interface takes the full benefit from individual bridging. From my point of view this is a much better approach than to control the pci interface directly from DomX which would also be possible.

If I forgot to mention something or you have corrections please give me a friendly hint.

Cheers and have fun,
Torsten

 

 


Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (213.164.xx.xx) on Tue 5 Dec 2006 at 14:18
Can you disable promiscous mode for a guest?

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (85.177.xx.xx) on Wed 6 Dec 2006 at 09:41
[ View Weblogs ]

A very good question. I logged into my Dom1 and tried:

ifconfig -a | grep -i PROM

and got an empty result.

Did the same in DOM0 and also got an empty result. Seems my system is not using promiscious mode at all... ??

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Excds (217.78.xx.xx) on Wed 6 Dec 2006 at 09:55
Sorry, I just happened to read that comment in "human mode". My first thought was: "Yes, how do you stop guests from being promiscous?"

;-))

/Daniel

--
Ever noticed something? Unix comes with compilers. Windows comes with
Solitaire.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by El_Cubano (66.93.xx.xx) on Wed 6 Dec 2006 at 02:30
So, would it be possible to use this sort of thing to have each domU have multiple addresses? That is, if I want eth0 connected to a public network and eth1 connected to a private network (say the private network is GigE and I want all big transfers to go over it to keep the load of the public network). Would this possible? How would make two NICs appear in each domU?

--
Roberto C. Sanchez
http://people.connexer.com/~roberto

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (85.177.xx.xx) on Wed 6 Dec 2006 at 09:47
[ View Weblogs ]

As I did not try it I cannot be sure but specifying multiple entries in the /etc/xen/anyXmDomain.cfg:entry should do that:

vip=['ip=10.XX.XX.230,mac=00:16:de:ad:fa:ce,bridge=xenbr0', 'ip=10.XX.XX.234,mac=00:16:de:ad:be:ef,bridge=xenbr1']

As said, I did not try it and wrote the syntax from memory...

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Excds (217.78.xx.xx) on Wed 6 Dec 2006 at 09:51
Thankyou thankyou thankyou thankyou!

This was exactly what I've been thinking about for a couple of days.

I guess that this will also work with VLAN tagged interfaces?

Do you know if there's a limit on how many bridged interfaces Xen can support? I want to do a crazy setup with about 48 virtual machines each bridged to a VLAN tagged interface.

/Daniel
--
Ever noticed something? Unix comes with compilers. Windows comes with
Solitaire.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (85.177.xx.xx) on Wed 6 Dec 2006 at 10:03
Daniel,

as I never used vlan tagged interfaces (and never would) I cannot answer your question. But I would ask you to write an article or a comment as soon as you figured it out. Thank you.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by linlan (64.140.xx.xx) on Fri 5 Jan 2007 at 20:36
I've set up a similar config with xenbr0 (eth0 - public class C) and xenbr1 (eth1 - private class C). I've created a bunch of DomNs that use both interfaces. What I find though is I can't ping any of the other Class C addresses on the xenbr1. It's like the packets aren't sent out eth1. [root@dwarf ~]# brctl show bridge name bridge id STP enabled interfaces xenbr0 8000.feffffffffff no vif31.0 vif30.0 vif29.0 vif28.0 vif1.0 peth0 vif0.0 xenbr1 8000.feffffffffff no vif31.1 vif30.1 vif29.1 peth1 vif0.1 Everything looks okay although I'm surprised both bridges have the same bridge ID. The routes are right but when I try to ping another address it tells me the destination host is unreachable. Any suggestions on what I might do to fix or troubleshoot this would be greatly appreciated. There's no problem reaching anything on eth0.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by linlan (64.140.xx.xx) on Fri 5 Jan 2007 at 22:46
Sorry - always check the obvious first. Some kind soul had disconnected my eth1 cable.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (85.177.xx.xx) on Sun 15 Apr 2007 at 21:01
Thanks,

that was exactly what I was looking for. This article solves me hours of trial and error.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by lepalom (62.57.xx.xx) on Thu 28 Jun 2007 at 19:36
First of all thanks for the article.

I have a doubt about it. In the Dom0 you need to have the interfaces in the way to connect them to the bridges. In may case I have eth0 with an its network configuration and I don't want to touch it or make a bridge. Howeber, I have an eth1 that I would like to use it in the DomX. My problem is that in Dom0 I need to configure it, because not, I cannot make the bridge. So my question is how I "configure" without an IP a eth in Dom0 to use it in DomX?

Regards,

Leo

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (85.177.xx.xx) on Fri 29 Jun 2007 at 09:39
[ View Weblogs ]
Hi Leo,

in my configuration I created bridges for all ethX cards so your configuration differs from what we have here.

What happens when you change the script /etc/xen/scripts/my-network-script:

|#!/bin/sh dir=$(dirname "$0") "$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=xenbr1|

and use only
vif = ['ip=10.XX.XX.234,mac=00:16:de:ad:be:ef,bridge=xenbr1']

it should create
xenbr1 8000.feffffffffff no peth1 vif0.1 vif6.0

xenbr1 should be usable as desribed in the article. What do you do with eth0 and why don't you want to also bridge it?

regards,
Torsten

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by lepalom (62.57.xx.xx) on Fri 29 Jun 2007 at 09:53
Hi Torsen,

>in my configuration I created bridges for all ethX cards so your configuration
>differs from what we have here.

ok, no problem, but I don't want to assign an IP to the eth1 because I shouldn't want that Dom0 have any relation in a network level with eth1.

> What happens when you change the script /etc/xen/scripts/my-network-script:
> |#!/bin/sh
> |dir=$(dirname "$0") "
> |$dir/network-bridge" "
> |$@" vifnum=1 netdev=eth1 bridge=xenbr1|

is created, but when I try to use it I have:
bridge name bridge id STP enabled interfaces
xenbr0 8000.feffffffffff no vif0.0 peth0
xenbr1 8000.000000000000 no


>and use only vif = ['ip=10.XX.XX.234,mac=00:16:de:ad:be:ef,bridge=xenbr1']
>it should create xenbr1 8000.feffffffffff no peth1 vif0.1 vif6.0
>xenbr1 should be usable as desribed in the article.
>What do you do with eth0 and why don't you want to also bridge it?

Ok, I have to explain better. I have a server that is working and running on Dom0, It has its own network interface eth0 and is working. I would like to have a DomU box, running inside for experimental proposes with its own eth interface connecting to another network. I don't want any possible interference betwend Dom0 and DomU, so I prefer to separate the network transit. That's my idea.

Howeber I'm not be able to do that if I don't configure eth1 in Dom0, and this is what I don't want to do.

Regards,

Leo

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (85.177.xx.xx) on Fri 29 Jun 2007 at 10:07
[ View Weblogs ]
Leo,

sorry but I never tried that. Needless to say that runing any server in Dom0 is an improper setup for a XEN system.

> I don't want any possible interference betwend Dom0 and DomU,

As Dom0 is always the parent of DomU that is just not possible! If your server were in a DomU it would be no problem. But running services in Dom0 gives them all privileges.

xenbr1 does not have an IP address in Dom0. Was that what you really wanted?

regards,
Torsten

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by lepalom (62.57.xx.xx) on Fri 29 Jun 2007 at 10:30
Torsten,

>sorry but I never tried that. Needless to say that runing any server in Dom0 >is an improper setup for a XEN system.

Yes, you are right, but this is what I have by now.

>> I don't want any possible interference betwend Dom0 and DomU,

>As Dom0 is always the parent of DomU that is just not possible! If your
>server were in a DomU it would be no problem. But running services in Dom0
>gives them all privileges.

Yes, ok by now in my case, it's just an experiment. Dom0 is ok for my. I don't want that DomU and Dom0 have interferences.

> xenbr1 does not have an IP address in Dom0. Was that what you really wanted?

I want that, as you when I run brctl to have:
$brctl show
bridge name bridge id STP enabled interfaces
xenbr0 8000.feffffffffff no vif0.0
peth0
xenbr1 8000.000000000000 no

because in xenbr1 nothing is attached to eth1 because eth1 is not configured. The question to me is what I have to put in /etc/network/interfaces to configure eth1 in Dom0 without an IP or any network option to use it in DomU?

I want to use eth1 _only_ in DomU, not in Dom0.

Regards,

Leo

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (129.174.xx.xx) on Tue 10 Jul 2007 at 22:48
Torsten,

I am sure you are aware of this, but the xen network script(xen-bridge) creates two bridges with the same Hardware address, and messages like the followig are showing my in the logs:

Jul 9 17:15:25 salerno kernel: peth0: received packet with own address as source address
Jul 9 17:19:38 salerno kernel: peth0: received packet with own address as source address
Jul 9 17:19:38 salerno kernel: peth0: received packet with own address as source address
Jul 9 17:19:42 salerno kernel: peth0: received packet with own address as source address
Jul 9 17:30:27 salerno kernel: peth0: received packet with own address as source address
Jul 9 17:30:27 salerno kernel: peth0: received packet with own address as source address
Jul 10 09:12:19 salerno kernel: peth0: received packet with own address as source address
Jul 10 10:06:04 salerno kernel: peth0: received packet with own address as source address
Jul 10 10:06:04 salerno kernel: peth0: received packet with own address as source address
Jul 10 10:06:05 salerno kernel: peth0: received packet with own address as source address
Jul 10 10:50:33 salerno kernel: peth0 adding interface with same address as a received packet

While eth0 and eth1 have different hardware addresses(therefore all packets will endup in the host vm), I wonder how the hypvisor will handle the packets between the multiple guest oses. I am already seeing degradation in performance. Let me know what you think.

--
uk
ukhanlists AT hotmail.com

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by kaushikgoa (66.56.xx.xx) on Thu 27 Sep 2007 at 05:14
Hello

As per the article, I created my-network-script in /etc/xen/scripts with the same content and modified the existing /etc/xe/xend-config.sxp (to use my script) as below

(network-script my-network-script)

I also did "chmod +x my-network-script"

Now, if I issue "xend restart" , my Dom0 just hangs. Is there some problem with my-network-script ?? Because with /etc/xen/scripts/network-bridge, I can successfully create a DomU.

Please reply fast.

-Kaushik

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by kaushikgoa (66.56.xx.xx) on Thu 27 Sep 2007 at 05:46
ok..so I used lines like

"$dir/network-bridge" "$@" vifnum=0 bridge=xenbr0

instead of

"$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=xenbr0

in /etc/xen/scripts/my-network-script and "xend restart" worked (I can see xen-br0 apart from xenbr0, xenbr1, xenbr2 created by my-network-script) but why did it use to hang with "netdev=eth0" ?? I havent yet tried creating a domU as listed in this article...

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (189.10.xx.xx) on Tue 22 Jan 2008 at 02:41
You Rock! Thanks!

Fernando

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (69.25.xx.xx) on Fri 15 Feb 2008 at 22:51
hi, i have a question about multiple interface to domU.

if i have 2 NIC eth0 and eth1 configured to 2 networks ip, i want all domU have 2 interface (2 ip address or network), how to configure the system? Any help will be appreciated!!

Thanks,
Lee

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (85.177.xx.xx) on Mon 7 Jul 2008 at 07:02
[ View Weblogs ]
vif = [ 'ip=10.xx.xx.123,bridge=xenbr0','ip=10.xx.xx.124,brid ge=xenbr1' ]

regards,
Torsten

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by agromsl (75.152.xx.xx) on Sat 5 Jul 2008 at 03:20
With a 4 NICs
I created 3VMs, each one using a distinct NIC.
Everything has been working fine, the traffic of each VM using its own NIC, UNTIL I REBOOTED!

One of the VM was then unable to launch (xm create...).

I had to rebuild that VM (xm-create-image...)

I could then load that VM and the 2 others, UNTIL I REBOOTED (goto to line 4 above)... So I can't rely on that setup.

Apparently bridges created that way are not stable and they don't survive a reboot!

Read somewhere that netloop device had to be at least 32 for as many as 4 NICs, raised it to 32 (in /etc/modprobe.d/netloop) but didn't change anything.

All 4 NIC work fine in the dom0! can ping in and out...

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (85.177.xx.xx) on Mon 7 Jul 2008 at 07:03
[ View Weblogs ]
Agromsl,

check /var/log/xen/xend.log (and the other logfiles) to see if you can find any trail of an error when booting up. As I never had 4 NICs I don't know about that.

I know that the configuration works fine using 3 NICs on at least 3 machines in 3 countries. On these machines the bridges work fine for more than a year now.

Please recheck your configuration and logs.

regards,
Torsten

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by agromsl (75.152.xx.xx) on Mon 7 Jul 2008 at 09:50
What is better than finding a problem?
Finding an explanation (not exhaustive) and even better, a solution!

From various sources in forums I could see bits of explanation but none could solve the problem.

With my forth NIC I apparently had reached the number of netloop.

There is still a confusion in my mind between loop, netloop and loopbacks (if someone could give a clear explanation of similarities, differences between these notions, I'd appreciate) but to solve the problem I had to create a file /etc/modprobe.d/netloop and put that line in it:
options netloop nloopbacks=32
(put a line feed after the line, as we have to do in /etc/fstab)

I then tried to put 6 NICS in the machine created 5 VMs. I could load 4 of them, because I had reached a new limit.

I then added the line:
loop max_loop=64
in the /etc/modules file

After a reboot, I could then load all the 5 VM, each using its NIC (eth1 to 5), dom0 still capable of using eth0...

That's still empirical! If someone could please give us the mathematic formula to set loop, netloop, loopbacks according to the number of real NICs we want to bridge...

The recipe above works fine for my older computers (read «those whose hardware is supported by Debian Etch»).
- - - - - -
But I have a brand new to setup with the same pattern (1 NIC/VM) and I had to use Ubuntu 8.0.4 (hardy) to get appropriate support for chipset (Intel G33) and Marvell Yukon II gigabit Ethernet. Xen bridges have apparently been renamed in their xen package (they now bear the physical interface name eth0 is eth0's bridge!). That new naming will probably show up in Lenny as soon as Xen kernels will be released for it! (don't know how to check xen and xen-tools version number used)

With the «my-network-script ;» proposed by Itsec, eth devices didn't even show up at boot!

I tried to adapt it, as follow:
#!/bin/sh
dir=$(dirname "$0")
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=eth0
"$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=eth1
"$dir/network-bridge" "$@" vifnum=2 netdev=eth2 bridge=eth2

At least, the eth0, eth1, eth3 showed up and I can ping other machines, but I still can't access internet and did'nt even try to create VMs.

Can somebody adapt the script



[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (75.146.xx.xx) on Sat 26 Jul 2008 at 20:05
I modified my script just as you did, using eth0 and eth1 as the bridge names. In Dom0, I have two NIC's, on a the 192.168.100.0 network and one on the 192.168.2.0 network. I then created two test DomU's. For the first DomU, I specified to use the bridge=eth0 bridge. For the second DomU, I specified to use the bridge=eth1 bridge.

My DNS server is on the 192.168.100.0 network. In the first DomU, I could ping local machines and the Internet. On the second DomU, I could ping local machines, but could not get to the Internet. I had to setup, on the second DomU, to use the DNS server on the other subnet. Once I did that, both machines could access the Internet.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (84.187.xx.xx) on Thu 4 Dec 2008 at 19:25
Hi,

If you want to use this in Debian Lenny, just do everything the same except that you only supply the netdev-Variable to the network-bridge script, the other two(vifnum, bridge) are no longer needed.
And you have to specify bridge=ethX in your Domains vif-config-line, not bridge=xenbrX as in etch.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (62.96.xx.xx) on Mon 4 May 2009 at 14:02
Thanks thounds of times. This was the solution for my problem. In Lenny with this "old arguments", I lost every connection to the server. Now it´s working fine with two real interfaces bridged to one domain with even to interfaces inside. Additionally, seems you don´t need line (vif-script vif-bridge) in xend-config.sxp anymore (if you use the my-network-wrapper)

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (95.24.xx.xx) on Sat 29 Aug 2009 at 18:28
If you don't want to lose connection to the dom0 machine, after apply instructions in this article you must modify /etc/network/interfaces to change eth0 by xenbr0. Sorry for my english.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by suspended user plrunner (212.48.xx.xx) on Fri 16 Oct 2009 at 08:09
In this post
http://debiangeeks.blogspot.com/2008/03/howto-debian-xen-e-vlan.h tml the author explain how to manage vlans in xen. I think the way they used was the simplest one. In fact, using a customized script as you have shown, if you need to add a new vlan bridge you should edit both /etc/network/interfaces and the script itself while in that post they simply edit the "interfaces" file.

I have tried it and it works!

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (85.177.xx.xx) on Fri 16 Oct 2009 at 09:08
And please fully understand vlans and also please fully understand this article:
http://www.spirit.com/Network/net0103.html

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (71.199.xx.xx) on Sun 18 Oct 2009 at 19:13
Dumb question, but after configuring my-network-script, do we need to restart xen server? I currently have a 1 critical vm that cannot be taken down, but need xenbr1 available for anotther vm.

[ Parent | Reply to this comment ]

Using multiple network cards in XEN 3.2
Posted by Anonymous (84.130.xx.xx) on Tue 5 Jan 2010 at 21:34
I had a little bit time and wrote a newer article http://zeldor.biz/linux/10-xen-bridging.html for Xen 3.2

thanks for debian-administration very nice resource!

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (24.14.xx.xx) on Sun 21 Feb 2010 at 09:28
thanks so much! this consolidates many other books/articles i've read... finally explaining it all in one place!

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (78.54.xx.xx) on Sun 21 Feb 2010 at 18:48
[ View Weblogs ]
You're welcome.

Finally I use this article myself to remember the configuration ;-)

regards,
Torsten

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (78.54.xx.xx) on Sun 21 Feb 2010 at 18:59
[ View Weblogs ]
For Debian Lenny you can set up the /etc/xen/scripts/my-network-script like this:
#!/bin/sh
dir=$(dirname "$0")
"$dir/network-bridge" "$@" netdev=eth0
"$dir/network-bridge" "$@" netdev=eth1
"$dir/network-bridge" "$@" netdev=eth2
"$dir/network-bridge" "$@" netdev=eth3

regards, Torsten

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Nurtic-Vibe (95.114.xx.xx) on Mon 5 Apr 2010 at 11:05
This solution didn't work for me.
I've got a Debian Lenny dom0 and also Debian Lenny domUs. I tried to create multiple interfaces like you've posted, but on ping i always get "Destination Host Unreachable". I've rechecked cables, network setup and configuration files a hundred times, but i can't find the failure.
Can someone of you help me on this?

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by doug182 (190.86.xx.xx) on Wed 14 Apr 2010 at 21:00
hi all, just one question, i have installed ubuntu hardy heron server, xen 3.2 and i cant see "xenbr0, xenbr1" in my network configuration, just show:

eth

lo

peth

veth

vif

is it normal or have to make something else to enable xenbr0 and xenbr1??

sorry about the questions but im noob

ill appreciatte your help, THXS!!!

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by itsec (78.54.xx.xx) on Thu 15 Apr 2010 at 10:52
[ View Weblogs ]
Sorry, don't know anything in ubuntu. Maybe you should give ifconfig from both Dom0 and a DomU so anybody can help you. Even if this is *NOT* a support forum.
regards,
Torsten

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (87.226.xx.xx) on Wed 4 Aug 2010 at 20:05
By default in debian and ubuntu bridge interface called ethN and physical interface renamed to pethN (if you use network-bridge script), look at output of "brctl show" command.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (196.15.xx.xx) on Tue 25 Oct 2011 at 12:27
Hi, and also many thanks for the great explanation. I am running Centos5 and have everything working as you explained. Just one question, can two or more DomU's share the same bridge, e.g. xenbr2. I tried that but then can only get access to one DomU. The IP's do differ and I get complete access when the DomU's are run seperately.

I do not have any IP's specified in the DomU configuration file.

[ Parent | Reply to this comment ]

Re: Using multiple network cards in XEN 3.0
Posted by Anonymous (37.191.xx.xx) on Thu 14 Mar 2013 at 23:46
Hi,
i want to create bunch of labs in XEN. each lab consists of 4 machines as below:
Gateway : 2 NIC's, eth0 will be connected to physical eth0 of XEN, eth1 will be connected to private network.(10.0.0.0) ip= 10.0.0.1
SRV1 : eth0 ip = 10.0.0.2
SRV2 : eth0 ip= 10.0.0.3
FIREWALL : eth0 ip = 10.0.0.4, eth1= 10.0.1.1
DESKTOP : eth0 ip = 10.0.1.2

i just want to use one physical NIC of XEN.
questions are:
1- can i create 2 bridges, link br0 to eth0 of XEN and put vif1.0 which is for eth0 gateway machine in it and put other machines NIC's in br1? then not to link br1 to eth0 of XEN in order to let GATEWAY eth0 be the single point of connection to eth0 of XEN?
2- if not , then how can i implement this scenario?
3- what if, let's say i want to create 5 labs like this, with same ip's?

[ Parent | Reply to this comment ]