Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been having problems with Xen networking on OpenSUSE, specifically with getting Dom0 opening a TCP connection to the DomU. Other machines on the network can open TCP connections to all 3, so I'm hoping a manual network configuration will let me resolve the Dom0 -> DomU issue.

So I need help to manually configure my Dom0 network, bridge, and 2 VIF interfaces in OpenSUSE. Ideally I'll have 3 mac addresses, two randomly generated for each VIF and one for the Dom0. This way my internal DHCP/DNS server can assign each a IP and all machines on the lan can connect to all 3 servers. All 3 machines should be on the same internal network with everything else (no VLAN or NAT). NOTE: You can assume this is a static network setup, I'm just using DHCP with static MACs for convenience, but I expect the IPs of Dom0, and DomUs to be fixed.

1) How do I configure this network start to finish in YaST?

or

2) Please provide sample /etc/sysconfig/network scripts, and any other config file scripts to set this up.

Thanks

share|improve this question
add comment

2 Answers

I create the bridges manually using the ifcfg- files in /etc/sysconfig/network. I have a bridge attached to eth0 that gets passed to domUs. Below are my ifcfg-eth0 and ifcfg-br5000 files. It's slightly different if you need to bridge a VLAN, but since you don't indicate as much, I assume that's not needed.

eth0:

BOOTPROTO='static'
#IPADDR='172.16.30.221/24'
IPADDR='0.0.0.0/24'
BROADCAST='172.16.30.255'
MTU=9000''
STARTMODE='onboot'
NAME='Ethernet Network Card'

br5000:

BOOTPROTO='static'
BRIDGE='yes'
BRIDGE_FORWARDDELAY='0'
BRIDGE_PORTS='eth0'
BRIDGE_STP='off'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='172.16.30.221/24'
MTU='9000'
NAME=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
share|improve this answer
    
That's half of it. How would I manually create the two VIF interfaces so they can use the bridge, giving them 2 different MAC and IP addresses. –  RLZaleski Dec 22 '11 at 19:48
    
You don't create the vifs, Xen does when it creates the VM. In your domU config file, you would set a line like: vif = [ 'mac=00:16:3e:42:49:01, bridge=br5000'] Then, in the domU, you can get an IP via DHCP or set it statically. Or set it in the domU configuration file. –  Kendall Dec 22 '11 at 19:54
    
Yeah, that much works right... And I can RDesktop from a laptop to the DomU. But RDesktop form Dom0 to DomU doesn't work. So I was thinking if I could set up the VIF in SuSE, then I can just tell XEN use this VIF –  RLZaleski Dec 22 '11 at 20:01
    
What versions of: OpenSuSE dom0, Xen, domU ? –  Kendall Dec 22 '11 at 20:16
    
OpenSUSE 11.4 , kernel is 2.6.37.6-0.9, xen is /boot/xen-4.0.2_52. I tried your scripts, commented out the vif-script and network-script. My VM vif line is. vif=[ 'mac=08:00:27:11:D9:B1,ip=192.168.1.211,type=ioemu,bridge=br0' ]. Still, it's the same error where dom0 can ping, but not open a TCP connection to DomU. I asked this on Xen-Users too. –  RLZaleski Dec 22 '11 at 22:53
add comment

I am more familiar with XEN under SLES, but I think OpenSuSE will be similar.

If bridging is available via yast network try that one (works on SLES11, not on SLES10).

If bridging is not available via yast look into /etc/xen/scripts. There you should find a script called network-bridge. Use that wrapper-script to move your Dom0-Interface onto the bridge (look into the head of the script for parameters).

I found it to be necessary to put a configuration /etc/sysconfig/network/ifcfg-$BRIDGE with startmode manual so that the bridge will be up after the network-bridge-script runs.

The basic trick of the wrapper-script is to move the MAC (and IP) from the physical interface to the bridge-device. The original interface will be added to the bridge and renamed to PETH - serving as "uplink" to the network.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.