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 terminal or shortcut config 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 1515).

    • Syntax: enable secret <password> (e.g., enable secret class).

    • Stores the password using a secure hash rather than plain text, superseding legacy enable password commands.

  • Securing User EXEC Mode (Console Line):

    • Secures physical console port connectivity (Line con 0).

    • Command sequence:

    • line console 0

    • password <password> (e.g., password cisco)

    • login

    • The login command 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 as line vty 0 14 depending on device hardware lines)

    • password <password>

    • login

    • transport input ssh telnet

    • The transport input ssh telnet command explicitly dictates which protocols are allowed to connect through the terminal lines.

  • Global Password Encryption:

    • Syntax: service password-encryption

    • Automatically 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-config

    • Abbreviated Form: copy run start

    • Execution within Configuration Modes: Prepending the command with do allows immediate execution from any sub-configuration mode without exiting back to privileged EXEC mode (e.g., do copy run start or do copy running-config startup-config).

Router Interface Configuration

  • Accessing Interface Configuration Submode:

    • Syntax: interface <interface-type> <interface-number>

    • Example: interface GigabitEthernet 0/0/0

    • Shorthand aliases: interface gigabitethernet 0/0/0, int ge0/0/0, or interface 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.0

    • Error 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/64

    • Structural difference from IPv4: Uses Classless Inter-Domain Routing (CIDR) slash notation to designate prefix length (e.g., /64/64) rather than a separate dotted-decimal mask.

  • State Activation and Physical Dependencies:

    • Default Administrative State: Cisco router interfaces default to an administratively down state.

    • State Activation: no shutdown

    • Hardware/Physical Layer Requirement: Issuing no shutdown transitions the administrative state to up. However, the physical and data link states (Line protocol) only transition to operational up status 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/0 changed state to up) 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/0

    • description Link to LAN

    • ip address 192.168.10.1 255.255.255.0

    • ipv6 address 2001:db8:acad:10::1/64

    • no shutdown

    • exit

    • Interface GigabitEthernet 0/0/1 (WAN/Point-to-Point Link to Router R2):

    • interface GigabitEthernet0/0/1

    • description Link to R2

    • ip address 192.168.11.1 255.255.255.252

    • no shutdown

    • exit

    • The subnet mask 255.255.255.252255.255.255.252 applied to g0/0/1 accommodates a point-to-point link (/30/30 prefix length yielding 22 usable host addresses), contrasting with the 255.255.255.0255.255.255.0 (/24/24 prefix length) mask configured for the local access LAN on g0/0/0.

Verification and Diagnostic Commands

  • Execution Modes: All verification commands originate in privileged EXEC mode (Router#). Appending the prefix do allows execution from any global or sub-configuration prompt (e.g., do show ip interface brief).

  • Summary Interface Status Commands:

    • show ip interface brief

    • Displays 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 brief

    • Displays an equivalent tabular output listing interface identifiers, assigned global unicast and link-local IPv6 addresses, and interface operational status.

  • Routing Table Diagnostics:

    • show ip route

    • Dumps 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 route

    • Dumps the IPv6 routing table entries stored in RAM.

  • Detailed Interface Telemetry:

    • show interfaces [interface-id]

    • Syntax examples: show interfaces or target-specific queries like show 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/0

    • Displays 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 192.168.10.10192.168.10.10, default gateway set to 192.168.10.1192.168.10.1.

    • Router R1 Interface g0/0/0: IP address 192.168.10.1192.168.10.1, Subnet mask 255.255.255.0255.255.255.0 (local gateway for PC1's network).

    • Router R1 Interface g0/0/1: IP address 192.168.11.1192.168.11.1, Subnet mask 255.255.255.0255.255.255.0 (local gateway for PC3's network).

    • Host PC3: IP address 192.168.11.10192.168.11.10, default gateway set to 192.168.11.1192.168.11.1.

    • Forwarding Process:

    • PC1 initiates a data packet targeted to PC3 with Destination IP 192.168.11.10192.168.11.10.

    • PC1 evaluates its local routing table, identifies that 192.168.11.10192.168.11.10 is not within its local subnet 192.168.10.0/24192.168.10.0/24, and forwards the frame to its default gateway IP 192.168.10.1192.168.10.1 on R1's g0/0/0 interface.

    • R1 ingests the packet on interface g0/0/0, consults its routing table in RAM, determines that network 192.168.11.0/24192.168.11.0/24 is directly connected to interface g0/0/1, and forwards the packet out interface g0/0/1 to destination device PC3 (192.168.11.10192.168.11.10).

  • 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 as ip default-gateway 192.168.10.5).