Cisco CCNA 1 Module 10: Basic Router Configurations and Default Gateways
Module Objectives and Scope
Primary Purpose: Establish initial configuration settings on Cisco routers, Layer 2 switches, and associated end devices to enable local and remote network communication.
Core Functional Domains:
Execution of foundational Cisco IOS setup commands to secure management modes and identity.
Interface configuration for both IPv4 and IPv6 protocols, including administrative state toggles and contextual documentation.
Verification and operational validation of interface states, routing tables, and interface telemetry via diagnostic commands.
Implementation and architectural role of default gateways on local end devices and Layer 2 management planes.
Initial Router Configuration and Security
Default System State: Out-of-the-box Cisco routers boot with the default factory hostname
Router.Device Identification:
Configured from global configuration mode (
configure terminalor shortcutconfig t).Syntax:
hostname <device-name>(e.g.,hostname R1).Abbreviated syntax:
ho <device-name>(e.g.,ho R1).Immediately alters the command-line interface prompt to reflect the specified identifier.
Securing Privileged EXEC Mode:
Enforces cryptographic protection on privileged EXEC access (administrative privilege level ).
Syntax:
enable secret <password>(e.g.,enable secret class).Stores the password using a secure hash rather than plain text, superseding legacy
enable passwordcommands.
Securing User EXEC Mode (Console Line):
Secures physical console port connectivity (
Line con 0).Command sequence:
line console 0password <password>(e.g.,password cisco)loginThe
logincommand is mandatory to instruct the IOS parser to prompt for and validate the defined password upon console connection initialization.
Securing Virtual Terminal (VTY) Remote Access:
Protects inbound Telnet and Secure Shell (SSH) management connections across virtual terminal lines.
Command sequence:
line vty 0 4(or expanded pools such asline vty 0 14depending on device hardware lines)password <password>logintransport input ssh telnetThe
transport input ssh telnetcommand explicitly dictates which protocols are allowed to connect through the terminal lines.
Global Password Encryption:
Syntax:
service password-encryptionAutomatically obfuscates clear-text passwords currently displayed in the configuration files (such as console or VTY line passwords) using a reversible hashing algorithm, preventing unauthorized visual reconnaissance.
Legal Notification via Message of the Day (MOTD):
Syntax:
banner motd #<message>#Demarcated using matching delimiter symbols (such as
#).Text placed within the delimiters displays verbatim across the terminal session before authentication takes place.
Used to convey explicit legal notices and warnings, such as:
WARNING: Unauthorized access is strictly prohibited.
Configuration Persistence and Memory Subsystems:
RAM (Random Access Memory): Stores the volatile
running-config. All modifications entered in configuration modes take immediate effect in RAM but are purged if the device experiences power loss or a reboot.NVRAM (Non-Volatile Random Access Memory): Stores the non-volatile
startup-config, read during the initial boot phase.Saving Active Parameters:
copy running-config startup-configAbbreviated Form:
copy run startExecution within Configuration Modes: Prepending the command with
doallows immediate execution from any sub-configuration mode without exiting back to privileged EXEC mode (e.g.,do copy run startordo copy running-config startup-config).
Router Interface Configuration
Accessing Interface Configuration Submode:
Syntax:
interface <interface-type> <interface-number>Example:
interface GigabitEthernet 0/0/0Shorthand aliases:
interface gigabitethernet 0/0/0,int ge0/0/0, orinterface gig 0/0/0.
Interface Documentation:
Syntax:
description <text>Examples:
description Link to LAN,description Link to R2.Functional role: Purely human-readable metadata; it possesses zero switching, routing, or protocol metric value.
Engineering utility: Facilitates rapid network diagram cross-referencing, multi-technician shift coordination, and historical port identification without external documentation.
IPv4 Address Assignment:
Syntax:
ip address <ipv4-address> <subnet-mask>Syntax requirement: A mandatory single space must separate the IPv4 host address and the dotted-decimal subnet mask.
Example:
ip address 192.168.10.1 255.255.255.0Error detection behavior: Cisco IOS performs automated boundary checking and flags invalid subnet masks or subnet conflicts with an error message in most scenarios. However, specific subnet overlap conditions and logical anomalies might bypass automatic error checking, requiring manual verification of address boundaries.
IPv6 Address Assignment:
Syntax:
ipv6 address <ipv6-address>/<prefix-length>Example:
ipv6 address 2001:db8:acad:10::1/64Structural difference from IPv4: Uses Classless Inter-Domain Routing (CIDR) slash notation to designate prefix length (e.g.,
) rather than a separate dotted-decimal mask.
State Activation and Physical Dependencies:
Default Administrative State: Cisco router interfaces default to an
administratively downstate.State Activation:
no shutdownHardware/Physical Layer Requirement: Issuing
no shutdowntransitions the administrative state toup. However, the physical and data link states (Line protocol) only transition to operationalupstatus if the port is physically cabled and electrically coupled to an active, powered partner device (such as another router interface or an operational switch port).Asynchronous System Logging: Upon state transitions, the terminal generates real-time informational status logs (e.g., reporting that
GigabitEthernet0/0/0changed state toup) unless console logging levels have been administratively suppressed.
Dual Interface Configuration Walkthrough on Router R1:
Interface GigabitEthernet 0/0/0 (LAN-Facing Link):
interface GigabitEthernet0/0/0description Link to LANip address 192.168.10.1 255.255.255.0ipv6 address 2001:db8:acad:10::1/64no shutdownexitInterface GigabitEthernet 0/0/1 (WAN/Point-to-Point Link to Router R2):
interface GigabitEthernet0/0/1description Link to R2ip address 192.168.11.1 255.255.255.252no shutdownexitThe subnet mask
applied tog0/0/1accommodates a point-to-point link ( prefix length yielding usable host addresses), contrasting with the( prefix length) mask configured for the local access LAN ong0/0/0.
Verification and Diagnostic Commands
Execution Modes: All verification commands originate in privileged EXEC mode (
Router#). Appending the prefixdoallows execution from any global or sub-configuration prompt (e.g.,do show ip interface brief).Summary Interface Status Commands:
show ip interface briefDisplays a concise tabular summary of all physical and logical router interfaces.
Columns include interface name, assigned IPv4 address, Layer 1 status (
Status), and Layer 2 operational protocol state (Protocol).show ipv6 interface briefDisplays an equivalent tabular output listing interface identifiers, assigned global unicast and link-local IPv6 addresses, and interface operational status.
Routing Table Diagnostics:
show ip routeDumps the current IPv4 routing table held within dynamic RAM, including directly connected networks (
C), local host routes (L), static routes, and dynamic routing protocol tables.show ipv6 routeDumps the IPv6 routing table entries stored in RAM.
Detailed Interface Telemetry:
show interfaces [interface-id]Syntax examples:
show interfacesor target-specific queries likeshow interfaces gig0/0/0.Displays hardware details, MAC addresses, MTU, bandwidth, delay, reliability metrics, encapsulation types, queue structures, and operational packet statistics (input/output byte counts, CRC errors, dropped packets).
show ip interface [interface-id]Syntax example:
show ip interface g0/0/0Displays protocol-specific IPv4 configuration parameters and statistics, including IP MTU, split horizon status, directed broadcast settings, and access list filtering configurations.
show ipv6 interface [interface-id]Displays protocol-specific IPv6 configuration parameters, link-local addresses, joined IPv6 multicast groups, and neighbor discovery mechanisms for all or specific interfaces.
Default Gateway Principles and Implementation
Default Gateway Architecture for Host Devices:
Definition and Function: The default gateway serves as the outbound egress point used when an end host transmits packets targeting destinations outside its local IP subnet.
Local Routing Boundary: Traffic confined within the local local area network (LAN) segment traverses via local Layer 2 MAC frame exchanges without router intervention.
Inter-Network Routing Boundary: When a host targets a destination IP that resides on a foreign network, it directs the packet to the Layer 2 MAC address of the default gateway, while maintaining the destination host's Layer 3 IP address.
Topology Rule: The IP address assigned to an end host and the router interface acting as its default gateway must reside within the exact same logical IP network segment and share matching subnet mask parameters.
End-to-End Inter-Subnet Packet Forwarding Walkthrough:
Topology Setup:
Host PC1: IP address
, default gateway set to.Router R1 Interface
g0/0/0: IP address, Subnet mask(local gateway for PC1's network).Router R1 Interface
g0/0/1: IP address, Subnet mask(local gateway for PC3's network).Host PC3: IP address
, default gateway set to.Forwarding Process:
PC1 initiates a data packet targeted to PC3 with Destination IP
.PC1 evaluates its local routing table, identifies that
is not within its local subnet, and forwards the frame to its default gateway IPon R1'sg0/0/0interface.R1 ingests the packet on interface
g0/0/0, consults its routing table in RAM, determines that networkis directly connected to interfaceg0/0/1, and forwards the packet out interfaceg0/0/1to destination device PC3 ().
Default Gateway Implementation on Layer 2 Switches:
Management Plane Requirements: Pure Layer 2 switches forward Ethernet frames between local ports without requiring an IP address. However, to remotely manage the switch using SSH, Telnet, or SNMP from a foreign network (outside the switch's immediate subnet), the switch requires an IP configuration consisting of a Switch Virtual Interface (SVI) and a default gateway.
Consequence of Missing Gateway: Without an operational default gateway, management responses originated by the switch cannot navigate past the local router back to a technician on another subnet. Management is consequently restricted to local LAN hosts or a direct physical console cable.
Switch Configuration Syntax:
Global configuration command:
ip default-gateway <gateway-ip-address>Example implementation:
ip default-gateway 192.168.10.1(or network-specific management gateways such asip default-gateway 192.168.10.5).