DHCP problem with OFED patch for Infiniband support
HAUTREUX Matthieu
matthieu.hautreux at cea.fr
Fri Jan 16 16:19:48 UTC 2009
Hi,
I'm currently using dhcp-3.0.5 provided by CentOS-5.2 with OFED-1.3
patch for Infiniband support (enclosed).
Using OFED patch, dhclient is conforming to RFC-4390. It doesn't include
IB interface harware address in the DHCP packet but uses client
identifier instead.
As a result, the interface hw address length is 1 (just the character
corresponding to the type of Addr : 32 ).
One major drawback of DHCP over IB is the requirement to use broadcasted
replies. The only way for a IB dhclient to find its own reply is by
looking for matching xid (transaction ID). xid are generated using
random() in dhclient. random() is initialized using
srandom(seed+cur_time). Nethertheless, when hw address hlen is 1, the
processed seed is roughly always the same. As a result, IB nodes that
uses dhclient to configure IB interfaces at the same time share the same
xid and as a result use any of the broadcasted replies. The protocol is
then broken.
I don't know if it is the good place to post that, but you will find
enclosed a patch that correct this behavior. The proposed patch build a
"backup seed" using all the interfaces available on the machine and use
it if it can not find a good seed for the required interfaces during
real DHCP process. If backup seed construction fails (no interfaces
providing a hw address long enough for seed construction), it try to
build a seed using gethostid().
As far as I have tested it, the patch seems to work quite well. I will
let you judge if it will be interesting to add it to the main branch or
add your own to ensure that this problem is solved. The modified part of
the code is still the same in 4.1.0.
If you have any question, feel free to ask.
Thanks in advance
Matthieu Hautreux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcp-3.0.5-OFED.patch
Type: text/x-patch
Size: 1225 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-hackers/attachments/20090116/05030daa/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhcp-3.0.5-dhclient-srandom.patch
Type: text/x-patch
Size: 2614 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-hackers/attachments/20090116/05030daa/attachment-0001.bin>
More information about the dhcp-hackers
mailing list