[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Server with 2 NICS; connect domU to outside & vlan



Hi Ferreira,

Am Montag, den 30.03.2009, 14:43 +0200 schrieb Ferreira, N. L. (Nuno):
> Hi *
> 
> First of all, let me say that I have almost no knowledge about how 
> networks works. I must fill this gap soon.
> So, don't feel obliged to completely answer my question(s). I only 
> expect some tips/clues to start with.
> 
> What I have:
> 1) A dom0 server with 2 NIC cards (eth0, eth1), running centOS52 xen
> 3.2.
> 2) A switch to a VLAN with several physical machines (already up and 
> running).
> 
> What I need:
> 1) A domU with a static IP and also connected to the VLAN.

you need to write your own networking-script to use 2 bridges.

# vim /etc/xen/scripts/network-2nics

#!/bin/bash
/etc/xen/scripts/network-bridge $1 netdev=eth0 bridge=xenbr0 vifnum=0
/etc/xen/scripts/network-bridge $1 netdev=eth1 bridge=xenbr1 vifnum=1

# chmod a+x /etc/xen/scripts/network-2nics

edit xend-confix.sxp

and finally restart xend.

To use 2 bridges/NICs into your guests, just use something like:

vif         = [ 
'ip=xxx.yyy.zzz.228,mac=00:01:ad:13:04:05,bridge=xenbr0','ip=10.0.57.228,mac=00:16:3E:3C:B3:FC,bridge=xenbr1'
 ]

> My plan:
> 1) use dom0 eth0 to connect to the outside world; domU will use it also 
> to connect to the outside (this is the default anyway).
> 2) use dom0 eth1 to connect domU to the switch connected to the VLAN.
> 
> Do not know if this makes much sense, it makes to me at least,.

So:

- do you want to NATting in dom0? ---> use network-nat ;)
- Or do you want a router in domU ---> follow the above :-)
> 
> My progress:
> Till now, all my created domU's (each with a static IP) were connecting 
> to the web through xenbr0. The second NIC on dom0 was not being used at 
> all. The xen config file pointed to xenbr0, and I only had to change 
> inside the domU the network configurations (/etc/sysconfig/network and 
> /etc/sysconfig/network-scripts-eth0). An ifconfig on the host shows me 
> the following network components (deleted not so important stuff):
> 
> [root@dom0 ~]# ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:E0:81:4D:30:D0

....  it's not a good idea to post your public-ips :-)

> xenbr1    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF
>          
> 
> So it seems that the dom0 is well configured, both to the outside world 
> and to the VLAN. Though I thought 2 xen bridges should appear ... one 
> for each NIC card?

yap, but the standard-network-script wont do this 4 you.
> 
> I booted a domU (after changing in the xen cfg file xenbr0 to xenbr1) 
> created is this machine (when the eth1 was still inactivated) and I had 
> problems because Kudzu detected a change in the network configuration. 
> So probably, I should create the domU when both dom0 NIC cards are 
> active, right?

yap. if i understand you right, you wand to use a domU as router?

So you need _a_ domU with 2 nics (connected to internal _and_ external
bridge), whcich does the job for you.

> 
> How can I accomplish my 2 goals above on "My plans" section?
> Any insights for me to start playing?
> 
> Sorry for such long e-mail, and thanks for your reading.
> Cheers,
> N.

hth,

Thomas


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.