How MPLS Reduces Routes (BGP-free Core)

Posted by

Over the years I’ve answered the question of, “Why MPLS?”, many times.  There are many reasons from traffic engineering and unified provisioning/design to reducing route table size by implementing a BGP-free core.  In this article we will review a routing issue and demonstrate how MPLS can be used to solve it by implementing a BGP-free core (and some other options).

Lets start with a basic routing issue demonstrated below:

route_issue_blog

 

In this example, R1 (1.1.1.1) and R2 (2.2.2.2) have an iBGP peering between them.  The underlying network is running OSPF and the direct links and loopback0 interfaces are redistributed into OSPF.  The problem in this case is that R1 learns the R2 networks via BGP (think of these as public IP prefixes) but the other routers in the network have no knowledge of these routes.  When R1 tries to send traffic to the R2 networks the next hop routers drop the traffic. You can follow the packet through the network  Packet received by R1 with destination of 2.2.3.1 (1), R1 lookups up the route for 2.2.3.1, the next hop is 2.2.2.2 (2), a recursive lookup for 2.2.2.2 results in a next hop of R3 (3). The packet is then forwarded to R3 (4).  R3 does a lookup for 2.2.3.1 but there is no route so the packet is dropped (5).  See the route tables and testing information below.

R1#sh ip route
 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2
 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
 ia - IS-IS inter area, * - candidate default, U - per-user static route
 o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
 C       1.1.1.1 is directly connected, Loopback0
 2.0.0.0/8 is variably subnetted, 14 subnets, 2 masks
 O       2.2.2.2/32 [110/31] via 2.2.15.5, 00:02:30, FastEthernet0/1
 [110/31] via 2.2.13.3, 00:02:30, FastEthernet0/0
 B       2.2.3.0/24 [200/0] via 2.2.2.2, 00:22:17
 B       2.2.4.0/24 [200/0] via 2.2.2.2, 00:22:17
 B       2.2.5.0/24 [200/0] via 2.2.2.2, 00:22:17
 B       2.2.6.0/24 [200/0] via 2.2.2.2, 00:22:17
 B       2.2.7.0/24 [200/0] via 2.2.2.2, 00:22:19
 B       2.2.8.0/24 [200/0] via 2.2.2.2, 00:22:19
 B       2.2.9.0/24 [200/0] via 2.2.2.2, 00:22:19
 C       2.2.13.0/24 is directly connected, FastEthernet0/0
 C       2.2.15.0/24 is directly connected, FastEthernet0/1
 O       2.2.24.0/24 [110/30] via 2.2.13.3, 00:02:33, FastEthernet0/0
 O       2.2.26.0/24 [110/30] via 2.2.15.5, 00:02:33, FastEthernet0/1
 O       2.2.34.0/24 [110/20] via 2.2.13.3, 00:02:33, FastEthernet0/0
 O       2.2.56.0/24 [110/20] via 2.2.15.5, 00:02:33, FastEthernet0/1
 3.0.0.0/32 is subnetted, 1 subnets
 O       3.3.3.3 [110/11] via 2.2.13.3, 00:02:33, FastEthernet0/0
 4.0.0.0/32 is subnetted, 1 subnets
 O       4.4.4.4 [110/21] via 2.2.13.3, 00:02:33, FastEthernet0/0
 5.0.0.0/32 is subnetted, 1 subnets
 O       5.5.5.5 [110/11] via 2.2.15.5, 00:02:33, FastEthernet0/1
 6.0.0.0/32 is subnetted, 1 subnets
 O       6.6.6.6 [110/21] via 2.2.15.5, 00:02:33, FastEthernet0/1
R1#ping 2.2.2.2 so lo0
Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
 Packet sent with a source address of 1.1.1.1
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 44/62/76 ms
R1#traceroute 2.2.2.2 so lo0
Type escape sequence to abort.
 Tracing the route to 2.2.2.2
1 2.2.13.3 16 msec 20 msec 24 msec
 2 2.2.34.4 36 msec 40 msec 44 msec
 3 2.2.24.2 72 msec 56 msec 48 msec
R1#ping 2.2.3.2 so lo0
Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 2.2.3.2, timeout is 2 seconds:
 Packet sent with a source address of 1.1.1.1
 UUUUU
 Success rate is 0 percent (0/5)
R1#traceroute 2.2.3.2 so lo0
Type escape sequence to abort.
 Tracing the route to 2.2.3.2
1 2.2.13.3 12 msec 24 msec 16 msec
 2 2.2.13.3 !H  !H  !H
R2#sh ip route
 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2
 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
 ia - IS-IS inter area, * - candidate default, U - per-user static route
 o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
 O       1.1.1.1 [110/31] via 2.2.26.6, 00:04:40, FastEthernet0/1
 [110/31] via 2.2.24.4, 00:04:40, FastEthernet0/0
 2.0.0.0/8 is variably subnetted, 14 subnets, 2 masks
 C       2.2.2.2/32 is directly connected, Loopback0
 C       2.2.3.0/24 is directly connected, Loopback3
 C       2.2.4.0/24 is directly connected, Loopback4
 C       2.2.5.0/24 is directly connected, Loopback5
 C       2.2.6.0/24 is directly connected, Loopback6
 C       2.2.7.0/24 is directly connected, Loopback7
 C       2.2.8.0/24 is directly connected, Loopback8
 C       2.2.9.0/24 is directly connected, Loopback9
 O       2.2.13.0/24 [110/30] via 2.2.24.4, 00:04:41, FastEthernet0/0
 O       2.2.15.0/24 [110/30] via 2.2.26.6, 00:04:42, FastEthernet0/1
 C       2.2.24.0/24 is directly connected, FastEthernet0/0
 C       2.2.26.0/24 is directly connected, FastEthernet0/1
 O       2.2.34.0/24 [110/20] via 2.2.24.4, 00:04:42, FastEthernet0/0
 O       2.2.56.0/24 [110/20] via 2.2.26.6, 00:04:42, FastEthernet0/1
 3.0.0.0/32 is subnetted, 1 subnets
 O       3.3.3.3 [110/21] via 2.2.24.4, 00:04:42, FastEthernet0/0
 4.0.0.0/32 is subnetted, 1 subnets
 O       4.4.4.4 [110/11] via 2.2.24.4, 00:04:42, FastEthernet0/0
 5.0.0.0/32 is subnetted, 1 subnets
 O       5.5.5.5 [110/21] via 2.2.26.6, 00:04:42, FastEthernet0/1
 6.0.0.0/32 is subnetted, 1 subnets
 O       6.6.6.6 [110/11] via 2.2.26.6, 00:04:42, FastEthernet0/1
R3#sh ip route
 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2
 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
 ia - IS-IS inter area, * - candidate default, U - per-user static route
 o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
 O       1.1.1.1 [110/11] via 2.2.13.1, 00:05:10, FastEthernet0/0
 2.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
 O       2.2.2.2/32 [110/21] via 2.2.34.4, 00:05:10, FastEthernet0/1
 C       2.2.13.0/24 is directly connected, FastEthernet0/0
 O       2.2.15.0/24 [110/20] via 2.2.13.1, 00:05:10, FastEthernet0/0
 O       2.2.24.0/24 [110/20] via 2.2.34.4, 00:05:10, FastEthernet0/1
 O       2.2.26.0/24 [110/30] via 2.2.34.4, 00:05:10, FastEthernet0/1
 C       2.2.34.0/24 is directly connected, FastEthernet0/1
 O       2.2.56.0/24 [110/30] via 2.2.13.1, 00:05:12, FastEthernet0/0
 3.0.0.0/32 is subnetted, 1 subnets
 C       3.3.3.3 is directly connected, Loopback0
 4.0.0.0/32 is subnetted, 1 subnets
 O       4.4.4.4 [110/11] via 2.2.34.4, 00:05:12, FastEthernet0/1
 5.0.0.0/32 is subnetted, 1 subnets
 O       5.5.5.5 [110/21] via 2.2.13.1, 00:05:12, FastEthernet0/0
 6.0.0.0/32 is subnetted, 1 subnets
 O       6.6.6.6 [110/31] via 2.2.34.4, 00:05:12, FastEthernet0/1
 [110/31] via 2.2.13.1, 00:05:12, FastEthernet0/0
