0% found this document useful (0 votes)
13 views16 pages

Configure and Verify Single Area OSPFv2 Part-1 PDF

verify single area OSPFv2

Uploaded by

www.ali89qhome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views16 pages

Configure and Verify Single Area OSPFv2 Part-1 PDF

verify single area OSPFv2

Uploaded by

www.ali89qhome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

OSPF (Open Shortest Path First) protocol:

o OSPF is term which stands for Open Shortest Path First.


o Link State protocol sends update based in state of the link.
o When a link comes up and goes down it sends the updates.
o OSPF protocols is a dynamic open standard Routing Protocol.
o OSPF protocols is the Link-State dynamic routing protocol.
o OSPF protocols uses the Shortest Path First (SPF) algorithm.
o OSPF protocols uses IP protocol type 89 (not TCP or UDP).
o OSPF External and Internal Administrative Distance is 110.
o OSPF is a classless Routing protocol and OSPF metric is Cost.
o OSPF use multicast address 224.0.0.5 to send the hello packet.
o OSPF use multicast address 224.0.0.6 for all designated routers.
o OSPF default Hello time is 10 seconds and dead time is 40 seconds.
o OSPF protocols supports both the VLSM and route summarization.
o OSPF use wildcard mask, which is the reciprocal of subnet mask.
o OSPF protocols supports both MD5 and clear text authentication.
o OSPF protocols supports the summarization at ABRs router only.
o OSPF are requires more memory and CPU processing to run.
o OSPF work on area, Area 0 is the backbone of OSPF technology.
o OSPF have Neighbor table, Topology table and Routing table.
o OSPF packets are only sends to the neighbor of own Area.
o OSPF protocols supports both IPv4 and IPv6 routed protocols.
o OSPF load balancing with equal cost routes for same destination.
o OSPF dynamic routing protocols supports unlimited hop counts.
o OSPF protocols supports trigger updates for fast convergence.
o OSPF sends update with a sequence number of 0x80000001.
o The sequence number ends with 0x7FFFFFFF and start again.
o The sequence number will increment by one in every updates.
o OSPF protocol is more complex to setup and hard to troubleshoot.
OSPF Terminologies:
Area:
o In Open Shortest Path First (OSPF) dynamic protocol Area is like a Subnetting.
o It allows separating the large internetwork into smaller networks known as areas.
o OSPF implements two levels hierarchy with areas: backbone and area off backbone.
Backbone:
o In Open Shortest Path First Protocol Backbone is central point of this implementation.
o Routers running in this area required to maintain complete database of entire network.
o All areas In Open Shortest Path First (OSPF) Protocol is needed to connect with this area.
Area off Backbone:
o In Open Shortest Path First (OSPF), Area off backbone is the extension of the backbone.
o Routes running in this area required to maintain specific database instead of complete.
o In Open Shortest Path First (OSPF), protocol It will speed-up the convergence time.

Router ID:
o Every Router in Open Shortest Path First network, needs the unique OSPF Router ID.
o The OSPF Router ID is used to provide & give a unique identity to the OSPF Router.
o There are different ways in Open Shortest Path First protocol which it can be identified.
o The highest IP address of the active Physical interface of the router becomes the Router ID.
o If a logical interface is configured , then highest IP address of logical interface becomes RID.
o If specify the Router-ID manually then it takes priority over all and become the Router-ID.
Link:
o Link is an interface running Open Shortest Path First (OSPF) routing protocol.
o When we add an interface in OSPF process, it will be considered as a link.
State:
o In Open Shortest Path First (OSPF), State is the information associated with an interface.
o A link or Interface contains several information such as IP address, up/down status, subnet.
o A link also have subnet mask, type of interface, type of network , bandwidth and delay etc.
o Open Shortest Path First (OSPF) dynamic protocols consider this information as the state.
LSA:
o Link State Advertisement (LSA) is data packet, it contains Link-State & routing information.
o Open Shortest Path First dynamic protocol uses it to share & learn network information.
LSDB:
o Every Open Shortest Path First (OSPF) router maintains a Link State Database (LSDB).
o Link State Database (LSDB) is collection of all Link State Advertisement received by router.
o Every LSA has unique sequence number, OSPF stores LSA in LADB with sequence number.
Internal Router:
o It is a router that has only OSPF neighbor relationships with routers in the same area.
o In Open Shortest Path First (OSPF) Internal Router has all of its interfaces in single area.
Backbone Router:
o The area 0 is known as backbone area & routers in area 0 are known as backbone routers.
Designated Router (DR) and Backup Designated Router (BDR):
o Designated Router is router interface elected among all routers on network segment.
o And Backup designated (BDR) is a backup for the Designated Router (DR) in OSPF.
o DRs are used for reducing network traffic by providing a source for routing updates.
o The Designated Router (DR) maintains a complete topology table of the network.
o The Designated Router (DR) sends the updates to the other routers via multicast.
o All routers in an area will form slave/master relationship with Designated Router (DR).

Router Priority:
o It is used to determine who will become Designated or Backup Designated Router.
o In Open Shortest Path First (OSPF) Dynamic Protocols The default priority is one (1).
o In Open Shortest Path First (OSPF) Router Priority, value range is between 0 to 255.
o The range of priority values that allow a router to be a candidate are 1 to through 255.
o A priority setting of (0) zero means that the router does not participate in the election.
o Changing the priority setting to zero (0) means router can never become the DR or BDR.
Area Border Router (ABR):
o ABR is router that connects one or more OSPF areas to the main backbone network.
o Area Border Router (ABR) is considered a member of all areas it is connected to.
Autonomous System Boundary Router (ASBR):
o If it is one interface is in OSPF Domain & other interface in any other routing protocol.
o It requires redistribution in order to make router as Autonomous System Boundary Router.
o To check the Autonomous System Boundary Router run the command: show ip protocols.
OSPF Tables:
Each OSPF router stores routing and topology information in three tables: Neighbor table,
Topology table and Routing Table.
OSPF Routing Table:
OSPF stores single best route for each destination in this table. Router uses this table to
forward the packet. There is a separate routing table for each routed protocol.

O This route was learned through OSPF.


192.168.3.0/24 Destination learn network and 24 is subnet mask.
110 110, is the Administrative Distance of OSPF.
2 This is the metric, Total cost to get to the destination.
192.168.2.3 Next Hop IP Address where to send the traffic.
00:45:57 Time since the route was learnt.
GigabitE1/0 The outbound interface going towards the destination.

OSPF Neighbor Table:


Contain information about the neighbors; Neighbor table includes all neighbors that is directly
connected to router using OSPF. Contains all discovered OSPF neighbors with whom routing
information will be interchanged.

Neighbor ID The Neighbor ID is the router ID of the neighbor router.


Pri The Pri field indicates the priority of the neighbor router.
State The State field indicates the functional state of the neighbor router.
Dead Time The amount of time remaining that the router waits to receive an OSPF
hello packet from the neighbor before declaring the neighbor down.
Address The IP address of the interface to which this neighbor is directly connected.
Interface The interface on which the OSPF neighbor has formed adjacency.
OSPF Topology Table:
Topology Table contains the entire road map of the network with all available OSPF routers and
calculated best and alternative paths. The OSPF database contains all LSAs that describe the
network topology.

OSPF Router This router OSPF router ID that is 192.168.2.1 highest interface IP.
With ID
(192.168.2.1)
Process ID 1 Process ID of the OSPF configured by Network Administrator.
Link ID The IDs of the routers in the area. There are three routers in Area 0.
ADV Router Router ID of the routers who is advertising the LSA.
Age Maximum age counter in seconds. The maximum is 3600 seconds or 1 hour
Seq# It starts from 0x80000001 and will increase by 1 for each update.
Checksum This is check sum of each LSA.
Link Number of interfaces detected per router. Every router has 2 links in Area.
OSPF Metric:
OSPF uses a metric called cost, which is based on the bandwidth of an interface.
Cost = Reference Bandwidth / Interface Bandwidth
the reference bandwidth is a default value on Cisco routers which is a 100Mbit (108) interface.
Divide the reference bandwidth by the bandwidth of the interface and get the cost. The lower
the cost the better the path is. In route, that has lowest cumulative cost value between source
and destination will be selected for routing table. If two path is equal cost, OSPF will use both
paths and will load balance among them 50/50.
Default Cost of Interfaces
Interface Type Bandwidth Metric Calculation Cost
Ethernet Link 10Mbps 100000000/10000000 = 10 10
FastEthernet Link 100Mbps 100000000/100000000 = 1 1
Serial Link 1544Kbps 100000000/1544000 = 64.76 64
Gigabyte Link 1 Gbps 1
10 Gigabit Link 10 Gbps 1
40 Gigabit Link 40 Gbps 1
100 Gigabit Link 100 Gbps 1

From PC1 to PC2 total OSPF cost is 12 because in the way one Ethernet link which is connected
between R3 to PC2. Cost is counting from outgoing interfaces to reach destination. Therefore,
from PC1 to PC2 OSPF total cost is cost is 12 of R1, R2 and R3 outgoing interfaces.
From PC2 to PC1 total OSPF cost is 3 as all link are FasEthernet. Cost is counting from outgoing
interfaces to reach destination. Therefore, from PC2 to PC1 OSPF total cost is cost is 3 of R3, R2
and R1 outgoing interfaces.
OSPF Basic Configuration:
OSPF Protocols use wildcard mask, which is 32 bits long. It is inverted of subnet masks, with the
zero bits indicating that the corresponding bit position must match the same bit position in the
IP address. The one bits indicate that the corresponding bit position does not have to match the
bit position in the IP address.

