Configure Anycast and Prefix segments in SPRING for IS-IS Protocol
Segment routing (SR) or source packet routing in networking (SPRING) is a control-plane architecture that enables an ingress router to steer a packet through a specific set of nodes and links without relying on the intermediate nodes in the network to determine the actual path it should take. Segment routing global block (SRGB) is the range of label values used in segment routing. Junos OS allows you to configure prefix segment identifier (SID) and node SID to prefixes that are advertised in IS-IS through policy configuration.
Before you configure SPRING SRGB, prefix SID, and anycast SID for the IS-IS protocol, you must:
Configure the router interfaces.
Configure the router ID.
Configure IS-IS.
To configure device R1 with SPRING SRGB, prefix SID, and anycast SID for IS-IS protocols:
-
Configure the start-label and index-range of SRGB.
[edit protocols isis source-packet-routing] user@host# set srgb start-label start-label-value user@host# set srgb index-range index-range-value
For example, configure SRGB with start-label 800000 and index-range 40000 .
[edit protocols isis source-packet-routing] user@host# set srgb start-label 800000 user@host# set srgb index-range 40000
-
Configure the routing policy to match a route (IPv4 or IPv6 )
exactly. Configure the index and the node segment of the
prefix segment for a given term and accept the routing
policy.
[edit policy-options policy-statement policy-name term term-value] user@host# set from route-filter IP address exact user@host# set then prefix-segment index index-value user@host# set then prefix-segment node-segment user@host# set accept
Note:Configure node segment as /32 prefix on loopback interface (lo0.0) or on a valid stub interface.
For example, configure the routing policy to match the IPv4 route exactly. Configure the index and the node segment of the prefix segment for a given term and accept the routing policy.
[edit policy-options policy-statement policy-name term term-value] user@host# set from route-filter 198.51.100.1/32 exact user@host# set then prefix-segment index index-value user@host# set then prefix-segment node-segment user@host# set accept
For example, configure the routing policy to match the IPv6 route exactly. Configure the index and the node segment of the prefix segment for a given term and accept the routing policy.
[edit policy-options policy-statement policy-name term term-value] user@host# set from route-filter 2001:db8::/32 exact user@host# set then prefix-segment index index-value user@host# set then prefix-segment node-segment user@host# set accept
-
Configure the index and the node segment of the prefix segment
for a given term and accept the routing policy.
[edit policy-options policy-statement policy-name term term-value then] user@host# set prefix-segment index index-value user@host# set prefix-segment node-segment user@host# set accept
For example, configure the prefix segment with index 1004 and the node segment for term 1 of policy statement prefix SID and accept the routing policy.
[edit policy-options policy-statement prefix-sid term 1 then] user@host# set prefix-segment index 1004 user@host# set prefix-segment node-segment user@host# set accept
-
Configure the routing policy with the same prefix (IPv4 or IPv6
)and same prefix segment on more than one routers for
anycast SID.
Note:
For anycast prefix SID, configure prefix SID on loopback interface( lo0.0).
[edit policy-options policy-statement prefix-sid term 1 ] user@host# set from route-filter IP address exact user@host# set then prefix-segment index index-value user@host# set then accept
For example, configure IPv4 prefix 198.51.100.1/32 with prefix segment 1000 on two routers R0 and R1 for anycast SID.
[edit policy-options policy-statement prefix-sid term 1 ] user@host# set from route-filter 198.51.100.1/32 exact user@host# set then prefix-segment index 1000 user@host# set then accept
For example, configure IPv6 prefix 2001:db8::/32 with prefix segment 1000 on two routers R0 and R1 for anycast SID.
[edit policy-options policy-statement prefix-sid term 1 ] user@host# set from route-filter 2001:db8::/32 exact user@host# set then prefix-segment index 2000 user@host# set then accept
-
Configure export policy on the IS-IS protocol.
[edit protocols isis] user@host# export prefix-sid
-
Configure explicit NULL to enable E and P bits in all prefix
SID advertisements.
[edit protocol isis source-packet-routing] user@host# set explicit-null
-
Configure adjacency segment hold time to retain segment
adjacency.
[edit protocol isis source-packet-routing] user@host# set adjacency-segment hold-time hold-time
For example, configure adjacency segments with 240,000 milliseconds hold time.
[edit protocol isis source-packet-routing] user@host# set adjacency-segment hold-time 240000