Showing posts with label LSA. Show all posts
Showing posts with label LSA. Show all posts

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 --














Sunday, January 2, 2011

Link state Routing Protocol

Link state routing protocol is one of the two protocols (the other is distance vector routing protocol), used in packet switching networks. Link state routing uses the Dijkstra or Shortest Path First (SPF) algorithm. The protocol works as each node makes a connectivity map of the network in the form of a graph that shows where the node connects to which neighboring node. The protocol will then calculate the best logical path to each destination node and adds it to its routing table. Examples of link state routing protocols are OSPF and IS-IS.

The contrast with link state routing and distance vector routing is that link state routing shares only the information about the connectivity with its neighbors, whereas distance vector routing shares the full routing table of the node with its neighbors. Another one is that after the initial exchange of LSAs are made, link state protocols do not exchange information anymore until there is a change in the network topology. However, it will advertise all its LSAs every 30 minutes, whereas distance vector protocols sends full routing table and process it every 30 or 90 seconds. Compared to DV, LS is therefore more bandwidth and resource efficient.

The first process in creating a routing link is that the routers must be neighbors first by forming an adjacency. To form this adjacency, the routers must agree on the area number, the hello and dead timer settings, and stub area and link authentication configuration. All of this must be the same on both sides of the link or this adjacency will not be formed. The default Hello timer is 10 seconds, and the default dead timer is 40 seconds.

To check router's adjacency type the command "#show ip ospf neighbor" or "#show ip ospf interface"

After this adjacency is formed, the routers will send then Link State Updates (LSUs) which contains Link State Advertisements (LSAs). LSA contains e.g. subnet masking information. LSA will be processed by the receiving router and placed into the link state database and the SPF algorithm is applied to this database to create the OSPF routing table.

To see the database type the command: "#show ip ospf database"

LSA contains sequence numbers which will be checked upon arrival on the destination router. This router will then compare its sequence number (from the previous LSA) to the current LSA. There are 3 possible actions that can happen:

1. If the sequence number is the same, the LSA is ignored by the receiving router

2. If the sequence number is lower than the sequence number the router has, than the router will ignore the update and sends the LSU back to the sending router.

3. If the sequence number is higher, the LSA is accepted an will be added to its database. Afterwards, the receiving router will send an LSA acknowledgment back to the sending router. It will the flood that LSA and will run the SPF algorithm to update its own routing table and holds therefore the most updated route.

To config OSPF type the command:
(config)#router ospf
(config-router)#network area
(config-router)#network area

Configure it on both ends of the link and an adjacency should be formed. We can show it using : #show ip ospf neighbor

To see the ospf database: #show ip ospf database

To see the interface running ospf: #show ip ospf interface

-- 3 Januari 2011 --