WAN Fundamentals and IP Routing: How Routers Connect Separate Networks

While switches connect devices within a single local network, routers connect entirely separate networks together, forming the backbone of both enterprise WANs and the internet itself. This comprehensive guide explains what distinguishes a WAN from a LAN, covers how routers make forwarding decisions using a routing table, and walks through the essential Cisco commands for viewing and understanding router behavior.

WAN FundamentalsIP Routing TableCisco Router Basics

~5 min read · Updated Sep 9, 2026

LAN Versus WAN: Two Fundamentally Different Scopes

The Ethernet switching discussed earlier in this series operates within a LAN (Local Area Network) — a single site, such as one office building or floor, where devices are typically directly cabled or wirelessly connected to shared switching infrastructure. A WAN (Wide Area Network) connects separate LANs together across greater distances, typically using a service provider's infrastructure rather than privately owned cabling.

Key distinction:
LAN: high bandwidth, low latency, privately owned
     and controlled infrastructure (switches, cabling)

WAN: comparatively lower bandwidth, higher latency,
     often leased from a service provider
     (leased lines, MPLS, internet-based VPNs)

A router is the device that sits at the boundary between these networks, making the decision about how to forward traffic from one network toward another — the fundamental Layer 3 function that a Layer 2 switch cannot perform.

Why Routing Is Necessary

A switch, discussed earlier in this series, forwards frames based on MAC addresses within a single broadcast domain. This approach does not scale to the entire internet, where flooding traffic to every possible destination would be catastrophically inefficient. IP Routing solves this using hierarchical, logical addressing: an IP address encodes both which network a device belongs to and which specific device it is within that network, allowing a router to make a forwarding decision based only on the network portion of the address, without needing to know about every individual device.

The Routing Table: A Router's Core Decision-Making Tool

Every router maintains a Routing Table, a list of known network destinations and the corresponding next-hop or exit interface used to reach them.

Router# show ip route

Codes: C - connected, S - static, O - OSPF, R - RIP

Gateway of last resort is 203.0.113.1 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, GigabitEthernet0/0
C    192.168.2.0/24 is directly connected, GigabitEthernet0/1
S    10.0.0.0/8 [1/0] via 192.168.2.2
S*   0.0.0.0/0 [1/0] via 203.0.113.1

Each entry's code letter indicates how the router learned that route: C for directly connected networks (an interface with a configured IP address on that network), S for statically configured routes (manually entered by an administrator), and letters like O or R for routes learned dynamically through routing protocols, discussed in depth later in this series.

The Longest Prefix Match Rule

When multiple routing table entries could potentially match a destination address, a router always chooses the entry with the Longest Prefix Match — the most specific matching route, indicated by the longest subnet mask.

Example routing table entries:
0.0.0.0/0        (default route — matches everything)
10.0.0.0/8        (matches a large range)
10.1.1.0/24       (matches a smaller, more specific range)

For a packet destined to 10.1.1.5, the router chooses
the 10.1.1.0/24 route, since it is the most specific
match, even though the packet also technically matches
the broader 10.0.0.0/8 and 0.0.0.0/0 entries

This rule is fundamental to how routers scale efficiently: a router can maintain a single broad default route for general internet traffic while maintaining specific routes only for the network segments it needs finer-grained control over.

Basic Router Interface Configuration

Router(config)# interface gigabitethernet 0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# description LAN Interface
Router(config-if)# exit

Router(config)# interface gigabitethernet 0/1
Router(config-if)# ip address 192.168.2.1 255.255.255.0
Router(config-if)# no shutdown

Unlike a switch's ports, which typically require no IP configuration to forward traffic, each router interface must be assigned an IP address on a specific network before the router can route traffic to or from that network — this is the essential link between the router's physical connections and its logical routing table entries.

Configuring a Static Route

A Static Route is a manually configured routing table entry, useful for small networks or specific destinations where dynamic routing protocols would be unnecessary overhead.

