Skip to content

Conversation

@anjan-keysight
Copy link
Contributor

@anjan-keysight anjan-keysight commented Sep 22, 2025

IPv6 Segment Routing Header Support

Redocly view of proposed model

Proposal is for IPv6 segment routing (Type 4) header, This is the first of the IPv6 routing extension header support in OTG model. This current PR is an abridged version of the original PR and does not have the SR TLVs.

The model is made generic to accommodate other IPv6 extension header types, hop-by-hop or fragment. Currently we will support routing extensions only. In routing also we will currently support Type 4 which is segment routing.

Note: The IPv6 next_header if set to AUTO, will be updated to reflect the correct next header type, which is 43 for IPv6 route.

RFC for reference

...
f1Ipv6 := f1.Packet().Add().Ipv6()
f1Ipv6.NextHeader().Auto()

f1ExtHdr := f1.Packet().Add().Ipv6ExtensionHeader()
f1ExtHdr.NextHeader().Auto()
f1ExtHdr.HdrExtLen().Auto()

f1SR := f1ExtHdr.Routing().SegmentRouting()
f1SR.SegmentsLeft().Auto()
f1SR.LastEntry().Auto()
f1SR.Flags().Protected().SetValue(1)
f1SR.Flags().Oam().SetValue(1)

f1SegList := f1SR.SegmentList()
f1SegList.Add().Segment().SetValue("2001:db8::1")
f1SegList.Add().Segment().SetValue("2001:cb7::1")
f1SegList.Add().Segment().SetValue("2001:4cd::1")
...

Copy link
Contributor

@apratimmukherjee apratimmukherjee left a comment

Choose a reason for hiding this comment

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

Looks good , some comments on descriptions.

Copy link
Contributor

@SuryyaKrJana SuryyaKrJana left a comment

Choose a reason for hiding this comment

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

looks ok now.

@apratimmukherjee apratimmukherjee merged commit 1a00059 into master Sep 24, 2025
@apratimmukherjee apratimmukherjee deleted the ipv6-srh-no-tlv branch September 24, 2025 12:31
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.

6 participants