So routes in an MPLS cisco router can have the following codes; the highlighted ones are the most common I see:
Codes:
- L - local
- 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
- H - NHRP
- l - LISP
- + - replicated route
- % - next hop override
As elsewhere, you can see the routes by:
show ip route
Or you can search for a route by (ie search for routes to 10.116.x.x):
show ip route | incude 10.116
To add a route to the MPLS router nodes, the route must be added as a STATIC route to the node that is LOCAL to the subnet.
For example, we add a new node to the MPLS network. That new node has the following network as a LOCAL subnet: 10.116.0.10/32.
This network would show as the following:
L 10.116.0.10/32 is directly connected, GigabitEthernet0/1
The new node also has the following network as a subnet 10.116.15.0/24. The problem is that while the subnet at the location will already know about the subnet, the other locations will not know about the subnet until it is advertised/distributed across the MPLS network routers.
If you try to traceroute a address on the new subnet from a different location, the other routers will not know what to do and bounce the packet to the default route, causing a loop/bounce.
As stated above, to resolve, the STATIC route must be added to the router where the subnet is located:
S 10.116.15.0/24 [1/0] via 10.116.1.1
To add a static route:
enable
config t
ip route 10.116.15.0 255.255.255.0 10.116.1.1
(note that CIDR doesn't work. ie: ip route 10.251.10.0/24 10.162.100.2)
Once that is added, the other routers will pickup the route as a BGP route:
B 10.116.15.0/24 [20/0] via 10.162.131.38
B routes (BGP) will pick up routes from their neighbor. You can view by:
show ip bgp
O routes (OSPF routes) will pick up routes as well. You can view by:
show ip ospf