Followers

Tuesday, March 10, 2020

OSPF


 Open Shortest Path First (OSPF) 
OSPF uses the Dijkstra Shortest Path First algorithm to determine the shortest path in the network.
OSPF will form neighbor relationships with adjacent routers in the same Area.
OSPF is a classless protocol, and also supports VLSMs.
OSPF administrative distance is 110 & no hop-count limit.
OSPF metric is “COST”,to select best path Bandwidth should be high & cost should low
i.e Higher the BW lower the cost, lower the cost better path.
OSPF support only equal cost of multipath, If the cost of multipath link is same, then
 load-balancing is performed between the multipath.

Comparison between OSPFv2 vs OSPFv3
OSPFv2 stands for Open Shortest Path First version 2 and OSPFv3 stands for Open Shortest Path First version 3.
OSPFv2 is the IPv4’s OSPF version, whereas OSPFv3 is the IPv6’s OSPF version.
In OSPFv2, many OSPF instances per interface are not supported, whereas in OSPFv3, many OSPF instances per interface are supported.

S.NO
OSPFV2
OSPFV3
1
OSPFv2 is the IPv4’s OSPF version.
While OSPFv3 is the IPv6’s OSPF version.
2
The header size of OSPFv2 is 16 bytes.
While the header size of OSPFv3 is 28 bytes.
3
OSPFv2 have seven link-state advertisement.
OSPFv3 have nine link-state advertisement.
4
There is only one instance per link, in OSPFv2.
While there are many instances per link, in OSPFv3.
5
In OSPFv2, many OSPF instances per interface are not supported.
Whereas in OSPFv3, many OSPF instances per interface are supported.
6
There is no flooding space in OSPFV2.
While there is present flooding space in OSPFv3.
7
OSPFv2 runs on subnets rather than links.
While OSPFv3 runs on links rather than subnets.


 OSPF Area
OSPF network can be divided into sub-domains called areas.
Each area in an OSPF network must be connected to the backbone area (also known as area 0).
All routers inside an area must have the same area ID in order to become OSPF neighbors.
A router that has interfaces in more than one area (area 0 and area 1, for example) is known as an Area Border Router (ABR).
A router that connects an OSPF network to other routing domains (to an EIGRP network, for example) is called an Autonomous System Border Routers (ASBR).
 Area Types
        1)   Standard Area – A “normal” OSPF area- 

            


Routers within a standard area will share Router (Type 1) and Network (Type 2) LSAs to build their topology tables. Once fully synchronized, routers within an area will all have identical topology tables.
Standard areas will accept Network Summary (Type 3) LSAs, which contain the routes to reach networks in all other areas.
Standard areas will accept ASBR Summary (Type 4) and External (Type 5) LSAs, which contain the route to the ASBR and routes to external networks, respectively.

           2)    Stub Area-

          
Its Prevents external routes from flooding into an area
Like Standard areas, Stub area routers will share Type 1 and Type 2 LSAs to build their topology tables.
Stub areas will also accept Type 3 LSAs to reach other areas.
Stub areas will not accept Type 4 or Type 5 LSAs, detailing routes to external networks.
          3)    Totally stubby area-
Its Prevents both inter-area and external routes from flooding into an area.
 Like Standard and Stub areas, Totally Stubby area routers will share Type 1 and Type 2 LSAs to build their topology tables.
 Totally Stubby areas will not accept Type 3 LSAs to other areas.
 Totally Stubby areas will also not accept Type 4 or Type 5 LSAs, detailing routes to external networks.

          4)    Backbone Area (Area 0)- It allow all type of LSA.

          5)    Not So Stubby Area (NSSA) –
Its Similar to a Stub area; prevents external routes from flooding into an area, unless those external routes originated from an ASBR within the NSSA area.
Like Standard and Stub areas, NSSA area routers will share Type 1 and Type 2          LSAs to build their topology tables.
NSSA areas will also accept Network Summary (Type 3) LSAs, which contain the routes to reach networks in all other areas.
No Type 5 & Type 4 AS-external LSAs allowed, but Type 7 LSAs that convert to Type 5 at the NSSA ABR can traverse.

        6)    Totally Not So Stubby Area (TNSSA)-
 Its Similar to a Totally Stubby area; prevents both inter-area and external routes from flooding into an area, unless those external routes originated from an ASBR within the NSSA area.
Like Standard and Stub areas, TNSSA area routers will share Type 1 and Type 2 LSAs to build their topology tables.
TNSSA areas will not accept Type 3, Type 4 or Type 5 LSAs, detailing routes to external networks.
If an ASBR exists within the TNSSA area, that ASBR will generate Type 7 LSAs.

OSPF LINK STATE PACKET TYPES
Database Descriptor packet:
For link-state routing protocol, it is required that the link-state databases for all routers remain synchronized. The synchronization starts as soon as the adjacency is formed between neighbors. OSPF uses Database Descriptor (DBD) packets for this purpose.
The DBD packets are OSPF packet Type 2. The OSPF router summarizes the local database and the DBD packets carry a set of LSAs belonging to the database. When a neighbor sees an LSA that is more recent than its own database copy, it requests this newer LSA from the neighbor.

Link State Request packet:
The Link State Request (LSR) packet is an OSPF packet Type 3. After DBD packets exchange process, the router may find it does not have an up-to-date database. The LSR packet is used to request pieces of neighbor database that is more up-to-date.

Link State Update packet:
Link State Update (LSU) packets are OSPF packet Type 4. These packets implement the flooding of LSAs. Each LSA contains routing, metric and topology information to describe a portion of OSPF network. The local router advertises LSA within an LSU packet to its neighboring routers. In addition, the local router advertises the LSU packet with information in response to an LSR packet.

