-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
investigating dhcp relay option 82 #57
Comments
With isc-dhcp-relay, the source interface is stored as suboption 1 of option 82 as follows:
Since the request comes from the Vlan on our T0s, the interface name stored is the name of the Vlan interface. |
The actual format should be "%h:%p", where %h is the host name and %p is the port name.
|
Unfortunately, it appears that the option 82 circuit-id string is not customizable with isc-dhcp-relay:
https://linux.die.net/man/8/dhcrelay We may need to consider a different solution, or patching isc-dhcp-relay to suit our needs. |
Thanks for this link. It looks like this is a patch applied to the same version of isc-dhcp-relay that Debian currently provides (i.e., what we're currently using), so this is good. However, it does not support appending the hostname. So, we have a few options: 1.) Append the hostname in the command line when starting the relay
2.) Add a hostname option and create a PR @ https://github.com/jpereira/isc-dhp-relay
3.) Fork the https://github.com/jpereira/isc-dhp-relay repo and make the modification in our fork
What are your thoughts? |
I haven't looked at the patch in detail, how can we get the source incoming interface in our vlan case? |
I see that the relay supports listening on multiple interfaces. So, instead of telling the relay to listen on the VLAN interface, we can start the relay so that it listens on all the member interfaces individually. I believe this will cause the source interface name to be appended to Option 82 as we desire. |
can you check? I am not so sure as the other interfaces do not have IP address. |
Looks like your doubts were correct; the packet is discarded because the interface doesn't have an IP.
We'll have to figure out a way to determine the source interface, and most likely patch the relay. |
ok. Looks like we can only listen to the vlan interface. However, we need to figure our the real source interface. one idea is that when you receive the package, use brctl showmacs [vlan_intf_name], find out the which source interface has the source mac of the packet. |
try use ip_pktinfo->ifindex to deduce the source interface? will it work? |
I recompiled isc-dhcp-relay and forced it to use sockets, and unfortunately, in_pktinfo->ipi_ifindex contains the index of the VLAN interface, not the actual source interface. |
How source interface is attached to dhcp request in option 82
The text was updated successfully, but these errors were encountered: