TSHOOT – Redistribution Part 5 – The OSPF / EIGRP / BGP / Redistribution lab!

Redis_Base_Final

To round off Redistribution series of posts for Dynamic Routing Redistribution, what better way to drive it home, than to Redistribute every Dynamic Routing Domain into every other one and see what we can break?

There will be a LOT of output from this lab to demonstrate how to verify and configure / troubleshoot everything Redistribution, so brace for lots of labbing derps and fixing of said labbing derps! ūüôā

I will color code each Protocol for clarity like OSPF EIGRP and BGP !

So in the route table even if something shows it is known by one protocol, if it is blue (ospf) orange (eigrp) or brown (bgp) that means it is a route from the routing domain corresponding with those colors!

Its been forever since I’ve labbed Route Redistribution, so lets start on R1

First to verify whats going on with R1:

R1(config)#do sh ip proto
*** IP Routing is NSF aware ***

Routing Protocol is “eigrp 100”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Default networks flagged in outgoing updates
Default networks accepted from incoming updates
EIGRP-IPv4 Protocol for AS(100)
Metric weight K1=1, K2=0, K3=1, K4=0, K5=0
NSF-aware route hold timer is 240
EIGRP NSF disabled
NSF signal timer is 20s
NSF converge timer is 120s
Router-ID: 11.11.11.1
Topology : 0 (base)
Active Timer: 3 min
Distance: internal 90 external 170
Maximum path: 4
Maximum hopcount 100
Maximum metric variance 1

Automatic Summarization: disabled
Maximum path: 4
Routing for Networks:
10.1.13.0/30
11.11.11.0/24
Routing Information Sources:
Gateway Distance Last Update
Distance: internal 90 external 170

Routing Protocol is “ospf 1”
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 1.1.1.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.1.12.0 0.0.0.3 area 0
Routing Information Sources:
Gateway Distance Last Update
2.2.2.2 110 00:55:23
Distance: (default is 110)

R1(config)#do 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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.1.12.0/30 is directly connected, FastEthernet1/0/1
L 10.1.12.1/32 is directly connected, FastEthernet1/0/1
C 10.1.13.0/30 is directly connected, FastEthernet1/0/3
L 10.1.13.1/32 is directly connected, FastEthernet1/0/3
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.11.11.0/24 is directly connected, Loopback1
L 11.11.11.1/32 is directly connected, Loopback1
22.0.0.0/32 is subnetted, 1 subnets
O IA 22.22.22.2 [110/2] via 10.1.12.2, 01:00:41, FastEthernet1/0/1
R1(config)#

R1(config)#do sh ip eigrp nei

EIGRP-IPv4 Neighbors for AS(100)
H Address    Interface   Hold     Uptime       SRTT   RTO  Q   Seq
0   10.1.13.2      Fa1/0/3      14         01:02:21        1        4500  0     3
R1(config)#do sh ip ospf nei

Neighbor ID   Pri       State     Dead Time   Address        Interface
2.2.2.2                 1    FULL/DR     00:00:38      10.1.12.2    FastEthernet1/0/1
R1(config)#

OSPF and EIGRP Neighbor Adjacencies are up, we have our Inter-Area OSPF Route 22.22.22.0/24 in the Route Table, time to redistribute EIGRP and OSPF:

R1(config)#router ospf 1
R1(config-router)#redistribute eigrp ?
<1-65535> AS number

R1(config-router)#redistribute eigrp 100 ?
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
nssa-only Limit redistributed routes to NSSA areas
route-map Route map reference
subnets Consider subnets for redistribution into OSPF
tag Set tag for routes redistributed into OSPF
<cr>

R1(config-router)#redistribute eigrp 100 tag ?
<0-4294967295> 32-bit tag value

R1(config-router)#redistribute eigrp 100 tag 100 ?
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
nssa-only Limit redistributed routes to NSSA areas
route-map Route map reference
subnets Consider subnets for redistribution into OSPF
<cr>

R1(config-router)#redistribute eigrp 100 tag 100 subnets ?
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
nssa-only Limit redistributed routes to NSSA areas
route-map Route map reference
<cr>

R1(config-router)#$e eigrp 100 tag 100 subnets metric-type ?
1 Set OSPF External Type 1 metrics
2 Set OSPF External Type 2 metrics

R1(config-router)#redistribute eigrp 100 tag 170 subnets metric-type 1 ?
metric Metric for redistributed routes
nssa-only Limit redistributed routes to NSSA areas
route-map Route map reference
<cr>

