Dynamic routing, also called adaptive routing, is a process where a router can forward data via a different route or given destination based on the current conditions of the communication circuits within a system. The term is most commonly associated with data networking to describe the capability of a network to 'route around' damage such as loss of a node or a connection between nodes, so long as other path choices are available. Dynamic routing allows as many routes as possible to remain valid in response to the change.
Systems that do not implement dynamic routing are described as using static routing as we previously saw, where routes through a network are described by manually fixed paths. where the loss of a node or a connection between nodes isn't compensated for. This means that anything that wishes to take an affected path will either have to wait for a repair in case of a failure, or will have to fail to reach it's destination and give up the journey.
First of all, let's setup the 4 networks and their gateways:
RouterA will be given the 192.168.1.0/24 subnet, RouterB the 192.168.2.0/24 subnet, RouterC the 192.168.3.0/24 subnet, and RouterD the 192.168.4.0/24 subnet on their Gig0/0 interfaces:
RouterA
RouterA>en
RouterA#conf t
RouterA(config)#int gig0/0
RouterA(config-if)#ip address 192.168.1.1 255.255.255.0
RouterA(config-if)#no shutdown
RouterA(config-if)#exit
RouterA(config)#exit
RouterA#copy run start
RouterA#exit
RouterA>
Do the same for the other 3 routers making sure you change what i highlighted and you will get this result:
Then give the correct configuration to the PCs of each network:
NetworkA:You can verify the configuration is active by running ipconfig:
Do the same for the other 3 networks and once that's done we will link the 4 routers together using two HWIC-2T WAN interface cards on each router:
The problem here is that we can't add it while the power is on, so we need to power the router off , put the 2 cards and then power it back on:
And here you see why it was important to run the "copy run start" command earlier, because we just restarted the router, and if the runnign config wasn't saved, we would have to enter all of our commands all over again.
Once that's done, we have a few extra ports to link using Serial Connections.
Once they are properly linked, we need to configure the Serial Connections
RouterA>en
RouterA#conf t
RouterA(config)#int se0/3/0
RouterA(config-if)#clock rate 64000
RouterA(config-if)#ip address 200.100.1.1 255.255.255.0
RouterA(config-if)#no shutdown
RouterA(config-if)#exit
RouterA(config)#int se0/3/1
RouterA(config-if)#ip address 200.100.4.2 255.255.255.0
RouterA(config-if)#no shutdown
RouterA(config-if)#exit
RouterA(config)#exit
RouterA#copy run start
RouterA#exit
RouterA>
RouterB
RouterB>en
RouterB#conf t
RouterB(config)#int se0/3/0
RouterB(config-if)#clock rate 64000
RouterB(config-if)#ip address 200.100.4.1 255.255.255.0
RouterB(config-if)#no shutdown
RouterB(config-if)#exit
RouterB(config)#int se0/3/1
RouterB(config-if)#ip address 200.100.3.2 255.255.255.0
RouterB(config-if)#no shutdown
RouterB(config-if)#exit
RouterB(config)#exit
RouterB#copy run start
RouterB#exit
RouterB>
RouterC
RouterC>en
RouterC#conf t
RouterC(config)#int se0/3/0
RouterC(config-if)#clock rate 64000
RouterC(config-if)#ip address 200.100.3.1 255.255.255.0
RouterC(config-if)#no shutdown
RouterC(config-if)#exit
RouterC(config)#int se0/3/1
RouterC(config-if)#ip address 200.100.2.2 255.255.255.0
RouterC(config-if)#no shutdown
RouterC(config-if)#exit
RouterC(config)#exit
RouterC#copy run start
RouterC#exit
RouterC>
RouterD
RouterD>en
RouterD#conf t
RouterD(config)#int se0/3/0
RouterD(config-if)#clock rate 64000
RouterD(config-if)#ip address 200.100.2.1 255.255.255.0
RouterD(config-if)#no shutdown
RouterD(config-if)#exit
RouterD(config)#int se0/3/1
RouterD(config-if)#ip address 200.100.1.2 255.255.255.0
RouterD(config-if)#no shutdown
RouterD(config-if)#exit
RouterD(config)#exit
RouterD#copy run start
RouterD#exit
RouterD>
Side note: the clock speed is being set on only ONE side of the serial connection is totally intentional.
Once that's done, all we need to do is activate the dynamic routing protocol itself (RIPv2)
RouterA:
RouterA>en
RouterA#conf t
RouterA(config)#router rip
RouterA(config-router)#version 2
RouterA(config-router)#network 192.168.1.0
RouterA(config-router)#network 200.100.1.0
RouterA(config-router)#network 200.100.4.0
RouterA(config-router)#exit
RouterA(config)#exit
RouterA#copy run start
RouterA#exit
RouterA>
RouterB:
RouterB>en
RouterB#conf t
RouterB(config)#router rip
RouterB(config-router)#version 2
RouterB(config-router)#network 192.168.2.0
RouterB(config-router)#network 200.100.4.0
RouterB(config-router)#network 200.100.3.0
RouterB(config-router)#exit
RouterB(config)#exit
RouterB#copy run start
RouterB#exit
RouterB>
RouterC:
RouterC>en
RouterC#conf t
RouterC(config)#router rip
RouterC(config-router)#version 2
RouterC(config-router)#network 192.168.3.0
RouterC(config-router)#network 200.100.3.0
RouterC(config-router)#network 200.100.2.0
RouterC(config-router)#exit
RouterC(config)#exit
RouterC#copy run start
RouterC#exit
RouterC>
RouterD:
RouterD>en
RouterD#conf t
RouterD(config)#router rip
RouterD(config-router)#version 2
RouterD(config-router)#network 192.168.4.0
RouterD(config-router)#network 200.100.2.0
RouterD(config-router)#network 200.100.1.0
RouterD(config-router)#exit
RouterD(config)#exit
RouterD#copy run start
RouterD#exit
RouterD>
And that's all!
Let's test the connection between PC0 and laptop3:
And it works! what's interesting here is, that if either one of the serial connection was being broken, the RIPv2 would allow the packets to be forwarded through the other available routes. And that is because thanks to the RIPv2 protocol, each router knows it's neighbor routing table automatically, there is no need to manually enter them all.
Click here to download the pkt file.
Next Chapter: VLANs
Until there is Nothing left.
Creative Commons Zero: No Rights Reserved
Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8
Contact: nihilist@contact.nowhere.moe (PGP)