Ferreira, N. L. (Nuno)
2009-Apr-01 14:25 UTC
[Xen-users] Server with 2 Nics (continuation)
Hi *.*, This is a continuation on the 2 NICs thread after some more testing. Just to remember my goal. --------------------------- I want to create a domU with 2 virtual NICS. One of them will contact the outside world, the other one will contact a VPN. No reason in concrete for choosing the bridging protocol, only because its the default one. I installed the dom0 with the 2 NICs active, with the net cables already placed to get correct IP''s. My OS configuration: ---------------------- [root@enmr03 ~]# uname -a Linux enmr03.chem.uu.nl 2.6.18-128.el5xen #1 SMP Wed Jan 21 11:12:42 EST 2009 x86_64 x86_64 [CentOS 52 x86_64, with gitco xen running (3.3.1)] Xen starst ok, and dom0 is seen. [root@enmr03 xen]# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 1877 2 r----- 84.3 I enabled both NICSs (eth0, eth1) while installing the OS. An ifconfig and brctl displays the following [removed stuff]: [root@enmr03 xen]# ifconfig eth0 Link encap:Ethernet HWaddr 00:15:17:8D:0B:EF inet addr:xxx.yyy.zzz.74 Bcast:xxx.yyy.zzz.255 Mask:255.255.255.0 inet6 addr: fe80::215:17ff:fe8d:bef/64 Scope:Link eth1 Link encap:Ethernet HWaddr 00:15:17:8D:0B:F1 inet addr:10.0.0.48 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::215:17ff:fe8d:bf1/64 Scope:Link 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 peth1 Link encap:Ethernet HWaddr 00:15:17:8D:0B:F1 inet6 addr: fe80::215:17ff:fe8d:bf1/64 Scope:Link virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link [root@enmr03 ~]# brctl show bridge name bridge id STP enabled interfaces eth1 8000.0015178d0bf1 no peth1 virbr0 8000.000000000000 yes Thus, eth1 --> peth1 seem''s Ok. Following Thomas Halinka tips on a previous e-mail: http://lists.xensource.com/archives/html/xen-users/2009-03/msg00772.html I changed xend-confix.sxp file: [root@enmr03 xen]# diff xend-config.sxp xend-config.sxp.orig.01abr09 < (network-script network-2nics) > (network-script network-bridges) [root@enmr03 xen]# cat /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 After rebooting the machine, an ifconfig and brctl again: [root@enmr03 ~]# ifconfig -a lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host peth0 Link encap:Ethernet HWaddr 00:15:17:8D:0B:EF inet6 addr: fe80::215:17ff:fe8d:bef/64 Scope:Link peth1 Link encap:Ethernet HWaddr 00:15:17:8D:0B:F1 inet6 addr: fe80::215:17ff:fe8d:bf1/64 Scope:Link virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link [... snipped ... vif0.0 --> vif0.4, sit0, veth0-->veth4] xenbr0 Link encap:Ethernet HWaddr 00:15:17:8D:0B:EF inet addr:xxx.yyy.zzz.74 Bcast:xxx.yyy.zzz.255 Mask:255.255.255.0 xenbr1 Link encap:Ethernet HWaddr 00:15:17:8D:0B:F1 inet addr:10.0.0.48 Bcast:10.0.0.255 Mask:255.255.255.0 [root@enmr03 ~]# brctl show bridge name bridge id STP enabled interfaces virbr0 8000.000000000000 yes xenbr0 8000.0015178d0bef no peth0 xenbr1 8000.0015178d0bf1 no peth1 During the reboot I noticed some errors. From the Network Configuration Window, I see that both NICs are down, and these are the message errors that appeared on the reboot: ----> Error for wireless request "Set Encode" (8B2A) : SET failed on device eth1 ; No such device. Determining IP information for eth1...SIOCSIFADDR: No such device eth1: unknown interface: No such device eth1: unknown interface: No such device failed. Error for wireless request "Set Encode" (8B2A) : SET failed on device eth0 ; No such device. SIOCGIFFLAGS: No such device Failed to bring up eth0. ----> Thus, though 2 bridges were correctly created (with the appropriate IP''s), the physical devices are down! Any insights? Cheers, N. -- =============================================Nuno Ricardo Santos Loureiro da Silva Ferreira NMR Spectroscopy Research Group Bijvoet Center for Biomolecular Research Utrecht University Bloembergen gebouw Padualaan 8, 3584 CH Utrecht The Netherlands P: +31.(0)30.253 9932 F: +31.(0)30.253 2652 E: n.l.ferreira@uu.nl W: http://nmr.chem.uu.nl ============================================= _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Apr 1, 2009 at 9:25 PM, Ferreira, N. L. (Nuno) <n.l.ferreira@uu.nl> wrote:> ----> > Error for wireless request "Set Encode" (8B2A) : > SET failed on device eth1 ; No such device.Are you using wireless? If yes, I don''t think wireless interface support bridging properly. Go with wired. Here''s an alternative config that might work for you. In my case I have a machine with two NICS, lots of domUs, each connected to a different network. I use bridge and vlan to achieve that. One NIC (eth1) is dedicated for dom0 "management", which leaves one (eth0) for domUs traffic. On xend-config.sxp, I have this: #(network-script network-bridge) (vif-script vif-bridge) That is, I comment-out network-script entirely and do bridge setup from the OS (RHEL5) Some config files on /etc/sysconfig/network-scripts/: # cat ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none ONBOOT=yes # cat ifcfg-eth0.6 DEVICE=eth0.6 VLAN=yes BOOTPROTO=none ONBOOT=yes BRIDGE=br6 # cat ifcfg-br6 DEVICE=br6 BOOTPROTO=none ONBOOT=yes TYPE=Bridge # cat ifcfg-eth0.61 DEVICE=eth0.61 VLAN=yes BOOTPROTO=none ONBOOT=yes BRIDGE=br61 # cat ifcfg-br61 DEVICE=br61 BOOTPROTO=none ONBOOT=yes TYPE=Bridge There are more bridges actually, but those two are enough for example. Those config means I create two bridges, br6 and br61, whose uplink interface is eth0.6 and eth0.61. So when a domU requires network on vlan6 I assign it to br6, and when domU requires network on vlan61 I assign it to br61. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users