cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
849
Views
9
Helpful
4
Replies

OSPF- Normal area (0):Do we need 'redistribute connected' for OSPF?

fortis123
Level 1
Level 1

Hi All,

Core router (6513) with OSPF area 0 (backbone/normal area). This is the onloy protocol on the router. Multiple vlans with diff /24 ipand all being advertised in ospf using 'network' statement. Do we still need 'redistribute connected' command in OSPF config..?

router ospf 100

area 0.0.0.0 range 10.60.0.0/16

area 0.0.0.0 range 192.168.100.0/24

redistribute connected

network 1.1.1.4 0.0.0.3 area 0.0.0.0

network 10.2.2.0 0.0.0.3 area 0.0.0.0

network 10.60.0.0 0.0.255.255 area 0

network 6.9.50.0 0.0.0.63 area 0

network 6.9.50.64 0.0.0.63 area 0

network 192.168.100.0 0.0.0.255 area 0

network 192.168.109.0 0.0.0.255 area 0

network 192.168.160.0 0.0.0.255 area 0

PS: This rtr/switch is connected to another area which is Stub via L3 link (1.1.1.4/30).

TIA

MS

4 Replies 4

Joseph W. Doherty
Hall of Fame
Hall of Fame

Answer might depend whether there are other "connected" networks that don't match a network statement. Assuming there's not, you shouldn't normally need both, although I also see area summaries and you did mention a stub. Since networks will be "different" depending on whether injected via network statement or redistribution, hard to tell what's really intended.

Thank you joseph. Also, another questn, what exactly does the redistubute static under OSPF do..? Redistributes the Static routes on the rtr into all other ospf areas in the AS? What is the default administrative distance to those routes..?

Thank you

MS

Redistribute static would inject the static routes defined on that router into OSPF as externals. There are options to the redistribute command that, I recall, allow you to subject the statics to a route map, determine metric, determine external route type, etc.

As to whether other OSPF areas would see these injected statics, that depends on OSPF area configurations and where the routes are injected.

Hello,

Regarding your original question: "all being advertised in ospf using 'network' statement. Do we still need 'redistribute connected' command in OSPF config..? "

1. If a network is covered by a network command you do not need to redistribute connected. There was a time (with certain older IOS versions) that if you had "redistribute connected subnets" in addition to network command, some needless externals would be originated, but this is not the case anymore. For more information have a look at the following document:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094707.shtml

2. One case I can think of that "redistribute connected subnets" makes sense is the case of a router with a dial-style role. Customers connect to the router and PPP causes a /32 connected route to appear in routing table. Instead of running OSPF with customer, you redistribute the connected and you are done.

Now, regarding another question of yours "What is the default administrative distance to those routes..?" (i.e. redistributed static). OSPF routes all have a default administrative distance of 110 that is the same for all types of routes (unlike EIGRP). Within OSPF however, intra-area routes are preferred over inter-area, and inter-area routes are preferred over external. You can change the distance per-route type, but this is normally not required:

http://www.cisco.com/en/US/docs/ios/12_2/iproute/command/reference/1rfospf.html#wp1017956

("A common reason to use the distance ospf command is when you have multiple OSPF processes with mutual redistribution, and you want to prefer internal routes from one over external routes from the other").

Kind Regards,

M.

Review Cisco Networking products for a $25 gift card