Advertisements

SRv6 Forwarding explained

Listen to this article if you do not want to read
SRv6 Forwarding | Lets understand SRv6 data plane forwarding in detail.

I have already explained SRv6 header and function of all important fields in the header to understand how SRv6 data plane forwarding happens. Here is the link if you want to visit SRv6 header (SRH)  explanation,

https://www.segmentroutingexpert.com/2020/03/srh-header.html

To understand SRv6 forwarding principle , look at the below figure 1 ,

Figure 1 SRv6 Forwarding

Inside packet, there is IPv6 header followed by SRH header. In SRv6, Next header field in IPv6 header is 43 (represent routing ) and Routing Type field is 4 (represent Segment routing SRv6). There can be multiple SRH in IPv6 packet. Next header field of all SRv6 packet is SRH except last one.

Remember, segments are encoded in reverse order. As an example from figure 1, a SID list is represented as (S1,S2,S3) wherein S1 is the last SID to visit , S2 is the second SID to visit and S3 is the first SID to visit along the SR path as shown above highlighted in red colour.

IPv6 packet in SRv6  is represented as (SA DA) (S1,S2,S3:SL) whereas,

SA-IPv6 source address in the IPv6 header
DA-IPv6 destination address in the IPv6 header
S1-last SID
S2-second SID
S3-first SID
SL-segment left

Forwarding sequence is,

  1. If next header is SRH and segment left SL >0
  2. Segment left represent the active segment index
  3. Copy active segment SID ( matches segment left index) to the DA address in the IPv6 header
  4. Decrement SL
  5. Forward the packet based on FIB lookup for updated DA
  6. Repeat the process until Segment left becomes 0

As an example, refer figure 1 above

  1. Say Segment left is index ‘n’ (n represent index value to identify SID index )
  2. Means active SID is S3
  3. S3 copied to DA address of IPv6 header and forwarding lookup happens for DA
  4. SL decrement happens, Segment left is 1 now
  5. Index 1 represent SID S2
  6. S2 copied to DA , forwarding based on updated Destination address (DA)
  7. Process repeat until SL becomes 0 (represent 0 as index , is the last segment )

This is basic principle of SRv6 forwarding . I hope this article is useful in understanding SRv6 forwarding in simplest way.

Advertisements

4 Comments on “SRv6 Forwarding explained

  1. Very professional Dinesh.. appreciate your step wise and systematic way of explanation of concept.

  2. Keep writing Dinesh , thanks for making us understand in a very simplistic manner about Segment Routing. Great Blog ..eagerly waiting for the next one

Comment Here

%d bloggers like this: