CCNA LAB - RIP Version 1

What is RIP?

  1. RIP is a distance vector routing protocol.
  2. RIP is a Classful routing protocol.
  3. RIP uses hop count as its only metric for path selection.
  4. RIP have administrative Distance is 120 
  5. Advertised routes with hop counts greater than 15 are unreachable.
  6. Messages are broadcast every 30 seconds.
Routing Protocols

RIP Message

The data portion of a RIP message is encapsulated into a UDP segment, with both source and destination port numbers set to 520. The IP header and data link headers add broadcast destination addresses before the message is sent out to all RIP configured interfaces.
RIP Message structure

RIP is Classful routing protocol

RIPv1 does not send subnet mask information in the update. Therefore, a router either uses the subnet mask configured on a local interface, or applies the default subnet mask based on the address class. Due to this limitation, RIPv1 networks cannot be discontiguous nor can they implement VLSM

IP classes

RIPv1 configuration

Syntax:

Router#router rip
Router(config-router)#network directly-connected-classful-network-address

Example:
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.0
R1(config-router)#network 192.168.3.0

LAB

RIP lab topology

IP address table:


Task 1: Configure IP address for each devices

Router R1:
R1>enable
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 172.30.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 1/0
R1(config-if)#ip ad
R1(config-if)#ip address 172.30.2.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#

Router R2:
R2>enable
R2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#interface f0/0
R2(config-if)#ip address 172.30.3.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 1/0
R2(config-if)#ip address 172.30.2.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 1/1
R2(config-if)#ip address 192.168.4.9 255.255.255.252
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown

Router R3:

R3>enable
R3#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#interface s
R3(config)#interface serial 1/0
R3(config-if)#ip address 192.168.4.10 255.255.255.252
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.5.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#

PC1:
PC1> ip 172.30.1.10 255.255.255.0 172.30.1.1
Checking for duplicate address...
PC1 : 172.30.1.10 255.255.255.0 gateway 172.30.1.1

PC2:
PC2> ip 172.30.3.10 255.255.255.0 172.30.3.1
Checking for duplicate address...
PC1 : 172.30.3.10 255.255.255.0 gateway 172.30.3.1

PC3:
PC3> ip 192.168.5.10 255.255.255.0 192.168.5.1
Checking for duplicate address...
PC1 : 192.168.5.10 255.255.255.0 gateway 192.168.5.1

Task 2: Configure RIPv1 in each router

Router 1:
R1>enable
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router rip

R1(config-router)#network 172.30.0.0


Notice that only a single network statement is needed for R1. This statement includes both interfaces on different subnets of the 172.30.0.0 major network. 

One things, sending updates out f0/0 interface wastes the bandwidth and processing resources of all devices on the LAN. So we should prevent send out Rip update via f0/0 use command "passive-interface fastEthernet 0/0"

R1(config-router)#passive-interface fastEthernet 0/0

Router 2:
R2>enable
R2#configure terminal
R2(config)#router rip
R2(config-router)#network 172.30.0.0
R2(config-router)#network 192.168.4.0
R2(config-router)#passive-interface fastEthernet 0/0

Router 3:
R3>enable
R3#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router rip
R3(config-router)#network 192.168.4.0
R3(config-router)#network 192.168.5.0
R3(config-router)#passive-interface fastEthernet 0/0

Task 3: Verify RIP

Step 1: Use the show ip route command to verify that each router has all of the networks in the topology in the routing table.

In Router R1:

R1#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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

     172.30.0.0/24 is subnetted, 3 subnets
C       172.30.2.0 is directly connected, Serial1/0
R       172.30.3.0 [120/1] via 172.30.2.2, 00:00:07, Serial1/0
C       172.30.1.0 is directly connected, FastEthernet0/0
R    192.168.4.0/24 [120/1] via 172.30.2.2, 00:00:07, Serial1/0
R    192.168.5.0/24 [120/1] via 172.30.2.2, 00:00:07, Serial1/0

In router R2

R2#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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

     172.30.0.0/24 is subnetted, 3 subnets
C       172.30.2.0 is directly connected, Serial1/0
C       172.30.3.0 is directly connected, FastEthernet0/0
R       172.30.1.0 [120/1] via 172.30.2.1, 00:00:08, Serial1/0
     192.168.4.0/30 is subnetted, 1 subnets
C       192.168.4.8 is directly connected, Serial1/1
R    192.168.5.0/24 [120/1] via 192.168.4.10, 00:00:14, Serial1/1

And Router R3:

R3#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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

R    172.30.0.0/16 [120/1] via 192.168.4.9, 00:00:09, Serial1/0
     192.168.4.0/30 is subnetted, 1 subnets
C       192.168.4.8 is directly connected, Serial1/0
C    192.168.5.0/24 is directly connected, FastEthernet0/0

Step 2: Verify that all necessary interface are active
To view necessary port are active, we use command "Show ip protocol" 

R1#show ip protocols
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 30 seconds, next due in 23 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Redistributing: rip
  Default version control: send version 1, receive any version
    Interface             Send  Recv  Triggered RIP  Key-chain
    Serial1/0             1     1 2
  Automatic network summarization is in effect
  Maximum path: 4
  Routing for Networks:
    172.30.0.0
  Passive Interface(s):
    FastEthernet0/0
  Routing Information Sources:
    Gateway         Distance      Last Update
    172.30.2.2           120      00:00:19
  Distance: (default is 120)

Step 3: View RIP message send and receive
To view sending and receiving RIP message, we need to turn on debug mode in each router. Note, turn debug on will wastes the bandwidth and processing resources of all devices

R1#debug ip rip
RIP protocol debugging is on
R1#
*Jan 28 17:34:20.559: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (172.30.2.1)
*Jan 28 17:34:20.559: RIP: build update entries
*Jan 28 17:34:20.559:   subnet 172.30.1.0 metric 1
R1#
*Jan 28 17:34:21.627: RIP: received v1 update from 172.30.2.2 on Serial1/0
*Jan 28 17:34:21.627:      172.30.3.0 in 1 hops
*Jan 28 17:34:21.631:      192.168.4.0 in 1 hops
*Jan 28 

To turn debug mode, we use command "undebug all"

R1#undebug all
All possible debugging has been turned off

I hope this post will help you understand well RIPv1. Next lab i will show you how to configure RIPv1 in Stub network. See you soon.

Router basic command and static route configuration


Topology Diagram

IP address table:



Learning Objectives
  1. Perform basic configuration tasks on a router
  2. Configure and activate Serial and Ethernet interface
  3. Test connectivity
  4. Gather information to discover causes for lack of connectivity between devices
  5. Configure a static route using an intermediate address.

Task 1: Execute basic command in each router: host name, enable secret, password, login...

  •  Change router name from R1 to GNS3 
            R1>enable
            R1#configure terminal
            R1(config)#hostname GNS3
            GNS3(config)#
  • Enable password before enter to privilege mode (password: gns3)
           R1#configure terminal 
           R1(config)#enable secret gns3  
          
  • Configure Banner 
R1>enable  
Password:  
R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
R1(config)#banner motd # 
Warning! This is my banner :)#
Show banner in user mode window
  • Configure password telnet, this configuration will help your router more secure.
R1>enable 
Password: 
R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
R1(config)#line vty 0 4 
R1(config-line)#password gns3 
R1(config-line)#login
Use Show running-configure to show result

Password in clear text, easy to attack.
We should use "service password-encryption" to increase secure for telnet password
R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z. 
R1(config)#service password-encryption 
R1(config)#exit
Telnet password already encrypted
  • To save router configuration use command "copy running-config startup-config"
R1#copy running-config startup-config 
Destination filename [startup-config]? 
Building configuration... 
[OK]
  • Clear configuration in router use command "erase startup-config
R1#erase startup-config 
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]

        Task 2: Configure IP for each interface in each router and PCs

        • Router R1
        Configure ip address for port serial 2/0 and f0/0

        R1>enable 
        Password: 
        R1#configure terminal 
        Enter configuration commands, one per line.  End with CNTL/Z 
        R1(config)#interface serial 2/0 
        R1(config-if)#ip address 172.16.2.1 255.255.255.0 
        R1(config-if)#clock rate 64000
        R1(config-if)#no shutdown 
        R1(config-if)#exit 
        R1(config)#interface fastEthernet 0/0
        R1(config-if)#ip address 172.16.3.1 255.255.255.0 
        R1(config-if)#no shutdown
        Show result, use command "show ip interface brief"

        Show detail port information in router R1

        • Router R2
        Configure ip address for interface serial 2/0, serial 2/1 and f0/0

        R2>enable 

        Password: 

        R2#configure terminal 

        Enter configuration commands, one per line.  End with CNTL/Z. 

        R2(config)#interface serial 2/0 
        R2(config-if)#ip address 172.16.2.2 255.255.255.0 
        R2(config-if)#clock rate 64000 
        R2(config-if)#no shutdown
        R2(config-if)#exit 
        R2(config)#interface fastEthernet 0/0 
        R2(config-if)#ip address 172.16.1.1 255.255.255.0 
        R2(config-if)#no shut 
        R2(config-if)#exit 
        R2(config)#interface serial 2/1 
        R2(config-if)#ip address 192.168.1.1 255.255.255.0 
        R2(config-if)#clock rate 64000 
        R2(config-if)#no shutdown 
        R2(config-if)#
        Interfaces configuration

        • Router R3
        Configure ip address for interface serial 2/0 and f0/0

        R3>enable 
        Password: 
        R3#configure terminal 
        Enter configuration commands, one per line.  End with CNTL/Z. 
        R3(config)#interface serial 2/0 
        R3(config-if)#ip address 192.168.1.2 255.255.255.0 
        R3(config-if)#clock rate 64000 
        R3(config-if)#no shut 
        R3(config-if)#exit 
        R3(config)#interface fastEthernet 0/0 
        R3(config-if)#ip address 192.168.2.1 255.255.255.0 
        R3(config-if)#no shut
        Router R3 interface configurations
        • PC1
        PC1> ip 172.16.3.2 255.255.255.0 172.16.3.1
        Checking for duplicate address...
        PC1 : 172.16.3.2 255.255.255.0 gateway 172.16.3.1
        • PC2
        PC2> ip 172.16.1.2 255.255.255.0 172.16.1.1
        Checking for duplicate address...
        PC1 : 172.16.1.2 255.255.255.0 gateway 172.16.1.1
        • PC3
        PC3> ip 192.168.2.2 255.255.255.0 192.168.2.1
        Checking for duplicate address...
        PC1 : 192.168.2.2 255.255.255.0 gateway 192.168.2.1

        Task 3: Configure static route

        • Enable debug routing use command "debug ip routing"
        R1#debug ip routing 
        IP routing debugging is on

              • Static route syntax

              or 


              • Router R1
              Reachability towards 172.16.1.0/24,192.168.1.0/24 and route 192.168.2.0 . The next-hop router is R2. The same outbound interface is s2/0. 

              R1> 
              R1>enable
              R1#configure terminal 
              Enter configuration commands, one per line.  End with CNTL/Z. 
              R1(config)#ip route 172.16.1.0 255.255.255.0 serial 2/0 
              *Jan 23 10:22:33.231: RT: SET_LAST_RDB for 172.16.1.0/24  NEW rdb: is directly connected
              *Jan 23 10:22:33.231: RT: add 172.16.1.0/24 via 0.0.0.0, static metric [1/0]
              *Jan 23 10:22:33.235: RT: NET-RED 172.16.1.0/24
               
              R1(config)#ip route 192.168.1.0 255.255.255.0  
              R1(config)#ip route 192.168.1.0 255.255.255.0 serial 2/0 
              *Jan 23 10:23:00.371: RT: SET_LAST_RDB for 192.168.1.0/24  NEW rdb: is directly connected
              *Jan 23 10:23:00.371: RT: add 192.168.1.0/24 via 0.0.0.0, static metric [1/0]
              *Jan 23 10:23:00.375: RT: NET-RED 192.168.1.0/24
               
              R1(config)#ip route 192.168.2.0 255.255.255.0 serial 2/0 
              *Jan 23 10:23:20.967: RT: SET_LAST_RDB for 192.168.2.0/24  NEW rdb: is directly connected
              *Jan 23 10:23:20.971: RT: add 192.168.2.0/24 via 0.0.0.0, static metric [1/0]*Jan 23 10:23:20.971: RT: NET-RED 192.168.2.0/24
              Note: Yellow mark is debug ip routing information. You only can receive this information after enable debug mode use "debug ip routing" command

              • Router R2

              Reachability towards 172.16.3.0/24,192.168.2.0/24  . The next-hop router  R1 outbound interface is s2/0 and R3 outbound interface is s2/1.
              R2#configure terminal 
              Enter configuration commands, one per line.  End with CNTL/Z. 
              R2(config)#ip route 172.16.3.0 255.255.255.0 serial 2/0 
              R2(config)#ip route 192.168.2.0 255.255.255.0 serial 2/1

              •  Router R3

               Reach-ability towards 172.16.3.0/24172.16.1.0/24, 172.16.2.0/24 . The next-hop router  R3 outbound interface is s2/0.
              R3# 
              R3#configure terminal 
              Enter configuration commands, one per line.  End with CNTL/Z. 
              R3(config)#ip route 172.16.3.0 255.255.255.0 serial 2/0 
              R3(config)#ip route 172.16.2.0 255.255.255.0 serial 2/0 
              R3(config)#ip route 172.16.1.0 255.255.255.0 serial 2/0
              Note: You can not just be changed, we must remove old route configuration before add new route information. Otherwise, both old and new route will keep in configuration file.
              To remove ip route, use command "no ip route"
               ExampleR3(config)#no ip route 172.16.1.0 255.255.255.0 serial 2/0

              • Show ip route table use "show ip route" command


              R1#show ip route
              Codes: C - connected, S - static, 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
                     i - IS-IS, su - IS-IS summary, 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
                   172.16.0.0/24 is subnetted, 3 subnets
              S       172.16.1.0 is directly connected, Serial2/0
              C       172.16.2.0 is directly connected, Serial2/0
              C       172.16.3.0 is directly connected, FastEthernet0/0
              S    192.168.1.0/24 is directly connected, Serial2/0
              S    192.168.2.0/24 is directly connected, Serial2/0

              • Check connectivity
              Form PC1 ping to PC2 and PC3


                                                 PC1> ping 172.16.1.284 bytes from 172.16.1.2 icmp_seq=1 ttl=62 time=61.365 ms84 bytes from 172.16.1.2 icmp_seq=2 ttl=62 time=73.770 ms84 bytes from 172.16.1.2 icmp_seq=3 ttl=62 time=41.482 ms84 bytes from 172.16.1.2 icmp_seq=4 ttl=62 time=44.665 ms84 bytes from 172.16.1.2 icmp_seq=5 ttl=62 time=41.450 ms
                                                PC1> ping 192.168.2.2
                                                84 bytes from 192.168.2.2 icmp_seq=1 ttl=61 time=65.602 ms
                                                84 bytes from 192.168.2.2 icmp_seq=2 ttl=61 time=58.691 ms
                                                84 bytes from 192.168.2.2 icmp_seq=3 ttl=61 time=57.872 ms
                                                84 bytes from 192.168.2.2 icmp_seq=4 ttl=61 time=58.364 ms
                                                84 bytes from 192.168.2.2 icmp_seq=5 ttl=61 time=62.914 ms
                                                Do same thing in PC2 and PC3.

                                                Configure FTP server in VirtualBox PC to save Start-up configure file.

                                                In this video I already show how to Add virtual-box PC into GNS3
                                                As you know, ftp server is a common repository of start up-config file. Use ftp server we can protect our device configuration more safety event broken.
                                                Today, I continue show you how to build FTP server in Virtual-box PC that we added before.


                                                Requirement:
                                                1. Installed GNs3 and add some ISO images. How to do?
                                                2. You can download ISO image hear 
                                                3. Embedded Virtual-box PC with GNS3. How to do?
                                                4. Router R1: f0/0 ip 200.200.200.1 (R2 and R3 are optional)
                                                5. GNS3-Virtual box PC: e0 ip 200.200.200.4 

                                                Diagrams

                                                Video







                                                How to access User Mode in GNS3?

                                                Normally, When we start Router, Switch... in GNS3 it will automatic enter to Privilege Mode. So you also can not execute some commands in User Mode for example Enable, Show...In order to prevent Emulation device automatic enter Privilege Mode you can follow some way as bellow:



                                                1. If you want to apply this configure for device in your project, you'll need to edit file "ios_base_startup-config.txt" in setup folder (C:\program files\GNS3\configs or %USERPROFILE%\GNS3\configs). Open file with Notepad and remove 2 lines have same content as bellow :
                                                 privilege level 15

                                                2. If you only apply this configure for current router your can execute 3 command as bellow:

                                                Console Port:
                                                R1#configure terminal
                                                R1(config)#line console 0
                                                R1(config-line)#no privilege level 15

                                                Aux Port:
                                                R1#configure terminal
                                                R1(config)#line aux 0
                                                R1(config-line)#no privilege level 15

                                                How to add Catalyst Switch in GNS3?

                                                In GNS3 you can not add images for Cisco Catalyst Switch. So all of you will have same with me question.How to make a emulation with Cisco Catalyst Switch?  Don't worry about this inconvenient. This topic i will show you how to overcome it.

                                                2. After finish step 1, you will have some Emulation Router like bellow picture.


                                                To emulate Catalyst Switch in Router image, we must add NM-16ESW module to slot in router.
                                                • Right-click on router choose Configure

                                                • In slot drop down list, select module NM-16ESW to add. Click OK to finish module addition.


                                                Note: Router need to be turned off before added port or module.

                                                3. Change symbol Router to Catalyst Switch


                                                In list of symbol, select Ethernet_Switch and apply.


                                                4. Change name of Route name to Switch name.



                                                5. Go to Global Configuration Mode, input command "no ip routing".

                                                Now router became Switch. You can use for your lab.
                                                I hope this guide will help you to study well. Please give me some comment to improve this post more better.
                                                Link to download ISO 3600 here




                                                CCNA Static route


                                                Router R1 ports:
                                                - f0/0 ip address: 60.61.62.1/24
                                                - f0/1 ip address: 192.168.1.1/24

                                                Router R2 ports:
                                                - f0/0 ip address: 60.61.62.2/24
                                                - f0/1 ip address: 10.11.12.1/24

                                                Router R3 ports:
                                                - f0/0 ip address: 10.11.12.2/24
                                                - f0/1 ip address: 172.16.1.1/24

                                                PC1 have e0: ip address 192.168.1.2/24
                                                PC2 have e0 ip address 172.16.1.2/24

                                                CCNA books

                                                Document CCNA_v4 ENG Full:

                                                1. ccna_v4_exploration1_eng
                                                2. ccna_v4_exploration2_eng
                                                3. ccna_v4_exploration4_eng
                                                4. ccna_v4_exploration4_eng