0% found this document useful (0 votes)
56 views8 pages

Understanding Segment Routing in MPLS

Segment routing is a network architecture that enables explicit routing of packets through a network by imposing a predetermined path. It works by encoding the complete path in the packet header at the source node. Key components include segments, segment identifiers to encode the path, and a segment routing header. It offers benefits like simplified network management and support for network slicing.

Uploaded by

jeteleprojsbc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views8 pages

Understanding Segment Routing in MPLS

Segment routing is a network architecture that enables explicit routing of packets through a network by imposing a predetermined path. It works by encoding the complete path in the packet header at the source node. Key components include segments, segment identifiers to encode the path, and a segment routing header. It offers benefits like simplified network management and support for network slicing.

Uploaded by

jeteleprojsbc
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Segment Routing

 1. what is segment routing ([Link])


 1. what is Segment Routing? - RAYKA ([Link])
1. What is Segment Routing.
 Segment Routing (SR) is a network routing architecture that enables explicit
routing of packets through a network by imposing a predetermined path, or
"segment," on them. It's primarily used in IP/MPLS (Internet
Protocol/Multiprotocol Label Switching) networks. Instead of relying on
traditional hop-by-hop forwarding, where each router along the path
independently determines the next hop for a packet based on its routing table,
segment routing allows the sender to specify the complete path for a packet at
the source node by encoding it into the packet's header.
 Segment Routing is just like MPLS but label assigning mechanism is different.

Key components of segment routing include:

 Segments: These are components of the network path, such as nodes, links, or
services. Segments can be represented using various identifiers, such as MPLS
labels, IP addresses, or IPv6 addresses.
 Segment Identifier (SID): Each segment in the path is associated with a unique
identifier called a Segment Identifier (SID). SIDs are used to encode the path
information in the packet header.
 Segment Routing Header (SRH): This is a header added to packets at the
source node that contains a list of SIDs corresponding to the desired path
segments. As the packet traverses the network, each router pops the top SID from
the SRH and forwards the packet to the corresponding segment.
 Traffic Engineering: Segment routing allows for efficient traffic engineering by
enabling the definition of specific paths through the network based on factors
such as available bandwidth, latency, or policy requirements.
 Flexibility and Scalability: Segment routing provides flexibility in defining
paths and can scale to large networks by avoiding the need for maintaining per-
flow state information at intermediate routers.
 Segment routing offers several benefits, including simplified network
management, improved network efficiency, and support for network slicing and
service chaining. It's being increasingly adopted in modern networks,
particularly in data center interconnects, service provider networks, and large
enterprise networks.

2. Packet Forwarding
Forwarding in IP Network

 When forwarding in the IP network, the data traffic always goes over a certain
path, which is best path chosen by IGP.

Page 1 of 8
 One problem we face in such networks is that traffic will not be directed to
another path when that path is congested.
 Another problem is that you cannot route your voice and data traffic through
different path. the requirements for data traffic and voice traffic are different.
The data traffic requires high bandwidth, but the voice traffic requires minimal
delay.

Forwarding in MPLS Network

 In an MPLS network, by changing the label on the edge of the network, we can
control the entire path of the traffic. This is the advantage of MPLS, which makes
it possible to isolate the data plane from the control plane.
 The advantage of MPLS networks over IP networks is that we can easily route
voice and data traffic through different paths when required depending on their
QoS requirements.
 The disadvantage of MPLS networks is that all routers must maintain the state of
all paths. Data traffic with the same IP destination but with different labels must
be forwarded through different path and all routers need to know that.

Forwarding in Segment Routing Network


 With segment routing, just like with MPLS, we control the path of the traffic at
the edge of the network. The difference, however, is that the path is maintained in
the packet itself and not in routers in the path.
 Router-id of routers, link can be Segment also.
Segment Routing vs MPLS
 With segment routing, like MPLS, we control the path of different applications
according to their QoS requirements, but at a lower cost. because the routers in
the network do not have to maintain the state of every path.
 In other words, to do traffic engineering in MPLS, in addition to IGP, we need LDP
(Label Distribution Protocol) or RSVP (Resource Reservation Protocol) for path
signalling but with segment routing we don’t need LDP or RSVP, and IGP with
some extensions is enough for segment routing.
 Segment Routing simplifies MPLS-enabled data center designs using Border
Gateway Protocol (BGP) RFC 3107 - IPv4 labeled unicast among Top-of-the-
Rack/Leaf/Spine switches.

3. Segment routing control-plane and data-plane process

 Two types of segments, prefix-SID (id of the router) and adj-SID (id of the link).
 prefix-SID is globally unique and we will configure it manually, but adj-SID is
locally significant and it is generated dynamically.
 a node segment is a special prefix segment that is bound to the loopback address
of a node. It is advertised as an index into the node specific SR Global Block or
SRGB
 Both prefix-SID and adj-SID are advertised through OSPF or ISIS in the network
and so all routers know each other’s prefix SID and adj-SIDs.

Page 2 of 8
 Both of these segment IDs(prefix-SID & adj-SID) are added over which the packet
is to be transmitted into the packet itself based on our policy and packet’s QoS
requirements thus controlling the path of the packet at edge router itself.
 If we don’t define a policy for our traffic, the traffic path would be the same as the
IGP path. In other words, when we don’t define a policy in the segment routing
network, segment routing path should be the same with IGP path. This is also
true for MPLS network. When there is no policy in MPLS network, MPLS path and
IGP path are the same.
How segment routing works?

data-plane process in segment routing with no policy at the edge

 Every router swap label with same label i.e It swap the label xrv6 with xrv6 and
at xrv5 it pop label as it is PHP (penultimate pop-hopping) router.
 Metric style wide is required for Segment Routing
 No separate control plane for Segment Routing
 Prefix-SID can be configured as an index or as an absolute amount. Index 1 means
16001, index 2 means 16002 since default range is between 16000 and 23999.

 Both Prefix-SID and adj-SID are advertised by IGP protocols like OSPF and ISIS
extensions.
 Show Commands :
“show cef [Link]/32” //CEF(Cisco express forwarding) contains FIB
“show mpls forwarding”
“show isis adj details”

Page 3 of 8
 In segment routing we have two options for data-plane: MPLS (SR-MPLS) and
IPV6 (SRv6) In this section we are talking about MPLS version of segment
routingand not IPv6.
 Commands to enable Segment Routig in all routers :
First Segement Routing to be enabled in Global
configuration mode :

Router1(Config)#Segment-routing mpls //enabling Segemnt Routing


Router1 (config-srmpls)# connected-prefix-sid-map //Assigning Prefic ID
Router1 (config-srmpls-conn)# address-family ipv4 // Specifies the IPv4 address
family
Router1 (config-srmpls-conn-af)# [Link]/32 100 range 1 // Associates SID 100
with the address [Link]/32.
exit

router isis LAB


is-type level-2-only
net 49.0000.0000.0001.0
metric-style wide
segment-routing mpls
address-family ipv4 unicast

 there are two labels assigned to each link(adj-SID) -Protected and not protected.
 with “show isis database verbose xrv5” in xrv1, we make sure that adj-SID and
prefix-SID related to router xrv5 are received in xrv1.

Page 4 of 8
4. Segment routing ECMP(Equal cost multiple paths)
 The first new point that we would like to talk about in the “Segment Routing Control-
Plane” is ECMP or Equal Cost Path Load Balancing. In this topology we have equal-cost
paths between the edge routers, xrv1 and xrv6.

 Since there is no traffic engineering rules in edge routers, we know that segment
routing follows the best IGP path for forwarding. In IGP, we have load balancing
over equal-cost paths so the traffic is load-balanced also in the segment routing
network.
 We also check the LFIB table with “show mpls forwarding” to make sure that load
balancing is taking place.
 And finally, we can traceroute the traffic to destination [Link] to make sure that
the load balancing is really happening.

5. Segment routing explicit-null versus implicit-null and


Preference over MPLS LDP

 with PHP rule in MPLS, the label is removed in the last router before the
destination. Since the QoS tag is also inside MPLS label, the QoS tag is
automatically removed when MPLS label is removed.
 With explicit-null, we’re adding real null MPLS label to the packet instead of
removing it. So the QoS tag is not removed from the packet and it is easier to
identify the traffic in order to apply the appropriate QoS policy.
 In Cisco router to enable explicit null :

Device# enable
Device# configure terminal
Device# segment-routing mpls
Device(config-srmpls)# set-attributes

Page 5 of 8
Device(config-srmpls-attr)# address-family ipv4
Device(config-srmpls-attr-af)# explicit-null
Device(config-srmpls-attr-af)# sr-label-preferred // Specifies SR label to be
preferred over the LDP
Device(config-srmpls-attr-af)# exit-address-family

 when we implement QoS in our “segment routing” network, it is


recommended to enable explicit-null, which helps us to implement the QoS
policy easier.

6. adj-SID in broadcast and NBMA network

7. Segment routing protection concept (TI-LFA)

 Traffic engineering and Protection (fast reroute, sub 50ms) are the main
advantages of both MPLS and segment routing networks.
 we have three main types of protection:
1. link protection
2. node protection
3. SRLG (Shared Risk Link Groups) protection : They help ensure
that backup paths don't fail due to the same reason as the primary path.
SRLGs group links that share a common point of failure. (eg Cable Cut)

 Multiple protection in one router : Multiple type protections(Link,Node


and SRLG) can be configured in a router.
1. Link and Node Protections : Node protection higher priority than
link protection. That means link calculated by Node protection
may be used for link protection when link fails and that may not
be the best path.
2. Node and SRLG : When both node protection and SRLG
protection are enabled. Then the backup path is chosen to
protect both node and SRLG, but if that is not possible, one with
higher priority (lower index value) is installed in the routing
table.

TI-LFA and post-convergence Path

 TI-LFA protocol, which stands for “Topology Independent Loop Free


Alternate”.

Page 6 of 8
 post-convergence path means, the path with the assumption that the link
or node is failed. Based on this assumption, “post-convergence path” is
calculated and installed in routing table as backup path.
 IP network does not use “post-convergence path“ protection when it is so
easy. The answer: Because it may cause loop due delay in updating routing
tables on which IP routing is basically dependent.
 So in segment routing, the backup path can be encoded in the packet itself
when a link or node fails, so there will be no loop in segment routing.
Configuring Topology Independent Loop Free Alternate Fast Reroute

 You can enable TI-LFA using any of the following two methods
1. Protocol enablement : Enables TI-LFA in router isis mode for all
IS-IS interfaces.
router isis 1
fast-reroute per-prefix [level-1 | level-2] all
fast-reroute ti-lfa [level-1 | level-2]

2. Interface enablement—Enable TI-LFA selectively on each


interface.

interface interface-name
isis fast-reroute protection [level-1 | level-2]
isis fast-reroute ti-lfa protection [level-1 | level-2]

 When both interface and protocol are TI-LFA enabled, the interface
configuration takes precedence over the protocol configuration.
MicroLoop Avoidance

 The ISIS - SR: uLoop Avoidance feature extends the ISIS Local Microloop
Protection feature thereby preventing the occurrences of microloops
during network convergence after a link-down event or link-up event.
 When changes occur in a network topology because ofthe failure or
restoration ofa link or a network device, IP Fast Reroute enables rapid
network convergence by moving traffic to precomputed backup paths until
regular convergence mechanisms move traffic to a newly computed best
path, also known as a post-convergence path. This network convergence
may cause short microloops between two directly or indirectly connected
devices in the topology
 Use the protected keyword with the” microloop avoidance segment-
routing” command, to enable microloop avoidance for protected prefixes
only.

Page 7 of 8
 The ‘microloop avoidance rib-update-delay milliseconds’ command can
be used to configure the delay in milliseconds for a node to wait before
updating the node’s forwarding table and stop using the microloop
avoidance policy.
 The following is a sample configuration code snippet to enable microloop
avoidance.
router isis
fast-reroute per-prefix level-2 all
microloop avoidance segment-routing
microloop avoidance rib-update-delay 3000

Page 8 of 8

You might also like