×

Configuring OSPF

Consider the topology given below –

Configuring OSPF

The initial IP configuration table is given below:

Devices Interface IP address
Router1 Se0/0/0 192.168.10.1
Fa0/0 10.0.0.1
Router2 Se0/0/0 192.168.10.2
Fa0/0 20.0.0.1
Switch1  N/A N/A
Switch2 N/A N/A
PC1 Fa0 10.0.0.2
PC2 Fa0 10.0.0.3
PC3 Fa0/0 20.0.0.2
PC4 Fa0/0 20.0.0.3

Configure IP address to router’s interfaces

Router>enable isused to enter the privileged exec mode.

Router#configure terminal is used to enter the global configuration mode.

Router(config)#hostname R1 is used to uniquely identify the router in the whole network.

R1(config)#interface s0/0/0 is used to enter the serial mode.

R1(config-if)#ip address 192.168.10.1 255.255.255.0 is used to configure an IP address in the serial interface.

R1(config-if)#clock rate 64000 is used to control the data flow.

R1(config-if)#no shutdown is used to make interface always up.

R1(config-if)#exit is used to return the previous mode.

R1(config)#interface f0/0 is used to enter the fastEthernet.

R1(config-if)# ip address  10.0.0.1 255.0.0.0 is used to configure an IP address in the fastEthernet interface.

R1(config-if)#no shutdown is used to make interface always up.

R1(config-if)#exit is used to move the global configuration mode.

Router1

On Router R1, give the following commands to configure hostname and IP address.

 Router>enable
 Router#configure terminal
 Router(config)#hostname R1
 R1(config)#interface s0/0/0
 R1(config-if)#ip address 192.168.10.1 255.255.255.0
 R1(config-if)#clock rate 64000
 R1(config-if)#no shutdown
 R1(config-if)#interface f0/0
 R1(config-if)#ip address 10.0.0.1 255.0.0.0
 R1(config-if)#no shutdown
 R1(config-if)#exit 
Configuring OSPF 1

Router2

On Router R2, give the following commands to configure hostname and IP address.

Configuring OSPF 2

Now when we ping from PC1 to PC3, it does not give any reply means there is no communication takes place between the PC1 and PC3.

Configuring OSPF 3

Configure the OSPF routing protocol

To enable OSPF, the following commands are used:

R1(config)# router ospf process_ID is used to enable OSPF routing protocol. Process_ID contains any positive integer from 1 to 65,535.

R1(config-router)# network IP_network address  [wildcard_mask] area [area number]

The above command allows us to specify interfaces which we want to include in the OSPF process.

The wildcard mask is used with the network address to filter the interfaces.

Router1

On Router1, we use following commands to configure OSPF:

 R1(config)#router ospf 100
 R1(config-router)#network 10.0.0.0 0.255.255.255 area 0
 R1(config-router)#network 192.168.10.0 0.0.0.255 area 0
 R1(config-router)#exit
 R1(config)# 
Configuring OSPF 4

Router2

On Router2, we use the following commands to configure OSPF:

Configuring OSPF 5

Verifying OSPF Routing

To verify OSPF Routing, we use "show ip route" command on the routers (router1 or router2). If in the routing table there is the entry of the symbol "O" then we say that OSPF is enabled in the network.

Router1's routing table is shown below:

Configuring OSPF 6

Router2's routing table is shown below:

Configuring OSPF 7

After configuring OSPF, we again ping from PC1 to PC3, and then it replies with the ip address, bytes, time, and TTL, which means communication has been started between PC1 and PC2.

Configuring OSPF 8

Related Topics

Configure IP Routing

IP Routing stands for “Internet Protocol Routing.”It is the process of sending packets (data) from a source network to a destination network.In IP Routing, routers select the best route for a data packet from the...

2 minutes read.

Verifying OSPF Configuration

There are several ways to verify OSPF configuration and operations, which are: show ip route commandshow ip ospf commandshow ip ospf database commandshow ip ospf interface commandshow ip protocol commandshow ip ospf neighbor commanddebugging ospf Consider the following topology –We...

