Monday, January 24, 2011

OSPF network

The first thing to know when designing an OSPF network is that each area should have a router that connects to area 0 (backbone area) either physically or logically.

Area border router (ABR) are routers that has more than 1 ospf area. To see this run the #show ip ospf command or use the #show ip ospf border-router command to see adjecent router area state is. ASBR are basically ABRs that has more than 1 routing protocol.

Route redistribution means placing a route that is learned in one routing domain into another routing domain that has different routing protocols. This is needed in order to syncronize values such as metrics. If this is not set, then there is a big chance that the 2 networks at each side of the router will not detect each other and therefore cannot communicate. The metric value in RIP and OSPF is definitely different because of the difference in obtaining a metric value (OSPF uses cost with max = 100,000,000, and RIP uses hops with max = 16), so ospf routes need to be redistributed/translated in order to be understood by RIP. This redistribution must be done in 2 way (to each other).

To redistribute RIP to OSPF and in reverse, the command is shown below.

To redistribute RIP to OSPF:

(config)#router ospf

(config-router)#redistribute connected subnets (Redistribute connected devices including subnetted routes)

(config-router)#redistribute subnets

To redistribute OSPF routing protocol to RIP:

(config)#router rip

(config-router)#redistribute connected metric

(config-router)#redistribute ospf metric

RIP requires seed metric (convert to understandable metric 0-15) be applied at the time of redistribution. The metric or the path being redistributed must be set from routers to RIP, IGRP and EIGRP. OSPF does not need to have this, because the default redistributed route seed metric of OSPF is 20. Without setting the seed metric, the routes that has a higher value than 15 will not be shown on the RIP network because it is considered as a disabled network.

When seeing the configuration, there is an "O E2" symbol which means an external route originally learned by redistribution. The cost of this route is from ASBR to dest network only.

There is a possibility where the destination routes has the same ip next hop address. This table can be shortened by using stub networks which must be configured on both end of the links (2 routers). The symbol will be changed to O*IA symbol. The command is:

(config)#router ospf

(config-router)#area stub

To change the default cost of the stub use the following command on 1 router only:

(config)#router ospf

(config-router)#area default-cost

To configure a total stub area (all external and internal area routes are replaced to a single default route) use the command on the ABR router only with :

(config)#router ospf

(config-router)#area stub no-summary

To show the neigbor configuration state use the "#show ip ospf neigbor" command

NSSA stands for "not so stubby area" which is a stub area that contains a limited number of external routes instead of all external routes connecting to OSPF. The purpose of this area is to inject other router protocols to OSPF with the redistribution command to the stub area via NSSA stub using type 7 LSAs, because type 5 LSA is blocked in NSSA area. The type 7 LSA will be translated to type 5 LSA by the NSSA ABR router in the NSSA area that connects to OSPF area 0.

The command to make an NSSA stub is :
(config)#router ospf
(config-router)#area nssa

There is a possibility to make NSSA area a total stub NSSA which will block LSA type 3, 4 and 5 and single default routes.

The command to make an NSSA total area stub is :
(config)#router ospf
(config-router)#area nssa no-summary

There are different LSA types and typical states on the router when

the show ip ospf database is run:

- LSA Type 1 : Sent by all Routers --> Router Link States
- LSA Type 2 : Sent by all DRs --> Net Link States
- LSA Type 3 : Sent by all ABRs --> Summary Net Link States
- LSA Type 4 : Sent by all ABRs --> Summary ASB Link States, describes how to get to the ASBR
- LSA Type 5 : Sent by ASBRs only --> Type-5 AS External Link States to all areas except stub and total stub areas
- LSA Type 7 : Sent by ASBRs only --> Type-7 AS External Link States, found only in NSSA area
- LSA Type 6 : Reserved for Multicast OSPF


There is a possibility to make a route summarization except using stub. This method is used when the summarized routes is implementen on routers that is in area 0, which does not allow stub configurations. There are 2 methods in summarizing routes which are area range and summary address.

Area range is used on ABRs where it summarizes routes from 1 area to another. The command is:
(config)#router ospf
(config-router)#area range


Summary address is used on ASBR routers to summarize routes that are redistributed from other protocols to OSPF. The command is:
(config)#router ospf
(config-router)#summary address


There is also a possibility to protect connections to the neighbors with authentication. The authentication can be set with passwords in either clear text or MD5. However, once set, the password must be configured the same on other neighboring routes involved.

The command for clear text password authentication is:
(config)#int
(config-if)#ip ospf authentication-key // password max 8 characters!
(config-if)#ip ospf authentication

The command for MD5 password authentication is:
(config)#int
(config-if)#ip ospf authentication message digest
(config-if)#ip ospf message-digest-key md5 MD5>

To see adjecencies use the command #debug ip ospf adj, to stop debugging use #u all

-- 26 January 2011 --














No comments:

Post a Comment