All guided builds

Guided buildstarter5 steps~10 min2 devices

One router, one PC, one ping

Build the smallest network that works: address a router and a PC on the same subnet and get a reply back.

What you'll be able to do: A PC and a router sharing one subnet, and a ping from the PC that comes back with a reply instead of a timeout.

Topics: IP addressing · Subnet masks · Default gateway · Ping

What you'll build

Step by step

  1. 1. Place the router

    Drag a router from the palette on the left onto the canvas. A router is the box that holds an address on every network it touches and carries traffic between them; in this build it holds exactly one address, and that address is the one the PC will treat as its way out.

    Why: A router is defined by its interfaces: each one is a member of a different network, and routing means taking a packet in on one and sending it out of another. Straight off the palette it belongs to no network at all — no port has an address and every port is shut — so it has nothing to route until you configure it.

  2. 2. Add the PC and run a cable between them

    Drag a PC onto the canvas, then drag from the router's Gi0/0 port to the PC's Eth0 port to draw a copper cable. A cable is physical connectivity and nothing more — and right now not even that: a router's ports leave the factory shut, so the router's end of this cable is switched off and no signal crosses it. `show ip interface brief` on the router lists Gi0/0 as administratively down. Neither box has an address yet either, so there is still no network here.

    • Cable Edge Gi0/0 ↔ PC-A Eth0

    Check: run show ip interface brief on Edge and look for Gi0/0 unassigned YES manual administratively down down.

    Why: `show ip interface brief` answers two questions separately: Status is about the port itself, Protocol about whether the link above it works. `administratively down` means the port has been switched off in its configuration — a deliberate state no cable can fix — while plain `down` means the port is on but hears no signal. Telling the two apart is the first move in most troubleshooting.

  3. 3. Name the router and address its LAN leg

    Open the router's console and give it a name, then put an address on the port facing the PC and switch the port on with `no shutdown`. An IP address identifies one interface on one network: 192.168.1.1 is this router's identity on this LAN, and the mask 255.255.255.0 is the part that says which other addresses count as local — everything from 192.168.1.1 to 192.168.1.254 here. By convention the router takes .1, so anyone reading the config knows where the exit is.

    On Edge — Name the box, then address the port facing the PC

    enable
    configure terminal
    hostname Edge
    interface GigabitEthernet0/0
    ip address 192.168.1.1 255.255.255.0
    no shutdown
    end

    Check: run show ip interface brief on Edge and look for 192.168.1.1 YES manual up.

    Why: An address belongs to an interface, not to the router as a whole, which is why a router holds one address per network it touches. The moment an addressed port comes up, the router works out the network that address sits in — 192.168.1.0/24 — and records it as a connected route; that route, not the address, is what it consults when deciding where a packet should go.

  4. 4. Give the PC an address on the same subnet

    Open the PC's console — it is a plain shell, with no enable or configure step — name it, and hand its wired adapter an address. 192.168.1.10 shares the first three numbers with the router and carries the same mask, which is what makes the two of them neighbours on one subnet; .10 rather than .2 only leaves room for servers and printers you might add later.

    On PC-A — Name the workstation and set a static address and mask

    hostname PC-A
    ipconfig Eth0 192.168.1.10 255.255.255.0

    Check: run ipconfig on PC-A and look for IPv4 Address. . . . . . . . . . : 192.168.1.10.

    Why: Before sending anything, a host applies its own mask to its own address and to the destination. If the two network parts match, the destination is on the local wire and the host ARPs for it directly; if not, the packet must go to a gateway. The PC and the router therefore have to agree on the network part, or each treats the other as a stranger.

  5. 5. Point the PC at its gateway, then ping the router

    One field is still empty: the default gateway, the address a host hands anything destined for an address outside its own subnet. Set it to the router, then ping. This particular ping is local, so it would work with the gateway blank — but a host without one can never leave its LAN, and the Console tab is about to show the packet crossing the cable and the line `PC-A: reply from 192.168.1.1`.

    On PC-A — Record the way out of the subnet, then test the link end to end

    ip route add default via 192.168.1.1
    ping 192.168.1.1

    Check: run arp -a on PC-A and look for (192.168.1.1) at.

    Why: For any destination outside its subnet, a host keeps the far address in the IP header but addresses the Ethernet frame to its gateway's MAC, which it learns with ARP. That is why a gateway must sit inside the host's own subnet: the host has to reach it directly, in one hop, before the router can carry the packet any further.

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
One router, one PC, one ping — step-by-step network lab · NetForge-AI