0% found this document useful (0 votes)
36 views8 pages

CCN Expt 8 HK

The document describes configuring OSPF routing on a virtual network with three routers. OSPF was configured on each router with identical process IDs and area 0. The network statements were used to activate OSPF and advertise networks. Neighbor relationships were verified and routing tables showed routes learned via OSPF.

Uploaded by

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

CCN Expt 8 HK

The document describes configuring OSPF routing on a virtual network with three routers. OSPF was configured on each router with identical process IDs and area 0. The network statements were used to activate OSPF and advertise networks. Neighbor relationships were verified and routing tables showed routes learned via OSPF.

Uploaded by

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

Name: Harshda Khairnar XIE ID: 202002015 Roll No: 26

___________________________________________________________________

EXPERIMENT NO. 8
 OSPF

AIM: Create a virtual network using Cisco Packet Tracer & configure Open Shortest Path
First(OSPF) on the routers.

SOFTWARE: Cisco Packet Tracer

THEORY: OSPF stands for Open Shortest Path First. OSPF is a link state open standard based
routing protocol. It was created in mid-1980. The Open Shortest Path First (OSPF) protocol is
a link state protocol that handles routing for IP traffic. Its newest implementation, version 2,
which is explained in RFC 2328, is an open standard. Open Shortest Path First (OSPF) is an
open standard (not proprietary) and it will run on most routers independent of make. Open
Shortest Path First (OSPF) uses the Shortest Path First (SPF) algorithm, developed by Dijkstra,
to provide a loop-free topology. Open Shortest Path First (OSPF) provides
fast convergence with triggered, incremental updates via Link State Advertisements (LSAs).
Open Shortest Path First (OSPF) is a classless protocol and allows for a hierarchical design
with VLSM and route summarization.
The main disadvantages of Open Shortest Path First (OSPF) are Open Shortest Path First
(OSPF) requires more memory to hold the adjacency (list of OSPF neighbors), topology (a link
state database containing all of the routers and their routes), and routing tables, Open Shortest
Path First (OSPF) requires extra CPU processing to run the SPF algorithm and Open Shortest
Path First (OSPF) is a complex routing protocol.

NETWORK DIAGRAM: 

All routers are in OSPF Area 0. Note that the link between R2 and R1 is an Ethernet (10Mbit)
link. All other links are FastEthernet (100Mbit) interfaces.
We’ll start with the configuration between R2 and R3:
Name: Harshda Khairnar XIE ID: 202002015 Roll No: 26
___________________________________________________________________

R2(config)#router ospf 1
R2(config-router)# network 192.168.23.0 0.0.0.255 area 0
R3(config)#router ospf 1
R3(config-router) #network 192.168.23.0 0.0.0.255 area 0
The number “1” is a process ID and you can choose any number you like. It doesn’t matter and
if you want you can use a different number on each router.
The second step is to use the network command. 
network 192.168.23.0 0.0.0.255

Just like RIP the network command does two things:

● Advertise the networks that fall within this range in OSPF.


● Activate OSPF on the interface(s) that fall within this range. This means that OSPF will
send hello packets on the interface.
Behind 192.168.23.0 you can see it says 0.0.0.255. This is not a subnet mask but a wildcard
mask. A wildcard mask is a reverse subnet mask. Let me give you an example:
Subnetmask 255 255 255 0

11111111 11111111 11111111 00000000

Wildcardmas 0 0 0 255
k

00000000 00000000 00000000 11111111


 
Reverse subnet mask means that the binary 1s and 0s of the wildcard mask are flipped
compared to the subnet mask. A subnet mask of 255.255.255.0 is the same as wildcard mask
0.0.0.255. OSPF uses areas so you need to specify the area:
area 0
In our example we have configured single area OSPF. All routers belong to area 0.
After typing in my network command you’ll see this message in the console:
R3# %OSPF-5-ADJCHG: Process 1, Nbr 192.168.23.2 on FastEthernet0/0 from
LOADING to FULL, Loading Done
R2# %OSPF-5-ADJCHG: Process 1, Nbr 192.168.23.3 on FastEthernet1/0 from
LOADING to FULL, Loading Done

R3 and R2 have become neighbours. There’s another command we can use to verify that we
have become neighbours:
R3#show ipospfneighbor
 
