Xen Bridge 2nd NIC

SLES12 with Xen installed. I am trying to create a windows server 2012r2 VM. The server has 2 NIC’s and during the creation of the VM, the 1st NIC is created as br0. This NIC is the one that SLES12 will use. We need to attach the 2nd NIC to a perimeter network and therefore can not use br0. How do you, in Xen, make a bridge for the 2nd NIC?

Found my answer here:
https://www.suse.com/documentation/sles11/book_xen/data/sec_xen_vbridge.html

So i followed that link above to make br1 (which i believe is for the 2nd NIC). However, the guest OS (server 2012) see the NIC, i can not get an ip. In the host OS (SLEs12), i do not have a ip set on the 2nd NIC because you are unable to set a default GW for that NIC (NIC 2 does not connect to the same network as NIC 1 so they have different GW’s). On the guest OS, i have DHCP set on the NIC. Ipconfig /all shows 169.x.x.x ip which means, it is not getting an ip. I set it statically and can not ping 4.2.2.2.
ifconfig
br0 Link encap:Ethernet HWaddr 3A:A5:4E:BF:65:67
inet6 addr: fe80::38a5:4eff:febf:6567/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:404 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:133668 (130.5 Kb)

br1 Link encap:Ethernet HWaddr 00:21:9B:8B:34:15
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:664 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:56106 (54.7 Kb) TX bytes:4172 (4.0 Kb)

eth0 Link encap:Ethernet HWaddr 00:21:9B:8B:34:13
inet addr:192.168.123.3 Bcast:192.168.123.255 Mask:255.255.255.0
inet6 addr: fe80::221:9bff:fe8b:3413/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:120365 errors:0 dropped:0 overruns:0 frame:0
TX packets:125046 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23692751 (22.5 Mb) TX bytes:38690349 (36.8 Mb)

eth1 Link encap:Ethernet HWaddr 00:21:9B:8B:34:15
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

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:65536 Metric:1
RX packets:1404952 errors:0 dropped:0 overruns:0 frame:0
TX packets:1404952 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:44521694104 (42459.1 Mb) TX bytes:44521694104 (42459.1 Mb)

vif2.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:465 overruns:0 carrier:0
collisions:0 txqueuelen:512
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

vif2.0-em Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:511 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:43524 (42.5 Kb) TX bytes:4172 (4.0 Kb)

And here are the listed devices on the VM guest:

How do i configure the 2nd NIC to connect to a different network?

[QUOTE=carnold6;26667]So i followed that link above to make br1 (which i believe is for the 2nd NIC). However, the guest OS (server 2012) see the NIC, i can not get an ip. In the host OS (SLEs12), i do not have a ip set on the 2nd NIC because you are unable to set a default GW for that NIC (NIC 2 does not connect to the same network as NIC 1 so they have different GW’s). On the guest OS, i have DHCP set on the NIC. Ipconfig /all shows 169.x.x.x ip which means, it is not getting an ip. I set it statically and can not ping 4.2.2.2.

ifconfig on the host:[code]
br0 Link encap:Ethernet HWaddr 3A:A5:4E:BF:65:67
inet6 addr: fe80::38a5:4eff:febf:6567/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:404 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:133668 (130.5 Kb)

br1 Link encap:Ethernet HWaddr 00:21:9B:8B:34:15
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:664 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:56106 (54.7 Kb) TX bytes:4172 (4.0 Kb)

eth0 Link encap:Ethernet HWaddr 00:21:9B:8B:34:13
inet addr:192.168.123.3 Bcast:192.168.123.255 Mask:255.255.255.0
inet6 addr: fe80::221:9bff:fe8b:3413/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:120365 errors:0 dropped:0 overruns:0 frame:0
TX packets:125046 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23692751 (22.5 Mb) TX bytes:38690349 (36.8 Mb)

eth1 Link encap:Ethernet HWaddr 00:21:9B:8B:34:15
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

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:65536 Metric:1
RX packets:1404952 errors:0 dropped:0 overruns:0 frame:0
TX packets:1404952 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:44521694104 (42459.1 Mb) TX bytes:44521694104 (42459.1 Mb)

vif2.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:465 overruns:0 carrier:0
collisions:0 txqueuelen:512
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

vif2.0-em Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:511 errors:0 dropped:0 overruns:0 frame:0
TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:43524 (42.5 Kb) TX bytes:4172 (4.0 Kb)[/code]

And here are the listed devices on the VM guest:

How do i configure the 2nd NIC to connect to a different network?[/QUOTE]

See the greyed-out NIC’s in the image? I believe i have to “attach” to one of those but how?

Hi
On the host use;

brctl show

To see what is connected where…

All your network configuration is done in the guest, I would imagine
routing would be done at the switch your server ethernet port is
connected to.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

[QUOTE=malcolmlewis;26669]Hi
On the host use;

brctl show

To see what is connected where…

All your network configuration is done in the guest, I would imagine
routing would be done at the switch your server ethernet port is
connected to.[/QUOTE]

brctl show:

bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
br1 8000.000000000000 no

There shouldnt be any configuration to be done at the switch as this network has been serving nodes for years. I should be able to plug a NIC into the wall port and get a 172.16.31.x address and surf with no problems. I feel like i do not have the config correct on the VM.

br0 was created when the VM was created (the setup process said it was recommended and i said yes). However, this connected to NIC 1 not NIC 2. So i followed that link i posted and made a bridge, br1 and then disassociated br0 with the physical NIC 1.

Hi
So they are not connected to any interface, I use KVM and have;

brctl show
bridge name	bridge id		STP enabled interfaces
br0		8000.000acd24d2d2 no		eth0
vnet0
br1		8000.000acd24d2d3	no		eth1
br2		8000.d48564a9653e	no		eth2

Have a look back in YaST at the bridges and interfaces.


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.36-38-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

[QUOTE=malcolmlewis;26671]Hi
So they are not connected to any interface, I use KVM and have;

brctl show
bridge name	bridge id		STP enabled interfaces
br0		8000.000acd24d2d2 no		eth0
vnet0
br1		8000.000acd24d2d3	no		eth1
br2		8000.d48564a9653e	no		eth2

Have a look back in YaST at the bridges and interfaces.[/QUOTE]

So, i have looked in yast->network settings but do not see a way to map the bridge to the interface. There is this:

I have checked eth1 at least 1000 times and this only kills all connectivity. Can you give me a screen shot of your bridged nic so i can match settings?
I wonder if i even have to use a bridge? I dont want communications between the host and guest. I just want the guest to use eth1 for network and internet connectivity. In hyper-v (windows), i have to make a vswitch so the guest can see the NIC. Then add that to the guest settings. Then configure the NIC on the guest. I know this isnt windows but the process, i would imagine, should be the same?

Setup background:
Physical server = 2 gigabit NICs. Broadcom netxtreme. eth0 is the only one used at the present that plugs into a switch on the 192.168.123 network
Host = SLES12 is the host and it uses static ip on 192.168.123 network eth0. I do not want this bridged. I want sles 12 to have it owns seperate NIC. The guest is not to use this NIC
Guest = Windows server 2012. Use its own sepearate NIC on 172.16.31 network eth1.

Hi
You need to check the box for the NIC to use in the bridged devices…

[QUOTE=malcolmlewis;26687]Hi
You need to check the box for the NIC to use in the bridged devices…

[/QUOTE]

Malcolm,
i promise i have checked eth1 some many times… but now it works!!! Thank you…