R4#sh ip route
 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2
 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
 ia - IS-IS inter area, * - candidate default, U - per-user static route
 o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
 O       1.1.1.1 [110/21] via 2.2.34.3, 00:05:25, FastEthernet0/0
 2.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
 O       2.2.2.2/32 [110/11] via 2.2.24.2, 00:05:25, FastEthernet0/1
 O       2.2.13.0/24 [110/20] via 2.2.34.3, 00:05:25, FastEthernet0/0
 O       2.2.15.0/24 [110/30] via 2.2.34.3, 00:05:25, FastEthernet0/0
 C       2.2.24.0/24 is directly connected, FastEthernet0/1
 O       2.2.26.0/24 [110/20] via 2.2.24.2, 00:05:25, FastEthernet0/1
 C       2.2.34.0/24 is directly connected, FastEthernet0/0
 O       2.2.56.0/24 [110/30] via 2.2.24.2, 00:05:26, FastEthernet0/1
 3.0.0.0/32 is subnetted, 1 subnets
 O       3.3.3.3 [110/11] via 2.2.34.3, 00:05:26, FastEthernet0/0
 4.0.0.0/32 is subnetted, 1 subnets
 C       4.4.4.4 is directly connected, Loopback0
 5.0.0.0/32 is subnetted, 1 subnets
 O       5.5.5.5 [110/31] via 2.2.34.3, 00:05:27, FastEthernet0/0
 [110/31] via 2.2.24.2, 00:05:27, FastEthernet0/1
 6.0.0.0/32 is subnetted, 1 subnets
 O       6.6.6.6 [110/21] via 2.2.24.2, 00:05:27, FastEthernet0/1
R5#sh ip route
 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2
 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
 ia - IS-IS inter area, * - candidate default, U - per-user static route
 o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
 O       1.1.1.1 [110/11] via 2.2.15.1, 00:05:39, FastEthernet0/1
 2.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
 O       2.2.2.2/32 [110/21] via 2.2.56.6, 00:05:39, FastEthernet0/0
 O       2.2.13.0/24 [110/20] via 2.2.15.1, 00:05:39, FastEthernet0/1
 C       2.2.15.0/24 is directly connected, FastEthernet0/1
 O       2.2.24.0/24 [110/30] via 2.2.56.6, 00:05:39, FastEthernet0/0
 O       2.2.26.0/24 [110/20] via 2.2.56.6, 00:05:39, FastEthernet0/0
 O       2.2.34.0/24 [110/30] via 2.2.15.1, 00:05:40, FastEthernet0/1
 C       2.2.56.0/24 is directly connected, FastEthernet0/0
 3.0.0.0/32 is subnetted, 1 subnets
 O       3.3.3.3 [110/21] via 2.2.15.1, 00:05:40, FastEthernet0/1
 4.0.0.0/32 is subnetted, 1 subnets
 O       4.4.4.4 [110/31] via 2.2.56.6, 00:05:41, FastEthernet0/0
 [110/31] via 2.2.15.1, 00:05:41, FastEthernet0/1
 5.0.0.0/32 is subnetted, 1 subnets
 C       5.5.5.5 is directly connected, Loopback0
 6.0.0.0/32 is subnetted, 1 subnets
 O       6.6.6.6 [110/11] via 2.2.56.6, 00:05:41, FastEthernet0/0
R6#sh ip route
 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2
 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
 ia - IS-IS inter area, * - candidate default, U - per-user static route
 o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
 O       1.1.1.1 [110/21] via 2.2.56.5, 00:06:00, FastEthernet0/0
 2.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
 O       2.2.2.2/32 [110/11] via 2.2.26.2, 00:06:00, FastEthernet0/1
 O       2.2.13.0/24 [110/30] via 2.2.56.5, 00:06:00, FastEthernet0/0
 O       2.2.15.0/24 [110/20] via 2.2.56.5, 00:06:00, FastEthernet0/0
 O       2.2.24.0/24 [110/20] via 2.2.26.2, 00:06:00, FastEthernet0/1
 C       2.2.26.0/24 is directly connected, FastEthernet0/1
 O       2.2.34.0/24 [110/30] via 2.2.26.2, 00:06:01, FastEthernet0/1
 C       2.2.56.0/24 is directly connected, FastEthernet0/0
 3.0.0.0/32 is subnetted, 1 subnets
 O       3.3.3.3 [110/31] via 2.2.56.5, 00:06:01, FastEthernet0/0
 [110/31] via 2.2.26.2, 00:06:01, FastEthernet0/1
 4.0.0.0/32 is subnetted, 1 subnets
 O       4.4.4.4 [110/21] via 2.2.26.2, 00:06:02, FastEthernet0/1
 5.0.0.0/32 is subnetted, 1 subnets
 O       5.5.5.5 [110/11] via 2.2.56.5, 00:06:02, FastEthernet0/0
 6.0.0.0/32 is subnetted, 1 subnets
 C       6.6.6.6 is directly connected, Loopback0

There are obviously some simple options to fix this issue.  Like having R2 advertise a default route through OSPF, but in larger scale real-life scenarios they might not be the best option.  We explore a few solutions below.

Option 1 : Default Route (Cheating)

The simplest option is to have R2 advertise itself as the default gateway for the network.  However, this isn’t the ideal solution as some other router in the network could be the actual default route and result in less than ideal routing in real world scenarios.

Configuration change, on R2 default-info originate:

 router ospf 1
  default-information originate always
  exit

Results:

R1#sh ip route
 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
        E1 - OSPF external type 1, E2 - OSPF external type 2
        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
        ia - IS-IS inter area, * - candidate default, U - per-user static route
        o - ODR, P - periodic downloaded static route
 
 Gateway of last resort is 2.2.13.3 to network 0.0.0.0
 
      1.0.0.0/32 is subnetted, 1 subnets
 C       1.1.1.1 is directly connected, Loopback0
      2.0.0.0/8 is variably subnetted, 14 subnets, 2 masks
 O       2.2.2.2/32 [110/22] via 2.2.13.3, 00:00:33, FastEthernet0/0
 B       2.2.3.0/24 [200/0] via 2.2.2.2, 00:31:39
 B       2.2.4.0/24 [200/0] via 2.2.2.2, 00:31:39
 B       2.2.5.0/24 [200/0] via 2.2.2.2, 00:31:39
 B       2.2.6.0/24 [200/0] via 2.2.2.2, 00:31:39
 B       2.2.7.0/24 [200/0] via 2.2.2.2, 00:31:39
 B       2.2.8.0/24 [200/0] via 2.2.2.2, 00:31:40
 B       2.2.9.0/24 [200/0] via 2.2.2.2, 00:31:40
 C       2.2.13.0/24 is directly connected, FastEthernet0/0
 C       2.2.15.0/24 is directly connected, FastEthernet0/1
 O       2.2.24.0/24 [110/21] via 2.2.13.3, 00:00:36, FastEthernet0/0
 O       2.2.26.0/24 [110/30] via 2.2.15.5, 00:00:36, FastEthernet0/1
 O       2.2.34.0/24 [110/11] via 2.2.13.3, 00:00:36, FastEthernet0/0
 O       2.2.56.0/24 [110/20] via 2.2.15.5, 00:00:36, FastEthernet0/1
      3.0.0.0/32 is subnetted, 1 subnets
 O       3.3.3.3 [110/2] via 2.2.13.3, 00:00:36, FastEthernet0/0
      4.0.0.0/32 is subnetted, 1 subnets
 O       4.4.4.4 [110/12] via 2.2.13.3, 00:00:36, FastEthernet0/0
      5.0.0.0/32 is subnetted, 1 subnets
 O       5.5.5.5 [110/11] via 2.2.15.5, 00:00:36, FastEthernet0/1
      6.0.0.0/32 is subnetted, 1 subnets
 O       6.6.6.6 [110/21] via 2.2.15.5, 00:00:36, FastEthernet0/1
 O*E2 0.0.0.0/0 [110/1] via 2.2.13.3, 00:00:36, FastEthernet0/0
 
 R1#ping 2.2.3.2 so lo0
 
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 2.2.3.2, timeout is 2 seconds:
 Packet sent with a source address of 1.1.1.1
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 60/63/64 ms
 R1#traceroute 2.2.3.2 so lo0
 
 Type escape sequence to abort.
 Tracing the route to 2.2.3.2
 
   1 2.2.13.3 20 msec 20 msec 24 msec
   2 2.2.34.4 28 msec 44 msec 44 msec
   3 2.2.24.2 76 msec 52 msec 52 msec

Option 2: Route Reflector with BGP

Another option would be to advertise the BGP routes to all of the intermediate routers by making R1 a route-reflector for the other routers.  By using a route reflector it prevents us from having to create a full-mesh configuration of BGP peers.  However, we are deviating from a BGP-free core concept here.

Changes made to R1:

router bgp 65001
  bgp router-id 1.1.1.1
  no bgp default ipv4-unicast
  bgp log-neighbor-changes
  neighbor 2.2.2.2 remote-as 65001
  neighbor 2.2.2.2 update-source Loopback0
  neighbor 3.3.3.3 remote-as 65001
  neighbor 3.3.3.3 update-source Loopback0
  neighbor 4.4.4.4 remote-as 65001
  neighbor 4.4.4.4 update-source Loopback0
  neighbor 5.5.5.5 remote-as 65001
  neighbor 5.5.5.5 update-source Loopback0
  neighbor 6.6.6.6 remote-as 65001
  neighbor 6.6.6.6 update-source Loopback0
  !
  address-family ipv4
   neighbor 2.2.2.2 activate
   neighbor 2.2.2.2 route-reflector-client
   neighbor 3.3.3.3 activate
   neighbor 3.3.3.3 route-reflector-client
   neighbor 4.4.4.4 activate
   neighbor 4.4.4.4 route-reflector-client
   neighbor 5.5.5.5 activate
   neighbor 5.5.5.5 route-reflector-client
   neighbor 6.6.6.6 activate
   neighbor 6.6.6.6 route-reflector-client
   no auto-summary
   no synchronization
  exit-address-family
 !

Changes made to R3-R6:

router bgp 65001
  bgp router-id 6.6.6.6
  no bgp default ipv4-unicast
  bgp log-neighbor-changes
  neighbor 1.1.1.1 remote-as 65001
  neighbor 1.1.1.1 update-source Loopback0
  !
  address-family ipv4
   neighbor 1.1.1.1 activate
   no auto-summary
   no synchronization
  exit-address-family
 !

Results:

