Monday, March 19, 2012

IS-IS Route Leaking

Packets destined to other L1 areas are routed to the nearest L1/L2 router and to be forwarded to the destination area. Routing to the nearest L1/L2 router can lead to suboptimal routing when the shortest path to the destination area is via a different L1/L2 router. Route leaking is a mechanism for leaking or redistributing L2 information into L1 areas in order to reduce suboptimal routing. By having more details about the inter-area routes, an L1 router is able to make a better choice upon which L1/L2 router to forward the packets to a particular destination area.

RFC 2966 – Domain-wide Prefix Distribution with Two-Level IS-IS defines route leaking for use with the 6-bit narrow metric TLV types 128 and 130; while RFC 5305 – IS-IS Extensions for Traffic Engineering defines route leaking for use with the 32-bit wide metric TLV type 135. Both RFCs define an Up/Down bit to indicate whether or not the route advertised in the LSP has been leaked. An Up/Down bit of 0 indicates that a route was originated within an L1 area; while L1/L2 routers set the Up / Down bit to 1 for prefixes or routes that were derived from L2 routing and advertised into L1 LSPs that get propagated into the L1 area. The Up/Down bit is used to prevent routing loops. An L1/L2 router never readvertises any L1 route with the Up/Down bit set back into the L2 backbone.

The Up / Down bit for IS-IS Route Leaking

The redistribute isis ip level-2 into level-1 distribute-list {100 – 199} IS-IS router subcommand implement IS-IS route leaking. An IP extended access list must be defined to match the routes that are to be leaked from L2 into L1. The metric-style wide IS-IS router subcommand is optional but recommended.Note: If wide-style metric is not enabled, the metric in the TLV will be interpreted wrongly – more than 63! Because the Up/Down bit is also being interpreted along with the 6-bit metric. lolz

In the sample scenario above, RT1 routes packets destined to 192.168.2.0/24 to the nearest L1/L2 router – RT3 by default. However, that route is not the most optimal path.

Below shows the IP routing table on RT1 after implemented route leaking on RT2 and RT3.
RT1 will now use the path via RT2 instead of RT3 to reach 192.168.2.0/24. Route leaking allows RT1 to determine the true cost to reach 192.168.2.0/24 and forward packets accordingly.

One criterion used in the BGP path-selection process is the IGP cost to the BGP next-hop address. Many ISPs rely on the IGP metric to choose the best path through their ASs. This practice is known as shortest exit routing.

Another common practice is to use the IGP metric for the value of the MED when advertising routes to other ASs. This provides the ability to request other ASs to use the shortest path through the AS when making routing decisions.

Before route leaking, if multiple areas were used within the AS, the IS-IS metric did not represent the true internal cost and did not work well with either of these practices. Leaking routes for all the BGP next-hop addresses implements a multiarea hierarchy while maintaining accurate end-to-end IGP metrics.

In MPLS VPN environments, reachability information for the loopback addresses of every Provider Edge (PE) router is needed. Leaking routes for the PE loopback addresses allows a multiarea hierarchy to be used in MPLS VPN implementations.

Route leaking can also be used to implement a crude form of traffic engineering. Leaking routes for individual addresses or services from specific L1/L2 routers control the exit point from an L1 area used to reach those addresses and services.

By default, IS-IS L1/L2 routers set the ATTached bit in their LSPs generated for their L1 areas. This original concept soon became obsolete after the route leaking capability was introduced. The ignore-attached-bit hidden IS-IS router subcommand can be configured on an L1/L2 router to ignore the ATTached bit in the LSPs from another L1/L2 router, and therefore does not install the IS-IS-learned default route into the IP routing table.