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 {100199} 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

Cisco documentations mentioned that the command syntax differs for 12.0S and 12.2S Cisco IOS releases, which uses the advertise ip l2-into-l1 {100199} IS-IS router subcommand. Those releases only support route leaking using TLV type 135; therefore the metric-style wide IS-IS router subcommand must be configured when implementing route leaking.
Note: Recent 12.0S and 12.2S Cisco IOS releases use the redistribute command to implement route leaking.

IS-IS Route Leaking

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.
RT1#sh ip route

Gateway of last resort is 13.13.13.3 to network 0.0.0.0

     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
C    192.168.1.0/24 is directly connected, Loopback0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet1/0
i ia 192.168.2.0/24 [115/35] via 12.12.12.2, FastEthernet0/0
i*L1 0.0.0.0/0 [115/10] via 13.13.13.3, FastEthernet1/0
RT1#

Below shows the L1 LSP generated by RT2 for the leaked route – 192.168.2.0/24.
Note that wide-style metric has been enabled on all routers in this sample scenario.
RT1#sh isis database RT2.00-00 detail


IS-IS Level-1 LSP RT2.00-00
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime      ATT/P/OL
RT2.00-00             0x00000005   0x6884        1194              1/0/0
  Area Address: 49.0001
  NLPID:        0xCC
  Hostname: RT2
  IP Address:   12.12.12.2
  Metric: 15         IP 12.12.12.0/24
  Metric: 15         IS-Extended RT2.01
  Metric: 20         IP-Interarea 192.168.2.0/24
RT1#

Leaked routes are called inter-area routes, which shown as IP-Interarea in the IS-IS LSDB and marked with an ia designation in the IP routing table.

2 common BGP practices benefit greatly from the route leaking ability:
  • 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.

No comments:

Post a Comment