R3#sh ip route
 Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
        D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
        N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
        E1 - OSPF external type 1, E2 - OSPF external type 2
        i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
        ia - IS-IS inter area, * - candidate default, U - per-user static route
        o - ODR, P - periodic downloaded static route
 
 Gateway of last resort is not set
 
      1.0.0.0/32 is subnetted, 1 subnets
 O       1.1.1.1 [110/11] via 2.2.13.1, 01:19:32, FastEthernet0/0
      2.0.0.0/8 is variably subnetted, 14 subnets, 2 masks
 O       2.2.2.2/32 [110/21] via 2.2.34.4, 01:19:32, FastEthernet0/1
 B       2.2.3.0/24 [200/0] via 2.2.2.2, 00:02:17
 B       2.2.4.0/24 [200/0] via 2.2.2.2, 00:02:17
 B       2.2.5.0/24 [200/0] via 2.2.2.2, 00:02:17
 B       2.2.6.0/24 [200/0] via 2.2.2.2, 00:02:17
 B       2.2.7.0/24 [200/0] via 2.2.2.2, 00:02:17
 B       2.2.8.0/24 [200/0] via 2.2.2.2, 00:02:18
 B       2.2.9.0/24 [200/0] via 2.2.2.2, 00:02:18
 C       2.2.13.0/24 is directly connected, FastEthernet0/0
 O       2.2.15.0/24 [110/20] via 2.2.13.1, 01:19:33, FastEthernet0/0
 O       2.2.24.0/24 [110/20] via 2.2.34.4, 01:19:34, FastEthernet0/1
 O       2.2.26.0/24 [110/30] via 2.2.34.4, 01:19:34, FastEthernet0/1
 C       2.2.34.0/24 is directly connected, FastEthernet0/1
 O       2.2.56.0/24 [110/30] via 2.2.13.1, 01:19:34, FastEthernet0/0
      3.0.0.0/32 is subnetted, 1 subnets
 C       3.3.3.3 is directly connected, Loopback0
      4.0.0.0/32 is subnetted, 1 subnets
 O       4.4.4.4 [110/11] via 2.2.34.4, 01:19:34, FastEthernet0/1
      5.0.0.0/32 is subnetted, 1 subnets
 O       5.5.5.5 [110/21] via 2.2.13.1, 01:19:34, FastEthernet0/0
      6.0.0.0/32 is subnetted, 1 subnets
 O       6.6.6.6 [110/31] via 2.2.34.4, 01:19:34, FastEthernet0/1
                 [110/31] via 2.2.13.1, 01:19:34, FastEthernet0/0
                    
                    
 R1#ping 2.2.3.2 so lo0
 
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 2.2.3.2, timeout is 2 seconds:
 Packet sent with a source address of 1.1.1.1
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 60/63/64 ms
 
 R1#traceroute 2.2.3.2 so lo0
 
 Type escape sequence to abort.
 Tracing the route to 2.2.3.2
 
   1 2.2.13.3 24 msec 20 msec 20 msec
   2 2.2.34.4 44 msec 44 msec 40 msec
   3 2.2.24.2 64 msec 44 msec 80 msec

In this scenario R3-R6 have learned routes to the BGP networks on R2 via R1 acting as a route reflector.  In a scenario where this was large scale with hundreds of thousands of BGP routes this would be less than ideal.

Option 3:  MPLS

The ideal situation in larger scale networks is to have the BGP routing handled by Provider Edge (PE) routers and have a pure MPLS core of Provider (P) routers.  PE routers and P routers advertise their loopback addresses using an IGP such as OSPF or IS-IS. For large networks the PE routers might contain hundreds of thousands of routes but the internal P routers only contain loopback and in some cases link routes so the tables may only contain a few hundred routes.

The PE routers are peered together via BGP by using iBGP and peering between loopback addresses.  The P routers are not running BGP, thus the concept of a BGP-free core.

Here is a walkthrough of the MPLS solution.

Why MPLS reduces route size

In this example, R1 (1.1.1.1) and R2 (2.2.2.2) have an iBGP peering between them.  The underlying network is running OSPF and the direct links and loopback0 interfaces are redistributed into OSPF.  In this case, MPLS/LDP is enabled all routers (R1 – R6). Each router creates and advertises MPLS labels to its neighbors. The end result is a label switched path between R1 and R2. Lets walk through the packet path. Packet received by R1 with destination of 2.2.3.1 (1), R1 lookups up the route for 2.2.3.1, the next hop is 2.2.2.2 (2), a label lookup results in a next hop of R3 using label X (3). An MPLS label of X is added to the packet and the packet is then forwarded to R3 (4).  R3 does a lookup for label X, inbound label of X is swapped with a label of Y and forwarded to R5 (5). R5 does a label lookup for inbound label of Y, R5 pops (removes) the MPLS label and forwards the packet to R2 (6).

