![Xen Bridge 配置不桥接 eth1 到 xenbr0](https://linux22.com/image/1445593/Xen%20Bridge%20%E9%85%8D%E7%BD%AE%E4%B8%8D%E6%A1%A5%E6%8E%A5%20eth1%20%E5%88%B0%20xenbr0.png)
我是半虚拟化的新手。我曾经Xen 初学者指南安装 Xen 并配置 dom0 它可以正常工作,但我无法为 domU 配置桥接网络。
我创建了这样的 debian 图像。
xen-create-image --hostname=weblinux --vcpus=2 --lvm=vg0 --bridge=xenbr0 --ip ***.***.***.225 --pygrub --dist=wheezy
当 xendomains 服务启动时,peth1 接口出现。我不知道它是什么。它与 eth1 有相同的 mac 地址。
我想使用 eth1 接口来桥接 domU 主机,并使用 eth0 来访问 dom0。
xm 列表
Name ID Mem VCPUs State
Time(s)
Domain-0 0 24086 32 r----- 1091.0
weblinux 3 8192 2 -b---- 0.2
brctl 显示
bridge name bridge id STP enabled interfaces
eth1 8000.**********43 no peth1
xenbr0 8000.feffffffffff no vif3.0
是否配置
eth0 Link encap:Ethernet HWaddr ***:41
inet addr:***.***.***.82 Bcast:***.***.***.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49365 errors:0 dropped:0 overruns:0 frame:0
TX packets:3260 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4713985 (4.4 MiB) TX bytes:653536 (638.2 KiB)
Interrupt:24 Memory:e6000000-e6012800
eth1 Link encap:Ethernet HWaddr ***:43
inet addr:***.***.***.226 Bcast:***.***.***.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:94817 errors:0 dropped:574 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9956941 (9.4 MiB) TX bytes:5146 (5.0 KiB)
Interrupt:25 Memory:e8000000-e8012800
peth1 Link encap:Ethernet HWaddr ***:43
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10472 errors:0 dropped:62 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1064304 (1.0 MiB) TX bytes:6292 (6.1 KiB)
Interrupt:25 Memory:e8000000-e8012800
vif3.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:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:532 (532.0 B) TX bytes:1260 (1.2 KiB)
xenbr0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff
inet6 addr: fe80::8043:dcff:fe55:d706/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 B) TX bytes:898 (898.0 B)
/etc/网络/接口
##eth0
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
##eth1
allow-hotplug eth1
auto eth1
iface eth1 inet dhcp
##xenbr0
iface xenbr0 inet manual
bridge_ports eth1
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere PHYSDEV match --physdev-out vif3.0 --physdev-is-bridged
ACCEPT udp -- anywhere anywhere PHYSDEV match --physdev-in vif3.0 --physdev-is-bridged udp spt:bootpc dpt:bootps
ACCEPT all -- anywhere anywhere PHYSDEV match --physdev-out vif3.0 --physdev-is-bridged
ACCEPT all -- weblinux anywhere PHYSDEV match --physdev-in vif3.0 --physdev-is-bridged
Chain OUTPUT (policy ACCEPT)
target prot opt source destination