Showing posts with label Dynamic Routing. Show all posts
Showing posts with label Dynamic Routing. Show all posts

Thursday, December 20, 2012

Dynamic Routing Configuration – RIP, IGRP




















I think If you followed the previous posts that I published under IP configuration in CISCO Packet tracer software, this won't be a big task for yu to design and load the above network now.

Follow the steps below one by one so that you will be learning how to perform dynamic routing configuration without having doubts. Though the steps are almost similar to the previous post, I'll be mentioning the commands of CLI then and there as necessary.


Step1: Design the above network and load it in to Packet Tracer Simulator.

Note:   For R1 and R3 - Router 1841.            For R2 – router 2811
            Select R1 – S0 and R2 – S1 as DCE side for clocking inside the simulator.

Step2 :Name R1, R2 and R3 as Malabe, Metro and Matara.


Router(config)#hostname MALABE
Router(config)#hostname METRO
Router(config)#hostname MATARA

Step3 : Design a suitable IP plan for the above networks.

For simplicity, the IP plan is marked clearly in the above diagram it self making easy for you to understand. I have used subnetting in the very similar way that was used in the previouse post (STATIC ROUTING AND DEFAULT ROUTING CONFIGURATIONS)

Step4 : Configure the Serial and Ethernet interfaces of routers.

Step5: Assign clock rate as 64000 for the R1 serial 0 and R2 serial 1 interfaces.


For Router1
MALABE(config)#interface fastEthernet 0/0
MALABE(config-if)#ip address 192.168.10.1 255.255.255.0
MALABE(config-if)#no shutdown
MALABE(config-if)#exit

MALABE(config)#interface serial 0/0/0
MALABE(config-if)#ip address 10.0.0.1 255.0.0.0
MALABE(config-if)#clock rate 64000
MALABE(config-if)#no shutdown

MALABE(config-if)#exit

For Router2
MATARA(config)#interface fastEthernet 0/0
MATARA(config-if)#ip address 192.168.12.1 255.255.255.0
MATARA(config-if)#no shutdown
MATARA(config-if)#exit

MATARA(config)#interface serial 0/0/0
MATARA(config-if)#ip address 11.0.0.2 255.0.0.0
MATARA(config-if)#no shutdown
MATARA(config-if)#exit

For Router0
METRO(config)#interface fastEthernet 0/0
METRO(config-if)#ip address 192.168.11.1 255.255.255.0
METRO(config-if)#no shutdown
METRO(config-if)#exit

METRO(config)#interface serial 0/0/0
METRO(config-if)#ip address 10.0.0.2 255.0.0.0
METRO(config-if)#no shutdown

METRO(config-if)#exit
METRO(config)#interface serial 0/0/1
METRO(config-if)#ip address 11.0.0.1 255.0.0.0
METRO(config-if)#clock rate 64000
METRO(config-if)#no shutdown

METRO(config-if)#exit

Step6 : Configure the PC’s. (IP address, Subnet Mask and Default Gateway).











Configure the routers with RIP and IGRP to enable dynamic routing.

Dynamic routing could be done using Interior Gateway Protocols (IGP) and Exterior Gateway Protocols (EGP). We apply IGP for LANs and EGP for WANs.

IGRP, EIGRP, RIP and OSPF are some of these IGPs and BGP is an example for EGP.

First let’s see how to perform routing using RIP

Here for each router we have to use RIP and consider the directly connected network addresses of them to perform this routing.

MALABE(config)#router rip
MALABE(config-router)#network 192.168.10.0
MALABE(config-router)#network 10.0.0.0

METRO(config)#router rip
METRO(config-router)#network 10.0.0.0
METRO(config-router)#network 11.0.0.0
METRO(config-router)#network 192.168.11.0

MATARA(config)#router rip
MATARA(config-router)#network 192.168.12.0
MATARA(config-router)#network 11.0.0.0

Use ‘ping’ command to check the connectivity.

For PC0
PC>ipconfig

IP Address......................: 192.168.10.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.10.1

PC>ping 192.168.11.2

Pinging 192.168.11.2 with 32 bytes of data:

Reply from 192.168.11.2: bytes=32 time=94ms TTL=126
Reply from 192.168.11.2: bytes=32 time=94ms TTL=126
Reply from 192.168.11.2: bytes=32 time=79ms TTL=126
Reply from 192.168.11.2: bytes=32 time=73ms TTL=126

Ping statistics for 192.168.11.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 73ms, Maximum = 94ms, Average = 85ms

PC>ping 192.168.12.2

Pinging 192.168.12.2 with 32 bytes of data:

Reply from 192.168.12.2: bytes=32 time=111ms TTL=125
Reply from 192.168.12.2: bytes=32 time=109ms TTL=125
Reply from 192.168.12.2: bytes=32 time=125ms TTL=125
Reply from 192.168.12.2: bytes=32 time=110ms TTL=125

Ping statistics for 192.168.12.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 109ms, Maximum = 125ms, Average = 113ms

PC>


For PC1

PC>ipconfig

IP Address......................: 192.168.12.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.12.1

PC>ping 192.168.10.2

Pinging 192.168.10.2 with 32 bytes of data:

Reply from 192.168.10.2: bytes=32 time=125ms TTL=125
Reply from 192.168.10.2: bytes=32 time=125ms TTL=125
Reply from 192.168.10.2: bytes=32 time=125ms TTL=125
Reply from 192.168.10.2: bytes=32 time=125ms TTL=125

Ping statistics for 192.168.10.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 125ms, Maximum = 125ms, Average = 125ms

PC>ping 192.168.12.2

Pinging 192.168.12.2 with 32 bytes of data:

Reply from 192.168.12.2: bytes=32 time=0ms TTL=128
Reply from 192.168.12.2: bytes=32 time=15ms TTL=128
Reply from 192.168.12.2: bytes=32 time=0ms TTL=128
Reply from 192.168.12.2: bytes=32 time=15ms TTL=128

Ping statistics for 192.168.12.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 15ms, Average = 7ms


For PC2
PC>ipconfig

IP Address......................: 192.168.11.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.11.1

PC>ping 192.168.10.0

Pinging 192.168.10.0 with 32 bytes of data:

Reply from 10.0.0.1: bytes=32 time=63ms TTL=254
Reply from 10.0.0.1: bytes=32 time=63ms TTL=254
Reply from 10.0.0.1: bytes=32 time=63ms TTL=254
Reply from 10.0.0.1: bytes=32 time=62ms TTL=254

Ping statistics for 192.168.10.0:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 62ms, Maximum = 63ms, Average = 62ms

PC>ping 192.168.12.2

Pinging 192.168.12.2 with 32 bytes of data:

Reply from 192.168.12.2: bytes=32 time=93ms TTL=126
Reply from 192.168.12.2: bytes=32 time=94ms TTL=126
Reply from 192.168.12.2: bytes=32 time=94ms TTL=126
Reply from 192.168.12.2: bytes=32 time=94ms TTL=126

Ping statistics for 192.168.12.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 93ms, Maximum = 94ms, Average = 93ms

PC>


Now let’s see how to perform routing using EIGRP

EIGRP is also an Interior Gateway protocol which is applied to one autonomous system. So to apply it, first we should have the same Autonomous number for all the networks. Otherwise all PC in the Autonomous system cannot communicate.
How to apply?

Note:-do not use many protocols at the same time. If so, first remove all the previous routing commands and then use EIGRP (In this case…type…no router rip in each router)

MALABE(config)#router eigrp 200
MALABE(config-router)#network 192.168.10.0
MALABE(config-router)#network 10.0.0.0

METRO(config)#router eigrp 200
METRO(config-router)#network 10.0.0.0
METRO(config-router)#network 11.0.0.0
METRO(config-router)#network 192.168.11.0

MATARA(config)#router eigrp 200 
MATARA(config-router)#network 192.168.12.0
MATARA(config-router)#network 11.0.0.0

According to the methods shown above routing could be done statically or dynamically by using routing protocols (or even by default) to route different networks to communicate with each other.

Static Routing Vs Dynamic Routing

Before trying out the practicals in this post, please make sure that you have a good knowlege in making a simple network in Cisco Packet tracer with IP configuration. If not, you better follow the previous posts and come back to continue.

Also note that you need to have system that we designed in the previous post (How to assign passwords for routers?)loaded in packet tracer to understand the concepts of this posts easily.















Above diagram shows the network that we configured in the previous post.

before starting with static routing and dynamic routing, I prefer if we check the connectivity of the system as it is to make sure that data packets are transferable within any source and destination in the network.

If the configurations are done properly, then data packets could be transferred within same networks. You can check them as below.

Click on PC àcommand promptàtype ping <destination ip address>

By changing the destination IP addresses( as R0’s Fast Ethernet port address, R0’s Serial port address, R1’s Fast Ethernet port, R1’s Serial port and the PC1’s IP address ) you can check the connectivity of the current network.

e.g.:-
 checking connectivity between PC0 and R0’s FE port.


















checking connectivity between PC0 and R0’s Serial port.











checking connectivity between PC0 and R1’s Serial port.














checking connectivity between PC0 and PC1.
















If PC0 cannot send data packets after passing R0’s Serial port, that shows that the hosts in the LAN
can only identify destinations within it but cannot recognize remote network hosts. The same results
would come when check the connectivity between PC1 and other ports separately. Therefore setting
paths in routing should be done by the administrator of the network.

There are two main methods of setting paths of routers.

1. Static routing.
2. Dynamic routing.

Identifying the Static and Dynamic routing methods.

In static routing, the administrator adds roots manually to routers. High security and avoiding overhead in routers are advantages of static routing. But to apply static routing, the admin should have a good knowledge in routing and this could be applied to small networks.

In dynamic routing, the admin doesn't set the paths manually but Routing protocols are followed to identify remote networks and set the paths.

Assigning Static Routing to both the routers and apply necessary configurations

What we are going to do here is, letting each router know about their other destinations. Just like people in our country knowing the country code of some other country to communicate with them. 

First we'll focus on the IT router (R0) to let know about the FINACE (R1) side. It aplies similar to the FINANCE router as well. Just examine the following commands and I'm sure that you'll understand what we are doing.
















Don't get confused about the Next Hop address. It's just the IP address of the serial port of the neighboring router that each router is connected to. for an instance for IT router's serial 0/0/0, the next hop address is the serial0/0/0 port IP address of FINANCE which is 5.0.0.4.

Now   Check the connectivity again.

  • Checking the connectivity between PC0 and all other destinations.
PC>ping 192.168.1.3

Pinging 192.168.1.3 with 32 bytes of data:

Reply from 192.168.1.3: bytes=32 time=94ms TTL=126
Reply from 192.168.1.3: bytes=32 time=78ms TTL=126
Reply from 192.168.1.3: bytes=32 time=94ms TTL=126
Reply from 192.168.1.3: bytes=32 time=78ms TTL=126

Ping statistics for 192.168.1.3:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 78ms, Maximum = 94ms, Average = 86ms

PC>ping 192.168.1.4

Pinging 192.168.1.4 with 32 bytes of data:

Reply from 192.168.1.4: bytes=32 time=63ms TTL=254
Reply from 192.168.1.4: bytes=32 time=63ms TTL=254
Reply from 192.168.1.4: bytes=32 time=62ms TTL=254
Reply from 192.168.1.4: bytes=32 time=47ms TTL=254

Ping statistics for 192.168.1.4:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 47ms, Maximum = 63ms, Average = 58ms

PC>ping 5.0.0.4

Pinging 5.0.0.4 with 32 bytes of data:

Reply from 5.0.0.4: bytes=32 time=63ms TTL=254
Reply from 5.0.0.4: bytes=32 time=63ms TTL=254
Reply from 5.0.0.4: bytes=32 time=63ms TTL=254
Reply from 5.0.0.4: bytes=32 time=63ms TTL=254

Ping statistics for 5.0.0.4:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 63ms, Maximum = 63ms, Average = 63ms

PC>ping 5.0.0.3

Pinging 5.0.0.3 with 32 bytes of data:

Reply from 5.0.0.3: bytes=32 time=31ms TTL=255
Reply from 5.0.0.3: bytes=32 time=31ms TTL=255
Reply from 5.0.0.3: bytes=32 time=31ms TTL=255
Reply from 5.0.0.3: bytes=32 time=31ms TTL=255

Ping statistics for 5.0.0.3:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 31ms, Maximum = 31ms, Average = 31ms


Now the Hosts in both the LANs can identify each other since the routing was done statically.

Do not forget to copy the running-config files to the startup configuration files as shown below. This makes the running-configuration information (that are volatile and lost when the router is switched off). To non-volatile memory in NVRAM.

 Router#copy running-config startup-config