MPLS Forwarding Adjacency

Posted on April 10, 2010

Sometimes it can be useful to set up a MPLS Traffic Engineering tunnel between sites, but did you ever notice that by default the IGP will not consider those tunnels for traffic ?
Did you ever try to change the OSPF cost of tunnel to force it to take traffic ? And it didn’t work right ?

Lets check that. We have a 7 routers setup, R1 and R7 will never be able to run MPLS Traffic Engineering they’ll just be plain MPLS/OSPF. I changed the cost of the links between routers R2 and R3, routers R3 and R4 and finally routers R5 and R6 so in all cases they should be the least preferred links (I put an OSPF cost of 1000). On the MPLS Traffic Engineering tunnel side I forced a path R2 – R3 – R4 and another path for R5 – R6, these tunnels are bi-directional.


First of all lets see our cost configs, our first path will be R1 – R2 – R3 – R4 – R7
R1

R1#sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.1.1/32        1     LOOP  0/0
Gi2/0        1     0               74.3.15.1/24       1     DR    1/1
Gi1/0        1     0               74.3.12.1/24       1     BDR   1/1

R2

R2(config-if)#do sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.2.2/32        1     LOOP  0/0
Tu0          1     0               Unnumbered Lo0     10    P2P   0/0
Gi2/0        1     0               74.3.23.2/24       1     BDR   1/1
Gi1/0        1     0               74.3.12.2/24       1     DR    1/1

R3

3(config-if)#do sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.3.3/32        1     LOOP  0/0
Gi2/0        1     0               74.3.34.3/24       1000  BDR   1/1
Gi1/0        1     0               74.3.23.3/24       1000  DR    1/1

R4

R4(config-if)#do sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.4.4/32        1     LOOP  0/0
Tu0          1     0               Unnumbered Lo0     10    P2P   0/0
Gi2/0        1     0               74.3.47.4/24       1     DR    1/1
Gi1/0        1     0               74.3.34.4/24       1     DR    1/1

R7

R7(config-router)#do sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.7.7/32        1     LOOP  0/0
Gi1/0        1     0               74.3.47.7/24       1     BDR   1/1
Gi2/0        1     0               74.3.67.7/24       1     DR    1/1

And our second path R1 – R5 – R6 – R7
R1

R1#sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.1.1/32        1     LOOP  0/0
Gi2/0        1     0               74.3.15.1/24       1     DR    1/1
Gi1/0        1     0               74.3.12.1/24       1     BDR   1/1

R5

R5(config-if)#do sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.5.5/32        1     LOOP  0/0
Tu0          1     0               Unnumbered Lo0     100   P2P   0/0
Gi2/0        1     0               74.3.56.5/24       1000  BDR   1/1
Gi1/0        1     0               74.3.15.5/24       1     BDR   1/1

R6

R6(config-if)#do sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.6.6/32        1     LOOP  0/0
Tu0          1     0               Unnumbered Lo0     100   P2P   0/0
Gi2/0        1     0               74.3.67.6/24       1     BDR   1/1
Gi1/0        1     0               74.3.56.6/24       1000  DR    1/1

R7

R7(config-router)#do sh ip ospf int br
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               54.1.7.7/32        1     LOOP  0/0
Gi1/0        1     0               74.3.47.7/24       1     BDR   1/1
Gi2/0        1     0               74.3.67.7/24       1     DR    1/1

So from those metrics what should be the path? If it was with normal links we should have something like R1 – R2 – R4 – R7 (the TE links go over R3 so it shouldn’t be taken in consideration). Lets check if I’m right

R1#sh ip route
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, + - replicated route

Gateway of last resort is not set

      54.0.0.0/32 is subnetted, 7 subnets
C        54.1.1.1 is directly connected, Loopback0
O        54.1.2.2 [110/2] via 74.3.12.2, 00:37:15, GigabitEthernet1/0
O        54.1.3.3 [110/3] via 74.3.12.2, 00:37:15, GigabitEthernet1/0
O        54.1.4.4 [110/1003] via 74.3.12.2, 00:19:55, GigabitEthernet1/0
O        54.1.5.5 [110/2] via 74.3.15.5, 00:35:05, GigabitEthernet2/0
O        54.1.6.6 [110/1002] via 74.3.15.5, 00:19:55, GigabitEthernet2/0
O        54.1.7.7 [110/1003] via 74.3.15.5, 00:19:55, GigabitEthernet2/0
      74.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
C        74.3.12.0/24 is directly connected, GigabitEthernet1/0
L        74.3.12.1/32 is directly connected, GigabitEthernet1/0
C        74.3.15.0/24 is directly connected, GigabitEthernet2/0
L        74.3.15.1/32 is directly connected, GigabitEthernet2/0
O        74.3.23.0/24 [110/2] via 74.3.12.2, 00:37:17, GigabitEthernet1/0
O        74.3.34.0/24 [110/1002] via 74.3.12.2, 00:19:57, GigabitEthernet1/0
O        74.3.47.0/24 [110/1003] via 74.3.12.2, 00:19:57, GigabitEthernet1/0
O        74.3.56.0/24 [110/1001] via 74.3.15.5, 00:23:52, GigabitEthernet2/0
O        74.3.67.0/24 [110/1002] via 74.3.15.5, 00:19:57, GigabitEthernet2/0

Looks like I’m totally wrong …
As we can see even tough I brought up the cost to make our TE tunnel look more attractive it wont take traffic. OSPF will ignore the MPLS Traffic Engineering tunnel the link will not come in the OSPF database.

R1#sh ip ospf database router adv-router 54.1.2.2

            OSPF Router with ID (54.1.1.1) (Process ID 1)

		Router Link States (Area 0)

  LS age: 1430
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 54.1.2.2
  Advertising Router: 54.1.2.2
  LS Seq Number: 80000011
  Checksum: 0xAD1E
  Length: 60
  Number of Links: 3

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 54.1.2.2
     (Link Data) Network Mask: 255.255.255.255
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 74.3.23.3
     (Link Data) Router Interface address: 74.3.23.2
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 74.3.12.2
     (Link Data) Router Interface address: 74.3.12.2
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

Hopefully for us MPLS Forwarding Adjacency is there with a magical command that can save our life’s … tunnel mpls traffic-eng forwarding-adjacency this command will tell the IGP to consider the MPLS Traffic Engineering tunnel as a link and not just a LSP.

Lets check that out, I’ll just enable this command on my 4 tunnel interfaces

R5(config-if)#int tun0
R5(config-if)#tunnel mpls traffic-eng forwarding-adjacency

Now lets check our routing table on R1

R1#sh ip route
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, + - replicated route

Gateway of last resort is not set

      54.0.0.0/32 is subnetted, 7 subnets
C        54.1.1.1 is directly connected, Loopback0
O        54.1.2.2 [110/2] via 74.3.12.2, 00:45:31, GigabitEthernet1/0
O        54.1.3.3 [110/3] via 74.3.12.2, 00:45:31, GigabitEthernet1/0
O        54.1.4.4 [110/12] via 74.3.12.2, 00:00:36, GigabitEthernet1/0
O        54.1.5.5 [110/2] via 74.3.15.5, 00:43:21, GigabitEthernet2/0
O        54.1.6.6 [110/14] via 74.3.12.2, 00:00:36, GigabitEthernet1/0
O        54.1.7.7 [110/13] via 74.3.12.2, 00:00:36, GigabitEthernet1/0
      74.0.0.0/8 is variably subnetted, 9 subnets, 2 masks
C        74.3.12.0/24 is directly connected, GigabitEthernet1/0
L        74.3.12.1/32 is directly connected, GigabitEthernet1/0
C        74.3.15.0/24 is directly connected, GigabitEthernet2/0
L        74.3.15.1/32 is directly connected, GigabitEthernet2/0
O        74.3.23.0/24 [110/2] via 74.3.12.2, 00:45:33, GigabitEthernet1/0
O        74.3.34.0/24 [110/12] via 74.3.12.2, 00:00:38, GigabitEthernet1/0
O        74.3.47.0/24 [110/12] via 74.3.12.2, 00:00:38, GigabitEthernet1/0
O        74.3.56.0/24 [110/1001] via 74.3.15.5, 00:32:08, GigabitEthernet2/0
O        74.3.67.0/24 [110/13] via 74.3.12.2, 00:00:38, GigabitEthernet1/0

Fantastic check these metrics! As you can see OSPF now considers our TE tunnel for traffic and as our tunnel (virtually) doesn’t take the path trough the links we modified it’s now preferred.

R1#sh ip ospf database router adv-router 54.1.2.2

            OSPF Router with ID (54.1.1.1) (Process ID 1)

		Router Link States (Area 0)

  LS age: 9
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 54.1.2.2
  Advertising Router: 54.1.2.2
  LS Seq Number: 80000013
  Checksum: 0x3338
  Length: 72
  Number of Links: 4

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 54.1.4.4
     (Link Data) Router Interface address: 0.0.0.7
      Number of MTID metrics: 0
       TOS 0 Metrics: 10

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 54.1.2.2
     (Link Data) Network Mask: 255.255.255.255
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 74.3.23.3
     (Link Data) Router Interface address: 74.3.23.2
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 74.3.12.2
     (Link Data) Router Interface address: 74.3.12.2
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

And OSPF clearly sees a direct link from R2 to R4.

Another command for your CCIE toolbox!


No Replies to "MPLS Forwarding Adjacency"


    Got something to say?

    Some html is OK