CCNA NOTES 7 # Router & Routing Complete Notes | CCNA Study Guide — TechWithYourFriend

 CCNA Study Notes 7 · Layer 3 Networking

Router & Routing

A complete, consolidated reference covering routing protocols, static & dynamic routing, route preference logic, and Cisco IOS commands — 

TopicsStatic · Dynamic · IGP · EGP · AD · ICMP
LevelCCNA / Intermediate
FormatBlog Study Notes- Techwithyourfriend

What is Routing?

Routing is the process of finding the best path for data (packets) to travel from a source device to a destination device across one or more networks. It is performed by a router — a Layer 3 (Network Layer) device.

Routing Protocol — A protocol that carries routing information and is used for the determination and selection of the best path from source to destination.

Routing Table — A table stored in a router that lists routes to particular network destinations. Command: R1# show ip route

Routing Table Codes

C
ConnectedDirect link
S
StaticManually set
*S
Default RouteGateway of last resort
R
RIPDistance vector
D
EIGRPCisco hybrid
O
OSPFLink-state
B
BGPPath vector EGP
L
LocalInterface IP /32

Connected Routes

A route automatically appears as C "Connected" in the routing table when both of the following are true:

  • A valid IP address is configured on the interface
  • The interface status (Layer 1) and protocol status (Layer 2) are both UP

IP Packet Flow (End-to-End)

  1. Source device creates data and encapsulates it into an IP packet (Layer 3)
  2. Checks destination address — same network → sends directly; different network → sends to default gateway
  3. Router receives packet and looks up its routing table
  4. Router forwards the packet out the appropriate interface toward the destination
  5. Packet reaches destination; destination device sends a reply back

Static Routing

Routes that are manually/statically configured by the network administrator. There is no automatic update if the network changes.

Characteristics

  • Administrative Distance: 1
  • High security (no protocol traffic)
  • High admin burden — manual entry
  • Best for small / controlled networks

Configuration Methods

  • Exit Interface — specify outgoing interface
  • Next Hop — specify next router's IP
  • Both — exit interface + next hop IP
! Add a static route via next-hop IP
Router(config)# ip route <dest-network> <subnet-mask> <next-hop-IP>
! Example
Router(config)# ip route 30.0.0.0 255.0.0.0 192.168.1.2

! Add a static route via exit interface
Router(config)# ip route 30.0.0.0 255.0.0.0 fastethernet 0/1

! Default route (catches all unknown destinations)
Router(config)# ip route 0.0.0.0 0.0.0.0 <next-hop-IP>

! Remove any route
Router(config)# no ip route <network> <mask> <next-hop>

Proxy ARP vs Recursive Lookup

⚡ Exit Interface → Problem
Proxy ARP: Router answers ARP requests on behalf of other devices. Happens when route is via exit interface on Ethernet. The router pretends to own every IP it knows a route for.
✓ Next Hop → Problem
Recursive Lookup: Router must look up the routing table a second time to resolve the next-hop IP to an exit interface. Adds slight overhead but is more precise.
Serial Links & Proxy ARP
Serial interfaces do not use MAC addresses and do not support ARP. Therefore, assigning a static route via exit interface on a serial link is completely safe — no Proxy ARP issue.

Floating Static Route

A static route with a deliberately higher AD value than the primary routing protocol. It sits inactive in the config and only enters the routing table if the primary route fails — acting as a reliable backup (redundancy) path.

Route Preference Criteria

When multiple routes exist to the same destination, the router selects one based on these criteria in order:

  1. Longest Prefix Match (CIDR)— More specific route wins. E.g. /28 beats /24. Fewer host IPs = less CPU utilization.
  2. Lowest Administrative Distance (AD)— Measure of trustworthiness. Lower = more trusted. Used when prefix lengths are equal.
  3. Lowest Metric— Protocol-specific cost. Used when prefix AND AD are equal.
  4. Load Balancing— If all criteria are identical, both routes enter the table and traffic is distributed equally.

Administrative Distance (AD) Table — 8-bit value (0–255)

Protocol / Route TypeAD ValueMetric UsedType
Connected Route0Auto
Static / Default Route1Manual
BGP (eBGP)20AS PathEGP
EIGRP (internal)90Composite (BW + Delay)IGP
OSPF110Cost (100 / Bandwidth)IGP
IS-IS115CostIGP
RIP v1 / v2120Hop Count (max 15)IGP
EIGRP (external)170CompositeIGP
BGP (iBGP)200AS PathEGP
Unknown / Invalid Route255Never installed
Key Rule
Lower AD = Higher trust = Route is preferred. A route with AD 255 is considered invalid and will never be installed in the routing table.

Dynamic Routing

Routes are automatically learned, calculated, and updated by routing protocols. Routers exchange routing information with directly connected (neighbouring) routers.

IGP — Interior Gateway Protocol

Shares routes within the same Autonomous System (AS).

  • RIP v1 / v2
  • EIGRP
  • OSPF
  • IS-IS

EGP — Exterior Gateway Protocol

Shares routes between different Autonomous Systems (Internet).

  • BGP (Border Gateway Protocol)
  • Maintains full AS-path
  • Prevents routing loops via path vector

Autonomous System (AS)

A group of routers or networks under a single administrative control. Identified by an AS Number (ASN) — a 16-bit value (0–65535) assigned by IANA.

  • Public ASN range: 1 – 64511
  • Private ASN range: 64512 – 65534
  • Reserved: 0 and 65535

Protocol Deep Dive

RIP
Routing Information Protocol
Type: Distance Vector
AD: 120
Metric: Hop Count (max 15)
Std: Open (v2 classless)
Slow convergence, small networks only.
EIGRP
Enhanced Interior Gateway Routing Protocol
Type: Hybrid / Adv. DV
AD: 90 internal / 170 ext
Metric: Composite (BW, Delay)
Std: Cisco proprietary
Fast convergence, scalable.
OSPF
Open Shortest Path First
Type: Link-State
AD: 110
Metric: Cost (100/BW)
Algo: Dijkstra SPF
Full topology map, fast convergence.
IS-IS
Intermediate System to Intermediate System
Type: Link-State
AD: 115
Metric: Cost
Std: Open (ISO)
Commonly used by ISPs.
BGP
Border Gateway Protocol
Type: Path Vector (EGP)
AD: 20 (eBGP) / 200 (iBGP)
Metric: AS Path
Std: Open (RFC 4271)
The backbone of the Internet.
IGRP
Interior Gateway Routing Protocol
Type: Distance Vector
Status: Obsolete
Vendor: Cisco (old)

Replaced by EIGRP. No longer used in modern networks.

Distance Vector vs Link-State

Distance Vector
Shares only routing table with direct neighbours. Uses hop count or similar metric. Slower convergence. Example: RIP, EIGRP.
Link-State
Builds a complete topology map of the network. Uses Dijkstra's SPF algorithm. Much faster convergence. Example: OSPF, IS-IS.

ICMP — Internet Control Message Protocol

ICMP is used for network diagnostics and error reporting. It operates at Layer 3 and is the foundation of the ping command.

Type 8
Echo Request— sent by the source when you runping
Type 0
Echo Reply— sent back by the destination confirming reachability
Type 3
Destination Unreachable— router could not forward the packet
Type 11
TTL Exceeded— used bytracerouteto map the path

Cisco IOS Debug Commands

CPU Warning
Debug commands consume significant CPU resources. Always disable debugging after use. Use only on low-traffic routers or during maintenance windows.
! Enable packet-level debugging
Router# debug ip packet
! Shows: incoming/outgoing packets, routing decisions, real-time flow

! Disable ALL debugging (do this immediately after)
Router# undebug all
%Debugging disabled

! Verify routing table
Router# show ip route

! Check interface status
Router# show ip interface brief

! Test connectivity
Router# ping 192.168.1.1
Router# traceroute 192.168.1.1

Key Interview Points ★

  • Router selects the best route using:1) Longest prefix match → 2) Lowest AD → 3) Lowest metric → 4) Load balancing
  • AD = 0 (connected), 1 (static/default), 90 (EIGRP), 110 (OSPF), 120 (RIP), 20/200 (BGP). AD 255 = invalid route, never installed.
  • Proxy ARPoccurs when a static route is configured via exit interface on Ethernet — the router replies to ARP on behalf of other devices. No issue on serial links.
  • Recursive Lookupoccurs when using Next-Hop IP — router must do two table lookups to resolve the path.
  • Floating Static Route= higher AD static route used as a backup path. Enters routing table only when primary route fails.
  • ICMP Type 8 = Echo Request (ping sent). ICMP Type 0 = Echo Reply (destination responds).
  • IGProutes within one AS (RIP, EIGRP, OSPF).EGProutes between AS's (BGP = Internet routing).
  • Always runundebug allafter debugging. Debug commands are CPU-intensive and can crash a production router.
  • BGP uses AS-Path as its metric and prevents routing loops by rejecting routes that already contain the local AS number in the path.
  • Connected routes have AD = 0 and are always the most trusted — they cannot be overridden by any routing protocol.

Comments

Popular posts from this blog

Network Topologies

Network Devices

CCNA Notes #01: Computer Networks — Types & Classification (Complete Guide)