Showing posts with label OSPF. Show all posts
Showing posts with label OSPF. Show all posts

OSPF Authentication

OSPF Authentication  

OSPF supports authentication to secure routing updates.We can use either clear-text or an MD5 authentication with OSPF.

Clear Text Authentication
To configure clear-text authentication, the first step is to enable authentication for the area, under the OSPF routing process:
Router(config)#  router ospf 1
Router(config-router)#  network 172.16.0.0 0.0.255.255 area 0
Router(config-router)#  area 0 authentication  
Then, the authentication key must be configured on the interface:
Router(config)#  interface fa 0/0
Router(config-if)#  ip ospf authentication
Router(config-if)#  ip ospf authentication-key MYKEY 
 
MD5 Authentication 
To configure MD5-hashed authentication, the first step is also to enable authentication for the area under the OSPF process:
Router(config)#  router ospf 1
Router(config-router)#  network 172.16.0.0 0.0.255.255 area 0
Router(config-router)#  area 0 authentication message-digest  
Notice the additional parameter message-digest included with the area 0 authentication command. Next, the hashed authentication key must be configured on the interface:
Router(config)# interface fa 0/0
Router(config-router)# ip ospf message-digest-key 10 md5 MYKEY
Router(config-router)# ip ospf authentication message-digest
NOTE: Area authentication must be enabled on all routers in the area, and the form of authentication must be identical (clear-text or MD5). The authentication keys do not need to be the same on every router in the OSPF area, but must be the same on interfaces connecting two neighbors. 

Please note: if authentication is enabled for Area 0, the same authentication must be configured on Virtual Links, as they are “extensions” of Area 0.
Read More...

Configuring Basic OSPF

Configuring Basic OSPF 

Routing protocol configuration occurs in Global Configuration mode. On Router, to configure OSPF:
Router(config)#  router ospf 1
Router(config-router)#  router-id 1.1.1.1
Router(config-router)#  network 172.16.0.0 0.0.255.255 area 1
Router(config-router)#  network 172.17.0.0 0.0.255.255 area 0  
Explanation 
  • The first command, router ospf 1, enables the OSPF process. The “1” indicates the OSPF process ID, and can be unique on each router. The process ID allows multiple OSPF processes to run on the same router. 
  • The router-id command assigns a unique OSPF ID of 1.1.1.1 for this router.
  • Here in OSPF we use wild card mask along with network statement to assagin an interface to a specific area
To change OSPF bandwidth
Router(config)#  interface s0
Router(config-if)#  bandwidth 64 
To change OSPF Cost
Router(config)#  interface fa 0/0
Router(config-if)#  ip ospf cost 10
Changing the cost of an interface can alter which path OSPF selected as “shortest,” and thus should be used with great care.

To alter how OSPF calculates its default metrics for interfaces:  
Router(config)#  router ospf 1
Router(config-router)#  ospf auto-cost reference-bandwidth 100
The above ospf auto-cost command has a value of 100 configured, which is actually the default. This indicates that a 100Mbps link will have a cost of 1 (because 100/100 is 1).Lowest cost is better

OSPF passive interface
As in EIGRP,OSPF will not form neighbor ship,If the Passive interface command is configured
Router(config)#  router ospf 1
Router(config-router)#  network 10.4.0.0 0.0.255.255 area 0
Router(config-router)#  passive-interface default
Router(config-router)#  no passive-interface fa 0/0 
"Passive-interface default" command make all interface passive and "no passive-interface fa 0/0" command will remove passive interface from fa 0/0 interface
Read More...

OSPF LSA and Area Types

OSPF relies on several types of Link State Advertisements (LSAs) to communicate link state information between neighbors. A brief review of the most applicable LSA types:
  • Router LSA (Type 1) – Contains a list of all links local to the router, and the status and “cost” of those links. Type 1 LSAs are generated by all routers in OSPF, and are flooded to all other routers within the local area. 
  • Network LSA (Type 2) – Generated by all Designated Routers in OSPF, and contains a list of all routers attached to the Designated Router. 
  • Network Summary LSA (Type 3) – Generated by all ABRs in OSPF, and contains a list of all destination networks within an area. Type 3 LSAs are sent between areas to allow inter-area communication to occur. 
  • ASBR Summary LSA (Type 4) – Generated by ABRs in OSPF, and contains a route to any ASBRs in the OSPF system. Type 4 LSAs are sent from an ABR into its local area, so that Internal routers know how to exit the Autonomous System. 
  • External LSA (Type 5) – Generated by ASBRs in OSPF, and contain routes to destination networks outside the local Autonomous System. Type 5 LSAs can also take the form of a default route to all networks outside the local AS. Type 5 LSAs are flooded to all areas in the OSPF system. 
  • Type 7 NSSA External LSAs - Used in stub areas in place of a type 5 LSA 
NOTE : LSA types 1 and 2 are found in all areas, and are never flooded outside of an area.

Summary:
  • Type 1 - Represents a router
  • Type 2 - Represents the pseudonode (designated router) for a multiaccess link
  • Type 3 - A network link summary (internal route)
  • Type 4 - Represents an ASBR
  • Type 5 - A route external to the OSPF domain
  • Type 7 - Used in stub areas in place of a type 5 LSA

OSPF Area Configurations:

Stub Area
For an area to become a stub, all routers belonging to it must be configured to operate as such. Stub routers and non-stub routers will not form adjacency.

Router(Config)#router OSPF 1
Router(config-router)# area 10 stub
Totally Stubby Areas
Like stub areas, totally stubby areas do not receive type 4 or 5 LSAs from their ABRs. However, they also do not receive type 3 LSAs; all routing out of the area relies on the single default route injected by the ABR.A stub area is extended to a totally stubby area by configuring all of its ABRs with the no-summary parameter

Router(Config)#router OSPF 1
Router(config-router)# area 10 stub no-summary
To designate a normal (stub) NSSA, all routers in the area must be so configured:
Router(Config)#router OSPF 1
Router(config-router)# area 10 nssa
Type 3 LSAs will pass into and out of the area. Unlike a normal stub area, the ABR will not inject a default route into an NSSA unless explicitly configured to do so. As traffic cannot be routed to external destinations without a default route, you'll probably want to include one by appending default-information-originate
Router(config-router)# area 10 nssa default-information-originate
To expand an NSSA to function as a totally stubby area, eliminating type 3 LSAs, all of its ABRs must be configured with the no-summary parameter:
Router(Config)#router OSPF 1
Router(config-router)# area 10 nssa no-summary
Summary
  • Type 1 - Represents a router
  • Type 2 - Represents the designated router for a multiaccess link
  • Type 3 - A network link summary (internal route)
  • Type 4 - Represents an ASBR
  • Type 5 - A route external to the OSPF domain
  • Type 7 - Used in stub areas in place of a type 5 LSA
Standard areas can contain LSAs of type 1, 2, 3, 4, and 5, and may contain an ASBR. The backbone is considered a standard area.
Stub areas can contain type 1, 2, and 3 LSAs. A default route is substituted for external routes.
Totally stubby areas can only contain type 1 and 2 LSAs, and a single type 3 LSA. The type 3 LSA describes a default route, substituted for all external and inter-area routes.
Not-so-stubby areas implement stub or totally stubby functionality yet contain an ASBR. Type 7 LSAs generated by the ASBR are converted to type 5 by ABRs to be flooded to the rest of the OSPF domain.

Related articles

CCNP : OSPF Quick Notes
CCNP Notes : IPV6 Quick Notes
CCNP Routing: EIGRP Quick Notes
EIGRP Passive Interface
EIGRP Stub
EIGRP Configuration and Troubleshooting commands
Basic notes on BGP (border gateway protocol)
Quick reminder about HSRP
EIGRP Authentication
EIGRP summarization

Read More...

CCNP : OSPF Quick Notes

 

Points to remember

· When priority is set to 0,that router won’t participate in DR/BDR election

· When other routing protocol routes are being redistributed into OSPF, Make sure "Subnet" option is added

· If ping to 224.0.0.5 fails, it means Router have no OSPF neighbors

· When OSPF is enabled across an NBMA network -- DR BDR election will occur. We need to configure neighbor command to build adjacencies

· If no Loopback is configured, Highest IP address will be the DR

· OSPFv3 for IPv6 authentication is supported by IPv6 IPSec.

· By default, redistribution of routes from other routing protocols into OSPF will appear as type E2 routes in OSPF routing table

· When implementing OSPFv3, In interface configuration mode, the IPv6 OSPF process area ID combination assigns interfaces to OSPFv3 areas.

· In OSPF, Router will only establish full adjacency with the DR and BDR on broadcast multi-access networks.

· OSPF Network LSAs are originated by the DR on every multi-access network. They include all attached routers including the DR itself

· In OSPF, If a router is stuck in INIT STATE means that router didn’t receive hello packets from neighboring router

· To make an area "totally stubby" we must apply the "area <area-id> stub no-summary" on the ABR and "area <area-id> stub" commands to all other routers in that area

· Advantages of creating multiple areas in OSPF

o Less frequent SPF calculation

o Smaller routing table

o Reduced LSU overhead

· Three restrictions apply to OSPF stub areas?

o No virtual links are allowed.

o The area cannot be a backbone area.

o No Autonomous System Boundary Routers are allowed.

· The maximum number of routers per OSPF area typically depends on

o the kind of OSPF areas being implemented

o the number of external LSAs in the network

o how well the areas can be summarized

· When verifying the OSPF link state database, which type of LSAs should you expect to see within the different OSPF area types?

o All OSPF routers in stubby areas can have type 3 LSAs in their database.

o All OSPF routers in NSSA areas can have type 3 LSAs in their database.

o All OSPF routers in NSSA areas can have type 7 LSAs in their database.

· When verifying OSPF virtual link problems, which is an important item to check on the two transit OSPF routers?

o OSPF Router ID

· Two statements about route redistribution when implementing OSPF

o OSPF can import routes learned using EIGRP, RIP, and IS-IS.

o OSPF routes can be exported into BGP.

· 3 statements about OSPF areas

o Areas introduce a boundary on the link-state updates.

o All routers within an area have the exact link-state database.

o The calculation of the Dijkstra algorithm on a router is limited to changes within an area.

Show Command

Explanation

show ip ospf database external

will display only the Type 5 LSAs in the OSPF topology database

show ip ospf

command displays the number of times that the OSPF Shortest Path First (SPF) algorithm has

been executed

show ip ospf neighbor

· This command is used to verify the current state of the OSPF database loading process

· To view neighbor adjacencies

S how ip ospf interfaces

view neighbor adjacencies

Show ip protocols

Display OSPF parameters such as filter, default metric, maximum paths, and number of areas configured on router

OSPF LSA

Q: You have been tasked with setting up OSPF on an existing company router usingIPv6. Which command enables OSPF for IPv6 on a router?

A. ipv6 router ospf process-id

Q: One of the most important characteristics of OSPF is multiple areas ?

A. All computation is kept within the area, with minimum communication between the areas, allowing the network to scale to larger sizes.

Q: When learning a new route, if a LSA received is not found in the topological database, what will an internal OSPF router do?

A. The LSA is flooded immediately out of all the OSPF interfaces, except the interface from which the LSA was received.

 

OSPF LSA type 

·

 OSPF order to form full adjacency

o Down

o INIT

o 2way

o Exstart

o Exchange

o Loading

o Full

 

OSPF adj

Read More...

OSPF Network Types

OSPF Network Types
OSPF’s functionality is different across several different network topology types. They are mentioning below

Broadcast Multi-Access – indicates a topology where broadcast occurs.
        •   OSPF will elect DRs and BDRs.
        •   Traffic to DRs and BDRs is multicast to 224.0.0.6. Traffic from DRs and BDRs to other routers is multicast to 224.0.0.5.
        •   Neighbors do not need to be manually specified.
        •   Examples Ethernet

Point-to-Point – indicates a topology where two routers are directly connected.
        • No DRs and BDRs.
        •   All OSPF traffic is multicast to 224.0.0.5.
        •   Neighbors do not need to be manually specified.

Point-to-Multipoint – indicates a topology where one interface can connect to multiple destinations. Each connection between a source and destination is treated as a point-to-point link.
        •    OSPF will not elect DRs and BDRs.
        •   All OSPF traffic is multicast to 224.0.0.5.
        •   Neighbors do not need to be manually specified.

Non-broadcast Multi-access Network (NBMA) – indicates a topology where one interface can connect to multiple destinations; however, broadcasts cannot be sent across a NBMA network.
        •   An example would be Frame Relay.
        •   OSPF will elect DRs and BDRs.
        •   OSPF neighbors must be manually defined, thus All OSPF traffic is unicast instead of multicast. 

Remember: On non-broadcast networks, neighbors must be manually specified, as multicast Hello’s are not allowed.
Read More...

OSPF DR and BDR election

OSPF elect a Designated Router (DR) for each multi- access networks, accessed via multicast address 224.0.0.6. For redundancy purposes, a Backup Designated Router (BDR) is also elected. 

DR and BDR election

  • The router with the highest priority becomes the DR; second highest becomes the BDR. If there is a tie in priority, Whichever router has the highest Router ID will become the DR. 
  • By default router priority will be same.We can change it if we need it
  • Default priority on Cisco routers is 1.If we set Router priority is O, that router will not participate in DR/BDR election
  • In FrameRelay (NBMA -non broadcast multi access) network ,HUB Must be elected as DR .We can do this by changing router priority

To change the priority on an interface: 

  Router(config)#Interface  fa 0/0
  Router(config-if)# ip ospf priority 125 

OSPF routers will form adjacencies with the DR and BDR. If a change occurs to a link, the update is forwarded only to the DR, which then  forwards it to all other routers. This greatly reduces the flooding of LSAs. 

Note: The DR election process is not preemptive .Thus, if a router with a higher priority is added to the network, it will not automatically supplant an existing DR. We need to clear OSPF process for another DR/BDR election,which is not good in a production enviroment 
Enhanced by Zemanta

Did You Enjoy this Article ?

If yes, Then enter your email below to get

more articles on CCNA and CCNP in your inbox

For FREE !

Read More...

OSPF neighbors


In OSPF, routers have to become neighbors first before exchanging link- state advertisements (LSA).After configuring OSPF on routers it will start sending hello packets to each other.The Hello packets also serve as keepalives to allow routers to quickly discover if a neighbor is down. Hello packets also contain a neighbor field that lists the Router IDs of all neighbors the router is connected to.

OSPF routers will only become neighbors if the following parameters within a Hello packet are identical on each router: 

  • Area ID 
  • Subnet Mask 
  • Hello Interval 
  • Dead Interval 
  • Authentication 
Enhanced by Zemanta
Read More...

Basic Notes on OSPF (Open Shortest Path First)

OSPF (Open Shortest Path First)

OSPF is a standardized Link-State routing protocol, designed to scale efficiently to support larger networks.

OSPF Characteristics
  • OSPF employs a hierarchical network design using Areas.
  • OSPF will form neighbor relationships with adjacent routers in the  same Area.
  • Instead of advertising the distance to connected networks, OSPF  advertises the status of directly connected links using Link-State  Advertisements (LSAs).
  • OSPF sends triggered updates only and send only changes
  • LSAs are additionally refreshed every 30 minutes.
  • OSPF traffic is multicast either to address 224.0.0.5 (all OSPF routers) or 224.0.0.6 (all Designated Routers).
  • Point to Point only use multicast address 224.0.0.5
  • OSPF uses the Dijkstra Shortest Path First algorithm to determine the shortest path.
  • OSPF is a classless protocol, and thus supports VLSMs.
  • OSPF supports only IP routing.
  • OSPF routes have an administrative distance is 110.
  • OSPF uses cost as its metric, which is computed based on the bandwidth of the link.
  • OSPF COST = Reference bandwidth/Link Bandwidth
  • OSPF has no hop-count limit. 
  • OSPF forms neighbor relationships, called adjacencies, with other routers in the same Area.
  • All routers must be connected to area 0 (Backbone Area)
  • All Routers in an AREA have same topology table
  • OSPF summarice networks in ABR (Area Border Router)
  • One Area contain localized updates.
  • ASBR (Autonomous system Border Router) Connects OSPF with other dynamic protocols like EIGRP OR RIP
  • only ABR and ASBR can summarize in OSPF
  • OSPF only become neigbour with routers in same area
  • In every single network in OSPF having a shared segment,there will be a DR  and BDR
  • In a shared ethernet segment ,Only DR and BDR will be in FULL state and others might be in 2 Way state 
The OSPF process builds and maintains three separate tables:
  • A neighbor table – contains a list of all neighboring routers.
  • A topology table – contains a list of all possible routes to all known  networks within an area.
  • A routing table – contains the best route for each known network. 
Different types of routers in OSPF
  • Routers in the backbone area (area 0) are called backbone routers
  • Routers between 2 areas (like the one between area 0 and area 1) are called area border routers (ABR) 
  • Routers that run OSPF and are connected to another network that runs another routing protocol (for example RIP) are called autonomous system border routers ( ASBR) 
Each OSPF router is identified by a unique Router ID. The Router ID can be determined in one of three ways:
  • The Router ID can be manually specified.
  • If not manually specified, the highest IP address configured on any Loopback interface on the router will become the Router ID.
  • If no loopback interface exists, the highest IP address configured on any Physical interface will become the Router ID 
