I'm trying to get DHCP working with DomU clients. I don't want to use
libvirtd. There's a dhcpd on the machine and it works fine for all clients
in the network, but not for DomUs. If I set a static IP on the DomU all
networking for them is fine, so there's no general networking problem.
I use the xen 3.2 packages for CentOS on CentOS 5.1.
There was a public IP address on eth0 and a private IP address on eth0:0.
I changed that around after I discovered with tcpdump that dhcpd was
replying on eth0 like publicip.bootps -> privateip.bootpc. This isn't a
problem for all other packets, but apparently for DHCP.
Bridging is setup with the standard Xen 3.2 network-bridge script by xend
like this:
bridge name bridge id STP enabled interfaces
eth0 8000.000c6e101f84 no vif3.0
vif2.0
vif1.0
peth0
Once I had the private IP address on eth0 and not on the alias anymore
DHCP started working on DomUs. However, I had to discover it worked only
for this first bootup and not later on. The DomU starts up, gets an IP
assigned and is happy. However, when it comes to renew the lease it hits
the same problem as before. There's first DHCPREQUEST, no answer, then
DHCPDISCOVER, no answer, it eventually falls back to pinging the gateway
(which works) and then stops. Eventually it drops it's own IP.
Sometimes it starts working after a reboot of the host, sometimes not.
Actually, there's not "no answer", it's just that the reply doesn't make
it to the DomU. tcpdump shows the reply on peth0, but not on eth0. Here's
an example from peth0:
15:59:41.964744 IP (tos 0x10, ttl 16, id 0, offset 0, flags [none],
proto: UDP (17), length: 328) 0.0.0.0.bootpc > 255.255.255.255.bootps:
BOOTP/DHCP, Request from 00:16:3e:43:17:01 (oui Unknown), length: 300,
xid:0x4e682b4f, secs:50, flags: [none] (0x0000)
Client Ethernet Address: 00:16:3e:43:17:01 (oui Unknown)
[|bootp]
15:59:41.965540 IP (tos 0x10, ttl 16, id 0, offset 0, flags [none],
proto: UDP (17), length: 328) mambo.bolera.lan.bootps >
192.168.1.149.bootpc: BOOTP/DHCP, Reply, length: 300, xid:0x4e682b4f,
secs:50, flags: [none] (0x0000)
Your IP: 192.168.1.149
Client Ethernet Address: 00:16:3e:43:17:01 (oui Unknown)
[|bootp]
eth0 sees only the first packet. So, there is something necessary to make
the DHCP packet travel from peth0 to eth0. I tried several routing and ip
tables commands, nothing helps.
What is necessary to make DHCP in DomUs work?
Kai
--
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|