Neighbor Configuration:
To make two OSPF routers neighbors, simple enable OSPF on the connected interfaces. There
are two ways, by using the network command or by enabling the OSPF process on the interface
directly. OSPF Neighbor Requirements are mention below:
o The devices must be on the same subnet.
o Must not be passive on connected interface.
o The devices must be in the same area.
o The devices hello and dead intervals must match.
o Router IDs must be unique.
o The devices must have the same authentication configuration.
Commands Description
R1(config)#router ospf 1 Enter OSPF mode choose Process ID 1
R1(config-router)#network 192.168.12.0 Enable OSPF by using network command,
0.0.0.255 area 0 wildcard and area 0
R2(config)#interface FastEthernet 0/0 Enter interface mode of R2
R2(config-if)#ip ospf 1 area 0 Enable OSPF on this interface area 0
R2(config-if)#exit Exit from interface mode
R2(config)#interface loopback 2 Enter loopback interface mode of R2
R2(config-if)#ip ospf 1 area 0 Enable OPSP on this interface area 0
R1# show ip ospf neighbor Verify ospf neighbor relationship
R1# show ip ospf interface f0/0 Verify OSPF neighbor relationship
R1# show ip ospf Verify OSPF process
R1# show ip ospf database Verify OSPF database
R1# show ip protocols Verify running protocols on Router
R1# debug ip ospf packet On debug for OSPF packets
R1# debug ip ospf hello On Debug for OSPF hello packet
OSPF Neighbor Adjacencies :
Before establishing a neighbor relationship, OSPF routers go through several state changes.
Down State, Init State, 2-Way State, Exstart State, Exchange State, Loading State and Full State.
State Description
Down State No hello have been received. All OSPF routers begin in this state.
Init State The interface has detected a Hello packet coming from a neighbor, but
bi-directional communication has not yet been established.
2-Way State When hello is exchanged between two OSPF routers that is called 2 way.
Designated Router (DR) and BDR is elected in this stage.
Exstart State Beginning of the LSDB exchange between both routers. Routers will start
to exchange link state information. Master & slave is elected in this stage.
Exchange State Routers will describe their entire link-state database by sending database
description packets. At this state, packets could be flooded to other
interfaces on the router.
Loading State In this state actual database is exchanged means that LS-Request, LS-
Update, LS Acknowledgement are also exchanged.
Full State At this state, the adjacency is complete. The neighboring routers are fully
adjacent. Adjacent routers will have a similar link-state database.

R1# debug ip ospf adj


R1# clear ip ospf process
Reset ALL OSPF processes? [no]: yes
OSPF RID (Router ID):
o RID is a unique identifier of Router in Open Shortest Path First (OSPF) network.
o RID must be unique within the autonomous system in Open Shortest Path First.
o Through Router ID (RID) Routers identify each other in AS (Autonomous System).
o Router ID is 32-bit long number same as Internet Protocol version 4 (IPV4) address.
o IPv4 address is also 32 bit in length you can use IPv4 address as a RID (Router ID).
o Manual configuration => Loopback interface => Active interface while selecting RID.
o If assigned Router ID (RID) manually, OSPF will not look in next two options to use.
o When multiple IP addresses are available, OSPF always pick highest IP address for RID.
o For network, stability always set RID by router-id command or using loopback interfaces.

Routers Selection RID:


An Open Shortest Path First (OSPF) Router looks in three places for RID (Router ID):
o In Open Shortest Path First (OSPF) Router look Manual configuration of router ID.
o In Open Shortest Path First Router look Highest IP address on loopback interface.
o In Open Shortest Path First Router look Highest IP address on physical interface.
DR (Designated Router) & BDR (Backup Designated Router):
o Open Shortest Path First (OSPF) uses DR and BDR on each multi-access network.
o DR & BDR election occurs in multi-access Broadcast & Non-Broadcast network types.
o DR is the Router in charge to maintain the Open Shortest Path First topology table.
o DR is the Router in charge to distribute updates to other routers within same segment.
o When a router is not the Designated Router (DR) or BDR it is called a DROTHER.
o All other routers will form adjacencies only with the elected DR and BDR routers.
o DR reduce the network traffic between neighbors by providing single source of updates.
o It is possible to change the priority if you like by using the ip ospf priority, command.
o Default Open Shortest Path First (OSPF) priority is set to one (1) which can be changed.
o A priority of 0 means the router can never be elected as Designated Router DR or BDR.
o In Open Shortest Path First (OSPF) use clear ip ospf process before change takes effect.
DR and BDR Election:
The default Designated Router (DR) election criteria are as follows:
o The Router configured with the highest priority wins the election.
o The default priority is 1 and the possible values range between 0 – 255.
o If the priority is set to 0, the router will not participate in the DR/BDR election.
o If the routers configured priority, tie then it use highest Router ID (RID) as tiebreaker.
o Router with the second highest priority value becomes the Backup Designated Router.
o If a router with the higher priority comes online after the election has taken place;
o It will not become Designated Router (DR) or BDR until DR and BDR router fail.
o If the DR fails, BDR will take over, another election will take place to elect a new BDR.
o In Designated Router and Backup Designated Router, Preemption is not supported.
o First router to come up will be DR and the second will be Backup Designated Router.
o Each other router will exchange routing information only with the DR and the BDR.
o DR will then distribute topology information to every other router inside the same area.
o To send routing information to a DR or BDR, the multicast address of 224.0.0.6 is used.
o A Designated Router DR sends routing updates to the multicast address of 224.0.0.5.
o If the DR fails, the BDR will take its role of redistributing routing information to other.
OSPF Network Types:
The network type defines how the neighbor relationship will be formed. Behavior of OSPF when
operating in these different network types – whether hellos are multicast or unicast, if DR/BDR
are elected, and so on. There are five different OSPF network types on a Cisco router point-to-
point, broadcast, non-broadcast, point-to-multipoint non-broadcast and point-to-multipoint.
Network Type Hello Timer Dead Timer Adjacency
Broadcast 10 40 Automatic + DR/BDR
Non-Broadcast 30 120 Manual + DR/BDR
Point-to-Multipoint 30 120 Automatic No DR/BDR
Point-to-Multipoint non-Broadcast 30 120 Manual No DR/BDR
Point-to-Point 10 40 Automatic No DR/BDR

Point-to-Point Network:
This is the simplest form of the network types. Point-to-Point network types are intended to be
used between two directly connected routers. An example of a point-to-point link is a serial link
connecting just two routers using HDLC or PPP. With point-to-point links, OSPF does not select
a DR or BDR. In addition, hello packets are sent to the multicast address 224.0.0.5. The Point-to-
Point network type has a 10-second hello and 40-second dead timer. Discovers neighbors
dynamically.

R1 Configuration R2 Configuration
R1(config)#interface s1/0 R2(config)#interface s1/0
R1(config-if)#ip address 192.168.12.1 R2(config-if)#ip address 192.168.12.2
255.255.255.0 255.255.255.0
R1(config-if)#no shutdown R2(config-if)#no shutdown
R1(config)#router ospf 1 R2(config)#router ospf 1
R1(config-router)#network 192.168.12.0 R2(config-router)#network 192.168.12.0
0.0.0.255 area 0 0.0.0.255 area 0
R1#show ip ospf interface s1/0 R2#show ip ospf interface s1/0
R1#show ip ospf neighbor R2#show ip ospf neighbor
Capture packets of one of the serial interfaces, which will enable to look into the details of the
hello packet sent by the routers. The packet is sent to the multicast address of 224.0.0.5. In
addition, notice that the ‘Designated Router’ and ‘Backup Designated Router’ fields are set to
0.0.0.0 meaning there is no DR or BDR. 10-second hello and 40-second dead timer.

Broadcast Networks:
A network type that connects two or more OSPF routers over a broadcast media such as
Ethernet. The Broadcast network type requires that a link support Layer 2 Broadcast
capabilities. On broadcast networks, neighbors are dynamically discovered by the hellos that
sent to the multicast address of 224.0.0.5. In addition, DR and BDR are elected on these
networks. The Broadcast network type has a 10 second hello and 40 second dead timer.
Routers Configurations
R3(config)#interface FastEthernet0/0 R4(config)#interface FastEthernet0/0
R3(config-if)#ip address 192.168.1.3 R4(config-if)#ip add 192.168.1.4
255.255.255.0 255.255.255.0
R3(config-if)#no shutdown R4(config-if)#no shutdown
R5(config)#interface FastEthernet0/0 R3(config)#router ospf 1
R5(config-if)#ip add 192.168.1.5 R3(config-router)#network 192.168.1.0
255.255.255.0 0.0.0.255 area 0
R5(config-if)#no shutdown

R4(config)#router ospf 1 R5(config)#router ospf 1


R4(config-router)# network 192.168.1.0 R5(config-router)# network 192.168.1.0
0.0.0.255 area 0 0.0.0.255 area 0
R3#show ip ospf interface f0/0 R4#show ip ospf interface f0/0
R5#show ip ospf interface f0/0 R3# show ip ospf neighbor

A packet capture of the hello packet shown below. Notice that a DR and a BDR have been
elected on this network. The packet is sent to the multicast address of 224.0.0.5.

You might also like