Neighbor ID Pri State Dead Time Address Interface
192.168.23.2 1 FULL/BDR 00:00:36 192.168.23.2 FastEthernet0/0
Name: Harshda Khairnar XIE ID: 202002015 Roll No: 26
___________________________________________________________________

R2#show ipospfneighbor
 
Neighbor ID Pri State Dead Time Address Interface
192.168.23.3 1 FULL/DR 00:00:32 192.168.23.3 FastEthernet1/0
Show ipospfneighbor is a great command to see if your router has OSPF neighbors. When the
state is full you know that the routers have successfully become neighbors.
Each OSPF router has a router ID and we check it with the show ip protocols command:
R2#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.23.2
R3#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.23.3
Above you see the router ID of R2 and R3. They used their highest active IP address as the
router ID. Let’s create a loopback on R2 to see if the router ID changes…
R2(config)#interface loopback 0
R2(config-if)#ip address 2.2.2.2 255.255.255.0
This is how you create a loopback interface. You can pick any number that you like it really
doesn’t matter.
R2#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 192.168.23.2
The router ID still the same. We need to reset the OSPF process before the change will take
effect, this is how you do it:
R2#clear ipospf process
Reset ALL OSPF processes? [no]: yes
Use clear ipospf process to reset OSPF. Let’s see if there is a difference:
R2#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 2.2.2.2
We can also change the router ID manually. Let me demonstrate this on R3:
R3#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Name: Harshda Khairnar XIE ID: 202002015 Roll No: 26
___________________________________________________________________

Incoming update filter list for all interfaces is not set


Router ID 192.168.23.3
Right now it’s 192.168.23.3…
R3(config-router)#router-id 3.3.3.3
R3#clear ipospf process
Reset ALL OSPF processes? [no]: yes
The router is friendly enough to warn me to reload or clear the OSPF process. Let’s verify our
configuration:
R3#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 3.3.3.3
As you can see above the router ID is now 3.3.3.3.
Right now we have an OSPF neighbor adjacency between R2 and R3. Let’s configure our
routers so that R2/R1 and R1/R3 also become OSPF neighbors:
R2(config)#router ospf 1
R2(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1(config)#router ospf 1
R1(config-router)#network 192.168.12.0 0.0.0.255 area 0
R1(config-router)#network 192.168.13.0 0.0.0.255 area 0
R3(config)#router ospf 1
R3(config-router)#network 192.168.13.0 0.0.0.255 area 0
I’ll advertise all networks in OSPF. Before we check the routing table it’s a good idea to see if
our routers have become OSPF neighbors:

R2#show ipospfneighbor 
 
Neighbor ID   Pri   State     Dead Time   Address       Interface
192.168.13.1    1   FULL/BDR  00:00:31    192.168.12.1  Ethernet0/0
3.3.3.3         1   FULL/DR   00:00:38    192.168.23.3  FastEthernet1/0
R1#show ipospfneighbor 
 
Neighbor ID   Pri   State     Dead Time   Address       Interface
3.3.3.3         1   FULL/BDR  00:00:33    192.168.13.3  FastEthernet1/0
2.2.2.2         1   FULL/DR   00:00:30    192.168.12.2  Ethernet0/0
R3#show ipospfneighbor 
 
Neighbor ID   Pri   State     Dead Time   Address         Interface
192.168.13.1    1   FULL/DR   00:00:37    192.168.13.1    FastEthernet1/0
2.2.2.2         1   FULL/BDR  00:00:30    192.168.23.2    FastEthernet0/0
Name: Harshda Khairnar XIE ID: 202002015 Roll No: 26
___________________________________________________________________

Excellent our routers have become OSPF neighbours and the state is full which means they are
done exchanging information. Let’s check the routing tables:
R2#show ip route ospf 
O    192.168.13.0/24 [110/2] via 192.168.23.3, 00:09:45, FastEthernet1/0

RESULT:
ROUTER 0
Name: Harshda Khairnar XIE ID: 202002015 Roll No: 26
___________________________________________________________________

ROUTER 1
Name: Harshda Khairnar XIE ID: 202002015 Roll No: 26
___________________________________________________________________

ROUTER 2
Name: Harshda Khairnar XIE ID: 202002015 Roll No: 26
___________________________________________________________________

CONCLUSION:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy