I have a problem to understand how KVM does networking with a Windows 2008 Server guest I set up. My problem is as follows:
I have a dedicated root server and there's a guest (Win 2k8 server). I installed the ethernet drivers from the ISO image within the VM. So the Adapter is this RedHat VirtIO thingy. That has been successful within the guest. The config is using virtio for a NIC and I set the bridge to virbr0:
virbr0 Link encap:Ethernet HWaddr fe:54:00:0e:68:af
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16231 errors:0 dropped:0 overruns:0 frame:0
TX packets:3279 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2637216 (2.5 MiB) TX bytes:705652 (689.1 KiB)
There's another interface:
vnet0 Link encap:Ethernet HWaddr fe:54:00:0e:68:af
inet6 addr: fe80::fc54:ff:fe0e:68af/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2529 errors:0 dropped:0 overruns:0 frame:0
TX packets:44561 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:571094 (557.7 KiB) TX bytes:2366159 (2.2 MiB)
What I want is to have networking for the guest and the ability to use rdesktop (so the port needs to be forwarded I guess). I try to avoid any iptables magic since it doesn't make to much sense to handle that on a firewall. How do I get network access in both directions to/from a guest.
If 192.168.122.1 is the bridge, how do I reach the VM? For rdesktop or something? Practically I want to reach the rdesktop port from eth0 or so, which is the external interface with a reachable IP address.
Update:
route:
target gateway source proto scope dev tbl
10.8.0.2 10.8.0.1 kernel link tun0
217.11.52.0/ 24 217.11.52.231 kernel link eth0
10.8.0.0/ 24 10.8.0.2 tun0
192.168.122.0/ 24 192.168.122.1 kernel link virbr0
default 217.11.52.1 eth0
127.255.255.255 broadcast 127.0.0.1 kernel link lo local
10.8.0.1 local 10.8.0.1 kernel host tun0 local
217.11.52.0 broadcast 217.11.52.231 kernel link eth0 local
217.11.52.231 local 217.11.52.231 kernel host eth0 local
217.11.52.230 local 217.11.52.231 kernel host eth0 local
192.168.122.1 local 192.168.122.1 kernel host virbr0 local
192.168.122.0 broadcast 192.168.122.1 kernel link virbr0 local
217.11.52.233 local 217.11.52.231 kernel host eth0 local
217.11.52.232 local 217.11.52.231 kernel host eth0 local
217.11.52.255 broadcast 217.11.52.231 kernel link eth0 local
127.0.0.0 broadcast 127.0.0.1 kernel link lo local
192.168.122.255 broadcast 192.168.122.1 kernel link virbr0 local
127.0.0.1 local 127.0.0.1 kernel host lo local
127.0.0.0/ 8 local 127.0.0.1 kernel host lo local
fe80::/ 64 kernel eth0
fe80::/ 64 kernel virbr0
fe80::/ 64 kernel vnet0
default unreachable kernel lo unspec
::1 :: none lo local
fe80::21b:21ff:fe95:a4f :: none lo local
fe80::fc54:ff:fe0e:68af :: none lo local
ff00::/ 8 eth0 local
ff00::/ 8 virbr0 local
ff00::/ 8 vnet0 local
default unreachable kernel lo unspec
brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.fe54000e68af yes vnet0