All guided builds

Guided buildcore6 steps~18 min5 devices

RIP: routing by counting hops

Chain three routers over two serial links and let RIP version 2 teach every router the way to every network, counting the hops as it goes.

What you'll be able to do: Three routers in a chain that learned the whole network from each other: the two LANs reach each other across two serial hops, every route shows how many routers away it is, and a new network added at the core appears at both edges without a command being typed there.

Topics: RIP · Dynamic routing · Routing tables · WAN links · Serial interfaces

What you'll build

Step by step

  1. 1. Stand up the west site

    Drag a router and a PC onto the canvas, cable the PC into the router's Gi0/0, then name the router West and give Gi0/0 the LAN's gateway address. Keep `show ip route` in view from here on — by the end, every line in it will have been learned from a neighbour.

    • Cable West Gi0/0 ↔ PC-West Eth0

    On West — Name the router and make Gi0/0 the west LAN's gateway

    enable
    configure terminal
    hostname West
    interface Gi0/0
    ip address 192.168.10.1 255.255.255.0
    no shutdown
    exit
    end

    On PC-West — Name the workstation, address it, and point it at its gateway

    hostname PC-West
    ipconfig Eth0 192.168.10.10 255.255.255.0 192.168.10.1

    Check: run show ip route on West and look for C 192.168.10.0/24 is directly connected, Gi0/0.

    Why: A router starts out knowing only its connected networks, the C lines. A routing protocol exists to fill in everything else, and RIP does it the simplest way there is.

  2. 2. Stand up the east site

    The same at the other end of the network, in a different subnet: a router named East with 192.168.30.1 on Gi0/0, and a PC behind it.

    • Cable East Gi0/0 ↔ PC-East Eth0

    On East — Name the router and make Gi0/0 the east LAN's gateway

    enable
    configure terminal
    hostname East
    interface Gi0/0
    ip address 192.168.30.1 255.255.255.0
    no shutdown
    exit
    end

    On PC-East — Name the workstation, address it, and point it at its gateway

    hostname PC-East
    ipconfig Eth0 192.168.30.10 255.255.255.0 192.168.30.1

    Check: run show ip route on East and look for C 192.168.30.0/24 is directly connected, Gi0/0.

    Why: The two edge sites will never share a cable — everything between them has to be learned, one router at a time.

  3. 3. Put a core router between them

    Drag a third router into the middle and name it Core. Run a serial cable from West's Se0/0/0 to Core's Se0/0/0 (10.1.1.0/30) and another from Core's Se0/0/1 to East's Se0/0/0 (10.1.1.4/30), and address all four ends. Core has no LAN of its own — it is the router every packet between the two sites has to cross.

    • Cable West Se0/0/0 ↔ Core Se0/0/0 (serial)
    • Cable Core Se0/0/1 ↔ East Se0/0/0 (serial)

    On West — Take the west end of the first serial link, 10.1.1.1

    enable
    configure terminal
    interface Se0/0/0
    ip address 10.1.1.1 255.255.255.252
    no shutdown
    exit
    end

    On Core — Name the core router and take the middle of both links

    enable
    configure terminal
    hostname Core
    interface Se0/0/0
    ip address 10.1.1.2 255.255.255.252
    no shutdown
    exit
    interface Se0/0/1
    ip address 10.1.1.5 255.255.255.252
    no shutdown
    exit
    end

    On East — Take the east end of the second serial link, 10.1.1.6

    enable
    configure terminal
    interface Se0/0/0
    ip address 10.1.1.6 255.255.255.252
    no shutdown
    exit
    end

    Check: run show ip interface brief on Core and look for Se0/0/1 10.1.1.5 YES manual up up.

    Why: Each router still knows only its connected networks. West knows 10.1.1.0/30 but has never heard of 10.1.1.4/30, one router further on, and neither edge knows the other's LAN exists.

  4. 4. Start RIP on West and Core

    `router rip` starts the process, `version 2` makes it carry each route's subnet mask, and each `network` line names a classful network whose interfaces should speak RIP — 10.0.0.0 covers both /30s at once, because RIP's `network` takes no mask. `no auto-summary` tells the router to advertise subnets exactly as they are. The moment Core joins, the two swap tables and West gains an R route to the far /30, one hop away.

    On West — Run RIP v2 on the west LAN and the serial link

    enable
    configure terminal
    router rip
    version 2
    network 192.168.10.0
    network 10.0.0.0
    no auto-summary
    end

    On Core — Run RIP v2 on both of Core's serial links

    enable
    configure terminal
    router rip
    version 2
    network 10.0.0.0
    no auto-summary
    end

    Check: run show ip route on West and look for R 10.1.1.4/30 [120/1] via 10.1.1.2, Se0/0/0.

    Why: RIP is a distance-vector protocol: every router tells its neighbours each network it knows and how many routers away it is, and nothing more — no map, just directions and distances. In [120/1], 120 is RIP's administrative distance and 1 is the hop count.

  5. 5. Bring East into RIP and count the hops

    The same lines on East, with its own LAN in the first `network` statement, and the chain is complete. Read West's route to the east LAN: [120/2] — two routers stand between West and that network, Core and then East. Core, in the middle, sees both LANs at [120/1].

    On East — Run RIP v2 on the east LAN and the serial link

    enable
    configure terminal
    router rip
    version 2
    network 192.168.30.0
    network 10.0.0.0
    no auto-summary
    end

    On PC-West — Cross the whole chain: two serial links, three routers

    ping 192.168.30.10

    Check: run show ip route on West and look for R 192.168.30.0/24 [120/2] via 10.1.1.2, Se0/0/0.

    Why: RIP never sees the whole network, only its neighbours' tables: East announces 192.168.30.0/24, Core adds one and passes it on, West adds one more. That is also RIP's weakness — a hop is a hop whether the link is gigabit or a slow serial line, and 16 hops means unreachable, which is why RIP stays in small networks.

  6. 6. Add a network at the core and touch only Core

    A loopback is a virtual interface that is always up — engineers give routers one as the address to manage them by. Create Loopback0 on Core in 172.16.20.0/24 and add a `network` line for its class B network, 172.16.0.0. West and East get no commands, yet both gain an R route to it, one hop away.

    On Core — Create the loopback and advertise its network into RIP

    enable
    configure terminal
    interface Loopback0
    ip address 172.16.20.1 255.255.255.0
    exit
    router rip
    network 172.16.0.0
    end

    On PC-East — Reach a network nobody configured a route for

    ping 172.16.20.1

    Check: run show ip route on East and look for R 172.16.20.0/24 [120/1] via 10.1.1.5, Se0/0/0.

    Why: Describe a network once, on the router it lives on, and the protocol tells everyone else — the whole case for dynamic routing. Because Core runs `no auto-summary`, it announces 172.16.20.0/24 exactly; with auto-summary on, a real router sending it out the 10.0.0.0 links would round it up to the whole class B, 172.16.0.0/16.

The theory behind it

Build it for real

The lab walks you through these steps and ticks each one off as your network starts working.

Open in the lab
RIP: routing by counting hops — step-by-step network lab · NetForge-AI