第 12 章 配置网络应用
把红帽虚拟化系统集成到你的网络体系里是一个复杂的过程,且依赖于基础架构,它可能需要自定义的配置来部署多个以太网接口和设置桥接。
Each domain network interface is connected to a virtual network interface in
dom0 by a point to point link. These devices are vif <domid> and <vifid>. vif1.0 for the first interface in domain 1; vif3.1 for the second interface in domain 3.
Domain0 处理这些虚拟接口上的通信,对于网桥、路由、速率限制等,它采用标准的 Linux 传统。xend 守护进程使用两个 shell 脚本来执行网络和新的虚拟接口的初始配置。这些脚本为所有的虚拟接口配置单一的网桥。你可以自定义这些脚本来配置其他的路由和网桥。
Red Hat Virtualization's virtual networking is controlled by the two shell scripts,
network-bridge and vif-bridge. xend calls these scripts when certain events occur. Arguments can be passed to the scripts to provide additional contextual information. These scripts are located in the /etc/xen/scripts directory. You can change script properties by modifying the xend-config.sxp configuration file located in the /etc/xen directory.
network-bridge — 当 xend 启动或停止时,这个脚本初始化或者停止虚拟网络。之后,初始化过程创建网桥 xen—br0 并把 eth0 移至这个网桥上,且修改对应的路由。当 xend 最后退出时,它删除这个网桥和 eth0,由此恢复原始的 IP 和路由配置。
vif-bridge - 对于域里的每个虚拟接口,这个脚本都被调用。它配置防火墙规则且能够把 vif 加入到合适的网桥上。
你可以使用其他脚本在你的网络里设立Red Hat虚拟化系统,如
network-route、network-nat、vif-route, 和 vif-nat。或者这些脚本可以用自定义的变量来替代。