CNE Tutorial 08 - Subnetting and Dynamic Routing Configuration With OSPFv2
CNE Tutorial 08 - Subnetting and Dynamic Routing Configuration With OSPFv2
Assume we have a network like the following map. 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.
130.10.5.0/25 is the given IP block.
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:
On each Serial Interface with DCE cable, we activate/open the interface and enable line CLOCK
by entering the commands (Router 3 for example)
Router(config)#int se2/0
Router(config‐if)#no shutdown
Router(config‐if)#clock rate 1000000
Router(config‐if)#ip address 130.10.5.57 255.255.255.252
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:
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:
Router2
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)#
Router4
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
networks, and vice versa.
Please wait for 1 minutes and then you can ping successfully from any PC to another one.
Verification:
Router 3
Router(config)#do show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Router 2
Router(config)#do show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Router 4
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
But the route from PC1 to PC4 now is changed: PC1 -> Router3 -> Router2 -> Router4 -> PC4.