Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
44 views

CNE Tutorial 08 - Subnetting and Dynamic Routing Configuration With OSPFv2

The document discusses subnetting a network and configuring dynamic routing using OSPF between routers. It describes subnetting a network into multiple subnets and assigning them to different networks. It then provides the OSPF configuration needed on each router to establish routing between all the networks and routers.

Uploaded by

Liên Vũ
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

CNE Tutorial 08 - Subnetting and Dynamic Routing Configuration With OSPFv2

The document discusses subnetting a network and configuring dynamic routing using OSPF between routers. It describes subnetting a network into multiple subnets and assigning them to different networks. It then provides the OSPF configuration needed on each router to establish routing between all the networks and routers.

Uploaded by

Liên Vũ
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

HANOI UNIVERSITY

Faculty of Information Technology

CNE – Tutorial Guide


Week 8
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:

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)
Network B has 14 PCs (Switch2): 130.10.5.32/28,
subnet mask is 255.255.255.240, wild card is 0.0.0.15.
Network C has 6 PCs (Switch3): 130.10.5.48/29,
subnet mask is 255.255.255.248, wild card is 0.0.0.7.

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 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:

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


network <ip_of_current_network> <its_wildcard> area <area_id>
(if network subnet mask is a.b.c.d, its wild card is 255-a.255-b.255-c.255-d)

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:

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

Gateway of last resort is not set

130.10.0.0/16 is variably subnetted, 6 subnets, 4 masks


C 130.10.5.0/27 is directly connected, FastEthernet0/0
O 130.10.5.32/28 [110/65] via 130.10.5.58, 00:00:44, Serial2/0
O 130.10.5.48/29 [110/65] via 130.10.5.65, 00:02:14, Serial3/0
C 130.10.5.56/30 is directly connected, Serial2/0
O 130.10.5.60/30 [110/128] via 130.10.5.58, 00:00:44, Serial2/0
[110/128] via 130.10.5.65, 00:00:44, Serial3/0
C 130.10.5.64/30 is directly connected, Serial3/0
Router(config)#

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

Gateway of last resort is not set

130.10.0.0/16 is variably subnetted, 6 subnets, 4 masks


O 130.10.5.0/27 [110/65] via 130.10.5.57, 00:00:58, Serial2/0
C 130.10.5.32/28 is directly connected, FastEthernet0/0
O 130.10.5.48/29 [110/65] via 130.10.5.62, 00:00:48, Serial3/0
C 130.10.5.56/30 is directly connected, Serial2/0
C 130.10.5.60/30 is directly connected, Serial3/0
O 130.10.5.64/30 [110/128] via 130.10.5.57, 00:00:48, Serial2/0
[110/128] via 130.10.5.62, 00:00:48, Serial3/0
Router(config)#

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

Gateway of last resort is not set

130.10.0.0/16 is variably subnetted, 6 subnets, 4 masks


O 130.10.5.0/27 [110/65] via 130.10.5.66, 00:01:42, Serial2/0
O 130.10.5.32/28 [110/65] via 130.10.5.61, 00:00:03, Serial3/0
C 130.10.5.48/29 is directly connected, FastEthernet0/0
O 130.10.5.56/30 [110/128] via 130.10.5.66, 00:00:03, Serial2/0
[110/128] via 130.10.5.61, 00:00:03, Serial3/0
C 130.10.5.60/30 is directly connected, Serial3/0
C 130.10.5.64/30 is directly connected, Serial2/0
Router(config)#

3. Trouble with a connection between 2 routers:


If for some reason, the connection between Router3 and Router4 died:
Because we used dynamic routing (OSPF), the routing table is automatically updated.

We still can ping from PC1 to PC4:

But the route from PC1 to PC4 now is changed: PC1 -> Router3 -> Router2 -> Router4 -> PC4.

You might also like