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

[dhcp_relay] fix #1247 Per Vlan DHCP relay is broken if DHCP server is connected via Vlan interface #2012

Closed
wants to merge 1 commit into from

Conversation

klhaung
Copy link
Contributor

@klhaung klhaung commented Sep 3, 2018

- What I did

- How I did it

  • Add the following code in docker-dhcp-relay.supervisord.conf.j2

{%- for (name, prefix) in VLAN_INTERFACE -%}
{%- if (prefix | ipv4) and (name != vlan_name) %} -i {{ name }}{% endif -%}
{%- endfor -%}

for search the interface listed in VLAN_INTERFACE.

- How to verify it

  • Reproduce the issue and then add the code statement to see if it fixes the issue.

- Description for the changelog

[dhcp_relay] fix #1247 Per Vlan DHCP relay is broken if DHCP server is connected via Vlan interface

- A picture of a cute animal (not mandatory but encouraged)

@jleveque
Copy link
Contributor

jleveque commented Sep 3, 2018

@klhaung: While this change will fix the issue presented in #1247, with the current version of isc-dhcp-relay we are using, it will cause all DHCP requests from machines under all VLANs to be relayed to all DHCP servers under all VLANs of the SONiC device. This can potentially generate a lot of unnecessary traffic. Also, if DHCP servers are not configured such that they are aware which clients to supply addresses to and which not to, it's possible the incorrect DHCP servers will offer addresses to clients.

As I mentioned in the comments at #1247. the isc-dhcp-relay has since been enhanced upstream to allow for specification of upstream vs. downstream interfaces, which is the appropriate way to address this issue. Now that SONiC is running Debian Stretch, we will soon upgrade the DHCP relay package and enhance the templates such that each relay agent listens on one VLAN for requests and treats all other interfaces as upstream interfaces which may contain DHCP servers.

I recommend this PR be closed in favor of the aforementioned upcoming solution.

@klhaung
Copy link
Contributor Author

klhaung commented Sep 4, 2018

Thanks, Joe. Close this PR because isc_dhcp_relay has been upgrade to 3.4.4 for the idea mentioned in #1247.

@klhaung klhaung closed this Sep 4, 2018
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 this pull request may close these issues.

Per Vlan DHCP relay is broken if DHCP server is connected via Vlan interface
2 participants