cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
471
Views
2
Helpful
3
Replies

Is it bug of EVE or it's the way that cisco wants(redis ospf into bgp)

rookie R
Level 1
Level 1

Hi all!

According to cisco, the command  

redistribute ospf 1 match internal external 1 external 2

!--- This redistributes ONLY OSPF External routes, but both type-1 and type-2.

only redistribute OE1 and OE2 routes (not O and OIA routes) into BGP, but what if I add a route-map in it and the route-map matches O and O IA routes? So I run a test on EVE, here is the topology and configuration:

rookieR_1-1695456136262.png

R1:

interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.12.1 255.255.255.0
duplex auto
!

router bgp 100012
bgp log-neighbor-changes
neighbor 192.168.12.2 remote-as 100023

 

 

 

 

 

R2:

interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.12.2 255.255.255.0
duplex auto
!
interface Ethernet0/1
ip address 192.168.23.2 255.255.255.0
duplex auto
!

router ospf 1
router-id 2.2.2.2
network 192.168.23.2 0.0.0.0 area 0
!
router bgp 100023
bgp log-neighbor-changes
redistribute ospf 1 match external 1 external 2 route-map TAG
neighbor 192.168.12.1 remote-as 100012
!

route-map loop23 permit 10
match interface Loopback23
!
route-map TAG permit 10
match tag 0
!

 

 

 

R3:

interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Loopback23
ip address 192.23.23.23 255.255.255.255
!
interface Loopback211
ip address 192.168.255.211 255.255.255.255
!
interface Loopback444
ip address 144.144.144.144 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.23.3 255.255.255.0
duplex auto
!

router ospf 1
router-id 3.3.3.3
redistribute connected subnets route-map loop23
network 144.144.144.144 0.0.0.0 area 1
network 192.168.23.3 0.0.0.0 area 0
network 192.168.255.211 0.0.0.0 area 0
!

route-map loop23 permit 10
match interface Loopback23
set tag 12345
!

 

 

Here is the ospf routing table of R2:

R2#show ip route ospf
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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

144.144.0.0/32 is subnetted, 1 subnets
O IA 144.144.144.144 [110/11] via 192.168.23.3, 00:30:34, Ethernet0/1
192.23.23.0/32 is subnetted, 1 subnets
O E2 192.23.23.23 [110/20] via 192.168.23.3, 01:11:53, Ethernet0/1
192.168.255.0/32 is subnetted, 1 subnets
O 192.168.255.211 [110/11] via 192.168.23.3, 01:10:07, Ethernet0/1

 

The route-map TAG matches all the routes that don't have tag which are the O and OIA OSPF routes,the only route it denies is the OE2 route,192.23.23.23/32 because it has tag 12345.

 

After I configure the command redistribute ospf 1 match external 1 external 2 route-map TAG on R2,I find it redistributes both O, OIA, and OE2 routes into BGP and sends those routes to R1, here is the BGP routing table of R1:

R1#show ip route bgp
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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

144.144.0.0/32 is subnetted, 1 subnets
B 144.144.144.144 [20/11] via 192.168.12.2, 00:01:55
B 192.168.23.0/24 [20/0] via 192.168.12.2, 00:01:55
192.168.255.0/32 is subnetted, 1 subnets
B 192.168.255.211 [20/11] via 192.168.12.2, 00:01:55

 

So it's that the way that should be? but why? I mean, does that mean the priority of the route-map is higher than the match external command? or else?

Thanks so much.

 

3 Replies 3

I send you message check it 

Gopinath_Pigili
Spotlight
Spotlight

router bgp 100023
redistribute ospf 1 match external 1 external 2 route-map TAG

In your configuration you miss "internal"  key-word with redistribute command

router bgp 100023
redistribute ospf 1 match internal external 1 external 2 route-map TAG

I hope this will solve the problem....

Thanks

Hi there!

Thanks for the reply. I didn't configure the internal on purpose because I want to find out what would happen if the first half part(redistribute ospf 1 match external 1 external 2,only redistribute OE1 and OE2) and the second half(route-map TAG,only matches O and OIA)  are quite the opposite. 

Here is what Cisco said about only configuring match external 1 external 2, but I didn't know what the route-map would do, so I tested it on EVE, and the result shocked me, I want to know if the test result is right or wrong, but I couldn't find any hard prove

Review Cisco Networking for a $25 gift card