cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
873
Views
5
Helpful
3
Replies

redistribution command questions

brooklynheight
Level 1
Level 1

I have a basic understanding of redsribing routes with a command such as this

router ospf 1

redistribute eigrp 1

However, I do not understand the following scenario

router ospf 1

log-adjacency-changes

redistribute connected subnets

redistribute bgp 6XXX subnets

network 192.168.2.0 0.0.0.255 area 1

why would you issue the redistribute connected subnet command?

In my sho ip route ...everything is either

direclty connected or being learned O E2

3 Replies 3

Edison Ortiz
Hall of Fame
Hall of Fame

When routes are redistributed into OSPF, only routes that are not subnetted are redistributed if the subnets keyword is not specified.

For instance, if you are redistributing from EIGRP and it has 192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24, they will be redistributed without problems because they are class C networks with /24 subnets

However, if you had 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24, none of those routes will be redistributed because they are class A networks with /24 subnets.

If you attempt to redistributed without the subnet keyword, you will receive this warning:

% Only classful networks will be redistributed

Edit: I re-read your questions one more time and now I see what you are really after.

In your case, you would want the redistribute connected subnet command if you want to announce other Layer3 links that your router has, that aren't part of the 192.168.2.0/24 subnet. Those links will be brought into the OSPF database as O E2, and you can verify it with the show ip os data.

correct- there are more subnets listed when i do # sh ip ospf data

192.168.96, 93, 92 etc..

is this because of the "redistribute connected subnet" command?

If I am announcing these other subnets..

couldn't the "network 192.168.x.x" lines have been left out?..since they would have

been distributed anway with the "redistribute connected subnet" command?

If 192.168.96.0/24 - 93.0/24 - 92.0/24 are directly connected links on this router, then yes, they were redistributed into OSPF by that command.

You need at least one network statement in order to enable OSPF on an interface and exchange routes with other OSPF routers. The redistribute command does not enable OSPF on an interface, it just announces the links to other OSPF speakers.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card