raindog308 |
11-12-2011 12:01 AM |
debian kvm - how to bridge?
I'm trying to setup kvm on Debian Squeeze. I created a VM (in virt-manager) running Windows XP and I can get out to the Internet from it just fine. But I can't get into the VM (ping, RDP, etc.)
To me this screams "you're NATting". But I thought I'd setup bridging...
So here is the hosts's /etc/network/interfaces, minus comments:
Code:
auto lo br0
iface lo inet loopback
allow-hotplug eth1
iface eth1 inet manual
iface br0 inet static
bridge_ports eth1
address 192.168.11.100
network 192.168.11.0
netmask 255.255.255.0
broadcast 192.168.11.255
gateway 192.168.11.1
bridge_stp on
bridge_maxwait 0
bridge_fd 0
The host is 192.168.11.100 and my router is 192.168.11.1. Host talks to the LAN just fine. I want the guest in this case to be 192.168.11.150, and if I setup its NIC in the guest, as I say, I can browse the web from the guest. But no pinging or RDP.
I think I have the bridge right:
Code:
# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.00044b008bbf yes eth1
eth1 in this case is correct.
Here is part of the XML:
Code:
<interface type='bridge'>
<mac address='52:54:00:04:35:c4'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='rtl8139'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
When the guest is running, this is what I see in ifconfig -a:
Code:
br0 Link encap:Ethernet HWaddr 00:04:4b:00:8b:bf
inet addr:192.168.11.100 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fe80::204:4bff:fe00:8bbf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44912471 errors:0 dropped:0 overruns:0 frame:0
TX packets:27431724 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:19277522011 (17.9 GiB) TX bytes:76564829455 (71.3 GiB)
eth1 Link encap:Ethernet HWaddr 00:04:4b:00:8b:bf
inet6 addr: fe80::204:4bff:fe00:8bbf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44913082 errors:0 dropped:0 overruns:0 frame:0
TX packets:27869792 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20031714700 (18.6 GiB) TX bytes:78643818982 (73.2 GiB)
Interrupt:29 Base address:0xe000
vnet0 Link encap:Ethernet HWaddr fe:54:00:04:35:c4
inet6 addr: fe80::fc54:ff:fe04:35c4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:1651 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:1280 (1.2 KiB) TX bytes:2112563 (2.0 MiB)
I'm not intentionally using any ipv6.
How can I get bridged networking (in the sense that the guest appears on the network as 192.168.11.150)?
|