Chapter 11. Pre-Red Hat Enterprise Linux 5.4 Xen networking


This chapter covers special topics for networking and network configuration with the Xen hypervisor.
Most guest network configuration occurs during the guest initialization and installation process. To learn about configuring networking during the guest installation process, read the relevant sections of the installation process, Chapter 7, Guest installation overview.
Network configuration is also covered in the tool specific reference chapters for virsh (Chapter 26, Managing guests with virsh) and virt-manager (Chapter 27, Managing guests with the Virtual Machine Manager (virt-manager)). Those chapters provide a detailed description of the networking configuration tasks using both tools.

Note

Using para-virtualized network drivers improves performance on fully virtualized Linux guests. Chapter 12, Xen Para-virtualized Drivers explains how to utilize para-virtualized network drivers.

11.1. Configuring multiple guest network bridges to use multiple Ethernet cards

To set up network bridges (with the Xen hypervisor):
  1. Configure another network interface using either the system-config-network application. Alternatively, create a new configuration file named ifcfg-ethX in the /etc/sysconfig/network-scripts/ directory where X is any number not already in use. Below is an example configuration file for a second network interface called eth1:
    $ cat /etc/sysconfig/network-scripts/ifcfg-eth1
    DEVICE=eth1
    BOOTPROTO=static
    ONBOOT=yes
    USERCTL=no
    IPV6INIT=no
    PEERDNS=yes
    TYPE=Ethernet
    NETMASK=255.255.255.0
    IPADDR=10.1.1.1
    GATEWAY=10.1.1.254
    ARP=yes
    
    Copy to Clipboard Toggle word wrap
  2. Copy the file /etc/xen/scripts/network-bridge to /etc/xen/scripts/network-bridge.xen.
  3. Comment out any existing network scripts in /etc/xen/xend-config.sxp and add the line (network-xen-multi-bridge).
    A typical xend-config.sxp file should have the following line. Comment this line out. Use the # symbol to comment out lines.
    network-script network-bridge
    
    Copy to Clipboard Toggle word wrap
    Below is the commented out line and the new line, containing the network-xen-multi-bridge parameter to enable multiple network bridges:
    #network-script network-bridge
    network-script network-xen-multi-bridge
    Copy to Clipboard Toggle word wrap
  4. Create a script to create multiple network bridges. This example creates a script called network-xen-multi-bridge.sh in the /etc/xen/scripts/ directory. The following example script will create two Xen network bridges (xenbr0 and xenbr1); one will be attached to eth1 and the other one to eth0. To create additional bridges, follow the example in the script and copy and paste the lines as required:
    #!/bin/sh
    # network-xen-multi-bridge
    # Exit if anything goes wrong.
    set -e
    # First arg is the operation.
    OP=$1
    shift
    script=/etc/xen/scripts/network-bridge.xen
    case ${OP} in
    start)
    	$script start vifnum=1 bridge=xenbr1 netdev=eth1
    	$script start vifnum=0 bridge=xenbr0 netdev=eth0
    	;;
    stop)
    	$script stop vifnum=1 bridge=xenbr1 netdev=eth1
    	$script stop vifnum=0 bridge=xenbr0 netdev=eth0
    	;;
    status)
    	$script status vifnum=1 bridge=xenbr1 netdev=eth1
    	$script status vifnum=0 bridge=xenbr0 netdev=eth0
    	;;
    *)
    	echo 'Unknown command: ' ${OP}
    	echo 'Valid commands are: start, stop, status'
    	exit 1
    esac
    
    Copy to Clipboard Toggle word wrap
  5. Make the script executable.
    # chmod +x /etc/xen/scripts/network-xen-multi-bridge.sh
    Copy to Clipboard Toggle word wrap
  6. Restart networking or restart the system to activate the bridges.
    # service network restart
    Copy to Clipboard Toggle word wrap
Multiple bridges should now be configured for guests on the Xen hypervisor.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat