Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source IP in DHCPDISCOVER packets #229

Open
LukasGibeh opened this issue Jan 15, 2024 · 1 comment · May be fixed by #230
Open

Source IP in DHCPDISCOVER packets #229

LukasGibeh opened this issue Jan 15, 2024 · 1 comment · May be fixed by #230

Comments

@LukasGibeh
Copy link

In the current implementation of DHCP in IPbus, the source IP of the DHCPDISCOVER messages is set to 192.168 & NOT MAC addr(15 downto 0).

Within the documentation or recent issues of IPbus I could unfortunately not find the specific reasoning for doing so.

According to RFC2131 [0]:

DHCP messages broadcast by a client prior to that client obtaining
its IP address must have the source address field in the IP header
set to 0.

In my interpretation DHCP servers or network architects are free to assume that any packet not originating from 0.0.0.0 is not an expected DHCPDISCOVER which could lead to problems in certain setups. (Maybe not at ATLAS/CMS, but at independent test setups.)

I would thus propose to set the source IP of the DHCPDISCOVER packets to 0.0.0.0.

[0] https://www.ietf.org/rfc/rfc2131.txt

LukasGibeh added a commit to LukasGibeh/ipbus-firmware that referenced this issue Jan 15, 2024
 - According to RFC2131 the IP source address of broadcast DHCPDISCOVER packets prior to obtaining its IP address via DHCP should be set to zero
@LukasGibeh LukasGibeh linked a pull request Jan 15, 2024 that will close this issue
@dpcsankey
Copy link
Collaborator

You are quite correct, RFC2131 does specify that the source IP address for DHCPDISCOVER should be 0.0.0.0.

As to why we did something different, we wanted to have a meaningful identifier field and we played the game of ensuring that we had a static 1's complement IP checksum by balancing this with the source IP address, having seen that other systems out there put their 'guess' as IP address in their DHCPDISCOVER.

So RFC says it should be 0.0.0.0, established practice says it doesn't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants