CCNA | Static Routing | 11
Overview of Routers and Traffic Forwarding
Routers: Devices that forward traffic between different networks (LANs).
Switches: Devices that forward traffic within a LAN.
IP Routing Process
Initial Steps:
An end host wants to send a packet to another end host in a different network.
Concept of a default gateway for routing traffic.
Routing Table:
Each router maintains a routing table listing known destinations and methods to reach them.
Vital for network engineers to understand; uses the command
show IP route
frequently.
Network Topology for Demonstration
LANs & IP Addresses:
LAN 1 (connected to Router R1): 192.168.1.0/24
PC1: 192.168.1.1
Router R1: 192.168.1.254 (g0/2 interface)
LAN 2 (connected to Router R4): 192.168.4.0/24
PC4: 192.168.4.1
Router R4: 192.168.4.254 (g0/2 interface)
WAN Connections: Connects the routers across large distances using fiber optics.
Routers Interconnecting:
R1 to R2: 192.168.12.0/24
R2 to R4: 192.168.24.0/24
R1 to R3: 192.168.13.0/24
R3 to R4: 192.168.34.0/24
Packet Sending Process from PC1 to PC4
Destination Check:
PC1 checks if PC4 is in the same network.
192.168.1.0 (PC1) vs 192.168.4.0 (PC4) => Different networks.
Routing Logic Activation:
PC1 must send the packet to its default gateway (Router R1).
Default gateway: Device to forward data to another network (R1 in this case).
Router R1 Processing
Forwarding Responsibilities:
Upon receiving the packet, R1 compares the destination IP with its routing table.
Example entry for R1:
Destination: 192.168.4.0/24
Next hop: 192.168.12.2 (R2)
Exit interface: g0/1.
Packet Forwarding:
R1 forwards the packet to R2 based on routing table entry.
Continuing Through Router R2 to R4
Router R2 Actions:
Similar process; it checks its routing table for the destination IP.
Example entry might indicate forwarding to R4 via:
Destination: 192.168.4.0
Next hop: 192.168.24.4 (R4 IP)
Exit interface: g0/1.
Final Router R4 Processing:
R4 checks its own routing table.
Directly connected to the destination: 192.168.4.0/24 on g0/2.
Forwards packet to Switch 4.
Understanding Layer 3 vs Layer 2
Layer 3 Overview: Packet's source and destination IP addresses remain unchanged during the journey.
Layer 2 Complexity: Involves MAC addresses, which change based on local network transit points.
Demonstration on Cisco Router CLI
Routing Table Examination:
Issue the command
show IP route
in privileged exec mode to view the routing table.Different codes indicate the type of routes:
C: Connected route.
L: Local route.
Local vs Connected Routes:
Connected Route:
e.g., 192.168.1.0/24 indicates the interface network.
Local Route:
e.g., 192.168.1.1/32 indicates the specific address on the interface.
Configuring Default Gateway
Default Route Concept:
Matches all possible destinations if no more specific route is available.
Identified by IP address of 0.0.0.0 and subnet mask 0.0.0.0.
This setup allows the router (acting as PC in the simulation) to send traffic to all external networks as needed.