Every network that runs a firewall or an inspection box has the same quiet problem. Putting the box in the path is easy. Making sure the right traffic actually goes through it, and only the right traffic, is where the config starts to grow. Policy based routing here, a VRF sandwich there, a few static routes nobody wants to touch.
SRv6 offers a different answer. Instead of configuring every router along the way, you write the path into the packet. In this lab I steer customer VPN traffic through a firewall and a DPI node on Nokia SR OS using SRv6 uSID, then capture the packet at three points to watch the destination address change. The whole thing is on video if you prefer to watch first.
The lab
Six Nokia SR OS routers form the core and edge: SPE1, SP1, SP2, SP3, SP4 and SPE2. Two Linux nodes sit on the side. fw1 is the firewall and dpi1 is the IDS and DPI node. Two traffic generators, ce10 and ce20, send a customer flow across a VPRN.
Without any steering, that flow would take a short path through the core and never touch fw1 or dpi1. With the policy in place it takes the long way around: nine links, through the firewall first and then the DPI node.

uSID in two minutes
With the F3216 uSID format, the first 32 bits of the destination address are a block, here fcbb:bb00::/32. After the block, the address is packed with 16 bit pieces. Each piece is an instruction for one router: a node identifier, a function, and so on. One IPv6 address can carry several of them.
The trick is what each router does with it. It reads the first instruction after the block, acts on it, and shifts the remaining ones to the left. The address gets shorter as the packet moves along. That is why one outer header can describe a whole path without a long list of segments.

Step 1: give SP1 a SID that points at the firewall
On SP1 I enabled micro segments with the fcbb:bb00::/32 block and created a locator. The part that matters for service chaining is the uA function. It is an adjacency SID: an instruction that says send this packet out of one specific interface, here the one that faces fw1.
The config blocks in this post are trimmed to the lines that matter and reformatted a little, so they will not paste in one go. The video shows the full output.
configure router "Base" segment-routing segment-routing-v6
origination-fpe [1]
source-address 2001:db8:ff00::1
micro-segment {
block-length 32
sid-length 16
block "ublk1" {
admin-state enable
termination-fpe [2]
label-block "srv6-block"
prefix { ip-prefix fcbb:bb00::/32 }
static-function { max-entries 256 }
}
}
micro-segment-locator "loc1" {
admin-state enable
block "ublk1"
un { srh-mode psp value 1 }
}
base-routing-instance {
micro-segment-locator "loc1" {
function {
ua 16 {
srh-mode psp
protection unprotected
interface-name "to-fw1-SP2"
}
}
}
}Notice protection unprotected on the uA SID. My reading of why it is there: a protected adjacency SID can get a backup path installed, and a backup path for a firewall hop could go around the firewall. For a chain that has to include the box, you want the hop pinned. Check what your own platform does by default before you rely on this.
In the SID table this uA shows up as function 400f. That is the 400f you see in the addresses later.
Step 2: let VPN routes use IPv6 next hops
The customer routes are VPN-IPv4. The core is IPv6 only, so the BGP next hop has to be an IPv6 address. That is what extended-nh-encoding and advertise-ipv6-next-hops are for.
configure router "Base" bgp
group "ibgp-v6" {
family { vpn-ipv4 true }
extended-nh-encoding { vpn-ipv4 true }
advertise-ipv6-next-hops { vpn-ipv4 true }
}Step 3: the SR policy that builds the chain
The chain itself is a static SR policy called sfc-chain on SPE1. It has color 100, its endpoint is SPE2, and it has one segment list with two entries: fcbb:bb00:1:400f:: and fcbb:bb00:3:400f::. Both use the end-x-next-csid behavior.
configure router "Base" segment-routing sr-policies static-policy "sfc-chain"
admin-state enable
color 100
endpoint 2001:db8:ff00::6
head-end local
type srv6
segment-routing-v6 {
segment-list 1 {
admin-state enable
segment 1 {
srv6-sid fcbb:bb00:1:400f::
behavior-and-structure { behavior end-x-next-csid }
}
segment 2 {
srv6-sid fcbb:bb00:3:400f::
behavior-and-structure { behavior end-x-next-csid }
}
}
}The routes from SPE2 carry color 100. When SPE1 sees a route whose color and endpoint match the policy, it resolves the route through the policy and uses its segment list as the path. Nothing in the core needs to know about the chain.

Step 4: check the control plane
Before touching a packet capture, confirm that the policy is up and that the route actually resolves into it.
show router segment-routing sr-policies all
show router tunnel-table ipv6 2001:db8:ff00::6/128 detail
show router 100 fib 1The policy should show as operational with the segment list from step 3. The tunnel table entry for SPE2 should show the SRv6 policy as the tunnel and the uSID carrier fcbb:bb00:1:400f:3:400f::. And the VPRN FIB should point the customer prefix at that tunnel.
Step 5: watch the address change
This is the part I like best. I captured the same flow at three places: before SP1, inside fw1 and inside dpi1. Inside the two Linux nodes it is a plain tcpdump.
# on fw1 and on dpi1
tcpdump -ni br0 -c 5 -vv 'ip6'
Before SP1 the destination is fcbb:bb00:1:400f:3:400f:: and there is a segment routing header carrying the last segment, fcbb:bb00:6:4001::.
Inside fw1 the destination is fcbb:bb00:3:400f::. SP1 used the first instruction and shifted the rest. The SRH is still there with one segment left.
Inside dpi1 the destination is fcbb:bb00:6:4001:: and the SRH is gone. The next header is IPIP, so the customer packet sits directly behind the outer IPv6 header.
That last capture deserves attention. Your inspection engine sees an IPv6 packet whose payload is another IP packet, not TCP or UDP. If the engine does not look through the outer header, it will not see the customer traffic at all. Test that before you trust the chain.
What this lab does not cover
It steers one direction. Return traffic is a separate problem and the obvious next lab.
It is a lab with a small, steady traffic load. It says nothing about throughput on a real firewall.
I did not run a failure test on the chain here. What happens when fw1 goes down is worth its own video.
Takeaways
Service chaining in SRv6 is a path, not a set of per-router rules. You define it once on the headend.
A uA adjacency SID is what points the packet at a specific interface, such as the one facing the firewall.
The address shrinks as uSIDs are used up. Capturing at each hop is the quickest proof that the chain works.
Check that your inspection box can handle IPv6 in front of an inner IP packet.
Full lab video: https://www.youtube.com/watch?v=p5RAXfoGAHY
If you want the load balancing side of SRv6 on the same platform, the previous lab covers flow label and inner-ip hashing: https://www.youtube.com/watch?v=hMIjc5Lqgt8
What should the next SRv6 lab be? Return path chaining, TI-LFA fast reroute, or Flex-Algo slicing. Tell me in the comments on the video.

Comments (0)
Please sign in to comment.