Segment Routing in Simple Terms
Before getting into the details of segment routing, let us have a look at how routers forward an IP packet to the destination. We also need to understand MPLS which is a forwarding mechanism based on labels.
In traditional IP forwarding, each router forwards an IP packet by looking up the destination IP address in the IP header and finding the best match in the routing table. With the evolution of multiprotocol label switching(MPLS), it provided a way to forward packets using label switching instead of IP based routing. In an MPLS network, packets are labelled while entering the network and routers can forward the traffic by looking at the label on the packet not the destination address. Only routers sitting at the edge of the MPLS network performs an IP look up to create a labelled switch path (LSP) and the intermediate routers perform only a label lookup. But, MPLS needs an additional protocol like LDP or RSVP-TE to assign and distribute labels apart from routing protocols like OSPF. Hence, it creates additional overhead on the network.
Using MPLS, you can implement traffic engineering which is known as MPLS-TE. Traffic engineering allows the optimal usage of network resources by including links which are not part of the least-cost path provided by IP routing. That means traffic engineering should provide the possibility to steer traffic through the network on paths different from the least-cost path. In a traffic-engineered path, the head-end router specifies the complete path that the traffic will take through the MPLS network. Because it is the head-end router that specifies the path, traffic engineering is also referred to as a form of source-based routing. RSVP-TE is used as the signalling protocol in MPLS-TE to establish the path for traffic forwarding.
In segment routing, the source router chooses a path to the destination and encodes the path in the packet header as an ordered list of instructions (segments). The remaining routers, just execute the instructions on the way to destinations. Unlike MPLS in segment routing, allocation, distribution of segments and programming the forwarding information is carried out by IGP protocol extensions. Hence, an additional signalling protocol like RSVP-TE is not required for segment routing and it results in reducing the network overhead. Segment Routing can be applied to an MPLS network or an IPv6 network. In an SR enabled MPLS network, MPLS label serves as the segment identifier. In an SR enabled IPv6 network, segment identifier is the IPv6 address. (To be continued).