Hello / Dead Interval
  • OSPF hello/Dead Interval time for non-broadcast and point-to-multipoint interfaces.  : 30/120 seconds
  • OSPF hello/Dead Interval time for broadcast and point-to-point interfaces.  : 10/40  seconds
  • Notice that, by default, the dead interval timer is four times the Hello interval. 
  • First they look at Router Priority. BY Default Router priority is One.We can change it if we need
  • If Router priority is same,OSPF will look at Highest Router -ID for DR BDR election
  • If we set Router priority is O,that router will not participate in DR/BDR election
  • In FrameRelay (NBMA -non broadcast multi access) network ,HUB Must be elected as DR .We can do this by changing router priority 
  • Type 1 - Represents a router
  • Type 2 - Represents the pseudonode (designated router) for a multiaccess link
  • Type 3 - A network link summary (internal route)
  • Type 4 - Represents an ASBR
  • Type 5 - A route external to the OSPF domain
  • Type 7 - Used in stub areas in place of a type 5 LSA
   OSPF Area types
  • Backbone area (area 0)
  • Standard area
  • Stub area
  • Totally stubby area
  • Not-so-stubby area (NSSA)
  OSPF Network Types
  • Point-to-Point
  • Point-to-Multipoint
  • Broadcast
  • Non-Broadcast
  • Non-Broadcast Multi-Access (NBMA)
Related articles
Read More...

Passive Interface (RIP,OSPF and EIGRP) explained with interview questions


Passive-interface command is used in all routing protocols to disable sending updates out from a specific interface. However the command behavior varies from o­ne protocol to another.

In RIP this command will disable sending multicast updates via a specific interface but will allow listening to incoming updates from other RIP enabled neighbors.This simply means that the router will still be able to receive updates o­n that passive interface and use them in the routing table.

Syntax
R1(config)# router ripR1(config-router)#  Version 2R1(config-router)#  network 10.4.0.0
R1(config-router)#  network 10.2.0.0
R1(config-router)#  passive-interface s0

The passive-interface command will prevent updates from being sent out of the Serial0 interface, but R1 will still receive updates on this interface.We can configure all interfaces to be passive using the passive-interface default command, and then individually use the no passive-interface command on the interfaces we do want updates to be sent out:

Syntax
 R1(config)#router rip
 R1(config-router)#  network 10.4.0.0
 R1(config-router)#  network 10.2.0.0
 R1(config-router)#  passive-interface default
 R1(config-router)#  no passive-interface e0

If you used the neighbor command under the RIP process, the router will send unicast updates as well as multicast updates.The passive-interface command must be used disable Multicast/broadcast updates and allowing only unicast.

Router(config)#router rip
Router(config-router)#  passive-interface s0
Router(config-router)#  passive-interface s1
Router(config-router)#  neighbor 10.3.5.1
Router(config-router)#  neighbor 10.4.5.1


In EIGRP the passive-interface command stops sending outgoing hello packets, hence the router can not form any neighbor relationship via the passive interface. This behavior stops both outgoing and incoming routing updates.

Syntax :
R1(config)# router eigrp 10
R1(config-router)# network 10.4.0.0
R1(config-router)# network 10.2.0.0
R1(config-router)# passive-interface s0

In OSPF the passive-interface has a similar behavior to EIGRP. The command suppresses hello packets and hence neighbor relationships.

R1(config)# router OSPF 101
R1(config-router)#  network 10.4.0.0
R1(config-router)#  network 10.2.0.0
R1(config-router)#  passive-interface s0

Passive interface default command can be used in both EIGRP and OSPF like we used in RIP

Always remember, that the passive-interface command will prevent EIGRP (and OSPF) from forming neighbor relationships out of that interface. No routing updates are passed in either direction.

Important: Passive interface command applying on interfaces wont effect on the sub interfaces created under it.If you want to active "passive interface" command on sub interface,it should be given on that specific sub interface

Interview Questions 
  • What is passive interface ?
  • Explain effect of Passive interface on RIP,EIGRP and OSPF ?
  • What is the effect of default passive interface command ?
  • Why does the EIGRP passive-interface command remove all neighbors for an interface?
  • How do I stop individual interfaces from developing adjacency in an OSPF network?
  • What command is used to stop RIP routing updates from exiting out an interface but still allow the interface to receive RIP route updates?
  • How Does the Passive Interface Feature Work in EIGRP?




Did You Enjoy this Article ?

If yes, Then enter your email below to get

more articles on CCNA and CCNP in your inbox

For FREE !

Read More...