[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-users] Xen networking with two NIC's
Hi,
First a quick apology, I think I accidentally submitted my initial
query to the list three times so the replies may be a bit over the
place!
I think that I have got it working, but I will explain my setup and the
solution for anyone else who needs it. My setup is:
dom0 - eth0 - 123.123.123.123
domA - eth0 - 123.123.123.124
domB - eth0 - 123.123.123.125
domC - eth0 - 123.123.123.126
ie all of the dom's have public IP's. Some have multiple IP's but they
are all only using one virtual network interface, which is all tied to
the one physical interface.
I recently got a second server that I want to back up some data from
the domU's on to. This is connected to the second network interface on
my Xen server via a crossover cable.
Therefore, I need to bridge the second network interface on the Xen
machine so that the domU's have access to the local area network, as
well as the internet on the other network interface.
To get it working, I first set up a new bridge and added the eth1
interface to it:
brctl addbr beth1
brctl addif beth1 eth1
I also enabled STP as I read something on the internet saying to do it,
but I'm not sure what it actually does! The network appears to work
with it on though.
I then created an ifcfg-beth1 file at /etc/sysconfig/network-scripts
with this in it:
DEVICE=beth1
TYPE=Bridge
BOOTPROTO=static
>
HWADDR=00:22:19:D5:09:EE
IPADDRESS=192.168.5.2
NETMASK=255.255.255.0
For some reason, after restarting the network now, I still had to add
the IP address info to beth1:
ifconfig beth1 192.168.5.2 netmask 255.255.255.0 up
Does anyone know why I still had to do this?
Finally, ifconfig should look something like this:
beth1 Link encap:Ethernet HWaddr
00:22:19:D5:09:EE
inet addr:192.168.5.2 Bcast:192.168.5.255 Mask:255.255.255.0
inet6 addr: fe80::222:19ff:fed5:9ee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:306 errors:0 dropped:0 overruns:0 frame:0
TX packets:211 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:19774 (19.3 KiB) TX bytes:18130 (17.7 KiB)
eth0 Link encap:Ethernet HWaddr 00:22:19:D5:09:ED
inet addr:123.123.123.123 Bcast:123.123.123.132
Mask:255.255.255.240
inet6 addr: fe80::222:19ff:fed5:9ed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:819867 errors:0 dropped:0 overruns:0 frame:0
TX packets:269048 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:82374101 (78.5 MiB) TX bytes:36740222 (35.0 MiB)
eth1 Link encap:Ethernet HWaddr 00:22:19:D5:09:EE
inet6 addr: fe80::222:19ff:fed5:9ee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:15412 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1302 (1.2 KiB) TX bytes:986818 (963.6 KiB)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:27952 errors:0 dropped:0 overruns:0 frame:0
TX packets:27952 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2590513 (2.4 MiB) TX bytes:2590513 (2.4 MiB)
peth0 Link encap:Ethernet HWaddr 00:22:19:D5:09:ED
inet6 addr: fe80::222:19ff:fed5:9ed/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:387023421 errors:0 dropped:0 overruns:0 frame:0
TX packets:551793023 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:83309441808 (77.5 GiB) TX bytes:464515787114 (432.6
GiB)
Interrupt:16
And brctrl show should look like this:
[root@mars network-scripts]# brctl show
bridge name bridge id STP enabled interfaces
beth1 8000.002219d509ee yes eth1
vifesty2local
eth0 8000.002219d509ed no vifesty2
vifwips0
vifmood0
vifesty1
vifesty0
peth0
You can then modify the line in your Xen domU config file to something
like this:
vif = ['ip=123.123.123.124, bridge=eth0,
vifname=vifesty2, mac=aa:00:aa:f3:9f:01', 'ip=192.168.5.3,
bridge=beth1, vifname=vifesty2local, mac=00:16:3e:08:be:a7']
Restart the domU and everything should work :)
Cheers,
Andrew
On 25/02/2010 9:18 AM, Digimer wrote:
On
10-02-23 11:01 PM, Andrew Kilham wrote:
Hi,
I have a Xen box set up with a number of VM's on it using bridged
networking. I have been using one NIC on the server, and assigning
public IP's to each of the VM's.
I have recently got a second separate physical machine, and I would
like
to use NFS to mount drives from my new machine, in to the VM's on my
Xen
machine. I have connected a crossover cable from the Xen machine to the
new machine, and I have set up a local area network between the two
servers. I'm just not sure how to then get my VM's to connect to the
new
network. Could someone please point me in the right direction :)
Cheers,
Andrew
If I understand correctly; You've got something like this:
dom0 - eth0 = 192.168.1.1
domA - eth0 = 192.168.1.100
domB - eth0 = 192.168.1.101
domB - eth0 = 192.168.1.102
You want to add another physical machine at something like:
New - eth0 = 192.168.1.10
And then mount it's storage on the VMs?
If that is right, then you should be able to connect dom0's eth0
interface to the new machine's eth0 (via cross-over or a switch) and be
off to the races. Is this what is failing?
Digi
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.435 / Virus Database: 271.1.1/2706 - Release Date: 02/23/10 19:34:00
|
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|