Skip to content

norac1243/Routing-Information-Protocol-RIP-Simulation-on-Cisco-Packet-Tracer-MCN-SEM6-RC19-20-GU-COMP-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Routing Information Protocol (RIP) Simulation on Cisco Packet Tracer

Table of Contents

  1. Network
  2. Best Practices
  3. Understanding Of Serial Ports
  4. Steps in RIP
5. How to fix Simulation Fails?

Network Topology Diagram

topology-diagram-packet-tracer

BEST PRACTICES:

Set the Preferences to show port labels.

This does help while assigning ip addresses to each port.
To navigate to preferences, either,

  1. click on Options and then Preferences
  2. Ctrl+R
    Choose "Always Show Port Labels"
    2-preferences-always-show-port-labels

Label each port by its IP ADDRESS

2-preferences-label-icon

STEP1: Build the topology as seen in the above diagram.

Note the Network Devices being used are

  • Generic (Router-PT)
  • Generic (PC-PT)
    topology-diagram-drawn

STEP2: Statically Assign the IP address and Subnet Mask for the PCs

Accordig to the diagram,

  • PC0 takes IP address: 10.0.0.2, Subnet Mask: 255.0.0.0 (represented by /8)
  • PC1 takes IP address: 20.0.0.2, Subnet Mask: 255.0.0.0 (represented by /8)
To assign this, click on the PC icon > Desktop tab > IP Configuration.

Assign as below:
FOR PC0:

PC0

FOR PC1:

PC1

After assigning any IP address to any port or device, its best to label the port using the label icon present top see best practices.

STEP3: Statically Assign the IP address of Fast Ethernet 0/0 port for both PC0 and PC1

NOTE: ⚠️

  • Fast Ethernet 0/0 or Fa0/0 is the port in your router that connects to a PC.
  • Hence we can set it up for both Router0 and Router1 connected to PC0 and PC1 respectively.
To be able to do tgus, Click on Router0 and then on CLI.
Type in below:

Router0 fa0/0

Explanation:

  1. First, type in no / n to exit the configuration dialog.
  2. Press the Enter key (Return).
  3. Type in en (short) or enable (full).
  4. Enter global configuration mode by typing:
    • conf t (short)
    • configure terminal (full)
  5. To set the IP address of fa0/0 (FastEthernet0/0), navigate to it by typing:
    • int fa0/0 (short)
    • int FastEthernet0/0 (full)
  6. Enter the IP address (10.0.0.1) with subnet mask (255.0.0.0, represented by /8) by typing:
    • ip add 10.0.0.1 255.0.0.0 (short)
    • ip address 10.0.0.1 255.0.0.0 (full)
  7. Boot the port (change the state from down to up) using the command:
    • no shut (short)
    • no shutdown (full)
  8. Type exit to exit fa0/0.

That's it! Do the same for router2 set for fa0/0, IP address as 20.0.0.0.1 with subnet mask, 255.0.0.0

Do the same for router2 set for fa0/0, IP address as 20.0.0.0.1 with subnet mask, 255.0.0.0
Router 2 fa0/0

STEP4: Statically Assign the Default Gateway

The default gateway in the PC is the IP address of the fa0/0 port of the router it's connected to. Therefore, for PC0 default gateway is 10.0.0.1 and for PC1 it's 20.0.0.1 Set Default gateway by clicking on: PC0>Desktop > IP Configuration > Default Gateway Do the same for PC1.

SERIAL PORTS:

Note that each Router can connect to another Router, (int the case of Router-PT) via serial ports.
These serial ports are

  1. Serial 2/0
  2. Serial 3/0
    By labelling the ports, you will now see the ports highlighted as Se2/0 (for Serial 2/0) and Se3/0 (for Serial 3/0). See best practices

    These serial ports can either be DCE or DTE.
  3. For DCE, It requires clock rate and bandwidth to be set.
  4. DTE, It doesnt require clock rate and bandwidth to be set.

    To find out which of your ports are DCE and which is DTE, you can either:
  5. On setting you preferences to label each port. DCE ports are labelled by a clock.
  6. Use a command, "show controller serial 2/0" (replace 2/0 by 3/0 for serial 3/0)
    note: this command does not work in global configuration mode. So if you are in global configuration mode, get out of it by either using "exit" or Ctrl+C

STEP5: Assign IP addresses for each of the Router 0


For Router0, accrding to the [diagram](##network-topology-diagram)
I. its serial port, on the line connecting router0 and router2, has IP address: 192.168.1.254/30
To set IP address:
1. First check what kind of port this is. For me its a DCE serial 2/0. For you, instead of this it can be DCE serial 3/0, DTE serial 2/0 or DTE serial 3/0 . So properly note that before proceeding.
![SHOW](https://raw.githubusercontent.com/norac1243/Routing-Information-Protocol-RIP-Simulation-on-Cisco-Packet-Tracer-MCN-SEM6-RC19-20-GU-COMP-/main/PICTURES-RIP/router-show-step-44444.JPG)
2. Since mine is a DCE serial 2/0, I do the following commands. Some commands are marked "Only for DCE". These commands need not be implemented for DTE.
Type in::
![4.1](https://raw.githubusercontent.com/norac1243/Routing-Information-Protocol-RIP-Simulation-on-Cisco-Packet-Tracer-MCN-SEM6-RC19-20-GU-COMP-/main/PICTURES-RIP/step-4-substep-code-1.JPG)
Explanation::
[1] Enter global configuration mode by typing in "conf t" (short) or "configure terminal" (full)
[2] To set IP address of se2/0 (in my case) we navigate to it by typing,
"int serial 2/0"
if its se3/0 in your case, command: "int serial 3/0"
[3] Enter the IP address, that is 192.168.1.254 with subnet mask, 255.255.255.252 (which is represented by /30) By typing,
"ip add 192.168.1.254 255.255.255.252"
[4] [only for DCE] now you gotta set clock rate and bandwidth. We mostly use standard measurements bandwidth as 64 and clock rate as 64000 unless externally specified.
The commands are:
"clock rate 64000"
"bandwidth 64"
[5] Boot the port, that is change the state from down to up using command,
"no shut" (short)
"no shutdown" (full)
[6] Type in "exit" to get out of serial2/0 (in my case)
  1. its serial port, on the line connecting router0 and router1, has IP address: 192.168.1.249/30
    In my case this port is DCE serial 3/0.
    Type in commands:
    4.2

STEP6: Assign IP addresses for each of the Router 1

For Router1, accrding to the diagram,

  1. its serial port, on the line connecting router0 and router1, has IP address: 192.168.1.250/30
    For me its a DTE serial 2/0 port, so I typed in commands
    5.1

  2. its serial port, on the line connecting router1 and router2, has IP address: 192.168.1.246/30
    For me its a DTE serial 3/0 port, so I typed in commands
    5.2

STEP7: Assign IP addresses for each of the Router 2

For Router2, accrding to the diagram,

  1. its serial port, on the line connecting router0 and router2, has IP address: 192.168.1.253/30
    For me its a DTE serial 2/0 port, so I typed in commands
    6.1
  2. its serial port, on the line connecting router1 and router2, has IP address: 192.168.1.245/30
    For me its a DCE serial 3/0 port, so I typed in commands
    6.2

STEP8: Configure RIP Protocol

  1. For this one should get into global configuration mode first, that's by "conf t"
  2. Then "router rip"
  3. Then add the respective networks for each router
    Router 0:
    rip r0
    Router1:
    rip r1
    Router2:
    rip r2

The question arises in how we determine the networks for each of these routers. For this we will be doing and operations.

For Router 0, we have 3 ports in use (fa0/0, se 2/0, se 3/0):

  1. We have fa0/0: 10.0.0.1 having subnet address of 255.0.0.0 we find the first network address by performing on an AND operation on the binary forms of 10.0.0.1 and 255.0.0.0, which gives ya 10.0.0.0
  2. Then we have se2/0: in my case its connected to 192.168.1.254/30 we find the network address by performing AND operation on binary forms of
  • 192.168.1.254 and
  • 255.255.255.252 (the subnet mask here is represented by 30, which in ip address form is 11111111.11111111. 11111111.11111100, which has a total of thirty 1s. convert this ip address to decimal and you will get 255.255.255.252)
  • on performing and operation you get, 192.168.1.252
  1. Then we have se3/0: in my case its connected to 192.168.1.249/30 we find the network address by performing AND operation on binary forms of
  • 192.168.1.249 and
  • 255.255.255.252
  • on performing and operation you get, 192.168.1.248

For Router 1, we have 2 ports in use (se 2/0, se 3/0):

  1. Then we have se2/0: in my case its connected to 192.168.1.250/30 we find the network address by performing AND operation on binary forms of
  • 192.168.1.250 and
  • 255.255.255.252
  • on performing and operation you get, 192.168.1.248
  1. Then we have se3/0: in my case its connected to 192.168.1.246/30 we find the network address by performing AND operation on binary forms of
  • 192.168.1.246 and
  • 255.255.255.252
  • on performing and operation you get, 192.168.1.240

For Router 2, we have 3 ports in use (fa0/0, se 2/0, se 3/0):

  1. We have fa0/0: 20.0.0.1 having subnet address of 255.0.0.0 we find the first network address by performing on an AND operation on the binary forms of 20.0.0.1 and 255.0.0.0, which gives ya 20.0.0.0
  2. Then we have se2/0: in my case its connected to 192.168.1.253/30 we find the network address by performing AND operation on binary forms of
  • 192.168.1.253 and
  • 255.255.255.252
  • on performing and operation you get, 192.168.1.252
  1. Then we have se3/0: in my case its connected to 192.168.1.245/30 we find the network address by performing AND operation on binary forms of
  • 192.168.1.245 and
  • 255.255.255.252
  • on performing and operation you get, 192.168.1.240

STEP9: Simulation of RIP

Basically, RIP protocol uses the path / route that has the least number of hops to get from the source to the destination. To get from PC0 to PC1, we have two routes:
Route1: PC0 <=> Router0 <=> Router2 <=> PC1
Route2: PC0 <=> Router0 <=> Router1 <=> Router2 <=> PC1
Route1 has lesser number of hops compared to Route2.
Hence when we simulate the packet transmission from PC0 to PC1, it should take Route1.
On removing Route1, RIP protocol chooses route2 to transmit packets from PC0 to PC1 since no other route exists

To simulate,enter Simulation Mode in the Bottom Right Corner (blue arrow).
Click the Envelope Icon and then click on PC0 and PC1 (red arrow)
In the Simulation Panel, Edit Filters, Click ICMP under IPv4
Then in play controls click capture forward to see the packet traverse route1.
at the end of it you should get an event list encircled in pink below and the successful status message highlighted by yellow arrow.
sim route1


Now get rid of the connection line between router0 and router2.
Click the Envelope Icon and then click on PC0 and PC1
There is only one route in this case, that is route2, so the packets have no choice but to choose that route.
![sim_route2](https://raw.githubusercontent.com/norac1243/Routing-Information-Protocol-RIP-Simulation-on-Cisco-Packet-Tracer-MCN-SEM6-RC19-20-GU-COMP-/main/PICTURES-RIP/simulation-pic2.JPG)

When Simulation fails, what can we do to fix it?

Normally packet simulation doesn't work the first time. So try doing it two times more.That is the same step of clicking the Envelope Icon and then click on PC0 and PC1.


If that doesn't work,check if you've entered the proper IP address for each device.
click on a device and then click Config and check each port address. Also check the gateways of the PCs.
On confirming correct port address, simulate once more.


if that fails again, test the working of the individual connection lines.
That is, Click the Envelope Icon and then click:

  1. PC0 and Router0
  2. PC1 and Router1
  3. Router0 and Router1
  4. Router0 and Router2
    and so on and so forth.


    if any of these connections fail, that means that there is an error in the 8th step,Configure RIP. If you have by mistake added a wrong network,make sure you are config mode and then after typing router rip you can type in this command to remove the wrong network is:
    "no network 20.0.0.0"
    where 20.0.0.0 can be understood as any wrong network.

Test again. it should work.

If you like this project, please consider starring ⭐ this repo on GitHub as it is the easiest and best way to support it.

About

RIP protocol for MCN SEM 6 RC19-20

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published