jktu17 at gmail.com
Tue Jul 16 07:21:53 UTC 2013
I'm using ISC DHCP package, 4.2.5-P1 version. I have a problem with
dhcrelay when using more than one "-i" options.
*Briefly: why requests are forwarded to dhcp-servers only through the last
(specified by -i switch) interface?*
1.I have such network scheme:
2. Dhcp server properly configured and running
3. Dhcp-relay run as this: *dhcrelay -i eth1 -i eth0 10.0.1.2*, where eth0
is net0, eth1 is net1, 10.0.1.2 - is dhcp server IP.
4.(BAD): When clients try to get lease, relay says: Forwarded BOORREQUEST
for ...MAC... to 10.0.1.2 and request realy forwarded to CLIENT(!!!)
through eth0 iface. And, of couse, no lease is got.
5.(GOOD): Now if we run relay as is:* dhcrelay -i eth0 -i eth1 10.0.1.2 *-all
is ok, request is now forwarded to SERVER through eth1 iface.
I've looked in code and saw, that (i use USE_SOCKETS) in line 724 in file
realy/dhcrelay.c such line ,which send request:
if (send_packet((fallback_interface ? fallback_interface : interfaces),
NULL, packet, length, ip->addresses, &sp->to, NULL) < 0) ....
I've not use fallback_interface, so the 1st param to send_packet() is
"struct interface_info *interfaces" array. Then send_packet() just use
sendto(fd,...), where fd - is descriptor of 1st element(1st interface) of
"interfaces" array. Also I use SO_BINDTODEVICE, so send_packet() writes to
different interfaces depending on the order of them in command line , and
in unpredictable order if i do not use "-i" at all.
So, behaviour of dhcrelay is different depending on the order of "-i"
*Is it normal? What do you suggest in such situatuion?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dhcp-users