Router(config)# ip route 10.0.0.0 255.0.0.0 192.168.2.2
Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1

-- The second line configures a "default route,"
-- matching any destination not covered by a more
-- specific entry, commonly used to point toward
-- an ISP or upstream network

Static routes are simple and predictable, but they do not automatically adapt if the network topology changes — if the next-hop address becomes unreachable, the static route remains in the table pointing to a now-dead path unless manually corrected, a limitation that dynamic routing protocols, discussed later in this series, are specifically designed to overcome.

Verifying Connectivity and Path

Router# ping 10.1.1.5
Router# traceroute 10.1.1.5

Type escape sequence to abort.
Tracing the route to 10.1.1.5
  1  192.168.2.2  4 msec  4 msec  4 msec
  2  10.1.1.5     8 msec  8 msec  8 msec

traceroute reveals the actual path a packet takes hop by hop, showing each router along the way — an essential tool for diagnosing exactly where connectivity breaks down when a destination is unreachable, since it isolates the problem to a specific segment of the path rather than the connection as a whole.

Why Understanding Routing Fundamentals Matters

Every routing protocol and advanced routing feature covered later in this series — OSPF, EIGRP, BGP, route redistribution — exists to solve one core problem more efficiently: automatically and correctly populating this same routing table that has been described in this article. Understanding what a routing table entry actually means, how longest prefix match determines which entry gets used, and how to read the output of basic diagnostic commands is the essential foundation for every more advanced routing topic that follows.

Written & researched by Dr. Shahin Siami

Related Articles

OSPF Fundamentals: Link-State Routing Explained

OSPF is the most widely deployed interior routing protocol in enterprise networks, using a fundamentally different approach than simply exchanging routing tables between neighbors. This article explains what a link-state protocol actually is, how OSPF routers become neighbors and build a shared topology database, how the cost metric determines the best path, and the essential commands for configuring and verifying single-area OSPF.

Continue

Network Address Translation: Sharing Public IP Addresses

The limited supply of public IPv4 addresses made it impossible for every device worldwide to have its own globally unique address, and Network Address Translation solved this by letting many private devices share a small number of public addresses. This article explains the three main NAT types, walks through configuring static NAT, dynamic NAT, and PAT on a Cisco router, and covers the essential commands for verifying active translations.

Continue

Access Control Lists: Filtering Traffic on Cisco Routers

Access Control Lists let a router or switch selectively permit or deny traffic based on source, destination, and protocol information, forming the foundation of basic network security and traffic filtering. This article explains how ACLs process traffic sequentially, covers the difference between standard and extended ACLs, walks through wildcard mask calculation, and explains critical placement rules that determine whether an ACL works as intended.

Continue

DHCP and DNS: Automatic Addressing and Name Resolution

Manually configuring an IP address on every device does not scale, and remembering numeric IP addresses for every service is impractical, which is why DHCP and DNS exist as essential supporting services in nearly every network. This article explains how DHCP automatically assigns IP addressing information, covers configuring a Cisco device as a DHCP server or relay agent, and explains how DNS resolves human-readable names into IP addresses.

Continue

Inter-VLAN Routing: Connecting VLANs with Router-on-a-Stick and SVIs

VLANs isolate broadcast domains from each other at Layer 2, but real applications still need devices in different VLANs to communicate, which requires routing between them at Layer 3. This article explains the legacy router-on-a-stick approach using subinterfaces, the modern and more scalable Switch Virtual Interface approach on Layer 3 switches, and the essential configuration and verification commands for both.

Continue

EtherChannel: Combining Multiple Links Into One Logical Connection

Instead of choosing between redundancy and bandwidth, EtherChannel combines multiple physical links into a single logical connection that provides both simultaneously, without Spanning Tree blocking any of the links. This article explains how EtherChannel bundles ports together, compares the PAgP and LACP negotiation protocols used to form a bundle safely, and covers the essential configuration and verification commands.

Continue