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

Re: [Xen-devel] Network-bridge script with bonding and vlan



----- Original Message ----- From: "Ewan Mellor" <ewan@xxxxxxxxxxxxx>
Maybe we'll accept your script into the repository if it's clean and general
enough, but whether you maintain it or we do, I don't think that it
(necessarily) belongs in network-bridge.

Well I have managed to get a trivial example configuration up and running. It uses the Fedora initscripts to initialise the networking (c.f. using network-bridge script). It still uses the vif-bridge script for domU's. It might be of some use to others running FC4.

The setup is two GbE ports (eth0 and eth1) bonded together using 802.3ad. Over that I have setup a single 802.1q VLAN (id 10) - with the intention of expanding this to one VLAN per domU. I configured a bridge (br0). I have created a config file to add vif0.0 to the bridge. Lastly I have provided a configuration file for veth0 which provides a MAC address and an IP address for dom0.

I notice that the dom0 vif interface uses zero based indexes (i.e vif0.0), however the domU network interface numbers are one based (i.e. vif<domain#>.1). Is there a reason for this?

I'd appreciate any feedback, especially if I'm doing bad things.

Greg.

--

# ip addr show
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
2: vif0.0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
   link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
3: veth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
   link/ether aa:de:ad:be:ef:01 brd ff:ff:ff:ff:ff:ff
   inet 192.168.0.20/24 brd 192.168.0.255 scope global veth0
4: bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
   link/ether 00:e0:81:2e:13:14 brd ff:ff:ff:ff:ff:ff
5: eth0: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
   link/ether 00:e0:81:2e:13:14 brd ff:ff:ff:ff:ff:ff
6: eth1: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
   link/ether 00:e0:81:2e:13:14 brd ff:ff:ff:ff:ff:ff
7: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
   link/ether 00:e0:81:2e:12:ca brd ff:ff:ff:ff:ff:ff
8: br0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
   link/ether 00:e0:81:2e:13:14 brd ff:ff:ff:ff:ff:ff
9: bond0.10: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
   link/ether 00:e0:81:2e:13:14 brd ff:ff:ff:ff:ff:ff
11: vif2.1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
   link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff


# brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.00e0812e1314       no              bond0.10
                                                       vif0.0
                                                       vif2.1


--/etc/modprobe.conf--
alias bond0 bonding
options bond0 mode=802.3ad lacp_rate=fast miimon=100

alias eth0 tg3
alias eth1 tg3
alias eth2 e100

---domU config---
kernel = "/boot/vmlinuz-2.6.12-xenU"
memory = 256
name = "purple"
nics=1
vif = [ 'mac=aa:de:ad:be:ef:02, bridge=br0' ]
disk = [ 'phy:/dev/VolGroup00/root01xenu,sda1,w',
        'phy:/dev/VolGroup00/swap01,sdb1,w',
        'phy:/dev/md0,sdc1,w' ]
root = "/dev/sda1 ro"
extra = "3"

---xend-config.sxp---
(xend-port         8000)
(xend-event-port   8001)
(xend-address      'localhost')
(console-port-base 9600)
(console-address   'localhost')
(network-script   network-bridge-nop  )
(vif-bridge        br0)
(vif-netdev        veth0)
(vif-script        vif-bridge)
(vif-antispoof     no)
(block-file block-file)
(block-enbd block-enbd)
(dom0-min-mem 0)
(dom0-cpus 0)

Attachment: route-veth0
Description: Binary data

Attachment: ifcfg-bond0
Description: Binary data

Attachment: ifcfg-bond0.10
Description: Binary data

Attachment: ifcfg-br0
Description: Binary data

Attachment: ifcfg-eth0
Description: Binary data

Attachment: ifcfg-eth1
Description: Binary data

Attachment: ifcfg-eth2
Description: Binary data

Attachment: ifcfg-veth0
Description: Binary data

Attachment: ifcfg-vif0.0
Description: Binary data

Attachment: network
Description: Binary data

Attachment: network-bridge-nop
Description: Binary data

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

 


Rackspace

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