0% found this document useful (0 votes)
3 views11 pages

05 IP Routing

Covers how routers forward packets using routing tables, static route configuration via Cisco IOS CLI, verification commands, and wildcard masks, culminating in a Packet Tracer activity that ties together VLSM and static routing.

Uploaded by

me.picache
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views11 pages

05 IP Routing

Covers how routers forward packets using routing tables, static route configuration via Cisco IOS CLI, verification commands, and wildcard masks, culminating in a Packet Tracer activity that ties together VLSM and static routing.

Uploaded by

me.picache
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IP Routing

Network Technology | IT

Topics Covered

What is IP Routing · Where & What is it For · Types of Routing · CLI Commands · Wildcard Masks ·
Packet Tracer Activity
What is IP Routing?
The process of forwarding packets between networks

IP Routing is the process by which a router reads the destination IP address of a packet and determines the best path to
forward it toward its destination — across one or more networks.

How it Works Key Terms


▸ Routers operate at Layer 3 (Network Layer) of the OSI model Router: Network device that forwards packets
▸ Each router maintains a Routing Table — a map of known networks and how to between subnets/networks

reach them Routing Table: Database of known routes stored in


the router's memory
▸ When a packet arrives, the router looks up the destination IP in its routing table
▸ It forwards the packet out the interface that leads toward the destination (Next Next Hop: IP address of the next router toward
the destination
Hop)
▸ If no matching route exists, the packet is dropped (or sent to a default route) AD: Administrative Distance —
trustworthiness of a route source
▸ Routing happens hop-by-hop — each router only decides the next step, not the
Metric: Cost of the path (hops, bandwidth,
full path delay, etc.)

Default Route: Catch-all route ([Link]/0) used when


no specific match exists
Where is IP Routing Used & What is it For?
Anywhere two or more networks need to communicate

Enterprise Networks Home & SOHO Networks Internet Service Providers

Routes traffic between departments, VLANs, Your home router routes between your ISP backbone routers use BGP to route
floors, and branch offices — keeping private 192.168.x.x LAN and the public billions of packets per second across the
networks segmented but connected internet via your ISP global internet

Data Centers WAN & Branch Connectivity Cloud Platforms

Routes traffic between compute tiers (web, Connects geographically separated offices AWS VPC route tables, Azure UDR, and GCP
app, DB), storage networks, and external over MPLS, leased lines, or VPN tunnels via routing all use IP routing to control traffic
clients static or dynamic routes between subnets and the internet
Types of IP Routing
Static routing vs. Dynamic routing protocols

Static Routing ← Focus of this topic Dynamic Routing (future topic)

▸ Routes manually added by an administrator RIP Routing Information Protocol — distance vector, max 15 hops,
▸ Never changes unless an admin modifies it legacy
▸ Zero routing protocol overhead — very efficient
▸ Predictable and easy to control OSPF Open Shortest Path First — link-state, most widely used interior
▸ Does NOT auto-adapt to link failures protocol
▸ Best for: small networks, stub routes, labs
▸ Command: ip route [net] [mask] [next-hop] EIGRP Enhanced IGRP — Cisco proprietary, hybrid, fast convergence

BGP Border Gateway Protocol — path vector, runs the internet (inter-
AS)

Advantages over static:


▸ Auto-discovers and shares routes with neighbours
▸ Adapts automatically to topology changes and failures
▸ Scales to very large networks (enterprise, ISP)
CLI: Interface Configuration
Setting up router interfaces before adding routes

Cisco IOS — Interface Configuration Command Notes


Router> enable enable Enters privileged EXEC mode from user
Router# configure terminal
mode
Router(config)# hostname R1 ! rename the router
R1(config)# interface GigabitEthernet0/0 ! select interface
R1(config-if)# description LAN-A1 Engineering ! optional label configure terminal Enters global configuration mode
R1(config-if)# ip address [Link] [Link] ! assign IP + mask
R1(config-if)# no shutdown ! enable the interface
R1(config-if)# exit interface <type><n> Selects a specific interface to configure
R1(config)# interface GigabitEthernet0/1
R1(config-if)# ip address [Link] [Link]
R1(config-if)# no shutdown ip address Assigns an IPv4 address and subnet
R1(config-if)# exit mask
R1(config)# interface Serial0/0/0 ! WAN link
R1(config-if)# ip address [Link] [Link] no shutdown Brings the interface UP (interfaces
R1(config-if)# clock rate 64000 ! only on DCE end
default to down)
R1(config-if)# no shutdown
description Label for documentation — does not
affect routing

clock rate Sets clock speed on a serial DCE end


(Packet Tracer)

exit Returns to the previous configuration


mode
CLI: Configuring Static Routes
Manually telling the router where each network is

Syntax

R1(config)# ip route [destination-network] [subnet-mask] [next-hop-IP | exit-interface]

Examples

R1(config)# ip route [Link] [Link] [Link] ! Route to Block B via R2's WAN IP
R1(config)# ip route [Link] [Link] Serial0/0/0 ! Route using exit interface instead of next-hop
R1(config)# ip route [Link] [Link] [Link] ! Default route — catch all unmatched destinations
R1(config)# no ip route [Link] [Link] [Link] ! Remove a static route (prefix 'no')

Next-Hop IP Exit Interface Default Route Administrative Distance


Use the IP address of the neighbouring Use the local interface name (e.g., [Link]/0 matches everything — used as AD = 1, second only to connected routes
router interface that leads toward the Se0/0/0) — common on point-to-point a last-resort path, typically toward the (AD 0). Considered very trusted by the
destination. serial links. internet. router.
CLI: Verification Commands
How to confirm routing is working correctly

Common Verification Commands Sample: show ip route output

R1# show ip route ! display routing table Gateway of last resort is not set
R1# show ip interface brief ! interface status + IPs
R1# show running-config ! full current configuration [Link]/24 is variably subnetted, 3 subnets
R1# show ip route static ! only static routes C [Link]/27 is directly connected, Gi0/0
L [Link]/32 is directly connected, Gi0/0
R1# ping [Link] ! test reachability
C [Link]/28 is directly connected, Gi0/1
R1# ping [Link] repeat 100 ! 100-packet ping test C [Link]/30 is directly connected, Se0/0/0
R1# traceroute [Link] ! show each hop in the path S [Link]/26 [1/0] via [Link]
R1# show interfaces Se0/0/0 ! detailed interface info S [Link]/27 [1/0] via [Link]

Route Code Legend

C Connected — directly attached network


L Local — the router's own interface IP (/32)
S Static — manually configured route
[1/0] = [Administrative Distance / Metric]
Wildcard Masks
The inverse of a subnet mask — used in OSPF and ACLs

Wildcard Mask = [Link] − Subnet Mask │ 0 bit = must match │ 1 bit = don't care (wildcard)

Wildcard Calculation Table Where Wildcards Are Used


CIDR Subnet Mask Wildcard Mask Usable Hosts OSPF — network statement

/24 [Link] [Link] 254 network [Link] [Link] area 0

Tells OSPF which interfaces to include based on network + wildcard range.


/25 [Link] [Link] 126

/26 [Link] [Link] 62


ACL — Access Control List
/27 [Link] [Link] 30
access-list 10 permit [Link] [Link]
/28 [Link] [Link] 14
Permit all addresses in the [Link]/26 subnet (wildcard [Link]).
/29 [Link] [Link] 6

/30 [Link] [Link] 2 Special Wildcards


[Link] → exact host match (/32)
/32 [Link] [Link] 0 (host route) [Link] → match ANY host
Used for host-specific rules or blanket permit/deny.
Activity: Packet Tracer — Network Topology
Given: [Link]/23 | Split statically, then VLSM each block

Given: [Link] / 23 Mask: [Link] Static split into 2 × /24: Block A = [Link]/24 (Site A) Block B = [Link]/24 (Site B)

