cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
496
Views
0
Helpful
2
Replies

redistributing connected routes into ospf

sarahr202
Level 5
Level 5

Hi everybody

Please consider the following example:

R1--area 0--R2

R1 has loopback addresses:

interface Loopback1

ip address 10.1.1.1 255.255.255.0

ip ospf network point-to-point

!

interface Loopback2

ip address 10.1.2.2 255.255.255.0

ip ospf network point-to-point

!

router ospf 1

router-id 1.1.1.1

log-adjacency-changes

redistribute connected metric 1 subnets

network 199.199.199.1 0.0.0.0 area 0

R1 routing table:

C    199.199.199.0/24 is directly connected, Serial0/0

     10.0.0.0/24 is subnetted, 2 subnets

C       10.1.2.0 is directly connected, Loopback2

C       10.1.1.0 is directly connected, Loopback1

=========================================================

My question is about redistribute command.   Please correct me if  I am wrong. My understanding  is when we use the command"  redistribute connected"  under a protocol say under eigrp,  we are telling the router  to  start advertising  the  all the routes present in routing table with "  C'  next to it in eigrp updates.

In our example, I want  R1( acting as ASBR)  to start sending updates about the loopback addresses;   10.1.1.0/24, 10.1.2.0/24  in our ospf domain. 

My question  is  when I use the command  :

redistribute connected metric 1 subnets

Should it not cause R1 to start sending updates  about all the routes present in routing table with "  C"  next to them?

When   I use the " Wireshark " on R1's int,  I saw  R1 generating updates (LSA5) about  10.1.2.0/24  10.1.1.0/24 but  not about 199.199.199.0/24 as it shoud  since  this route has "C" next to it in our routing table . (  Please keep in mind we  are already running ospf on 199.199.99.1 s0/0 by using network 199.199.199.0 0.0.0.0 area 0)

thanks and have a great week

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Sarah,

Your observation is absolutely correct. The redistribute connected command should cause all routes in the routing table flagged as 'C' (connected) to be redistributed into the respective routing protocol.

However, whenever a network command overlaps with a redistribute command, the network command takes precedence. In your case, the 199.199.199.0/24 is not redistributed into OSPF as LSA-5 because it is already considered as an internal network. It will instead be advertised as an internal network. After all, it would be illogical to establish an adjacency over a particular network and yet advertise that network as external (i.e. not belonging to the particular routing protocol).

Best regards,

Peter

View solution in original post

2 Replies 2

Peter Paluch
Cisco Employee
Cisco Employee

Hi Sarah,

Your observation is absolutely correct. The redistribute connected command should cause all routes in the routing table flagged as 'C' (connected) to be redistributed into the respective routing protocol.

However, whenever a network command overlaps with a redistribute command, the network command takes precedence. In your case, the 199.199.199.0/24 is not redistributed into OSPF as LSA-5 because it is already considered as an internal network. It will instead be advertised as an internal network. After all, it would be illogical to establish an adjacency over a particular network and yet advertise that network as external (i.e. not belonging to the particular routing protocol).

Best regards,

Peter

Thanks  Peter. It was nice hearing from you after a long time.

Review Cisco Networking for a $25 gift card