Documente Academic
Documente Profesional
Documente Cultură
If a router receives two updates listing the same remote network, the first thing the router checks
is the AD. If one of the advertised routes has a lowest AD than the other, then the route with the
lowest AD will be placed in the routing table.
If both advertised routes to the same network have the same AD, then routing protocol metrics
(such as hop count or bandwidth of the lines) will be used to find the best path to the remote
network. The advertised route with the lowest metric will be place in the routing table. If both
advertised routes have the same AD as well as the same metrics, then the routing protocol will
load-balance to the remote network (which means that it sends packets down each link).
RIP version 1 uses only classful routing, which means that all devices in the network must use
the same subnet mask. This is because RIP version 1 does not send updates with subnet mask
information. RIP version 2 provides something called prefix routing and does send subnet mask
information with the route updates. This is called classless routing.
Configuring RIP is pretty much straight forward. You just turn on the protocol stack with the help
of the command router rip and then instruct RIP which networks to advertise.
Lets start by configuring routerA. This specific router has three directly connected networks.
We want these networks to be advertised by RIP and this is how we do it:
RouterA(config)#router rip
RouterA(config-router)#version 2
RouterA(config-router)#network 192.168.10.0
RouterA(config-router)#network 10.10.25.0
RouterA(config-router)#network 10.10.125.0
Topology
Device Interface IP Address Subnet Mask Default Gateway
255.255.255.2
R1 F0/0 192.168.2.1 52 N/A
F0/1 192.168.1.1 255.255.255.0 N/A
255.255.255.2
R2 F0/0 192.168.2.2 52 N/A
255.255.255.2
F0/1 192.168.3.1 52 N/A
255.255.255.2
R3 F0/0 192.168.3.2 52 N/A
F0/1 192.168.4.1 255.255.255.0 N/A
PC-A NIC 192.168.1.10 255.255.255.0 192.168.1.1
PC-B NIC 192.168.4.10 255.255.255.0 192.168.4.1
R1(config-line)# exit
R1(config)#
g. Assign cisco as the vty password and enable login and also
R1(config)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exec-timeout 0 0
R1(config-line)# exit
R1(config)#
h. Encrypt the clear text passwords.
R1(config)# service password-encryption
i. Configure and activate both interfaces on the router.
R1(config)# int f0/0
R1(config-if)# ip address 192.168.2.1 255.255.255.252
R1(config-if)# no shut
R1(config-if)#exit
R1(config)# int f0/1
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# no shut
R1(config-if)#
j. Save the running configuration to the startup file.
R1# copy running-config startup-config (or) write mem
Destination filename [startup-config]?
Building configuration...
[OK]
R1#
Static Route in R2
R2(config)# ip route 192.168.1.0 255.255.255.0 192.168.2.1
R2(config)# ip route 192.168.4.0 255.255.255.0 192.168.3.2
Default Route in R3
R1(config)# ip route 0.0.0.0 0.0.0.0 192.168.3.1
R2#sh ip route
Gateway of last resort is not set
R3#sh ip route
Gateway of last resort is 192.168.3.1 to network 0.0.0.0
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#network 192.168.3.0
R3(config-router)#network 192.168.4.0
R1(config-router)#do sh ip route
Gateway of last resort is not set
R2#sh ip route
Gateway of last resort is not set
R3#sh ip route
Gateway of last resort is not set