LAN A1 — Engineering LAN B1 — Sales


30 hosts → /27 [Link] 60 hosts → /26 [Link]

R1 WAN Se0/0/0 ←→ Se0/0/0 R2


Gi0/0 · Gi0/1 · Se0/0/0 Se0/0/0 · Gi0/0 · Gi0/1
[Link]/30 (.49 ↔ .50)

LAN A2 — Admin LAN B2 — IT Dept


12 hosts → /28 [Link] 25 hosts → /27 [Link]

Interface Address Summary


R1 Gi0/0 LAN A1 [Link] /27 [Link] Gateway for [Link]/27
R1 Gi0/1 LAN A2 [Link] /28 [Link] Gateway for [Link]/28
R1 Se0/0/0 WAN [Link] /30 [Link] DCE end — set clock rate
R2 Se0/0/0 WAN [Link] /30 [Link] DTE end
R2 Gi0/0 LAN B1 [Link] /26 [Link] Gateway for [Link]/26
R2 Gi0/1 LAN B2 [Link] /27 [Link] Gateway for [Link]/27
Activity: VLSM Subnetting Breakdown
Block A ([Link]/24) and Block B ([Link]/24) each subdivided

Block A — [Link]/24 (VLSM)


Subnet Hosts /CIDR Network Broadcast First Host Last Host Usable

LAN A1 30 /27 [Link] [Link] [Link] [Link] 30

LAN A2 12 /28 [Link] [Link] [Link] [Link] 14

WAN 2 /30 [Link] [Link] [Link] [Link] 2

Block B — [Link]/24 (VLSM)


Subnet Hosts /CIDR Network Broadcast First Host Last Host Usable

LAN B1 60 /26 [Link] [Link] [Link] [Link] 62

LAN B2 25 /27 [Link] [Link] [Link] [Link] 30

Static Routes to Configure

R1(config)# ip route [Link] [Link] [Link] ! reach LAN B1 via R2


R1(config)# ip route [Link] [Link] [Link] ! reach LAN B2 via R2
R2(config)# ip route [Link] [Link] [Link] ! reach LAN A1 via R1
R2(config)# ip route [Link] [Link] [Link] ! reach LAN A2 via R1
Activity: Full Router Configuration (R1 & R2)
Enter these commands in Packet Tracer CLI

Router R1 — Full Configuration Router R2 — Full Configuration


Router> enable Router> enable
Router# configure terminal Router# configure terminal
Router(config)# hostname R1 Router(config)# hostname R2
R1(config)# interface GigabitEthernet0/0 R2(config)# interface Serial0/0/0 ! WAN — DTE end
R1(config-if)# ip address [Link] [Link] R2(config-if)# ip address [Link] [Link]
R1(config-if)# no shutdown R2(config-if)# no shutdown
R1(config-if)# exit R2(config-if)# exit
R1(config)# interface GigabitEthernet0/1 R2(config)# interface GigabitEthernet0/0
R1(config-if)# ip address [Link] [Link] R2(config-if)# ip address [Link] [Link]
R1(config-if)# no shutdown R2(config-if)# no shutdown
R1(config-if)# exit R2(config-if)# exit
R1(config)# interface Serial0/0/0 R2(config)# interface GigabitEthernet0/1
R1(config-if)# ip address [Link] [Link] R2(config-if)# ip address [Link] [Link]
R1(config-if)# clock rate 64000 ! DCE end R2(config-if)# no shutdown
R1(config-if)# no shutdown R2(config-if)# exit
R1(config-if)# exit R2(config)# ip route [Link] [Link] [Link] ! to LAN A1
R1(config)# ip route [Link] [Link] [Link] ! to LAN B1 R2(config)# ip route [Link] [Link] [Link] ! to LAN A2
R1(config)# ip route [Link] [Link] [Link] ! to LAN B2 R2(config)# end
R1(config)# end R2# write memory ! save config
R1# write memory ! save config R2# show ip route ! verify routes

You might also like