Router Fundamentals: Configuration, Routing & Troubleshooting
Router Fundamentals
Routing and the Routing Table
The router determines the best path for forwarding packets using routing tables, which track routes to network destinations.
Router Components
- CPU: Executes operating system instructions, including routing and switching functions.
- RAM: Stores instructions and data for CPU execution.
- ROM: Permanent storage.
- NVRAM: Stores startup configuration, IP protocols, and routing information.
- Flash Memory: Stores the operating system and other files.
- LAN Interface: Connects to Ethernet and Fast Ethernet LANs.
- WAN Interface: Connects to serial links like DSL and ISDN.
Key Router Features
- Determines the best path for sending packets.
- Forwards packets to their destination.
Router Boot Process
- Power-on self-test (POST).
- Loads the bootstrap program.
- Loads the Cisco IOS software.
- Loads the startup configuration file or enters setup mode.
Router Operation and Configuration
Routers operate at Layers 1, 2, and 3.
Basic Router Configuration Steps:
- Naming the router.
- Setting up passwords.
- Configuring interfaces.
- Configuring messages.
- Saving changes.
- Checking the configuration and core operations.
Key Router Commands
show running-config
: Displays the current configuration in RAM.copy running-config startup-config
: Saves the running configuration to NVRAM.show startup-config
: Displays the startup configuration stored in NVRAM.show ip route
: Displays the routing table.show interfaces
: Displays interface configuration and statistics.
Routing Table Importance
The routing table provides the router with the necessary information to forward packets to their destination networks.
How a Router Learns About Networks
- Static routes.
- Connected routes.
- Dynamic routes.
Important IP Header Fields
- IP version (IPv4).
- Time to Live (TTL).
- 32-bit source IP address.
- 32-bit destination IP address.
Encapsulation and Decapsulation Process
The router encapsulates data packets with source and destination IP addresses, then encapsulates them in frames with source and destination MAC addresses. The receiving gateway decapsulates the frame and checks its routing table. The packet is then encapsulated in a new frame with updated Layer 2 addresses and sent through the appropriate interface.
CDP (Cisco Discovery Protocol)
CDP is a powerful tool for network monitoring and troubleshooting.
Commands for Displaying Information:
show interfaces
show ip interface brief
show running-config
Commands for Network Testing and Troubleshooting:
ping
traceroute
show ip route
show ip route brief
show cdp neighbors
Static Routing
Uses of Static Routing:
- Managing routing tables in smaller networks.
- Routing to and from stub networks.
- Configuring a default route.
Advantages of Static Routing:
- Minimal CPU processing.
- Easy to understand and configure.
Disadvantages of Static Routing:
- Time-consuming setup and maintenance.
- Prone to errors in larger networks.
- Requires manual intervention for route changes.
- Not suitable for growing networks.
- Requires thorough network knowledge.
Dynamic Routing
Advantages of Dynamic Routing:
- Reduced administrative overhead.
- Automatic adaptation to topology changes.
- Less prone to configuration errors.
Disadvantages of Dynamic Routing:
- Consumes router resources (CPU, memory, bandwidth).
- Requires more advanced administrative knowledge.
Dynamic Routing Protocol Classification
- RIP: Distance vector interior routing protocol.
- IGRP: Distance vector interior routing protocol developed by Cisco (obsolete).
- OSPF: Link-state interior routing protocol.
- IS-IS: Link-state interior routing protocol.
- EIGRP: Advanced distance vector interior routing protocol developed by Cisco.
- BGP: Exterior gateway routing protocol.
Convergence
Convergence occurs when all router routing tables are consistent. Convergence properties include the speed of routing information propagation and optimal path calculation.
Metric
Routing protocols choose the best path based on a metric, which represents the distance to a network.
Packet Forwarding
Route Determination Function:
The process of determining the route a packet should take.
Switching Function:
Encapsulating the packet in the appropriate data link frame for the outgoing interface.
Router Packet Processing Steps
- Decapsulates the Layer 3 packet.
- Examines the destination IP address and consults the routing table.
- Encapsulates the Layer 3 packet into a new Layer 2 frame and forwards it.
Debugging Commands
debug ip routing
: Displays messages when new routes are added to the routing table.ip route network mask next-hop
: Configures a static route.