Monday, May 26, 2008

My FAQs 2 - OSPF

runs over?
Directly over IP

packet types?
Hello
Database description
Link state request
Link state update
Link state ack

hello?
for discovery of OSPF neighbors. Addressed to multicast 224.0.0.5 for broadcast and point-to-point interfaces. Hello on other interfaces is unicast. Default hello interval - 10 sec

DD?
The DD packet, type code 2, summarizes the local database by sending LSA headers to the remote router. The remote router analyzes these headers to determine whether it lacks any information within its own copy of the link-state database.

virtual links?
Virtual links are used for:

Linking an area that does not have a direct connection to the backbone.

Linking the backbone in case of a partitioned backbone.

Area without direct connection to the backbone
The backbone always need to be the center of all other areas, in some rare case where it is impossible to have an area physically connected to the backbone, a virtual link is used. This virtual link will provide that area a logical path to the backbone area. This virtual link is established between two ABRs that are on one common area, with one of the ABRs connected to the backbone area.

Partitioned Backbone
OSPF allows for linking a partitioned backbone using a virtual link. The virtual link should be configured between two separate ABRs that touch the backbone are from each side and having a common area in between.

LSA types?
1 Router LSA
2 Network LSA
3 Network summary LSA
4 ASBR summary LSA
5 AS external LSA
6 Group membership LSA
7 NSSA external LSA

OSPF neighbors stuck in ex-start state?
1. MTU mismatch b/w neighbors
2. Can't pass large packets in L2

Adjacency states?

Down Down is the starting state for all OSPF routers. A start event, such as configuring the protocol, transitions the router to the Init state. The local router may list a neighbor in this state when no hello packets have been received within the specified router dead interval for that interface.

Init The Init state is reached when an OSPF router receives a hello packet but the local router ID is not listed in the received Neighbor field. This means that bidirectional communication has not been established between the peers.

Attempt The Attempt state is valid only for Non-Broadcast Multi-Access (NBMA) networks. It means that a hello packet has not been received from the neighbor and the local router is going to send a Unicast hello packet to that neighbor within the specified hello interval period.

2-Way The 2-Way state indicates that the local router has received a hello packet with its own router ID in the Neighbor field. Thus, bidirectional communication has been established and the peers are now OSPF neighbors. On Point-to-Point and Point-to-Multipoint interfaces, the state will be changed to Full. On Broadcast interfaces, only the DR/BDR will advance to Full state with their neighbors, all the remaining neighbors will remain in the 2-Way state.

ExStart In the ExStart state, the local router and its neighbor establish which router is in charge of the database synchronization process. The higher router ID of the two neighbors controls which router becomes the master.

Exchange In the Exchange state, the local router and its neighbor exchange DD packets that describe their local databases.

Loading Should the local router require complete LSA information from its neighbor, it transitions to the Loading state and begins to send link-state request packets.

Full The Full state represents a fully functional OSPF adjacency, with the local router having received a complete link-state database from its peer. Both neighboring routers in this state add the adjacency to their local database and advertise the relationship in a link-state update packet.

Router LSA?
For advertising the networks connected to the local router. This includes all links connected to the router, the metrics of those interfaces, and the OSPF capabilities of the router. It has area scope.

Need for DR and BDR?
Broadcast segments in a network, such as an Ethernet link, pose a special problem to link-state protocols and their peer-to-peer nature. Multiple routers on the same physical segment share the resources of that link and produce a lot of redundant information
The ramifications of this process are twofold. First, each router reports the same set of information, the Ethernet link, to the rest of the OSPF network. Second, and perhaps more damaging, every router floods LSAs to each of its adjacent neighbors using the 224.0.0.5 multicast address.

DR?
Each broadcast segment in an OSPF network elects a designated router to act as the main point of contact for the network segment. Each router on the link must become adjacent with the DR, which handles all LSAs for the network. Each router sends the DR information using a new multicast destination address of 224.0.0.6, AllDRRouters. The designated router generates a network LSA, type code 2, to represent the broadcast segment to the rest of the network.

