Skip to content

Use arp_responder for static route ipv4 tests#3791

Merged
shi-su merged 3 commits intosonic-net:masterfrom
shi-su:static_arp
Jul 19, 2021
Merged

Use arp_responder for static route ipv4 tests#3791
shi-su merged 3 commits intosonic-net:masterfrom
shi-su:static_arp

Conversation

@shi-su
Copy link
Copy Markdown
Contributor

@shi-su shi-su commented Jul 14, 2021

Description of PR

Summary: Use arp_responder for static route ipv4 tests
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911

Approach

What is the motivation for this PR?

In current ipv4 static route test cases, since the nexthops are in the same vlan, the neighbor resolution would end up in the same interface and mac address. This PR fixes the issue by using arp_responder instead of adding IP addresses.

How did you do it?

Use arp responder for ipv4 static route tests.

How did you verify/test it?

Run the test cases locally and verify the arp learned as expected.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@shi-su shi-su requested a review from a team as a code owner July 14, 2021 01:07
@shi-su shi-su requested a review from prsunny July 14, 2021 01:07
@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Jul 14, 2021

This pull request fixes 1 alert when merging 245b775 into c711f59 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

else:
vlan_host_map = defaultdict(dict)
for idx in range(len(nexthop_addrs)):
mac = VLAN_BASE_MAC_PATTERN.format(idx)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could get the base mac from the ptf interface itself instead of predefined one. Can you please check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this suggestion. Using the mac from the ptf interface instead.

@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Jul 15, 2021

This pull request fixes 1 alert when merging 36e25d3 into bcbbe1a - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@shi-su shi-su merged commit b602831 into sonic-net:master Jul 19, 2021
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
What is the motivation for this PR?
In current ipv4 static route test cases, since the nexthops are in the same vlan, the neighbor resolution would end up in the same interface and mac address. This PR fixes the issue by using arp_responder instead of adding IP addresses.

How did you do it?
Use arp responder for ipv4 static route tests.

How did you verify/test it?
Run the test cases locally and verify the arp learned as expected.
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.

2 participants