18.16. 网​​​​​​​桥​​​​​​​错​​​​​​​误​​​​​​​


Red Hat Virtualization can configure multiple Virtualization network bridges to use with multiple ethernet cards. To successfully configure multiple network bridges for ethernet cards, you must configure the second network interface by either using the system-config-network TUI/GUI, or by creating a new configuration file in /etc/sysconfig/network-scripts . You should use a process to setup multiple Xen bridges. This is an example config file for a second NIC called 'eth1' :
#/etc/sysconfig/network-scripts/fcfg-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
把​​​​​​​ /etc/xen/scripts/network-bridge 复​​​​​​​制​​​​​​​到​​​​​​​ /etc/xen/scripts/network-bridge.xen 。​​​​​​​
Edit /etc/xen/xend-config.sxp and add a line to your new network bridge script (this example uses "network-virtualization-multi-bridge" ).
在​​​​​​​ xend-config.sxp 文​​​​​​​件​​​​​​​里​​​​​​​,加​​​​​​​入​​​​​​​的​​​​​​​新​​​​​​​行​​​​​​​应​​​​​​​该​​​​​​​与​​​​​​​新​​​​​​​脚​​​​​​​本​​​​​​​相​​​​​​​关​​​​​​​:
network-script network-xen-multi-bridge
请​​​​​​​确​​​​​​​保​​​​​​​不​​​​​​​要​​​​​​​注​​​​​​​释​​​​​​​下​​​​​​​面​​​​​​​的​​​​​​​一​​​​​​​行​​​​​​​:
network-script network-bridge
如​​​​​​​果​​​​​​​你​​​​​​​想​​​​​​​要​​​​​​​创​​​​​​​建​​​​​​​多​​​​​​​个​​​​​​​ Xen 网​​​​​​​桥​​​​​​​,你​​​​​​​必​​​​​​​须​​​​​​​创​​​​​​​建​​​​​​​一​​​​​​​个​​​​​​​自​​​​​​​定​​​​​​​义​​​​​​​的​​​​​​​脚​​​​​​​本​​​​​​​。​​​​​​​下​​​​​​​面​​​​​​​的​​​​​​​例​​​​​​​子​​​​​​​创​​​​​​​建​​​​​​​了​​​​​​​两​​​​​​​个​​​​​​​ Xen 网​​​​​​​桥​​​​​​​(称​​​​​​​为​​​​​​​ xenbr0 和​​​​​​​ xenbr1 )并​​​​​​​相​​​​​​​应​​​​​​​地​​​​​​​把​​​​​​​它​​​​​​​们​​​​​​​附​​​​​​​加​​​​​​​到​​​​​​​ eth1 和​​​​​​​ eth0
# !/bin/sh
# network-xen-multi-bridge
# Exit if anything goes wrong
set -e
# First arg is 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
如​​​​​​​果​​​​​​​你​​​​​​​想​​​​​​​创​​​​​​​建​​​​​​​其​​​​​​​他​​​​​​​的​​​​​​​网​​​​​​​桥​​​​​​​,你​​​​​​​可​​​​​​​以​​​​​​​使​​​​​​​用​​​​​​​示​​​​​​​例​​​​​​​脚​​​​​​​本​​​​​​​并​​​​​​​复​​​​​​​制​​​​​​​/粘​​​​​​​贴​​​​​​​相​​​​​​​应​​​​​​​的​​​​​​​文​​​​​​​件​​​​​​​。​​​​​​​
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.