Observability
Inertia can be overpowering. Supplanting a technology requires competing with not only the technology itself, but with its ecosystem. The ecosystem comprises people—network engineers, designers, architects, and operators who have become specialized using a particular toolkit. It includes ordering, billing, service assurance, orchestration, and visualization applications. These can slow the transition and even outright prevent it.
Luckily segment routing is enjoying a great deal of popularity. This has resulted in human attention being invested in developing, learning, and deploying it. Applications are catching up, offering familiar user experiences to flatten the learning curve; the best promise novel use cases that are uniquely achievable with SR.
This chapter explores tools that visualize, and provide service assurance for, a segment routed network.
Visualization
NorthStar is an MPLS underlay and selective overlay controller. Its genesis is rooted in the rise of centralization of traffic policy and control. Rather than aiming to be an illusory single pane of glass, it stays grounded by implementing well-defined traffic engineering functionality.
Day One: NorthStar Controller Up and Running is the best starter resource to learn more about this application: https://www.juniper.net/us/en/training/jnbooks/day-one/networking-technologies-series/northstar-controller/.
This focus of this chapter will not be administering NorthStar, but enabling an existing deployment to add value to an SR network.
In turn, we will also stay grounded. First, we’ll visualize
the network built so far. A new BGP address family – link-state
– will be enabled between the area
border routers (ABR) and NorthStar’s Junos VM. This exports
the topology for each area – nodes, links, link attributes,
and prefixes. Both Junos and NorthStar have been enhanced to support
export of SR-specific capabilities, such as the SRGB range, node,
and adjacency SIDs.
Apply the configuration below to the ABRs in both New York and Washington – p1.nyc, p2.nyc, p1.iad, and p2.iad, substituting router-specific values as appropriate. This provides redundancy by configuring all the ABRs in a region to export area-specific topology; it also ensures coverage of the entire multi-level network:
Let’s take a peek at what p1.nyc is exporting from both its areas. We’ll review one example from each of the nodes, links, and prefixes and how that information has been enriched with SR attributes.
Control plane: p1.nyc exporting pe2.nyc as a node, as well as its SR attributes
user@p1.nyc> show route advertising-protocol bgp 192.168.88.99 te-node-iso 0128.0049.1060.00 lsdist.0: 82 destinations, 82 routes (82 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path NODE { AS:4200000000 ISO:0128.0049.1060.00 ISIS-L1:0 }/1216 * Self 100 I IPv4 Router-ids: 128.49.106.0 Area border router: No External router: No Attached: No Overload: Yes Hostname: pe2.nyc Area membership: 49 00 01 SPRING-Capabilities: - SRGB block [Start: 1000, Range: 128, Flags: 0xc0] SPRING-Algorithms: - Algo: 0
Control Plane: p1.nyc exporting the link between itself and pe1.nyc, and its local adjacency SID
user@p1.nyc> show route advertising-protocol bgp 192.168.88.99 te-link-local-ip 192.0.2.5 lsdist.0: 82 destinations, 82 routes (82 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path LINK { Local { AS:4200000000 ISO:0128.0049.1063.00 }. { IPv4:192.0.2.5 } Remote { AS:4200000000 ISO:0128.0049.1061.00 }. { IPv4:192.0.2.4 } ISIS-L1:0 }/1216 * Self 100 I Metric: 10 TE Metric: 10 P2P IPV4 Adj-SID - Label: 16, Flags: 0x70, Weight: 0
Control plane: p1.nyc exporting pe2.iad’s prefix and associated SID index
user@p1.nyc> show route advertising-protocol bgp 192.168.88.99 te-ipv4-prefix-ip 128.49.106.10 lsdist.0: 82 destinations, 82 routes (82 active, 0 holddown, 0 hidden) Prefix Nexthop MED Lclpref AS path PREFIX { Node { AS:4200000000 ISO:0128.0049.1062.00 } { IPv4:128.49.106.10/32 } ISIS-L1:0 }/1216 * Self 100 I Prefix SID: 10, Flags: 0xe0, Algo: 0
The sum total of the BGP-LS exchange allows NorthStar to construct a graph of the network as shown in Figure 1 and Figure 2.
Besides unmarshalling BGP-LS ‘routes,’ NorthStar can collect, via NETCONF, and parse device configuration. You can do this by traversing it’s menu at the top right (Administration > Task Scheduler > Add > Device Collection). Be sure to specify a non-root user’s credentials.
Collecting device configuration is optional but improves the user experience. For instance, the ASNs to which our network is attached become visible in the UI. You can drill into Layer 3 VPN VRFs to discover their PEs, attachment circuits, and route targets. These aren’t particulars exported by BGP-LS. Configuration parsing presents the operator with multiple aspects of their network.
But this is a book about segment routing. NorthStar has several valuable SR-specific visualizations. Each link can display not just an IP address, but also its locally-allocated adjacency SID. You can select this by clicking the gear icon in the workspace (below the +/- zoom buttons in Figure 3). From there, choose Links > Show Label > IP, SID A::Z.
Another outstandingly useful feature is to right-click a router and select Node SIDs from selected node. The labels of the other router change to display the node SID alongside their hostname. This occurs by adding each node’s (IPv4-only at the moment) index to the advertised SRGB of the router’s neighbors.
As a best practice, the SRGB base and size have been kept consistent in our network. In networks where this isn’t or can’t be followed, this feature alone can be a lifesaver.
We’ll pause our exploration of NorthStar as a visualization tool. We’ll return to it in its day job as a traffic engineering controller. At that point, we’ll build upon this view-only exercise by calculating and provisioning SR-TE policies (the proper name for SR-TE LSPs).
Telemetry
Befitting its radical nature, Junos’ SR implementation forgoes exporting any statistics via SNMP. Long known to be antiquated, SNMP is being superseded by vastly more capable protocols and frameworks that organize information.
On the protocol front, gRPC obsoletes SNMP. It inherits the benefits of HTTP/2, such as:
Binary: Unlike text, serializing and un-serializing binary protocols is more efficient, compact, and less prone to errors over aspects such as white space handling. gRPC uses Protocol Buffers to encode and decode data. SNMP uses ASN.1.
Multiplexed: This allows multiple outstanding requests over a single TCP connection, while still allow- ing for parallelism. In practice, SNMP is UDP-based and inherits its non-guaranteed nature.
Bidirectional: Unlike its predecessor, HTTP/2 allows the server to push potentially useful data to the client, without being explicitly requested.
gRPC supports mutual certificate-based authentication; the rarely used SNMPv3 only supports shared key authentication. gRPC also offers both event-driven and periodic publish/subscribe approaches. This is similar to SNMP’s polling of statistics and relying on unsolicited traps to convey state changes. What makes gRPC more powerful is that it allows a client to express interest in subsets of the state information tree; as that state changes, the server publishes the update to clients – this could include a router’s ARP or ND table, LSP state, et al.
jtimon is an open-source gRPC client that’s invaluable for testing. Not only does it support subscribing to multiple paths for both periodic and event-triggered changes, it also supports mutual authentication, convenient conversion of key/value pairs to JSON, and it exports to Influxdb and Prometheus. You can find it at https://github.com/nileshsimaria/jtimon.
Building upon this improved transport is OpenConfig, an initiative to model networks in a vendor-neutral manner. This is an attempt to improve upon SNMP’s method of organizing information – the Management Information Base (MIB) – which resulted in sparse vendor-neutral support. Both configuration and operational data models have been defined by OpenConfig for the most widely used features – BGP, LLDP, and of course, SR. Others remain in the works.
Explore the Junos OpenConfig feature set at https://juni.pr/2WRRLst. Visit www.openconfig.net to keep up with, and possibly contribute to, the progress on data models. Remember that OpenConfig is not a single technology or protocol, but the name of a working group who shares the goal of more programmable infrastructure.
The robust transport protocol and intuitive data model representation makes modern telemetry easier for the operator.
For instance, this is how an SNMP poll for an interface’s operational status would traditionally be done. First, the interface’s ifIndex would have to be discovered. This is an arbitrary integer value assigned to an interface by the device. All interface-specific state and counters are keyed using that index. In long-standing environments the ifIndex would be cached, possibly reassigned, and consequently relearned on device reboot. Then the state and counters associated with that interface would have to be polled:
IF-MIB::ifDescr
is a human-friendly
abbreviation for the underlying OID – .1.3.6.1.2.1.2. Not every
branch of the MIB has a human-friendly representation. In contrast,
the equivalent subtree path with OpenConfig is /interfaces/interface[name=’ge-0/0/0’]/state/oper-status/
. It doesn’t take a leap in logic to understand the intent
even if the operator is initially unfamiliar with this X-Path syntax.
Enabling OpenConfig With gRPC Transport
Enabling gRPC transport is trivial for testing purposes. Enabling it for production does overwhelmingly imply certificate-based authentication. As a result, it requires a functional public key infrastructure (PKI), specifically a certificate authority (CA), that can issue digital certificates.
This book aspires to apply best practices. As a result, the telemetry configuration will be secure. Even so, maintaining and hardening a PKI environment is beyond the scope of this book. An insecure version will also be provided with an abundance of caution to not deploy in practice.
There are six steps needed to enable and secure gRPC:
Instantiate a root CA. This will need to be done on an x86 host. The example below uses OpenSSL to create a private key (.key extension) and self-signed certificate (.crt extension).
% openssl genrsa -out ca/root_ca.key 2048% openssl req -x509 -new -key CA/root_ca.key -days 3650 -out CA/root_ca.crt -subj ‘/CN=Root CA’You will next generate a private key and certificate signing request (CSR,
.csr
extension) for the gRPC client. In our example, jtimon is the gRPC client. The x86 host it runs on needs to present its identity to the gRPC servers (routers) for mutual authentication. The previously created CA can sign off on the CSR, generating a certificate for jtimon to use.% openssl genrsa -out client/client.key 2048% openssl req -new -key client/client.key -out client/client.csr -subj ‘/CN=localhost’% openssl x509 -req -in client/client.csr -CA CA/root_ca.crt -CAkey CA/root_ca.key -CAcreateserial -out client/client.crt -days 365Each router needs to generate a private key and CSR. The CA will then fulfil each CSR, as in the previous step, generating a certificate for the respective router. Both the certificate and private key are bundled together (.
pem
extension). The example below is for pe1.nyc:% openssl genrsa -out router/pe1.nyc.key 2048% openssl req -new -key router/pe1.nyc.key -out router/pe1.nyc.csr ‘/CN=pe1.nyc’% openssl x509 -req -in router/router.csr -CA CA/RootCA.crt -CAkey CA/RootCA.key -CAcreateserial -out router/router.crt -days 365% cat router/pe1.nyc.crt router/pe1.nyc.key > router/pe1.nyc.pemAll three identities – the root CA’s and the jtimon host’s certificates, as well as the router’s own bundle – should be copied to the
/var/tmp
location on each router. As an example, this is what results on pe1.nyc:user@pe1.nyc> file list /var/tmp/*.crt/var/tmp/client.crt/var/tmp/root_ca.crtuser@pe1.nyc> file list /var/tmp/*.pem/var/tmp/pe1.nyc.pemThe certificates then need to be activated via configuration. The example below is for pe1.nyc:
[edit]# set security pki ca-profile root_ca ca-identity root_ca# set security certificates local local-cert load-key-file /var/tmp/pe1.nyc.pem# commit# run request security pki ca-certificate load ca-profile root_ca filename /var/tmp/root_ca.crtFinally, gRPC can be enabled to listen on a secure port and require mutual authentication. A username and password will need to be provided by jtimon – the user needs to be present at the
[system login]
configuration hierarchy on the router:user@pe1.nyc> show configurationsystem {services {extension-service {request-response {grpc {ssl {port 32767;local-certificate local-cert; mutual-authentication {certificate-authority root_ca;client-certificate-request require-certificate-and-verify;}}}}}}}
Strictly for testing purposes, you may wish to use gRPC insecurely. Do so outside a lab environment at your own peril. Skip steps 1-5 above and replace the stanza in step 6 with:
SR Telemetry
With this backdrop, let’s explore which SR statistics can be streamed. The most fundamental is the volume of segment routed traffic transiting an interface. During a migration from other MPLS transport protocols, this sensor can differentiate how much of the forwarding plane has shifted away to SR.
You can configure this as follows:
This installs sensors for each interface that has an SR next-hop.
Management plane: Verify the OpenConfig sensors have been installed
user@pe1.nyc> show isis spring sensor info @IS-IS SENSOR INFORMATION Per-interface-per-member-link Ingress Sensor: Sensor-name Sensor-id aggr_ingress_intf_sensor 3221225555 Per-interface-per-member-link Egress Sensor: Sensor-name Sensor-id ge-0/0/1.0 3221225556 ge-0/0/2.0 3221225557 user@pe1.nyc> show route table inet.3 128.49.106.0/32 detail inet.3: 8 destinations, 9 routes (8 active, 0 holddown, 0 hidden) 128.49.106.0/32 (1 entry, 1 announced) *L-ISIS Preference: 14 ... Next hop: 192.0.2.5 via ge-0/0/1.0 Label operation: Push 1000 ... Statistics ID Group: Kernel ID = 2, Stats IDs = { 3221225556 } Next hop: 192.0.2.7 via ge-0/0/2.0, selected Label operation: Push 1000 ... Statistics ID Group: Kernel ID = 1, Stats IDs = { 3221225557 }
You can now subscribe to the OpenConfig path that exports these statistics (/mpls/signaling-protocols/segment-routing/interfaces/). Configure jtimon using a file similar to the one below, replacing the authentication credentials and paths to the private key and certificates as needed:
The configuration is self-explanatory. The router is requested to publish the SR interface statistics every 10 seconds. Launch jtimon and observe what pe1.nyc reports:
% jtimon-darwin-amd64 --config dev/telemetry/pe1.nyc.ssl.json –print Connecting to pe1.nyc:32767 ... Receiving telemetry data from pe1.nyc:32767 system_id: pe1.nyc component_id: 0 sub_component_id: 0 path: sensor_1019_1:/junos/services/segment-routing/interface/egress/usage/:/mpls/signaling- protocols/segment-routing/interfaces/:PFE sequence_number: 0 timestamp: 1550427772636 sync_response: false key: timestamp uint_value: 1550427772637 key: prefix str_value: /mpls/signalling-protocols/segment-routing/interfaces/interface[name=’ge-0/0/1.0’]/ state/counters[name=’oc-84’]/ key: out-pkts int_value: 5 key: out-octets int_value: 420
As an ingress PE, you can see that inbound IP traffic from CEs
has been sent out with an SR label via the interface connected to
p1.nyc. It doesn’t explain the traffic's destination as the
imposed label isn’t communicated. Note that the counter name
(oc-84
) uses an arbitrary number, unrelated
to labels in use.
Pointing jtimon at p1.nyc shows bidirectional traffic flow. An equal number of packets ingress and egress ge-0/0/2 and ge-0/0/3 – these interfaces connect to pe1.nyc and pe2.nyc, respectively:
system_id: p1.nyc ... str_value: /mpls/signalling-protocols/segment-routing/interfaces/interface[name=’ge-0/0/2.0’]/ state/counters[name=’oc-82’]/ key: out-pkts int_value: 5 key: out-octets int_value: 440 ... str_value: /mpls/signalling-protocols/segment-routing/interfaces/interface[name=’ge-0/0/3.0’]/ state/counters[name=’oc-83’]/ key: out-pkts int_value: 5 key: out-octets int_value: 440 system_id: p1.nyc ... str_value: /mpls/signalling-protocols/segment-routing/interfaces/interface[name=’ge-0/0/2.0’]/ key: in-pkts int_value: 5 key: in-octets int_value: 440 ... str_value: /mpls/signalling-protocols/segment-routing/interfaces/interface[name=’ge-0/0/3.0’]/ key: in-pkts int_value: 5 key: in-octets int_value: 440
As a final step, instrumenting pe2.nyc shows SR traffic egressing ge-0/0/1, which is pe2.nyc’s local interface to p1.nyc:
system_id: pe2.nyc ... str_value: /mpls/signalling-protocols/segment-routing/interfaces/interface[name=’ge-0/0/1.0’]/ state/counters[name=’oc-45’]/ key: out-pkts int_value: 5 key: out-octets int_value: 420
The eagle-eyed will have observed that p1.nyc reports an average packet size 4 bytes larger than the PE routers – confirming the imposition of a single node SID derived MPLS label.
This is a good start, and we can only get more granular. Per-SID statistics, especially with a uniform domain-wide SRGB, can be enormously useful in calculating traffic matrices. The configuration to enable that is:
Management plane: Verify additional OpenConfig sensors have been installed per-SID
user@pe1.nyc> show isis spring sensor info @IS-IS SENSOR INFORMATION Per-interface-per-member-link Ingress Sensor: Sensor-name Sensor-id aggr_ingress_intf_sensor 3221225555 Per-interface-per-member-link Egress Sensor: Sensor-name Sensor-id ge-0/0/1.0 3221225556 ge-0/0/2.0 3221225557 Per-sid Ingress Sensor: Sensor-name Sensor-id 17 3221225558 18 3221225559 19 3221225560 20 3221225561 1060 3221225562 1062 3221225563 1063 3221225564 1068 3221225565 1069 3221225566 1070 3221225567 1071 3221225568 1073 3221225569 1000 3221225570 1002 3221225571 1003 3221225572 1008 3221225573 1009 3221225574 1010 3221225575 1011 3221225576 1013 3221225577 IPv4/IPv6 Per-sid Egress Sensor: Sensor-name Sensor-id L-ISIS-128.49.106.0 3221225578 L-ISIS-128.49.106.2 3221225579 L-ISIS-128.49.106.3 3221225580 L-ISIS-128.49.106.8 3221225581 L-ISIS-128.49.106.9 3221225582 L-ISIS-128.49.106.10 3221225583 L-ISIS-128.49.106.11 3221225584 L-ISIS-128.49.106.13 3221225585 L-ISIS-2001:db8::128:49:106:0 3221225586 L-ISIS-2001:db8::128:49:106:2 3221225587 L-ISIS-2001:db8::128:49:106:3 3221225588 L-ISIS-2001:db8::128:49:106:8 3221225589 L-ISIS-2001:db8::128:49:106:9 3221225590 L-ISIS-2001:db8::128:49:106:10 3221225591 L-ISIS-2001:db8::128:49:106:11 3221225592 L-ISIS-2001:db8::128:49:106:13 3221225593
An array of additional sensors has been created. The ingress per-SID sensor names correspond to the IPv4 and IPv6 node as well as adjacency SIDs. In the egress direction, they are named based on the underlying protocol and advertised prefix SID.
Now change the path that jtimon subscribes to: /mpls/signaling-protocols/segment-routing/aggregate-sid-counters/
. The detail wells up from pe1.nyc, p1.nyc, and pe2.nyc to include
per-SID traffic volume.
Management plane: Per-SID statistics at pe1.nyc
str_value: /mpls/signalling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid- counter[ip-addr=’L-ISIS-128.49.106.0’]/state/counters[name=’oc-106’]/out-pkts/ key: out-pkts int_value: 5 key: out-octets int_value: 420
Management plane: Per-SID statistics at p1.nyc
str_value: /mpls/signalling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid- counter[mpls-label=’1000’]/state/counters[name=’oc-95’]/ key: in-pkts int_value: 5 key: in-octets int_value: 440 ... str_value: /mpls/signalling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid- counter[mpls-label=’1001’]/state/counters[name=’oc-96’]/ key: in-pkts int_value: 5 key: in-octets int_value: 440
Management plane: Per-SID statistics at pe2.nyc
str_value: /mpls/signalling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid- counter[ip-addr=’L-ISIS-128.49.106.1’]/state/counters[name=’oc-67’]/out-pkts/ key: out-pkts int_value: 5 key: out-octets int_value: 420
What is fantastic about this is that it shows unerringly how much traffic is destined from pe1.nyc to pe2. nyc, and vice versa. Observing p1.nyc’s counters shows how much traffic is destined to pe1.nyc or pe2.nyc from other PEs. With a universal SRGB, each router shares a common understanding of the label associated with a node SID. By summing counters associated with the same MPLS label, the operator can see how much traffic is being sent to the node SID originator through each transit router. Accumulating counters associated with a prefix SID shows the amount of traffic sent to a remote router. This can greatly simplify the construction of traffic matrices.
SR-TE Telemetry
Nowhere is telemetry more important than Segment Routing Traffic Engineering (SR-TE). Gleaning the volume of traffic directed into an SR-TE policy – loosely speaking, an SR-TE LSP – starts the feedback loop that can be used by a centralized control mechanism that can reroute the LSP based on bandwidth needs and availability.
To focus on its telemetry aspect, an SR-TE LSP has been created between pe2.nyc and pe1.iad. It is a colored LSP, which means it has been assigned an arbitrary, locally-significant numeric value. When a service route is learned via BGP, and carries an extended color community with a matching value, that route’s protocol next hop is automatically pointed at this SR-TE LSP.
SR-TE is covered more extensively in Optimizability chapter.
Traffic destined to service routes that resolve over the colored LSP is accounted for as SR-TE statistics. As earlier, SR-TE telemetry is specifically enabled via:
A simple, colored SR-TE LSP configuration is in effect:
Management plane: confirm sensor is attached to SR-TE LSP
user@pe2.nyc> show route table inet6color.0 detail inet6color.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden) 2001:db8::128:49:106:11-7100<c6>/160 (1 entry, 1 announced) *SPRING-TE Preference: 8 … Next hop: fe80::5668:a3ff:fe1e:6af via ge-0/0/2.0 weight 0x1, selected … Protocol next hop: 24 Label operation: Push 1071, Push 1061(top) … SRTE Policy State: SR Preference/Override: 100/100 BSID: 1000000 SRTE Policy Statistics State: Statistics Enabled: Ingress, Transit Ingress Sensor Status: Active, Sensor Id: 3758096403
Control plane: confirm service route points at SR-TE LSP
user@pe2.nyc> show route 2001:db8::198:51:100:54 detail inet6.0: 24 destinations, 31 routes (24 active, 0 holddown, 0 hidden) 2001:db8::198:51:100:54/127 (2 entries, 1 announced) *BGP Preference: 170/-101 ... Next hop: fe80::5668:a3ff:fe1e:6af via ge-0/0/2.0 weight 0x1, selected ... Protocol next hop: 2001:db8::128:49:106:11-7100<c6> ... Communities: color:0:7100
By default, there are two sensors attached to an SR-TE LSP. The ingress sensor measures the amount of IP traffic directed into the policy, and the transit sensor measures the amount of labeled traffic similary directed into the policy. The transit sensor is necessary if the binding SID (bSID), another locally-significant and separate from the color numeric identifier, associated with the SR-TE policy is used to steer MPLS-labeled traffic into the LSP.
As with all segment routing sensors, nothing is exported until non-zero statistics accumulate. As soon as IP traffic matching the colored service route arrives, the counters increase and are subsequently published at the frequency requested by the gRPC client.
Management plane: SR-TE IP statistics
system_id: pe2.nyc component_id: 0 sub_component_id: 0 path: sensor_1005_1:/junos/services/segment-routing/traffic-engineering/ingress/usage/:/mpls/ signaling-protocols/segment-routing/sr-te-ip-policies/:PFE sequence_number: 17 timestamp: 1550946298603 sync_response: false key: timestamp uint_value: 1550946298604 key: prefix str_value: /mpls/signalling-protocols/segment-routing/sr-te-ip-policies/sr-te-ip-policy[to- address=’2001:db8::128:49:106:11’, color=’7100’]/state/ counters[name=’oc-19’]/ key: packets int_value: 5 key: bytes int_value: 280
The IP policy name, intuitively enough, contains the endpoint of the LSP as well as its color. If MPLS labeled traffic had been forwarded into this LSP, using the binding SID, the policy name would additionally contain the bSID identifier. Also inarguable is SR’s treatment of IPv6 as a first-class citizen throughout the entire stack – from creating a colored SR-TE policy towards an IPv6 endpoint, to directing IPv6 traffic into that LSP, ending with receiving telemetry for the effort.
SR EPE Telemetry
The last application of SR telemetry is with egress peer engineering (EPE). Broadly speaking, an autonomous system boundary router (ASBR) can associate a label with a BGP peer, a specific link to a given BGP peer, or a set of BGP peers. This label is only installed in that ASBR’s forwarding plane, and is exported to a controller via BGP-LS as an EPE SID. The controller can craft SR-TE policies that lead beyond a particular ASBR to a distinct peer, a unique link to one peer, or even a collection of peers.
As used earlier, an SR-TE LSP has been installed on pe2.nyc to a particular BGP peer of pe1.iad. This requires the EPE label configured at pe1.iad to be present at the bottom of the segment list in the SR-TE policy. SR-EPE telemetry needs to be explicitly enabled, as you would have come to expect:
Control plane: confirm sensor is installed for the EPE SID
user@pe1.iad> show route label 1044444 detail mpls.0: 36 destinations, 36 routes (36 active, 0 holddown, 0 hidden) 1044444 (1 entry, 1 announced) *BGP-LS-EPE Preference: 170 ... Next hop: 198.51.100.56 via ge-0/0/12.0, selected Label operation: Pop ... Stats ID Group: Kernel ID = 39, Stats IDs = { 268435458 }
Traffic matching the colored service route is transmitted, resulting in pe1.iad emitting telemetry for the EPE SID:
system_id: pe1.iad component_id: 0 sub_component_id: 0 path: sensor_1006_2:/junos/services/segment-routing/sid/usage/:/mpls/signaling-protocols/segment- routing/aggregate-sid-counters/:PFE sequence_number: 895 timestamp: 1550958775682 sync_response: false key: timestamp uint_value: 1550958775684 key: prefix str_value: /mpls/signalling-protocols/segment-routing/aggregate-sid-counters/aggregate-sid- counter[mpls-label=’1044444’]/state/counters[name=’oc-2’]/ key: in-pkts int_value: 5 key: in-octets int_value: 440
OAM (Operations, Administration, Maintenance)
Admittedly, OAM is often an afterthought for network engineers. It’s only when things tilt sideways in production that many reach for tools that assert not just control plane path liveness, but also verify data plane hygiene.
This is even more important for SR-TE as it eliminates path signaling. Instead, it delegates this to sBFD (Seamless Bidirectional Forwarding Detection). BFD has been a workhorse for detecting data path failures. Each node in a point-to-point relationship starts by learning the other’s discriminator, the node and application identifier in BFD-speak. Following this discovery, a BFD session establishes for connectivity checking.
sBFD simplifies BFD by eliminating the handshake needed to learn discriminators. Instead, the operator assigns at least one local discriminator to each node in the network. In order to establish sBFD for an SR- TE path, the head-end is configured with the remote node’s discriminator.
The head-end acts as the initiator and pushes the SR-TE path’s label stack onto the liveness checking packets and ensuring the packets traverse the same path that user traffic will; the SR-TE policy destination statelessly responds to the sBFD packets. The SR-TE path is viable as long as the sBFD session is up at the ingress router.
You can configure sBFD by adding a discriminator on each node in the network. Let’s add sBFD liveness checking to the IPv4 SR-TE path we have defined from pe2.nyc to pe1.iad:
After adding this configuration the SR-TE path will remain Up as long as sBFD forwarding exists between the two routers, using the same label stack.
Control plane: Verify pe2.nyc’s sBFD session to pe1.iad is Up
user@pe2.nyc> show bfd session extensive Detect Transmit Address State Interface Time Interval Multiplier 127.0.0.1 Up 0.400 0.100 4 Client SPRING-TE, TX interval 0.100, RX interval 0.100 Session up time 01:41:41 Local diagnostic None, remote diagnostic None Remote state Up, version 1 Session type: Multi hop BFD (Seamless) Min async interval 0.100, min slow interval 1.000 Adaptive async TX interval 0.100, RX interval 0.100 Local min TX interval 0.100, minimum RX interval 0.100, multiplier 4 Remote min TX interval 0.100, min RX interval 0.100, multiplier 4 Local discriminator 18, remote discriminator 111 Echo mode disabled/inactive Remote is control-plane independent Path-Name V4-pe1.iad_v4_path0 Session ID: 0x0 1 sessions, 1 clients Cumulative transmit rate 10.0 pps, cumulative receive rate 10.0 pps
Control plane: Verify pe2.nyc’s SR-TE policy has a valid path
user@pe2.nyc> show spring-traffic-engineering lsp detail name pe2.nyc:pe1.iad_v4 Name: pe2.nyc:pe1.iad_v4 Tunnel-source: Static configuration To: 128.49.106.11-7100<c> State: Up Path: pe1.iad_v4_path0 Outgoing interface: NA Auto-translate status: Disabled Auto-translate result: N/A BFD status: Up BFD name: V4-pe1.iad_v4_path0 SR-ERO hop count: 2 Hop 1 (Strict): NAI: None SID type: 20-bit label, Value: 21 Hop 2 (Loose): NAI: None SID type: 20-bit label, Value: 1011
The first hop uses the adjacency SID to p1.nyc (21). If the adjacency between pe2.nyc and p1.nyc falters, this SR-TE policy will be brought Down.
Control plane: Verify the SR-TE policy goes Down if the label stack is rendered unusable
user@pe2.nyc> show isis adjacency Interface System L State Hold (secs) SNPA ge-0/0/1.0 p1.nyc 1 Down 0 ge-0/0/2.0 p2.nyc 1 Up 25
user@pe2.nyc> show spring-traffic-engineering lsp detail name pe2.nyc:pe1.iad_v4 Name: pe2.nyc:pe1.iad_v4 Tunnel-source: Static configuration To: 128.49.106.11-7100<c> State: Down Path: pe1.iad_v4_path0 Outgoing interface: NA Auto-translate status: Disabled Auto-translate result: N/A BFD status: Down BFD name: V4-pe1.iad_v4_path0 SR-ERO hop count: 2 Hop 1 (Strict): NAI: None SID type: 20-bit label, Value: 21 Hop 2 (Loose): NAI: None SID type: 20-bit label, Value: 1011
There are no alternate SID lists, otherwise known as paths, for the policy to utilize. User traffic will resolve over a non-SR-TE path, if one is available. In contrast, statically configured SR-TE paths that don’t take advantage of sBFD remain misleadingly Up.
Debuggability
Telemetry is but one part of observability. Troubleshooting network performance and availability depends on both the clarity of the underlying protocols and the diagnostics and logging of the available implementations.
SR’s minimization of state on transit routers, and its use of an uniform SRGB, make it easier for a human to parse node SID label forwarding actions – there is less to grok. Junos builds on this simplicity with a rich logging functionality to detect human error.
The SRMS section gave an example of how misconfigured node SIDs were flagged. There are two different types of conflicts that SR identifies:
SID conflict: this is caught if different SIDs are assigned to the same prefix.
Prefix conflict: this occurs if different prefixes are assigned the same SID.
The earlier example demonstrated a SID conflict. Let’s temporarily force a prefix conflict and use gRPC to stream that as an event. Traditional syslog remains available of course, but just like SNMP being succeeded by gRPC for telemetry, events can now be transmitted over gRPC as well.
Let’s configure jtimon to subscribe to /junos/events/
. To cause a prefix conflict, pe1.iad is temporarily configured with
an additional loopback address that actually belongs to p1.iad (128.49.106.9/32).
This would be fine if these addresses were used to generate a common
anycast SIDs. Instead, pe1.iad is misconfigured to advertise a different
prefix index (99) than p1.iad (9) using an IS-IS export policy.
Control plane: pe1.iad misconfiguration to cause a prefix conflict
Management plane: streamed system event about the prefix conflict
system_id: pe1.iad component_id: 65535 sub_component_id: 0 path: sensor_1004:/junos/events/:/junos/events/:eventd sequence_number: 5831 timestamp: 1551326098693 sync_response: false key: timestamp uint_value: 1551326098694 key: junos_re_stream_creation_timestamp uint_value: 1551326098693 key: junos_re_payload_get_timestamp uint_value: 1551326098693 key: junos_re_event_timestamp uint_value: 1551326098693 key: prefix str_value: /junos/events/event[id=’RPD_ISIS_PREFIX_SID_CNFLCT’ and type=’2’ and facility=’3’]/ key: timestamp/seconds uint_value: 1551326098 key: timestamp/microseconds uint_value: 692834 key: priority uint_value: 3 key: pid uint_value: 3211 key: message str_value: RPD_ISIS_PREFIX_SID_CNFLCT: IS- IS detected L1 prefix segment index ‘9’ originated by ‘p1. iad’ for prefix 128.49.106.9/32 conflicting with self- originated L1 prefix segment index ‘99’ for prefix 128.49.106.9/32 key: daemon str_value: rpd key: hostname str_value: pe1.iad key: prefix str_value: /junos/events/event[id=’RPD_ISIS_PREFIX_SID_CNFLCT’ and type=’2’ and facility=’3’]/ attributes[key=’isis-level’]/ key: value str_value: 1 key: prefix str_value: /junos/events/event[id=’RPD_ISIS_PREFIX_SID_CNFLCT’ and type=’2’ and facility=’3’]/ key: logoptions int_value: 9
Attention is beckoned and the misconfiguration recitifed. SR specifies a number of tie-breaking rules to address the conflict until human intervention takes place. The rules are evolving. At this point they are:
Prefer IPv6 entries over IPv4
Prefer longest prefix lengths
Prefer the numerically lowest prefix address
Prefer the numerically lowest segment index
Prefix conflicts are resolved first; SID conflict resolution follows on the outstanding entries. With this, let’s surface from our dive into observability and move on to optimizability.