Link State Acknowledgment packet:
Link State Acknowledgment (LSAck) packets are OSPF packet Type 5. OSPF requires acknowledgment for the receipt of each LSA. Multiple LSAs can be acknowledged in a single LSAck packet.

Link State Advertisement (LSA): 
The primary mean of communication between OSPF routers, it's the packet that carries all fundamental information about the topology and is flooded between areas to perform different functions, there are 11 types of LSA packets.

11Types of LSA
LSA Type 1 (Router LSA) -The Router LSA is generated by each router for each area it is located. In the link-state ID you will find the originating router’s ID.
LSA Type 2 (Network LSA) packets are generated by the Designated Router (DR) to describe all routers connected to its segment directly. LSA Type 2 packets are flooded between neighbors in the same area of origin and remain within that area.
 LSA Type 3 (Summary LSA)- The summary LSA is created by the ABR and flooded into other areas.
LSA Type 4 (ASBR Summary LSA) Other routers need to know where to find the ASBR. This is why the ABR will generate a summary ASBR LSA which will include the router ID of the ASBR in the link-state ID field
LSA Type 5 (ASBR External LSA) -packets are generated by the ASBR to advertise external redistributed routes into the OSPF’s AS.
LSA Type 6 (Group Membership LSA)-Not Use & Not Supported.
LSA Type 7 (NSSA External LSA) -packets are used for some special area types that do not allow external distributed routes to go through and thus block LSA Type 5 packets from flooding through them, LSA Type 7 packets act as a mask for LSA Type 5 packets to allow them to move through these special areas and reach the ABR that is able to translate LSA Type 7 packets back to LSA Type 5 packets.

LSA Type 8 -packets (External Attributes LSA -OSPFv2-/ Link Local LSA -OSPFv3-)
in OSPFv2 (IPv4) are called External Attribute LSAs, and are used to transit BGP attributes through an OSPF network while BGP destinations are conveyed via LSA Type 5 packets, however, this feature isn’t supported by most routers. With OSPFv3 IPv6), LSA Type 8 is redefined to carry IPv6 information through OSPF network.
 

LSA TYPE 9, 10 & 11

Generally Opaque LSAs (LSA Type 9, 10 & 11) are used to extend the capabilities of OSPF allowing the protocol to carry information OSPF doesn’t necessarily care about. Practical application of Opaque LSAs is in MPLS traffic engineering where they are used to communicate interface parameters such as maximum bandwidth, unreserved bandwidth

LSA TYPE 9 – OSPF LINK SCOPE OPAQUE (OSPFV2) / INTRA AREA PREFIX LSA (OSPFV3)

LSA Type 9 in OSPFv2 (IPv4) is defined as a Link Scope Opaque LSA for carrying OSPF information. For OSPFv3 it’s redefined to handle a communication prefix for a special area type called Stub Area.

LSA TYPE 10 – OSPF AREA SCOPE OPAQUE LSA

LSA Type 10 packets are used to flood OSPF information through other area routers even if these routers do not process this information in order to extend OSPF functionality, this LSA is used for traffic engineering to advertise MPLS and other protocols.

LSA TYPE 11 – OSPF AS SCOPE OPAQUE LSA

LSA Type 11 packets serve the same purpose as LSA Type 10 packets but are not flooded into special area types (Stub areas).

There are 5 OSPF network types:

Non-Broadcast
The Non-Broadcast network type is the default for OSPF enabled frame relay physical interfaces.
Non-Broadcast networks requires the configuration of static neighbors; hello’s are sent via unicast.
The Non-Broadcast network type has a 30 second hello and 120 second dead timer.
An OSPF Non-Broadcast network type requires the use of a DR/BDR

Broadcast
The Broadcast network type is the default for an OSPF enabled ethernet interface.
The Broadcast network type requires that a link support Layer 2 Broadcast capabilities.
The Broadcast network type has a 10 second hello and 40 second dead timer.
An OSPF Broadcast network type requires the use of a DR/BDR.

Point-to-Point
A Point-to-Point OSPF network type does not maintain a DR/BDR relationship.
The Point-to-Point network type has a 10 second hello and 40 second dead timer.
Point-to-Point network types are intended to be used between 2 directly connected routers.

Point-to-Multipoint
OSPF treats Point-to-Multipoint networks as a collective of point-to-point links.
Point-to-Multipoint networks do not maintain a DR/BDR relationship.
Point-to-Multipoint networks advertise a hot route for all the frame-relay endpoints.
The Point-to-Multipoint network type has a 30 second hello and 120 second dead timer.

Point-to-Multipoint Non-Broadcast
Same as Point-to-Multipoint but requires static neighbors. Used on Non-broadcast layer 2 topologies.
Gives you the ability to define link cost on a per neighbor basis.

 Multi-access Network on OSPF
The Working of OSPF is slightly change in Multi-access n/w, the multiple update is perform in multi-access n/w and system performance will get degraded.
The solution to this problem is centralized update is done by Designated router, during neighbourship formation all the router in n/w will be perform election.
The criteria for the election is router priority, Highest priority will get chance to become Designated router & 2nd priority become Backup designated router.
By default all router priority is 1, but the option is Router ID, the highest RID become DR & 2nd RID become BDR and other router become DR-other.
When DR-other want to send update its will send to DR and BDR using multicast address 224.0.0.6. The DR use multi access address 224.0.0.5. And the result is that only DR router flood all the LSAs in multi access network.
If DR does not send any update in Stipuated time period, then BDR become new DR and update in n/w. If DR came up then it cannot become DR again and this DR will become DR-other.

1 comment:

TYPES OF GUARD, SNMP VERSION & SECURITY ZONE

TYPES OF GUARD BPDU Guard-   Its use to implement on an access port configure with PortFast.  If BPDU Guard receiv...