This configuration could work, though it would still require a Route-Map to filter OSPF Routes being Redistributed into EIGRP from coming back into OSPF, so therefore I will need a Route-Map and will use them to set tags in all Redistribution points to keep things consistent and intuitive throughout this lab!

R1(config)#route-map EIGRP2OSPF deny 10
R1(config-route-map)#match tag 110
R1(config-route-map)#route-map EIGRP2OSPF permit 20
R1(config-route-map)#set tag 170
R1(config-route-map)#set metric-type ?
external IS-IS external metric
internal IS-IS internal metric or Use IGP metric as the MED for BGP
type-1 OSPF external type 1 metric
type-2 OSPF external type 2 metric

R1(config-route-map)#set metric-type type-1
R1(config-route-map)#exit
R1(config)#do sh route
route-map EIGRP2OSPF, deny, sequence 10
Match clauses:
tag 110
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP2OSPF, permit, sequence 20
Match clauses:
Set clauses:
metric-type type-1
tag 170
Policy routing matches: 0 packets, 0 bytes
R1(config)#

This Route-Map for Redistribution when applied EIGRP->OSPF:

  1. Drop routes tagged with value of 110 (to be OSPF tag)
  2. Match Any routes, set Metric to Type-1 (non-default seed metric), set tag 170
  3. Implicit Deny All (Does nothing because Sequence 20 matches any with permit!)

Now a Route-Map for OSPF->EIGRP:

R1(config)#route-map OSPF2EIGRP deny 10
R1(config-route-map)#match tag 170
R1(config-route-map)#route-map OSPF2EIGRP permit 20
R1(config-route-map)#set tag 110
R1(config-route-map)#exit
R1(config)#do sh route OSPF2EIGRP
route-map OSPF2EIGRP, deny, sequence 10
Match clauses:
tag 170
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map OSPF2EIGRP, permit, sequence 20
Match clauses:
Set clauses:
tag 110
Policy routing matches: 0 packets, 0 bytes
R1(config)#

This one is purely Route-Filtering and Route-Tagging for the 2-way Redistribution, now its time to put them to use!

R1(config)#router ospf 1
R1(config-router)#redistribute eigrp 100 ?
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
nssa-only Limit redistributed routes to NSSA areas
route-map Route map reference
subnets Consider subnets for redistribution into OSPF
tag Set tag for routes redistributed into OSPF
<cr>

R1(config-router)#redistribute eigrp 100 subnets route-map EIGRP2OSPF ?
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
nssa-only Limit redistributed routes to NSSA areas
tag Set tag for routes redistributed into OSPF
<cr>

R1(config-router)#redistribute eigrp 100 subnets route-map EIGRP2OSPF
R1(config-router)#

And now to configure EIGRP for Redistribution on R1:

R1(config-router)#router eigrp 100
R1(config-router)#redistribute ospf 1 ?
match Redistribution of OSPF routes
metric Metric for redistributed routes
route-map Route map reference
<cr>

R1(config-router)#redistribute ospf 1 metric ?
<1-4294967295> Bandwidth metric in Kbits per second

R1(config-router)#redistribute ospf 1 metric 1000 ?
<0-4294967295> EIGRP delay metric, in 10 microsecond units

R1(config-router)#redistribute ospf 1 metric 1000 10 ?
<0-255> EIGRP reliability metric where 255 is 100% reliable

R1(config-router)#redistribute ospf 1 metric 1000 10 5 ?
<1-255> EIGRP Effective bandwidth metric (Loading) where 255 is 100% loaded

R1(config-router)#redistribute ospf 1 metric 1000 10 5 255 ?
<1-65535> EIGRP MTU of the path

R1(config-router)#redistribute ospf 1 metric 1000 10 5 255 1500 ?
match Redistribution of OSPF routes
route-map Route map reference
<cr>

R1(config-router)#redistribute ospf 1 metric 1000 10 5 255 1500 route-map ?
WORD Pointer to route-map entries

R1(config-router)#$e ospf 1 metric 1000 10 5 255 1500 route-map OSPF2EIGRP ?
match Redistribution of OSPF routes
<cr>

R1(config-router)#$etric 1000 10 5 255 1500 route-map OSPF2EIGRP match ?
external Redistribute OSPF external routes
internal Redistribute OSPF internal routes
nssa-external Redistribute OSPF NSSA external routes

R1(config-router)#$ 10 5 255 1500 route-map OSPF2EIGRP match internal
R1(config-router)#

This ensures that only OSPF Inter-Area and Intra-Area routes will be Redistributed, as BGP will only Redistribute External Routes by default, so if I were to redistribute BGP into OSPF after Redistributing EIGRP into BGP… well… it could get messy!

So lets check out R2 and R3 to see what routes they are now seeing:

R2#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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback22
3.0.0.0/32 is subnetted, 1 subnets
S 3.3.3.3 [1/0] via 10.1.23.2
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C 10.1.12.0/30 is directly connected, FastEthernet1/0/1
L 10.1.12.2/32 is directly connected, FastEthernet1/0/1
O E1 10.1.13.0/30 [110/21] via 10.1.12.1, 00:00:06, FastEthernet1/0/1
C 10.1.23.0/30 is directly connected, FastEthernet1/0/2
L 10.1.23.1/32 is directly connected, FastEthernet1/0/2
11.0.0.0/24 is subnetted, 1 subnets
O E1 11.11.11.0 [110/21] via 10.1.12.1, 00:00:06, FastEthernet1/0/1
22.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 22.22.22.0/24 is directly connected, Loopback2
L 22.22.22.2/32 is directly connected, Loopback2
R2#

Note the seed metric is NOT 20, meaning the default redistribution metric-type 2 or E2 was not used, lets take a look at R3 to see what new external routes IT has:

R3#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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 10.1.23.1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback33
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D EX 10.1.12.0/30 [170/2565120] via 10.1.13.1, 00:02:43, FastEthernet1/0/3
C 10.1.13.0/30 is directly connected, FastEthernet1/0/3
L 10.1.13.2/32 is directly connected, FastEthernet1/0/3
C 10.1.23.0/30 is directly connected, FastEthernet1/0/2
L 10.1.23.2/32 is directly connected, FastEthernet1/0/2
11.0.0.0/24 is subnetted, 1 subnets
D 11.11.11.0 [90/156160] via 10.1.13.1, 00:02:43, FastEthernet1/0/3
22.0.0.0/32 is subnetted, 1 subnets
D EX 22.22.22.2 [170/2565120] via 10.1.13.1, 00:02:01, FastEthernet1/0/3
33.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 33.33.33.0/24 is directly connected, Loopback3
L 33.33.33.3/32 is directly connected, Loopback3
R3#

And just to kind of round this out, lets take a look at their respective routing process tables as well on R2 and R3:

R2#sh ip ospf data

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

                Router Link States (Area 0)

Link ID    ADV Router       Age      Seq#               Checksum   Link count
1.1.1.1          1.1.1.1             261     0x80000003      0x009560     1
2.2.2.2           2.2.2.2            260     0x80000003      0x005499     1

Net Link States (Area 0)

Link ID     ADV Router      Age      Seq#                 Checksum
10.1.12.2      2.2.2.2              260      0x80000001    0x00A06F

Summary Net Link States (Area 0)

Link ID      ADV Router     Age       Seq#                  Checksum
22.22.22.2    2.2.2.2             305      0x80000001      0x0028C7

Router Link States (Area 22)

Link ID    ADV Router      Age      Seq#               Checksum      Link count
2.2.2.2      2.2.2.2                301      0x80000002    0x008952            1

Summary Net Link States (Area 22)

Link ID    ADV Router Age          Seq#               Checksum
10.1.12.0    2.2.2.2         301       0x80000001       0x0032ED

Summary ASB Link States (Area 22)

Link ID    ADV Router    Age       Seq#              Checksum
1.1.1.1          2.2.2.2           255     0x80000001      0x001B14

Type-5 AS External Link States

Link ID      ADV Router    Age          Seq#            Checksum   Tag
10.1.13.0     1.1.1.1             301       0x80000001   0x001647     170
11.11.11.0   1.1.1.1             311       0x80000001   0x00B898     170
R2#

All the internal LSA Types, and at the very end is our EIGRP External Routes, most notably spotted (outside the Type-5 right in the table) by its tag of 170!

R3#sh ip eigrp top
EIGRP-IPv4 Topology Table for AS(100)/ID(33.33.33.3)
Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply,
r – reply Status, s – sia Status

P 10.1.12.0/30, 1 successors, FD is 2565120, tag is 110
via 10.1.13.1 (2565120/2562560), FastEthernet1/0/3
P 10.1.13.0/30, 1 successors, FD is 28160
via Connected, FastEthernet1/0/3
P 22.22.22.2/32, 1 successors, FD is 2565120, tag is 110
via 10.1.13.1 (2565120/2562560), FastEthernet1/0/3
P 11.11.11.0/24, 1 successors, FD is 156160
via 10.1.13.1 (156160/128256), FastEthernet1/0/3

R3#

And here we see the TAG of 110 indicating the OSPF routes in the EIGRP domain.

Now to Redistribute BGP into OSPF and EIGRP, I am not entirely sure what will happen per the quirks of BGP, but first to make route-maps on R3 to set for Route-Tagging:

Very important Route-Map concept I am bout to drop here!!!

R3(config)#route-map EIGRP2BGP deny 10
R3(config-route-map)#match tag 110
R3(config-route-map)#match tag 200
R3(config-route-map)#route-map EIGRP2BGP permit 20
R3(config-route-map)#set tag 170
R3(config-route-map)#exit
R3(config)#route-map BGP2EIGRP deny 10
R3(config-route-map)#match tag 110
R3(config-route-map)#match tag 170
R3(config-route-map)#route-map BGP2EIGRP permit 20
R3(config-route-map)#set tag 200
R3(config-route-map)#exit
R3(config)#do sh route
route-map EIGRP2BGP, deny, sequence 10
Match clauses:
tag 110 200
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP2BGP, permit, sequence 20
Match clauses:
Set clauses:
tag 170
Policy routing matches: 0 packets, 0 bytes
route-map BGP2EIGRP, deny, sequence 10
Match clauses:
tag 110 170
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map BGP2EIGRP, permit, sequence 20
Match clauses:
Set clauses:
tag 200
Policy routing matches: 0 packets, 0 bytes
R3(config)#

In the first Route-Map the Tags 110 and and 200 are denied in the first clause from going back into EIGRP, as I will be Redistributing OSPF into BGP from R2, however there is a deeper point here.

When OSPF Redistributes into BGP by default it will only Redistribute its internal routes, so I will NOT NEED a Route-Map for that Redistribution, as I can set the tag right on the Redistribute line in OSPF! However from BGP2OSPF will require a route-map to filter 170 tagged routes (EIGRP) as it already knows about those, and that is how routing loops form when there are multiple points of Redistribution flying around ūüôā

Now for some EIGRP to BGP Redistribution!

R3(config)#router eigrp 100
R3(config-router)#redistribute bgp 100 ?
metric Metric for redistributed routes
route-map Route map reference
<cr>

R3(config-router)#$e bgp 100 metric 1000 10 5 255 1500 route-map BGP2EIGRP ?
<cr>

R3(config-router)#$e bgp 100 metric 1000 10 5 255 1500 route-map BGP2EIGRP
R3(config-router)#

One thing I did not think about until I entered this, is that EIGRP is sharing External routes into OSPF via R1, so Redistribution from BGP probably actually will not be needed in this case! (Though I will still look at the CLI options for it anyways)

R3(config-router)#redistribute eigrp 100 route-map EIGRP2BGP
% “EIGRP2BGP” used as redistribute eigrp into bgp route-map, set tag not supported
R3(config-router)#

I think in CLI language, R3 just told me “You got served sucka!”

I had no idea Route-Map tags were not permitted into BGP, lets see if it just completely kicked that command out:

R3(config-router)#do sh run | sec router bgp
router bgp 100
bgp log-neighbor-changes
network 10.1.23.0 mask 255.255.255.252
network 33.33.33.0 mask 255.255.255.0
redistribute eigrp 100 route-map EIGRP2BGP <— Thar she blows
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback33
R3(config-router)#

Hmmm. So lets see whats up on R2 and 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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C 10.1.12.0/30 is directly connected, FastEthernet1/0/1
L 10.1.12.1/32 is directly connected, FastEthernet1/0/1
C 10.1.13.0/30 is directly connected, FastEthernet1/0/3
L 10.1.13.1/32 is directly connected, FastEthernet1/0/3
D EX 10.1.23.0/30 [170/2565120] via 10.1.13.2, 00:06:28, FastEthernet1/0/3 <– BGP!!!
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.11.11.0/24 is directly connected, Loopback1
L 11.11.11.1/32 is directly connected, Loopback1
22.0.0.0/32 is subnetted, 1 subnets
O IA 22.22.22.2 [110/2] via 10.1.12.2, 00:35:53, FastEthernet1/0/1
33.0.0.0/24 is subnetted, 1 subnets
D EX 33.33.33.0 [170/2565120] via 10.1.13.2, 00:06:28, FastEthernet1/0/3 <– BGP!!!
R1#

Our 2 BGP “network” statements have successfully Redistributed across EIGRP to R1, though I am curious to see them in the EIGRP Topology Table:

R1#sh ip eigrp top
EIGRP-IPv4 Topology Table for AS(100)/ID(11.11.11.1)
Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply,
r – reply Status, s – sia Status

P 10.1.12.0/30, 1 successors, FD is 2562560, tag is 110
via Redistributed (2562560/0)
P 10.1.23.0/30, 1 successors, FD is 2565120, tag is 200
via 10.1.13.2 (2565120/2562560), FastEthernet1/0/3
P 10.1.13.0/30, 1 successors, FD is 28160
via Connected, FastEthernet1/0/3
P 22.22.22.2/32, 1 successors, FD is 2562560, tag is 110
via Redistributed (2562560/0)
P 11.11.11.0/24, 1 successors, FD is 128256
via Connected, Loopback1
P 33.33.33.0/24, 1 successors, FD is 2565120, tag is 200
via 10.1.13.2 (2565120/2562560), FastEthernet1/0/3

R1#

One thing to note between the “sh ip eigrp top” from R3 and R1, is that it only shows the route as “via Redistributed” on the Boundary Router itself, whereas on R3 it did not show any sign of Redistribution outside of the Tag set in the Topology table.

Now over to R2 to see whats happenin:

R2#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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback22
3.0.0.0/32 is subnetted, 1 subnets
S 3.3.3.3 [1/0] via 10.1.23.2
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C 10.1.12.0/30 is directly connected, FastEthernet1/0/1
L 10.1.12.2/32 is directly connected, FastEthernet1/0/1
O E1 10.1.13.0/30 [110/21] via 10.1.12.1, 00:42:23, FastEthernet1/0/1
C 10.1.23.0/30 is directly connected, FastEthernet1/0/2
L 10.1.23.1/32 is directly connected, FastEthernet1/0/2 <—- NOT BGP!!!
11.0.0.0/24 is subnetted, 1 subnets
O E1 11.11.11.0 [110/21] via 10.1.12.1, 00:42:23, FastEthernet1/0/1
22.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 22.22.22.0/24 is directly connected, Loopback2
L 22.22.22.2/32 is directly connected, Loopback2
33.0.0.0/24 is subnetted, 1 subnets
O E1 33.33.33.0 [110/21] via 10.1.12.1, 00:12:58, FastEthernet1/0/1 <— EIGRP??!?!?!
R2#

These are perfect example of best route selected per AD!

I ran out of colors so I used a pretty pink to highlight these two routes that were once known by BGP (33.33.33.0/24 right across the R2-R3 link) and 10.1.23.0/30 (Directly Connected):

R2#sh ip ospf data

(output redacted)

Type-5 AS External Link States

Link ID      ADV Router Age       Seq#            Checksum   Tag
10.1.13.0      1.1.1.1          932     0x80000002   0x001448    170
10.1.23.0 ¬† ¬†¬† 1.1.1.1 ¬† ¬† ¬† ¬†¬† 1124 ¬† 0x80000001¬†¬† 0x00A7AB¬† 170¬† <— Backup!
11.11.11.0    1.1.1.1          932     0x80000002   0x00B699    170
33.33.33.0¬†¬†¬† 1.1.1.1 ¬† ¬† ¬† ¬†¬† 1124 ¬† 0x80000001¬†¬† 0x009D71 ¬†¬† 170 <—- Better AD than 200!
R2#

A prime example of best path selection via AD!

BGP’s AD being 200 is bested by EIGRPs External Route AD of 170, in fact there isn’t any other route type that can NOT beat BGP’s AD to a destination unless the “distance” command is used to manipulate it, which I will demonstrate right after THIS:

R2#traceroute 33.33.33.3
Type escape sequence to abort.
Tracing the route to 33.33.33.3
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.12.1 0 msec 0 msec 9 msec
2 10.1.13.2 0 msec * 0 msec
R2#

Maybe I’ll leave it like that while I redistribute OSPF into BGP to see what kind of chaos I reek upon this Redistribution lab, remember no Route-Map needed as OSPF should by default Redistribute only its Internal routes, and the Boundary Route R2 has a filter for that route-tag.

So here we go OSPF -> BGP:

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router bgp 100
R2(config-router)#redistribute ospf 1 ?
match Redistribution of OSPF routes
metric Metric for redistributed routes
route-map Route map reference
vrf VPN Routing/Forwarding Instance
<cr>

R2(config-router)#redistribute ospf 1

Crap.

I forgot OSPF allows a tag command in ITS redistribution, and BGP just yelled at me on R3 for even trying to set a tag in a Route-Map!

So, I am just going to just redistribute OSPF into BGP with no tags set, just to be an engine of routing chaos.

R2(config-router)#redistribute ospf 1

So lets go over to R3 first to see how its looking from over there:

R3#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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 10.1.23.1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback33
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D EX 10.1.12.0/30 [170/2565120] via 10.1.13.1, 01:03:29, FastEthernet1/0/3
C 10.1.13.0/30 is directly connected, FastEthernet1/0/3
L 10.1.13.2/32 is directly connected, FastEthernet1/0/3
C 10.1.23.0/30 is directly connected, FastEthernet1/0/2
L 10.1.23.2/32 is directly connected, FastEthernet1/0/2
11.0.0.0/24 is subnetted, 1 subnets
D 11.11.11.0 [90/156160] via 10.1.13.1, 01:03:29, FastEthernet1/0/3
22.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
B 22.22.22.0/24 [200/0] via 2.2.2.2, 00:01:12 <—————-Uhhhh, What??
D EX 22.22.22.2/32 <—- WHAT WHAT WHAT?!?!?!
[170/2565120] via 10.1.13.1, 01:02:47, FastEthernet1/0/3
33.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 33.33.33.0/24 is directly connected, Loopback3
L 33.33.33.3/32 is directly connected, Loopback3
R3#

Sooooo, somehow BGP’s AD of 200 was somehow preferred over EIGRP’s internal AD of 90 if I have that right, lets look at the EIGRP table:

R3#sh ip eigrp top
EIGRP-IPv4 Topology Table for AS(100)/ID(33.33.33.3)
Codes: P – Passive, A – Active, U – Update, Q – Query, R – Reply,
r – reply Status, s – sia Status

P 10.1.12.0/30, 1 successors, FD is 2565120, tag is 110
via 10.1.13.1 (2565120/2562560), FastEthernet1/0/3
P 10.1.23.0/30, 1 successors, FD is 2562560, tag is 200
via Redistributed (2562560/0)
P 10.1.13.0/30, 1 successors, FD is 28160
via Connected, FastEthernet1/0/3
P 22.22.22.2/32, 1 successors, FD is 2565120, tag is 110
via 10.1.13.1 (2565120/2562560), FastEthernet1/0/3
P 11.11.11.0/24, 1 successors, FD is 156160
via 10.1.13.1 (156160/128256), FastEthernet1/0/3
P 33.33.33.0/24, 1 successors, FD is 2562560, tag is 200
via Redistributed (2562560/0)

R3#

I’m a bit at a loss for words right now as to how EIGRP External Route is the preferred route to 22.22.22.2 on R2 (redistributed from OSPF -> EIGRP across R1).

R3#sh ip route 22.22.22.2
Routing entry for 22.22.22.2/32
Known via “eigrp 100”, distance 170, metric 2565120
Tag 110, type external
Redistributing via eigrp 100, bgp 100
Last update from 10.1.13.1 on FastEthernet1/0/3, 01:10:26 ago
Routing Descriptor Blocks:
* 10.1.13.1, from 10.1.13.1, 01:10:26 ago, via FastEthernet1/0/3
Route metric is 2565120, traffic share count is 1
Total delay is 200 microseconds, minimum bandwidth is 1000 Kbit
Reliability 5/255, minimum MTU 1500 bytes
Loading 255/255, Hops 1
Route tag 110
R3#

So it is tagged as 110 so it is an OSPF originated Route, Redistributed through R1, this for 22.22.22.2, however lets now look at the network 22.22.22.0:

R3#sh ip route 22.22.22.0
Routing entry for 22.22.22.0/24
Known via “bgp 100”, distance 200, metric 0, type internal
Redistributing via eigrp 100
Last update from 2.2.2.2 00:13:55 ago
Routing Descriptor Blocks:
* 2.2.2.2, from 2.2.2.2, 00:13:55 ago
Route metric is 0, traffic share count is 1
AS Hops 0
MPLS label: none
R3#

AhhhhhhhhhhhhhHa!

R3#sh ip route

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 10.1.23.1

GOTCHA!

Because this BGP Neighborship was formed using loopbacks and static routes pointing to said loopbacks, the network is available via the STATIC ROUTE which has a better AD than ANY Routing Protocols AD!

That through me through a loopedback. Another point of interest is 10.1.12.0/30 as this should be advertised as an OSPF internal route into BGP:

R3#sh ip route 10.1.12.0
Routing entry for 10.1.12.0/30
Known via “eigrp 100”, distance 170, metric 2565120
Tag 110, type external
Redistributing via eigrp 100, bgp 100
Last update from 10.1.13.1 on FastEthernet1/0/3, 01:22:51 ago
Routing Descriptor Blocks:
* 10.1.13.1, from 10.1.13.1, 01:22:51 ago, via FastEthernet1/0/3
Route metric is 2565120, traffic share count is 1
Total delay is 200 microseconds, minimum bandwidth is 1000 Kbit
Reliability 5/255, minimum MTU 1500 bytes
Loading 255/255, Hops 1
Route tag 110
R3#

Its known via EIGRP via OSPF Redistribution at R1, but why did it not redistribute through R2?

R2(config-router)#do sh run | sec router bgp
router bgp 100
bgp log-neighbor-changes
network 10.1.23.0 mask 255.255.255.252
redistribute ospf 1
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source Loopback22
R2(config-router)#

I will try specifying “internal” to prove myself a lying liar about OSPF redistributing internal routes by default, and see what happens:

R2(config-router)#no redistribute ospf 1
R2(config-router)#redistribute ospf 1 match internal
R2(config-router)#

And over on R3:

R3#sh ip route

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 10.1.23.1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback33
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D EX 10.1.12.0/30 [170/2565120] via 10.1.13.1, 01:27:19, FastEthernet1/0/3 <— Why???

Oohhhhh duh:

R2#sh ip route

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback22
3.0.0.0/32 is subnetted, 1 subnets
S 3.3.3.3 [1/0] via 10.1.23.2
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C 10.1.12.0/30 is directly connected, FastEthernet1/0/1
L 10.1.12.2/32 is directly connected, FastEthernet1/0/1

Its not an OSPF Route to be Redistributed!

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#redistribute ?
bgp Border Gateway Protocol (BGP)
connected Connected
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
isis ISO IS-IS
iso-igrp IGRP for OSI networks
maximum-prefix Maximum number of prefixes redistributed to protocol
mobile Mobile routes
odr On Demand stub Routes
ospf Open Shortest Path First (OSPF)
rip Routing Information Protocol (RIP)
static Static routes

R2(config-router)#redistribute connected
% Only classful networks will be redistributed¬†¬† <—derrrp
R2(config-router)#redistribute connected ?
metric Metric for redistributed routes
metric-type OSPF/IS-IS exterior metric type for redistributed routes
nssa-only Limit redistributed routes to NSSA areas
route-map Route map reference
subnets Consider subnets for redistribution into OSPF
tag Set tag for routes redistributed into OSPF
<cr>

R2(config-router)#redistribute connected subnets
R2(config-router)#

There we go, take that classful subnets, now lets take a glimpse at R3 once more…

R3#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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 10.1.23.1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback33
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D EX 10.1.12.0/30 [170/2565120] via 10.1.13.1, 01:32:07, FastEthernet1/0/3 <– NooOOO!
C 10.1.13.0/30 is directly connected, FastEthernet1/0/3
L 10.1.13.2/32 is directly connected, FastEthernet1/0/3
C 10.1.23.0/30 is directly connected, FastEthernet1/0/2
L 10.1.23.2/32 is directly connected, FastEthernet1/0/2
11.0.0.0/24 is subnetted, 1 subnets
D 11.11.11.0 [90/156160] via 10.1.13.1, 01:32:07, FastEthernet1/0/3
22.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
B 22.22.22.0/24 [200/0] via 2.2.2.2, 00:05:41
D EX 22.22.22.2/32
[170/2565120] via 10.1.13.1, 01:31:25, FastEthernet1/0/3
33.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 33.33.33.0/24 is directly connected, Loopback3
L 33.33.33.3/32 is directly connected, Loopback3
R3#

DOH! I don’t need to redistribute connected INTO OSPF, I NEED TO DO IT INTO BGP TO GET THE CONNECTED ROUTES OF R2 INTO BGP!

R2(config-router)#router bgp 100
R2(config-router)#redistribute ?
bgp Border Gateway Protocol (BGP)
connected Connected
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
isis ISO IS-IS
iso-igrp IGRP for OSI networks
mobile Mobile routes
odr On Demand stub Routes
ospf Open Shortest Path First (OSPF)
rip Routing Information Protocol (RIP)
static Static routes

