You are on page 1of 12

Lab Report

Course Title: Computer Networks Laboratory


Course Code: CSE-3634

Spring-2023

Lab No: 10

Name of Lab Work: Static Routing

Student’s ID : C201040
Date of : 18/10/2023
Performance
Date of : 25/10/2023
Submission

Marks :
1. Introduction:
Implementing the Open Shortest Path First (OSPF) dynamic routing protocol on a network is
a crucial step in ensuring efficient and scalable routing within the network infrastructure.
OSPF is a widely-used interior gateway protocol (IGP) that is designed to determine the best
path for routing data packets across an IP network.

2. Description:
In this lab, applying several steps to create OSPF protocol
Network Design and Topology: Before implementing OSPF, the first step is to design the
network and establish its topology. This involves identifying all routers and network segments
that need to participate in the OSPF routing process. Understanding the network's physical
and logical layout is essential for OSPF to function optimally.
Router Configuration: Each router in the network needs to be configured to support OSPF.
This involves enabling OSPF on the router and specifying the network interfaces that will
participate in the OSPF process. Routers exchange routing information through OSPF-enabled
interfaces.
Area Design: OSPF networks are divided into areas, each with its own designated area
identifier. It's important to design the areas in a way that optimizes network performance.
3. Topology:

Fig: Topology for 8 pc devices connected by 4 subnet


This topology using Devices:
1. 8 UPCS as like pc:
PC1, PC2, PC3, PC4, PC5, PC6, PC7, PC8
2. 4 Ethernet switches:
Switch1, Switch2, Switch3, Switch4
3. 4 Router(7200)
R1, R2, R3,R4
4. Configurations:

PC No IP Address Router Submask Address

PC1 192.168.102.2 R1 255.255.255.192

PC2 192.168.102.130 R3

PC3 192.168.102.66 R2

PC4 192.168.102.195 R4

PC5 192.168.102.3 R1

PC6 192.168.102.131 R3

PC7 192.168.102.67 R2

PC8 192.168.102.197 R4
5. Configuration command in terminal to assign the IP address and
Submask address each PC’s:

Command code for PC ip address assigning with gateway:


PC1> ip 192.168.102.2 255.255.255.192 192.168.102.1
(PC1 ip address) (submask) (Gateway R1
ip address)

In the terminal:

Fig: PC ip address 192.168.102.3 assign with 192.168.102.1 gateway

The PC1 assigned ip address is 192.168.102.3 and when it needs


routing outside the subnet using the gateway 192.168.102.1 for
connecting other PCs from other subnets. The submask is
255.255.255.192. We used the same code for configuring other pc’s.
Command code for R1 ip address assigning:

R1#configure terminal
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.102.1 255.255.255.192
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#interface serial 1/0
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#interface serial 1/1
R1(config-if)#ip address 40.0.0.2 255.255.255.252
R1(config-if)#no shut
R1(config-if)#clock rate 64000
R1(config-if)#exit
R1(config)#exit
R1#show ip route
R1#write

In the terminal:

Fig: router R1 config the interface f0/0, s1/0, s1/1


The router R1 assigned the interface,
f0/0 is connected with ethernet Switch1 by ip address
192.168.102.1 and submask 255.255.255.192.
s1/0 is connect 10.0.0.1 with s1/0 interface from router R2 ip
address 10.0.0.2
s1/1 is connect 40.0.0.2 with s1/1 interface from router R3 ip
address 40.0.0.1

We used the same configuration code but changed the ip addresses and
submasks for R2, R3, R4.

Command code for R1 OSPF assigning:

R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#network 192.168.102.1 0.0.0.63 area 0
R1(config-router)#network 10.0.0.1 0.0.0.3 area 0
R1(config-router)#network 40.0.0.2 0.0.0.3 area 0

In the terminal:
Check the ip protocol for R1:

Command code:

R1#show ip protocol

Terminal:

Check OSPF:

Command code:

R1#show ip ospf int br


Terminal:
6. Result:
Ping from PC1 to other subnets pcs:

Fig: PC1 to PC3,P5,P6..


Here pc1 ping check with other subnet pcs like pc3, pc5 etc.
7. Result analysis:
Using Wireshark(Tool Application) for analysis the capture every path between router to
router and router to ethernet switch.

Router R2 to R1 capture analysis:

Fig: Router R2 to R1 capture analysis

Status:
Frame 1: 84 bytes on wire (672 bits), 84 bytes captured (672 bits) on
interface -, id 0
Cisco HDLC
Internet Protocol Version 4, Src: 10.0.0.1, Dst: 224.0.0.5
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0xc0 (DSCP: CS6, ECN: Not-ECT)
Total Length: 80
Identification: 0x039c (924)
000. .... = Flags: 0x0
...0 0000 0000 0000 = Fragment Offset: 0
Time to Live: 1
Protocol: OSPF IGP (89)
Header Checksum: 0xcaf3 [validation disabled]
[Header checksum status: Unverified]
Source Address: 10.0.0.1
Destination Address: 224.0.0.5
Open Shortest Path First
OSPF Header
Version: 2
Message Type: Hello Packet (1)
Packet Length: 48
Source OSPF Router: 192.168.102.1
Area ID: 0.0.0.0 (Backbone)
Checksum: 0x9e0a [correct]
Auth Type: Null (0)
Auth Data (none): 0000000000000000
OSPF Hello Packet
Network Mask: 255.255.255.252
Hello Interval [sec]: 10
Options: 0x12, (L) LLS Data block, (E) External Routing
Router Priority: 1
Router Dead Interval [sec]: 40
Designated Router: 0.0.0.0
Backup Designated Router: 0.0.0.0
Active Neighbor: 192.168.102.65
OSPF LLS Data Block
Checksum: 0xfff6
LLS Data Length: 12 bytes
Extended options TLV

8. Conclusion:
During this lab I face problems are, first only 4 limit path access when area 0 means
backbone. Be careful when extra paths use the different areas to create new areas for OSPF
protocol.

You might also like