On this page 13 sections
  1. 1. Three-router lab
  2. 2. Configure connected interfaces
  3. 3. Read the routing table
  4. 4. Add static routes in both directions
  5. 5. Verify the complete path
  6. 6. Use a default route on a stub router
  7. 7. Remove static routes before the RIP stage
  8. 8. Configure RIPv2
  9. 9. Verify RIP routes
  10. 10. Add a floating static backup
  11. 11. Test failover and restore the primary path
  12. 12. Troubleshooting and saving
  13. 13. Cisco references
01

1. Three-router lab

Example: PC1 and PC3 are on different LANs with R2 between their gateways. Configure connected interfaces first, then add routes for the remote LANs.

Use fresh IOS / IOS XE lab routers. Device names in the prompts identify where to execute each command; configure those hostnames beforehand. Adapt interface names to your model. Type only the text after the prompt. PC1> identifies the PC terminal, whose actual prompt depends on the operating system.

Static routing and RIPv2 are successive stages of this lab. The later cleanup section removes the static routes before enabling RIP. The backup link is optional and is added last.

Main topology and addressing — reference only
PC1 ---- Gi0/0 [R1] Gi0/1 ---- Gi0/0 [R2] Gi0/1 ---- Gi0/1 [R3] Gi0/0 ---- PC3

Device/interface  IPv4 address       Purpose
R1 Gi0/0         192.168.10.1/24    LAN 1 gateway
R1 Gi0/1         10.0.12.1/30      R1-R2 link
R2 Gi0/0         10.0.12.2/30      R1-R2 link
R2 Gi0/1         10.0.23.1/30      R2-R3 link
R3 Gi0/1         10.0.23.2/30      R2-R3 link
R3 Gi0/0         192.168.30.1/24    LAN 3 gateway

PC1: 192.168.10.10/24   Gateway: 192.168.10.1
PC3: 192.168.30.30/24   Gateway: 192.168.30.1

/24 mask: 255.255.255.0
/30 mask: 255.255.255.252
02

2. Configure connected interfaces

Example: assign the six router interface addresses from the plan. Configure both PCs manually before testing.

  • interface: select the port connected to the stated peer.
  • ip address: assign the local address and mask; do not enter the peer's address.
  • no shutdown: enable the interface.
  • show ip interface brief: confirm addresses and up/up state.

At this stage, adjacent routers should reach each other. PC1 cannot yet reach PC3 because the remote LAN routes are missing.

R1 — LAN and transit interfaces
R1# configure terminal
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface GigabitEthernet0/1
R1(config-if)# ip address 10.0.12.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# end
R1# show ip interface brief
R2 — transit interfaces
R2# configure terminal
R2(config)# interface GigabitEthernet0/0
R2(config-if)# ip address 10.0.12.2 255.255.255.252
R2(config-if)# no shutdown
R2(config-if)# exit
R2(config)# interface GigabitEthernet0/1
R2(config-if)# ip address 10.0.23.1 255.255.255.252
R2(config-if)# no shutdown
R2(config-if)# end
R2# show ip interface brief
R2# ping 10.0.12.1
R2# ping 10.0.23.2
R3 — LAN and transit interfaces
R3# configure terminal
R3(config)# interface GigabitEthernet0/0
R3(config-if)# ip address 192.168.30.1 255.255.255.0
R3(config-if)# no shutdown
R3(config-if)# exit
R3(config)# interface GigabitEthernet0/1
R3(config-if)# ip address 10.0.23.2 255.255.255.252
R3(config-if)# no shutdown
R3(config-if)# end
R3# show ip interface brief
03

3. Read the routing table

Example: R1 knows its directly connected networks but needs a route to 192.168.30.0/24.

C means connected, L means a local interface address, S means static and R means learned through RIP. In a route such as [120/2], 120 is administrative distance and 2 is the protocol metric.

Forwarding uses the longest matching prefix. When different sources offer the same prefix, administrative distance helps select the installed route. Lower distance is preferred; default static distance is 1 and RIP distance is 120. A more-specific route is not overridden merely because a less-specific route has lower distance.

  • show ip route: display the installed IPv4 routing table.
  • show ip route 192.168.30.30: inspect the route matching the destination host.
  • show ip route connected: display connected networks.
R1 — inspect current knowledge
R1# show ip route
R1# show ip route 192.168.30.30
R1# show ip route connected
04

4. Add static routes in both directions

Example: send LAN 1 traffic to LAN 3 through R2. R2 must know both LANs, and R3 must know how to return traffic to LAN 1.

  • ip route destination mask next-hop: configure a route to a destination network through the next router.
  • show ip route static: display installed static routes.

The next hop is the adjacent router's address, not your own interface address. These Ethernet examples use next-hop addresses, avoiding an interface-only route that might depend on proxy ARP.

R1 — route to LAN 3
R1# configure terminal
R1(config)# ip route 192.168.30.0 255.255.255.0 10.0.12.2
R1(config)# end
R1# show ip route static
R2 — routes to both LANs
R2# configure terminal
R2(config)# ip route 192.168.10.0 255.255.255.0 10.0.12.1
R2(config)# ip route 192.168.30.0 255.255.255.0 10.0.23.2
R2(config)# end
R2# show ip route static
R3 — return route to LAN 1
R3# configure terminal
R3(config)# ip route 192.168.10.0 255.255.255.0 10.0.23.1
R3(config)# end
R3# show ip route static
05

5. Verify the complete path

Example: test from PC1 so that the packet source is 192.168.10.10, whose return route was explicitly configured.

  • ping 192.168.30.30: test end-to-end reachability from PC1.
  • tracert 192.168.30.30: inspect the path from a Windows or Packet Tracer PC; Unix-like clients usually use traceroute.
  • ping 192.168.30.30 source 192.168.10.1: test from R1 using its LAN interface address where the IOS image supports this syntax.

A normal router ping may select a transit-interface source. The static stage has only remote-LAN routes, so some transit-source return paths are absent. Use the PC test or the explicit LAN source rather than assuming that such a failure proves LAN routing is broken.

Expected: PC1 reaches PC3. Host firewalls must permit the test traffic; traceroute hops may time out even when forwarding works.

PC1 — test the remote LAN
PC1> ping 192.168.10.1
PC1> ping 192.168.30.30
PC1> tracert 192.168.30.30
R1 — optional source-specific ping
R1# ping 192.168.30.30 source 192.168.10.1
06

6. Use a default route on a stub router

Example: R1 has only one upstream router, R2. Replace R1's specific LAN 3 route with a default route. Keep R2 and R3's static routes from section 4.

  • no ip route: remove the specified static route from the configuration.
  • ip route 0.0.0.0 0.0.0.0 10.0.12.2: send destinations without a more-specific match toward R2.

The default route is 0.0.0.0/0, commonly displayed as S* with a gateway of last resort. It does not create Internet connectivity: the upstream router still needs a destination route and the return path must exist.

R1 — replace the specific route with a default
R1# configure terminal
R1(config)# no ip route 192.168.30.0 255.255.255.0 10.0.12.2
R1(config)# ip route 0.0.0.0 0.0.0.0 10.0.12.2
R1(config)# end
R1# show ip route
07

7. Remove static routes before the RIP stage

Example: use the same topology for dynamic routing. Remove the routes created above so they do not hide the RIP-learned routes.

  • no ip route: remove each exact route, including its next hop.

If you skipped the default-route exercise, remove R1's section 4 specific route instead. The blocks below assume you completed section 6.

R1 — remove the default route
R1# configure terminal
R1(config)# no ip route 0.0.0.0 0.0.0.0 10.0.12.2
R1(config)# end
R2 — remove both static routes
R2# configure terminal
R2(config)# no ip route 192.168.10.0 255.255.255.0 10.0.12.1
R2(config)# no ip route 192.168.30.0 255.255.255.0 10.0.23.2
R2(config)# end
R3 — remove the static return route
R3# configure terminal
R3(config)# no ip route 192.168.10.0 255.255.255.0 10.0.23.1
R3(config)# end
08

8. Configure RIPv2

Example: let the three routers exchange their connected networks. RIPv2 carries subnet masks, supports VLSM and normally multicasts updates to 224.0.0.9 using UDP 520.

RIP uses hop count: 15 is the largest reachable metric and 16 means unreachable. RIPv1 does not carry subnet masks. This lab explicitly uses RIPv2.

  • router rip: enter RIP configuration mode, shown as (config-router)#.
  • version 2: select RIPv2.
  • no auto-summary: prevent automatic summarization at classful network boundaries.
  • network 10.0.0.0: enable RIP on interfaces in the classful 10.0.0.0/8 network; it does not assign an IP address or force a /8 advertisement here.
  • network 192.168.10.0: include R1's LAN interfaces in that classful network.
  • passive-interface GigabitEthernet0/0: suppress outbound RIP updates on the PC-facing LAN while still advertising its subnet through active RIP interfaces.

RIP's network command uses classful network selection, not an OSPF-style wildcard mask. Only transit links exchange updates in this lab. A passive RIP interface is not a security filter for incoming packets.

R1 — advertise LAN 1 and its transit network
R1# configure terminal
R1(config)# router rip
R1(config-router)# version 2
R1(config-router)# no auto-summary
R1(config-router)# network 10.0.0.0
R1(config-router)# network 192.168.10.0
R1(config-router)# passive-interface GigabitEthernet0/0
R1(config-router)# end
R2 — exchange routes on both transit links
R2# configure terminal
R2(config)# router rip
R2(config-router)# version 2
R2(config-router)# no auto-summary
R2(config-router)# network 10.0.0.0
R2(config-router)# end
R3 — advertise LAN 3 and its transit network
R3# configure terminal
R3(config)# router rip
R3(config-router)# version 2
R3(config-router)# no auto-summary
R3(config-router)# network 10.0.0.0
R3(config-router)# network 192.168.30.0
R3(config-router)# passive-interface GigabitEthernet0/0
R3(config-router)# end
09

9. Verify RIP routes

Example: after updates propagate, R1 should learn LAN 3 through R2 with metric 2. R2 learns each remote LAN with metric 1.

  • show ip protocols: inspect RIP version, selected networks, passive interfaces and routing information sources.
  • show ip route rip: display installed RIP routes.
  • show ip rip database: inspect RIP's own route database, where supported.

Expected on R1: a route to 192.168.30.0/24 through 10.0.12.2, marked R and [120/2]. RIP convergence is not instantaneous; allow updates to propagate before diagnosing missing routes.

R1 — inspect RIP
R1# show ip protocols
R1# show ip route rip
R1# show ip rip database
R2 — inspect transit learning
R2# show ip route rip
R3 — check the return path
R3# show ip route 192.168.10.10
PC1 — repeat the end-to-end test
PC1> ping 192.168.30.30
10

10. Add a floating static backup

Example: add a direct backup cable between spare Gi0/2 ports on R1 and R3. Use 172.16.13.1/30 on R1 and 172.16.13.2/30 on R3. This separate address range is not selected by the existing RIP network commands.

A floating static route has a higher administrative distance than the primary route for the same prefix. Use 200, above RIP's 120, so RIP remains preferred while it is available.

  • ip route ... 200: create a backup static route with administrative distance 200.
  • show ip route 192.168.30.0: inspect the currently installed route on R1.

Configure a backup in both directions. These routes protect the two LAN prefixes, not every possible destination. A floating route does not itself probe end-to-end health; it becomes eligible when the preferred route disappears and its own next hop remains reachable.

R1 — backup interface and route to LAN 3
R1# configure terminal
R1(config)# interface GigabitEthernet0/2
R1(config-if)# ip address 172.16.13.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# ip route 192.168.30.0 255.255.255.0 172.16.13.2 200
R1(config)# end
R1# ping 172.16.13.2
R1# show ip route 192.168.30.0
R3 — backup interface and return route
R3# configure terminal
R3(config)# interface GigabitEthernet0/2
R3(config-if)# ip address 172.16.13.2 255.255.255.252
R3(config-if)# no shutdown
R3(config-if)# exit
R3(config)# ip route 192.168.10.0 255.255.255.0 172.16.13.1 200
R3(config)# end
R3# ping 172.16.13.1
11

11. Test failover and restore the primary path

Example: after both backup interfaces are configured, shut R1's link toward R2 using console access. Leave the direct R1–R3 backup link active.

  • shutdown: disable the selected primary-link interface for the test.
  • show ip route 192.168.30.0: confirm the backup route is installed on R1, normally as S [200/0] through 172.16.13.2.
  • no shutdown: restore the primary interface after the test.

R3 must also stop using its old RIP return route before full bidirectional failover works. Wait for triggered updates or RIP route expiration, then check both tables. Do not expect an immediate transition.

After restoration and RIP convergence, R [120/2] should again replace the floating static route on R1.

R1 — simulate primary-link loss
R1# configure terminal
R1(config)# interface GigabitEthernet0/1
R1(config-if)# shutdown
R1(config-if)# end
R1# show ip route 192.168.30.0
R3 — confirm the backup return path after convergence
R3# show ip route 192.168.10.0
PC1 — test the backup path
PC1> ping 192.168.30.30
R1 — restore the primary link
R1# configure terminal
R1(config)# interface GigabitEthernet0/1
R1(config-if)# no shutdown
R1(config-if)# end
R1# show ip route 192.168.30.0
12

12. Troubleshooting and saving

Example: the interface is up but remote traffic fails. Inspect the destination route and the return route before changing protocol settings.

Static route missing: check the destination mask and next-hop reachability. RIP route missing: inspect the network commands, RIPv2 setting and transit interfaces; do not make a router-to-router interface passive.

Static route hides RIP: a distance-1 static route normally wins for the same prefix. Backup never activates: the primary route may still exist, or the backup next hop may be unreachable.

PC ping fails but router ping works: inspect the PC's gateway, mask and firewall. Router ping fails but PC traffic works: check which source address the router selected and its return path.

  • show ip protocols: check RIP configuration and routing information sources.
  • show running-config: inspect configured routes, including floating routes not currently installed.
  • copy running-config startup-config: save the verified final state on each router.

Restore any interface shut during testing before saving.

R1 — final checks and save
R1# show ip protocols
R1# show running-config
R1# copy running-config startup-config
R2 — save
R2# copy running-config startup-config
R3 — save
R3# copy running-config startup-config
13

13. Cisco references

Cisco — RIP Command Reference:
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_rip/command/irr-cr-book/irr-cr-rip.html

Cisco — Configure a Next Hop IP Address for Static Routes:
https://www.cisco.com/c/en/us/support/docs/dial-access/floating-static-route/118263-technote-nexthop-00.html

Cisco — Basic IP Routing:
https://www.cisco.com/c/en/us/td/docs/routers/ios-xe/ip-routing/b-ip-routing/m_iri-iprouting.html