Hi, I have a very strange (at least for me) problem with getting the ISC dhcp server and relay agent to work in virtualized environment using zones and Crossbow. Currently I think I end up having some more generic networking questions, hence my post to this list. I am currently trying to simulate the following environment:
- one client subnet - two dhcp server in two different networks - on router tying this networks together, with a dhcp relay agent running on it Client, servers and relay agent run in their own zone. Now when I compile the software with the default setting to use DLPI for sending packets towards the dhcp client, I get the following behaviour on the server: - after the first start of the server, I logs that it received a DISCOVER and sends on OFFER, though nothing can be seen on virtual wire (using snoop) - after that first request, no other packet is being received, although it can be seen that a DISCOVER is being sent towards the server (using snoop on that interface) - restarting the daemon does not make a difference - after about 15 min (I could not really pinpoint the exact time) without network traffic, it works again for exactly one request (same as first item) This can be worked around by defining "USE_SOCKET", then everything works flawlessly. I get a similar thing on the relay agent: - after first start, the relay agent receives the client DISCOVER on one interface, forwarding it to two servers, on two different networks using two different interfaces (this works because sockets seem to be used, using a normal IP unicast) - the (active) server responds with an OFFER, which gets received and processes by the relay agent. It then tries to send it out via DLPI (to set broadcast addresses accordingly) towards the client, which gets logged, but nothing can be seen on the network - all subsequent requests from the client get forwarded to the server, but the OFFER coming back is not seen by the relay agent, although I can see it on the network - after some time (about 15 min) without dhcp traffic it works again for exactly one request/response Unfortunately the relay agent needs to use DLPI, because "USE_SOCKETS" is only supported with one interface. This is what I found out after hours of debugging (using my intermediate C and debugging skills): - Four filedescriptors are open on the relay agent (3 on the interfaces + 1 on the socket). For the first packet, "select" reports two fd's for reading (socket + one interface), for all following requests only one (socket) fd is reported to be ready, which causes the relay agent to not see the incoming OFFERs on the interface. - Using a debugger to see how the DLPI generated packet is being assembled (I suspected some problem there), I was able to successfully send a packet towards the client. Due to debugging, the time between the DISCOVER was received by the relay agent and the OFFER being sent out on the same interface, was about 30 minutes, which apparently made a difference in this case. I would very much like to get this setup running, because it allows me to simulate different network scenarios pretty easily. To me this looks like something is "blocking" the interface after the first use, causing "select" not to report anything, at least up to a certain timeout period, when everything works again. Any pointers, what the issue could be, or what else I can verify to get a better picture of what is happening, would be appreciated. I do not know if this is now a specific application issue (by incorrectly using DLPI) or just a special case in this virtual environment (which need to be worked around somehow). Thanks, Marcus _______________________________________________ networking-discuss mailing list [email protected]
