CCNA NOTES 7 # Router & Routing Complete Notes | CCNA Study Guide — TechWithYourFriend
CCNA Study Notes 7 · Layer 3 Networking
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
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)
- Source device creates data and encapsulates it into an IP packet (Layer 3)
- Checks destination address — same network → sends directly; different network → sends to default gateway
- Router receives packet and looks up its routing table
- Router forwards the packet out the appropriate interface toward the destination
- 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
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:
- Longest Prefix Match (CIDR)— More specific route wins. E.g. /28 beats /24. Fewer host IPs = less CPU utilization.
- Lowest Administrative Distance (AD)— Measure of trustworthiness. Lower = more trusted. Used when prefix lengths are equal.
- Lowest Metric— Protocol-specific cost. Used when prefix AND AD are equal.
- 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)
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
AD: 120
Metric: Hop Count (max 15)
Std: Open (v2 classless)
Slow convergence, small networks only.
AD: 90 internal / 170 ext
Metric: Composite (BW, Delay)
Std: Cisco proprietary
Fast convergence, scalable.
AD: 110
Metric: Cost (100/BW)
Algo: Dijkstra SPF
Full topology map, fast convergence.
AD: 115
Metric: Cost
Std: Open (ISO)
Commonly used by ISPs.
AD: 20 (eBGP) / 200 (iBGP)
Metric: AS Path
Std: Open (RFC 4271)
The backbone of the Internet.
Status: Obsolete
Vendor: Cisco (old)
Replaced by EIGRP. No longer used in modern networks.
Distance Vector vs Link-State
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.
Cisco IOS Debug Commands
! 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 run
undebug 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
Post a Comment