R2(config-router)#redistribute connected ?
metric Metric for redistributed routes
route-map Route map reference
<cr>

R2(config-router)#redistribute connected
R2(config-router)#

BGP has NO CLASS! Therefore, needs no “subnets” command for those classless networks to be redistributed into it!

I still don’t entirely expect this to work, as by this logic the route will now have an AD of 200 via BGP anyways, but lets look for the heck of it:

R3#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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 10.1.23.1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback33
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D EX 10.1.12.0/30 [170/2565120] via 10.1.13.1, 01:36:18, FastEthernet1/0/3
C 10.1.13.0/30 is directly connected, FastEthernet1/0/3
L 10.1.13.2/32 is directly connected, FastEthernet1/0/3
C 10.1.23.0/30 is directly connected, FastEthernet1/0/2
L 10.1.23.2/32 is directly connected, FastEthernet1/0/2
11.0.0.0/24 is subnetted, 1 subnets
D 11.11.11.0 [90/156160] via 10.1.13.1, 01:36:18, FastEthernet1/0/3
22.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
B 22.22.22.0/24 [200/0] via 2.2.2.2, 00:09:52
D EX 22.22.22.2/32
[170/2565120] via 10.1.13.1, 01:35:36, FastEthernet1/0/3
33.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 33.33.33.0/24 is directly connected, Loopback3
L 33.33.33.3/32 is directly connected, Loopback3
R3#

I was just going to disconnect R3 from R1, but there is more logical way of doing this, and I probably can’t yank out cords on the TSHOOT exam:

R1(config)#route-map OSPF2EIGRP deny 15
R1(config-route-map)#match ip add 12
R1(config-route-map)#exit
R1(config)#access-list 12 permit 10.1.12.0 0.0.0.255
R1(config)#

Bwahahahahaaaa!!! I don’t even need to look at the route-map to know what I am about to see on R3:

R3#sh ip route 10.1.12.0
Routing entry for 10.1.12.0/30
Known via “bgp 100”, distance 200, metric 0, type internal
Redistributing via eigrp 100
Last update from 2.2.2.2 00:01:30 ago
Routing Descriptor Blocks:
* 2.2.2.2, from 2.2.2.2, 00:01:30 ago
Route metric is 0, traffic share count is 1
AS Hops 0
MPLS label: none
R3#

ROUTE MAP IN YOUR FACE EIGRP!

R3#sh ip route

Gateway of last resort is not set

2.0.0.0/32 is subnetted, 1 subnets
S 2.2.2.2 [1/0] via 10.1.23.1
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback33
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
B 10.1.12.0/30 [200/0] via 2.2.2.2, 00:02:49

Kapow! CCNP Ninja style! That is how you pass exams! ūüôā

I am about brain dead here after work / Reading BGP OCG / Watching CBT videos / labbing for a couple hours, but for the sake of rounding this off lets check out 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, H – NHRP, l – LISP
+ – replicated route, % – next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
C 10.1.12.0/30 is directly connected, FastEthernet1/0/1
L 10.1.12.1/32 is directly connected, FastEthernet1/0/1
C 10.1.13.0/30 is directly connected, FastEthernet1/0/3
L 10.1.13.1/32 is directly connected, FastEthernet1/0/3
D EX 10.1.23.0/30 [170/2565120] via 10.1.13.2, 00:49:47, FastEthernet1/0/3
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.11.11.0/24 is directly connected, Loopback1
L 11.11.11.1/32 is directly connected, Loopback1
22.0.0.0/32 is subnetted, 1 subnets
O IA 22.22.22.2 [110/2] via 10.1.12.2, 01:19:12, FastEthernet1/0/1
33.0.0.0/24 is subnetted, 1 subnets
D EX 33.33.33.0 [170/2565120] via 10.1.13.2, 00:49:47, FastEthernet1/0/3
R1#

Pretty normal, nothing unexpected, so I will call it here.

Though there was a very good lesson to be learned with the OSPF -> BGP Internal Routes thing, and that is that BGP has an AD of 200, so if any other Routing Protocol is Redistributing the Route into BGP it is going to take that path instead.

That is what we call “sub-optimal routing” in Cisco terms ūüôā

If anyone has followed along with all of that, I hope this has been as informative for you as it has for me, next up will be BGP Troubleshooting and almost time to sit the exam!

(I will wr mem on these routers for possible future labbing chaos!)

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s