2 minutes read.

Banner config

Banner config The banner is a little pool which is used in Cisco systems and also in other systems like Unix, Linux and so no.It permits a text that is displayed when you log in a...

1 minute read.

Subnetting

Subnetting is the process of dividing a big network into many small networks. Suppose there is a company which has four departments like Development, HR, Marketing, and Testing. We don't want that all...

5 minutes read.

EIGRP Basics

EIGRP stands for Enhanced Interior Gateway Routing Protocol. It is also called as the Hybrid routing protocol. It contains the features of both distance vector and link-state routing protocols. Characteristics of EIGRP There are the...

5 minutes read.

Routing Information Protocol

Routing Information Protocol (RIP) Routing Information Protocol is a distance-vector routing protocol. It uses hop count to determine the best way for the remote network. By default, it has a maximum hop count 15. In...

5 minutes read.

Components of a Cisco Router

The Internal Components of a Cisco Router Before troubleshoot and configure Cisco devices, it is necessary to know the major components of the Cisco routers. The given table shows all the internal components of...

2 minutes read.

Configuring Catalyst Switches

When you power on a new purchased Switch for the first time, it runs a series of Power-On Self Tests (POSTs) operations. A  POST is designed to verify the basic operations of the...

3 minutes read.

Configuring IP Routing in Our Network

There are 3 types of IP routing that we can configure in our network. Default RoutingStatic RoutingDynamic Routing Default Routing Default Routing is used to configure unknown destination networks.It is used on stub networks. Stub networks are...

3 minutes read.

Data Encapsulation and De-Encapsulation

Data Encapsulation It is the process of adding headers and trailers to data. When a host transmits data to another device over a network, the data is encapsulated, with protocol information...

5 minutes read.

Saving, Erasing, and Verifying Configuration

Saving Configuration Cisco device store commands information into two configuration files: running configurationstartup configuration running configuration In the running configuration, you can manually save the data from RAM to NVRAM by typing the copy running-config startup-config command. When you...

3 minutes read.

Variable Length Subnet Masks (VLSMs)

Variable Length Subnet Masks (VLSMs) A VLSM is a process of allocating IP addresses to the subnets according to the user’s need.VLSM is introduced to avoid the wastage of IP addresses.It allows you to...

3 minutes read.

Configure DHCP

 DHCP DHCP stands for Dynamic Host Configuration Protocol.It is a client server-based architecture which involves DHCP client and DHCP server.It is a messaging system for the communication between the DHCP server and DHCP client.It...

3 minutes read.

CCNA Tutorial

What is CCNA? CCNA stands for Cisco Certified Network Associate. It is a certification course offered by Cisco. CCNA improves your understanding of the internet working and how different network topologies work...

3 minutes read.

Cisco IOS Overview

Cisco IOS Overview Cisco Internetwork Operating System (IOS) is a multitasking operating system which controls all functions of Cisco routers and switches. Willaim Yeager wrote the first IOS in 1986.It is used to allocate resources and manages...

2 minutes read.

Types of Spanning Tree Protocol

There are the following types of Spanning Tree Protocol – 1. Common Spanning Tree (802.1D) A Common Spanning Tree (802.1D) standard is developed by IEEE which elects only one Root Bridge for the...

2 minutes read.

IP Addressing

IP Addressing IP Addressing is designed to allow hosts on a network to communicate with another host on a different network. There are two types of IP address: IPv4 IPv4 addresses are 32-bits long. It allows...

2 minutes read.

Switching

A switch is a network device which is used to connect multiple devices (routers, computers) inside the LAN (Local Area Network). It operates at Data Link Layer (Layer 2) of the OSI reference...

3 minutes read.

Configuring OSPF

Consider the topology given below – The initial IP configuration table is given below: Devices Interface IP address Router1 ...

2 minutes read.

Configuring EIGRP

Consider the topology given below – The initial IP configuration table is given below: Devices Interface IP address Router1 ...

2 minutes read.