Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Strange behavior ( BGP and OSPF)

I have 3 routers - 2610,1601 and 1603.

In route table i see strange things -same routes marked as B and as O. BGP route have AD 200

and OSPF route have AD is 110. But by default, a lower AD is always prefered.

Why it's so?

-----------2610-----------

2610#sh ip int brief

Interface IP-Address OK? Method Status Protocol

Ethernet0/0 A.B.C.1 YES NVRAM up up

Serial0/0 unassigned YES TFTP up up

Serial0/0.2 192.168.100.1 YES NVRAM up up

Serial0/0.3 unassigned YES unset up up

Loopback0 192.168.17.1 YES manual up up

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 255.255.255.255 area 0

!

router bgp 333

no synchronization

bgp log-neighbor-changes

network 192.168.17.0

network A.B.C.0

neighbor 192.168.100.2 remote-as 333

neighbor 192.168.100.2 route-reflector-client

neighbor A.B.C.111 remote-as 333

neighbor A.B.C.111 route-reflector-client

!

2610#sh ip route bgp

192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks

B 192.168.21.0/24 [200/0] via 192.168.100.2, 00:02:43

192.168.16.0/24 is variably subnetted, 2 subnets, 2 masks

B 192.168.16.0/24 [200/0] via A.B.C.111, 00:02:43

2610#sh ip route ospf

192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.21.1/32 [110/782] via 192.168.100.2, 00:03:39, Serial0/0.2

192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.20.1/32 [110/11] via A.B.C.111, 00:03:39, Ethernet0/0

192.168.16.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.16.1/32 [110/11] via A.B.C.111, 00:03:39, Ethernet0/0

192.168.1.0/30 is subnetted, 1 subnets

O 192.168.1.76 [110/2343] via 192.168.100.2, 00:03:39, Serial0/0.2

-----------1603-----------

c1603#sh ip int brief

Interface IP-Address OK? Method Status Protocol

Ethernet0 A.B.C.111 YES NVRAM up up

Loopback0 192.168.20.1 YES manual up up

Loopback1 unassigned YES manual up up

Loopback2 unassigned YES manual up up

Loopback3 192.168.16.1 YES manual up up

!

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

!

router bgp 333

no synchronization

network 192.168.16.0

network 192.168.20.0

network A.B.C.0

neighbor A.B.C.1 remote-as 333

!

c1603#sh ip route ospf

B.C.D..0/29 is subnetted, 1 subnets

O B.C.D..200 [110/801] via A.B.C.1, 00:03:58, Ethernet0

O 192.168.10.0/24 [110/801] via A.B.C.1, 00:03:58, Ethernet0

O 192.168.11.0/24 [110/20] via A.B.C.1, 00:03:58, Ethernet0

192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.21.1/32 [110/792] via A.B.C.1, 00:03:58, Ethernet0

192.168.17.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.17.1/32 [110/11] via A.B.C.1, 00:03:58, Ethernet0

192.168.1.0/30 is subnetted, 1 subnets

O 192.168.1.76 [110/2353] via A.B.C.1, 00:03:58, Ethernet0

O 192.168.100.0/24 [110/791] via A.B.C.1, 00:03:58, Ethernet0

c1603#sh ip route bgp

192.168.21.0/24 is variably subnetted, 2 subnets, 2 masks

B 192.168.21.0/24 [200/0] via 192.168.100.2, 00:03:17

192.168.17.0/24 is variably subnetted, 2 subnets, 2 masks

B 192.168.17.0/24 [200/0] via A.B.C.1, 00:03:11

---------------1601--------

Cisco1601#sh ip int brief

Interface IP-Address OK? Method Status Protocol

Ethernet0 B.C.D..202 YES NVRAM up up

Loopback0 192.168.21.1 YES manual up up

Serial0 unassigned YES NVRAM up up

Serial0.1 192.168.1.77 YES NVRAM up up

Serial1 unassigned YES NVRAM up up

Serial1.1 192.168.100.2 YES NVRAM up up

!

router ospf 1

log-adjacency-changes

network 0.0.0.0 255.255.255.255 area 0

!

router bgp 333

no synchronization

bgp log-neighbor-changes

network 192.168.21.0

network B.C.D..200 mask 255.255.255.248

neighbor 192.168.100.1 remote-as 333

!

Cisco1601#sh ip route bgp

192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks

B 192.168.20.0/24 [200/0] via A.B.C.111, 00:03:33

192.168.17.0/24 is variably subnetted, 2 subnets, 2 masks

B 192.168.17.0/24 [200/0] via 192.168.100.1, 00:03:28

192.168.16.0/24 is variably subnetted, 2 subnets, 2 masks

B 192.168.16.0/24 [200/0] via A.B.C.111, 00:03:33

Cisco1601#sh ip route ospf

192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.20.1/32 [110/1573] via 192.168.100.1, 00:04:41, Serial1.1

192.168.17.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.17.1/32 [110/1563] via 192.168.100.1, 00:04:41, Serial1.1

192.168.16.0/24 is variably subnetted, 2 subnets, 2 masks

O 192.168.16.1/32 [110/1573] via 192.168.100.1, 00:04:41, Serial1.1

3 REPLIES
Gold

Re: Strange behavior ( BGP and OSPF)

I don't see any conflict between the ospf and bgp routes in the output you've provided? You seem to have:

192.168.20.0/24 via bgp

192.168.20.1/32 via ospf

192.168.17.0/24 via bgp

192.168.17.1/32 via ospf

192.168.16.0/24 via bgp

192.168.16.1/32 via ospf

In each case, you have a /24 via bgp, and a /32 via ospf. These overlap, but they are not identical--they are each a seperate route--so ospf's and bgp's routing information don't ever get compared based on admin distance.

Russ.W

Community Member

Re: Strange behavior ( BGP and OSPF)

Well, but who to made that i have only one route /24 and can you help me to understand what means

network 0.0.0.0 255.255.255.255 area ?

Gold

Re: Strange behavior ( BGP and OSPF)

I don't understand the question about the /24's? The network 0.0.0.0 255.255.255.255 area 0 statement tells ospf to find all the interfaces on this box within the address range 0.0.0.0 with all bits wildcard, and run ospf on those interfaces. In this case, that's all interfaces.

Russ.W

102
Views
0
Helpful
3
Replies
CreatePlease to create content