Docsity

Dynamic Routing Configuration with Subnetting using OSPF in Networking - Prof. Nnguyễn, Study notes of Computer Networks

Toggle sidebar
bg1
NETWORKING – Tutorial Guide
Tut 10
Dynamic Routing Configuration with subnetting
In this tutorial we continue to work with OSPF.
This method means one router will dynamically find the route to others network by
automatically "learning" other routers’ configurations.
The most important point of OSPF routing configuration is to configure a router with each
network it belongs to and we don’t need to care about other routers.
First we have to access Global Configuration mode then using command with syntax:
router ospf <id> (id is a number, normally 100, 200, 300…)
network <ip of current network> <its wildcard> area 0 (if network ip is a.b.c.d, its wild
card is 255-a.255-b.255-c.255-d)
Assume we have a network like this:
In this example, we used Router-PT which has 2 serial ports and 4 Ethernet ports. Connections
between routers are Serial DCE connected to the serial ports of the routers.
Given IP block is 130.10.5.0/25. It means that we have 27 = 128 IPs, from 130.10.5.0 to
130.10.5.127.
1. Subnet the given IP block for all networks:
Network A has 20 PCs (Switch1): 130.10.5.0/27, subnet mask is 255.255.255.224, wild card is
0.0.0.31 (255-255.255-255.255-255.255-224)
pf3

Partial preview of the text

Download Dynamic Routing Configuration with Subnetting using OSPF in Networking - Prof. Nnguyễn and more Study notes Computer Networks in PDF only on Docsity!

NETWORKING – Tutorial Guide

Tut 10

Dynamic Routing Configuration with subnetting

In this tutorial we continue to work with OSPF.

This method means one router will dynamically find the route to others network by

automatically "learning" other routers’ configurations.

The most important point of OSPF routing configuration is to configure a router with each

network it belongs to and we don’t need to care about other routers.

First we have to access Global Configuration mode then using command with syntax:

router ospf (id is a number, normally 100, 200, 300…)

network area 0 (if network ip is a.b.c.d, its wild

card is 255-a.255-b.255-c.255-d)

Assume we have a network like this:

In this example, we used Router-PT which has 2 serial ports and 4 Ethernet ports. Connections

between routers are Serial DCE connected to the serial ports of the routers.

Given IP block is 130.10.5.0/25. It means that we have 2 7 = 128 IPs, from 130.10.5.0 to

1. Subnet the given IP block for all networks:

Network A has 20 PCs (Switch1): 130.10.5.0/27, subnet mask is 255.255.255.224, wild card is

Network B has 14 PCs (Switch2): 130.10.5.32/28, subnet mask is 255.255.255.240, wild card is

Network C has 6 PCs (Switch3): 130.10.5.48/29, subnet mask is 255.255.255.248, wild card is

Network connects router2 and router3: 130.10.5.56/30, subnet mask is 255.255.255.252, wild

card is 0.0.0.3.

Network connects router4 and router2: 130.10.5.60/30.

Network connects router3 and router4: 130.10.5.64/30.

On Serial Interface with DCE cable enable line CLOCK by entering the command:

Router(config-if)#clock rate 1000000

After you have successfully configured IP address to all PCs and routers, all PCs should ping

within their network. But we can not ping from network A to B or A to C. The reason is that

there is no route from network A to B or A to C.

2. Setup routing:

There are two ways to build the routing tables in routers: static routing and dynamic routing. In

the last tutorial, we learnt how to add static routes to routers. In this tutorial, we will configure

OSPF so that the routers can build the routing table dynamically.

Configure Router3 as follows:

Router(config)#router ospf 100 Router(config-router)#network 130.10.5.0 0.0.0.31 area 0 Router(config-router)#network 130.10.5.56 0.0.0.3 area 0 Router(config-router)#network 130.10.5.64 0.0.0.3 area 0 Router(config-router)#

Router2 and router4 are configured similarly:

Router

Router(config)#router ospf 100 Router(config-router)#network 130.10.5.32 0.0.0.15 area 0 Router(config-router)#network 130.10.5.56 0.0.0.3 area 0 Router(config-router)#network 130.10.5.60 0.0.0.3 area 0 Router(config-router)#

Router

Router(config)#router ospf 100 Router(config-router)#network 130.10.5.48 0.0.0.7 area 0 Router(config-router)#network 130.10.5.60 0.0.0.3 area 0 Router(config-router)#network 130.10.5.64 0.0.0.3 area 0 Router(config-router)#

So, after each router has been configured, routes of the networks it belongs to will

automatically added to ip route table of other already‐configured routers of connected