-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans #4469
[dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans #4469
Conversation
This code fixes a bug where two or more vlans exist. Cross contamination happens for DHCP packets Offer/Ack when received on shared northbound links. The code filters out those packet based on dst IP equal Vlan loopback IP. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
based on ip src/dst for vm-relay link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add comments into the function?
0da9789
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with minor suggestion.
640219a
* [dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans This code fixes a bug where two or more vlans exist. Cross contamination happens for DHCP packets Offer/Ack when received on shared northbound links. The code filters out those packet based on dst IP equal Vlan loopback IP. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
* [dhcpmon] Filter DHCP O/A Messages of Neighboring Vlans This code fixes a bug where two or more vlans exist. Cross contamination happens for DHCP packets Offer/Ack when received on shared northbound links. The code filters out those packet based on dst IP equal Vlan loopback IP. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
- Why I did it
This code fixes a bug where two or more vlans exist. Cross contamination
happens for DHCP packets Offer/Ack when received on shared northbound links.
The code filters out those packet based on dst IP equal Vlan loopback IP.
Also, Fixed a bug where libevent event id was being printed instead of signal id.
signed-off-by: Tamer Ahmed tamer.ahmed@microsoft.com
- How to verify it
pytest test_dhcp_relay.py --testbed=testbed --inventory=../ansible/str --testbed_file=../ansible/testbed.csv --host-pattern=all --module-path=../ansible/library
***-Using single Vlan
logs from syslog:
Apr 23 04:52:59.710434 str-s6100-acs-2 NOTICE dhcp_relay#dhcpmon[52]: DHCP Discover rx: 2, tx:96, Offer rx: 2, tx:2, Request rx: 2, tx:96, ACK rx: 2, tx:2
Apr 23 04:54:25.390030 str-s6100-acs-2 NOTICE dhcp_relay#dhcpmon[51]: DHCP Discover rx: 1, tx:48, Offer rx: 1, tx:1, Request rx: 1, tx:48, ACK rx: 1, tx:1
***-Using two vlans:
ansible-playbook config_sonic_basedon_testbed.yml -i str -l str-s6100-acs-2 -e testbed_name=vms7-t0-s6100 --vault-password-file=../.vault-file -e deploy=true -e vlan_config=two_vlan_a
Apr 23 08:05:35.444937 str-s6100-acs-2 ALERT dhcp_relay#dhcpmon[58]: Received signal Terminated
Apr 23 08:05:35.444937 str-s6100-acs-2 NOTICE dhcp_relay#dhcpmon[58]: DHCP Discover rx: 2, tx:96, Offer rx: 2, tx:2, Request rx: 2, tx:96, ACK rx: 2, tx:2
Apr 23 08:05:35.444937 str-s6100-acs-2 ALERT dhcp_relay#dhcpmon[57]: Received signal Terminated
Apr 23 08:05:35.444937 str-s6100-acs-2 NOTICE dhcp_relay#dhcpmon[57]: DHCP Discover rx: 2, tx:96, Offer rx: 2, tx:2, Request rx: 2, tx:96, ACK rx: 2, tx:2
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)