DR election?
Based on priority and router id. Router with the highest priority (value 0 -ineligible for election) becomes DR. If there is a tie, higher router id is selected. The wait time for electing the first designated router on the segment arises from an OSPF timer called the WaitTimer. This is to guarantee exchange of hellos b/w ospf routers

When a higher priority router comes to a network, it will not immediately become the DR/BDR. It has to wait till the next electioni to become BDR first.

Backbone area?
Area 0.0.0.0 connects all areas and redistributes all non-backbone routing info b/w the areas. All other areas must be connected to the backbone area.

OSPF router types?
Internal router A router that maintains all operational interfaces within a single area is known as an internal router. An internal router may belong to any OSPF area.
Backbone router A router that has at least one interface in area 0 is known as a backbone router.
Area border router The area border router (ABR) connects one or more OSPF areas to the backbone. This means that at least one interface is within area 0 while another interface is in another area. The ABR plays a very important role in an OSPF network.
Autonomous System boundary router An Autonomous System boundary router (ASBR)
injects external routing knowledge into an OSPF network.

N/w summary LSA?
Routing knowledge crosses an area boundary in an OSPF network by using a network summary LSA, type code 3. By default, each Type 3 LSA matches a single router LSA or network LSA on a one-for-one basis. The network summary LSA also has an area-flooding scope.


AS external LSA?
Both the router and network summary LSAs are effective at propagating internal OSPF routing knowledge throughout the network. They are not capable, however, of carrying external routing information. The AS external LSA, type code 5, was defined for this explicit purpose. External routes in an OSPF network can come in multiple forms like redistribute static routes, or from a network(internal or external) that is not currently running OSPF.

ASBR summary LSA?
While the Type 5 LSA provides the network information necessary to reach the external networks, the OSPF routers may not automatically begin using that data. The address of the ASBR must be known in the link-state database via a router LSA. For each ASBR reachable by a router LSA, the ABR creates an ASBR summary LSA, type code 4, and injects in into the appropriate area. This LSA provides reachability information to the ASBR itself. ASBR summary LSA has area scope and is generated by an ABR.

Stub areas?
An OSPF stub area provides for a smaller link-state database by restricting the presence of AS external LSAs within the area. Since a single Type 5 LSA is generated for each external route, the potential number of LSAs in an OSPF network can be quite sizeable. ( disadvantage of forwarding potentially unroutable
packets)

The responsibility for enforcing an OSPF stub area rests with the ABR. Under normal circumstances, the ABR re-floods the Type 5 LSAs into the area. When configured as a stub area, however, the ABR simply does not flood the AS external LSAs into the area. To provide the required IP reachability, the ABR should instead generate a summary LSA for the default route and inject that into the stub area

Totally stubby area?
An expansion of the concept of a stubby area. The ABR in a totally stubby area stops creating and flooding Type 3 LSAs for the backbone and for area 22 routes. The default Type 3 LSA is generated to provide reachability to all routes outside area 10. The basic operation of the stub area did not change in this situation. Types 4 and 5 LSAs are still not present in the area 10 routers.

Not so stubby area?
Suppose that your OSPF network requires connectivity to a partner that is using RIP within its network. The routers in this area have been suffering from database issues that caused the area to become stub. This exact set of circumstances led to the development of the not-so-stubby area (NSSA).

A not-so-stubby area is an OSPF stub area that allows some external routes to be present in the database. This is accomplished with a new NSSA external LSA, type code 7. The Type 7 LSA carries external routing information from the ASBR within the NSSA. It has an area flooding scope, so only routers in the NSSA receive the Type 7 LSA. The external routing information within the LSA is converted by the ABR into an AS external LSA at the area boundary. The ABR floods the Type 5 LSA into the OSPF domain, and no other routers in the network are aware of the NSSA configuration.

No comments: