Skip to content

[chassis][multi-asic]: Add support for vendor LC ip range for macvlan ip (#22008)#870

Merged
yejianquan merged 1 commit intoAzure:202405from
anamehra:202405
Mar 14, 2025
Merged

[chassis][multi-asic]: Add support for vendor LC ip range for macvlan ip (#22008)#870
yejianquan merged 1 commit intoAzure:202405from
anamehra:202405

Conversation

@anamehra
Copy link
Contributor

Signed-off-by: Anand Mehra [email protected]

Why I did it

As per current design, macvlan IP start with an offset of 10 from miplane Ip subnet base ip on a namespace.
In some platforms this may cause conflict if the LC midplane ip for any slot falls in that range. The IP conflict cause midplane traffic loss.

In Cisco Chassis, macvlan IP may conflict with LC midplane IP range. This conflict causes midplane traffic loss for conflicting ip and affects any LC namespace transaction with Supervisor.

To prevent any conflict, Venddor may provide an offset to be used to generate macvlan IP address to prevent any conflict with midplane IP address.

Work item tracking
  • Microsoft ADO (31798758):

How I did it

Added an ip_offset value which Vendor may provide based on their midplane ip range to generate safe IP address for macvlan in namespace.

The lc_ip_offset offset needs to be set in /usr/share/sonic/device//chassisdb.conf file for the LC where an offset is required.

cat chassisdb.conf
chassis_db_address=127.0.0.3
midplane_subnet=127.0.0.0/16
lc_ip_offset=100

How to verify it

After boot, check eth1 IP address in namespaces. The IP addresses should not conflict with any expected LC eth1-midplane IP or any other IP in the system.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

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

@anamehra anamehra requested a review from lguohan as a code owner March 13, 2025 22:42
@anamehra
Copy link
Contributor Author

Hi @yejianquan , for your viz. Thanks

Copy link
Contributor

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

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

LGTM

@yejianquan yejianquan merged commit 97cfb4d into Azure:202405 Mar 14, 2025
2 checks passed
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