Configuring SRv6 on Junos (Locator and IGP)

I wanted to make my SRv6 lab examples usable with more platforms. Adding netlab Junos SRv6 support (included in the 26.10 release) was relatively easy; here’s what I learned while working on the pull request:

  • I decided to use micro-SIDs and used the excellent SRv6 Micro-SID (uSID) Basics article by Krzysztof Szarkowicz (of the EVPN-with-MPLS fame) as the starting point.
  • Krzysztof recommended using SRv6 block configuration. I was too lazy to calculate it from the SRv6 locator (which was already part of the data structure), so I used only the locator configuration. Everything worked fine without SRv6 block anyway (but maybe I’m missing something important).
SRv6 uSID locator configuration on Junos
routing-options {
  source-packet-routing {
    srv6 {
      locator dut {
        5f00:0:1::/48;
        micro-sid;
      }
    }
  }
}
  • Adding the SRv6 SID to IS-IS was trivial. All I had to do was tell the IS-IS protocol to get a node uSID from the already-configured locator:
SRv6 IS-IS configuration on Junos
protocols {
  isis {
    source-packet-routing {
      srv6 {
        locator dut micro-node-sid;
      }
    }
  }
}

Have I missed anything? Would you have done it differently? Please write a comment.

Why Do We Need SRv6 Locator in IS-IS?

Even if you plan to use SRv6 solely for layer-3/VPN services, you have to add the SRv6 locator to the IS-IS configuration to get the SRv6 TLVs and the locator prefix into the IS-IS LSP. The locator prefix is inserted into the IPv6 routing tables on other IS-IS routers and enables forwarding of SRv6-encapsulated packets.

SRv6 IS-IS LSP advertised by a Junos router configured with SRv6
pe2# show isis database detail dut.00-00Area Gandalf:IS-IS Level-2 link-state database:LSP ID                  PduLen  SeqNumber   Chksum  Holdtime  ATT/P/OLdut.00-00                 328   0x00000004  0x9652    1191    0/0/0  Protocols Supported: IPv4, IPv6  Area Address: 49.0001  MT Router Info: ipv4-unicast  MT Router Info: ipv6-unicast  Hostname: dut  TE Router ID: 10.0.0.1  IPv6 TE Router ID: 2001:db8:0:1::1  Router Capability: 10.0.0.1 , D:0, S:0    SR Algorithm:      0: SPF      1: Strict SPF    SRv6: O:0  MT Reachability: 0000.0000.0007.00 (Metric: 10) ipv6-unicast    Link Local  ID: 345    Link Remote ID: 1    Local Interface IPv6 Address(es): 2001:1::1    Remote Interface IPv6 Address(es): 2001:1::2  IPv4 Interface Address: 10.0.0.1  IPv6 Interface Address: 2001:db8:0:1::1  MT IPv6 Reachability: 5f00:0:1::/48 (Metric: 0) ipv6-unicast  MT IPv6 Reachability: 2001:1::/64 (Metric: 10) ipv6-unicast  MT IPv6 Reachability: 2001:db8:0:1::1/128 (Metric: 0) ipv6-unicast  MT IPv6 Reachability: 2001:db8:0:1::/64 (Metric: 0) ipv6-unicast  SRv6 Locator: 5f00:0:1::/48 (Metric: 0) ipv6-unicast    Sub-TLVs:      SRv6 End SID Endpoint Behavior: uN PSP/USD, SID value: 5f00:0:1::        Sub-Sub-TLVs:          SRv6 SID Structure Locator Block length: 32, Locator Node length: 16, Function length: 0, Argument length: 80,
Add comment
Sidebar