In this scenario only R1 and R2 have information about the routes in BGP, these are the PE routers.  The P routers R3-R6, only have loopback and point-to-point link information, no BGP routes.  See the route tables and testing information below.

Changes made to R1 – R6:

mpls ip
 mpls lab proto ldp
 mpls ldp router-id lo0
 int fa0/0
  mpls ip
 int fa0/1
  mpls ip
 end
 copy run start

Results:

R1#show mpls ldp nei
     Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 1.1.1.1:0
         TCP connection: 3.3.3.3.59300 - 1.1.1.1.646
         State: Oper; Msgs sent/rcvd: 16/16; Downstream
         Up time: 00:01:32
         LDP discovery sources:
           FastEthernet0/0, Src IP addr: 2.2.13.3
         Addresses bound to peer LDP Ident:
           2.2.13.3        2.2.34.3        3.3.3.3        
     Peer LDP Ident: 5.5.5.5:0; Local LDP Ident 1.1.1.1:0
         TCP connection: 5.5.5.5.47879 - 1.1.1.1.646
         State: Oper; Msgs sent/rcvd: 16/16; Downstream
         Up time: 00:01:31
         LDP discovery sources:
           FastEthernet0/1, Src IP addr: 2.2.15.5
         Addresses bound to peer LDP Ident:
           2.2.56.5        2.2.15.5        5.5.5.5 
            
 R1#show mpls forwarding-table
 Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
 tag    tag or VC   or Tunnel Id      switched   interface             
 16     17          2.2.2.2/32        0          Fa0/0      2.2.13.3    
 17     19          2.2.24.0/24       0          Fa0/0      2.2.13.3    
 18     20          2.2.26.0/24       0          Fa0/1      2.2.15.5    
 19     Pop tag     2.2.34.0/24       0          Fa0/0      2.2.13.3    
 20     Pop tag     2.2.56.0/24       0          Fa0/1      2.2.15.5    
 21     Pop tag     3.3.3.3/32        0          Fa0/0      2.2.13.3    
 22     22          4.4.4.4/32        0          Fa0/0      2.2.13.3    
 23     Pop tag     5.5.5.5/32        0          Fa0/1      2.2.15.5    
 24     24          6.6.6.6/32        0          Fa0/1      2.2.15.5
 
 R3#show mpls ldp nei
     Peer LDP Ident: 4.4.4.4:0; Local LDP Ident 3.3.3.3:0
         TCP connection: 4.4.4.4.43693 - 3.3.3.3.646
         State: Oper; Msgs sent/rcvd: 18/18; Downstream
         Up time: 00:02:48
         LDP discovery sources:
           FastEthernet0/1, Src IP addr: 2.2.34.4
         Addresses bound to peer LDP Ident:
           2.2.34.4        2.2.24.4        4.4.4.4        
     Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 3.3.3.3:0
         TCP connection: 1.1.1.1.646 - 3.3.3.3.59300
         State: Oper; Msgs sent/rcvd: 17/17; Downstream
         Up time: 00:02:19
         LDP discovery sources:
           FastEthernet0/0, Src IP addr: 2.2.13.1
         Addresses bound to peer LDP Ident:
           2.2.13.1        2.2.15.1        1.1.1.1 
 
 R3#show mpls forwarding-table
 Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
 tag    tag or VC   or Tunnel Id      switched   interface             
 16     Pop tag     1.1.1.1/32        54         Fa0/0      2.2.13.1    
 17     17          2.2.2.2/32        792        Fa0/1      2.2.34.4    
 18     Pop tag     2.2.15.0/24       0          Fa0/0      2.2.13.1    
 19     Pop tag     2.2.24.0/24       0          Fa0/1      2.2.34.4    
 20     20          2.2.26.0/24       0          Fa0/1      2.2.34.4    
 21     20          2.2.56.0/24       0          Fa0/0      2.2.13.1    
 22     Pop tag     4.4.4.4/32        58         Fa0/1      2.2.34.4    
 23     23          5.5.5.5/32        0          Fa0/0      2.2.13.1    
 24     24          6.6.6.6/32        0          Fa0/1      2.2.34.4    
        24          6.6.6.6/32        0          Fa0/0      2.2.13.1
 
 
 R4#show mpls ldp nei
     Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 4.4.4.4:0
         TCP connection: 3.3.3.3.646 - 4.4.4.4.43693
         State: Oper; Msgs sent/rcvd: 20/20; Downstream
         Up time: 00:04:44
         LDP discovery sources:
           FastEthernet0/0, Src IP addr: 2.2.34.3
         Addresses bound to peer LDP Ident:
           2.2.13.3        2.2.34.3        3.3.3.3        
     Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 4.4.4.4:0
         TCP connection: 2.2.2.2.646 - 4.4.4.4.33283
         State: Oper; Msgs sent/rcvd: 20/27; Downstream
         Up time: 00:04:28
         LDP discovery sources:
           FastEthernet0/1, Src IP addr: 2.2.24.2
         Addresses bound to peer LDP Ident:
           2.2.24.2        2.2.26.2        2.2.2.2         2.2.3.2        
           2.2.4.2         2.2.5.2         2.2.6.2         2.2.7.2        
           2.2.8.2         2.2.9.2        
 R4#
 
 R4#show mpls forwarding-table 
 Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop   
 tag    tag or VC   or Tunnel Id      switched   interface             
 16     16          1.1.1.1/32        222        Fa0/0      2.2.34.3    
 17     Pop tag     2.2.2.2/32        2234       Fa0/1      2.2.24.2    
 18     Pop tag     2.2.13.0/24       0          Fa0/0      2.2.34.3    
 19     18          2.2.15.0/24       0          Fa0/0      2.2.34.3    
 20     Pop tag     2.2.26.0/24       0          Fa0/1      2.2.24.2    
 21     20          2.2.56.0/24       0          Fa0/1      2.2.24.2    
 22     Pop tag     3.3.3.3/32        0          Fa0/0      2.2.34.3    
 23     23          5.5.5.5/32        0          Fa0/0      2.2.34.3    
        23          5.5.5.5/32        0          Fa0/1      2.2.24.2    
 24     24          6.6.6.6/32        0          Fa0/1      2.2.24.2
 
 R1#ping 2.2.3.2 so lo0
 
 Type escape sequence to abort.
 Sending 5, 100-byte ICMP Echos to 2.2.3.2, timeout is 2 seconds:
 Packet sent with a source address of 1.1.1.1
 !!!!!
 Success rate is 100 percent (5/5), round-trip min/avg/max = 52/57/68 ms
 R1#traceroute 2.2.3.2 so lo0
 
 Type escape sequence to abort.
 Tracing the route to 2.2.3.2
 
   1 2.2.13.3 [MPLS: Label 17 Exp 0] 60 msec 64 msec 60 msec
   2 2.2.34.4 [MPLS: Label 17 Exp 0] 64 msec 60 msec 64 msec
   3 2.2.24.2 64 msec 56 msec 60 msec

Conclusion

Although this isn’t an overly difficult routing problem to solve, it does show that there are many different options to solve it.  However, as the size of the network increases and the number of BGP routes increases it becomes more and more efficient to run an MPLS-enabled BGP-free core.  In this case, you could run more expensive scalable hardware on the PE routers and focus on simple and fast routing on the P routers.   Nearly all configuration and troubleshooting in these types of networks happens at the PE routers.  The P routers become very static from a configuration standpoint reducing the amount of mistakes that could be made on them.

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s