Cisco router configuration basics begin with console access, an understanding of IOS command modes and a small working IP topology. This guide takes you from a factory-default router to a successful ping while explaining what each command changes.
The examples use common Cisco IOS and IOS XE syntax. Interface names vary by router model, so check your device before copying commands.
What do you need before configuring a Cisco router?
You need a Cisco router, a console cable, terminal software and a simple IP addressing plan. For a physical lab, you may also need Ethernet cables, two PCs or a second router; for a virtual lab, Cisco Packet Tracer can provide the same basic command practice.
Prepare the following items:
- Cisco router or a supported simulator
- USB-to-console or USB-to-serial console cable
- Terminal program such as PuTTY, Tera Term or SecureCRT
- Ethernet cables for network interfaces
- An IP addressing table
- Administrator access to the computer
A console connection is an out-of-band management connection. It does not require the router to have an IP address, which makes it the normal method for initial configuration and password recovery tasks.
How do you connect the console cable?
Connect the console cable between your computer and the router's console port, then open the correct serial port in a terminal program. The standard Cisco serial settings are 9600 bits per second, 8 data bits, no parity, 1 stop bit and no flow control.
Diagram in words:
Laptop USB port → USB console cable → Router CONSOLE port
Use these terminal settings:
| Setting | Value |
|---|---|
| Speed | 9600 baud |
| Data bits | 8 |
| Parity | None |
| Stop bits | 1 |
| Flow control | None |
On Windows, open Device Manager and check Ports (COM & LPT) to identify the COM port. On Linux, a USB serial adapter may appear as /dev/ttyUSB0, while a USB console interface may appear as /dev/ttyACM0.
A Linux serial session can be opened with a tool such as screen:
sudo screen /dev/ttyUSB0 9600Power on the router and press Enter when the boot process finishes. If IOS displays the initial configuration dialog, enter no so that you can practise the commands manually:
Would you like to enter the initial configuration dialog? [yes/no]: no
Router>If the terminal window is blank, check the selected COM port, terminal speed, cable driver and whether the cable is connected to the console port rather than an Ethernet port.
What are the main Cisco IOS command modes?
Cisco IOS uses command modes to control which operations are available. The prompt changes as you move from basic monitoring to privileged commands, global configuration and interface-specific settings.
| Mode | Prompt example | Purpose |
|---|---|---|
| User EXEC | Router> | Basic monitoring |
| Privileged EXEC | Router# | Full show, debug and file operations |
| Global configuration | Router(config)# | Device-wide configuration |
| Interface configuration | Router(config-if)# | Interface settings |
| Line configuration | Router(config-line)# | Console and VTY access settings |
Move between the modes as follows:
Router> enable
Router# configure terminal
Router(config)# interface gigabitEthernet 0/0/0
Router(config-if)# exit
Router(config)# end
Router#The exit command returns one level. The end command or Ctrl+Z returns directly to privileged EXEC mode.
Students learning these workflows can practise them as part of a structured CCNA course, where the commands are combined with addressing, switching and troubleshooting labs.
How should you plan the first router lab?
Use a small topology with one LAN interface and one point-to-point connection between two routers. Document the address, subnet mask and purpose of every interface before entering commands.
Diagram in words:
PC-A — R1 G0/0/0 — R1 G0/0/1 — R2 G0/0/1
The addressing plan is:
| Device | Interface | IPv4 address | Subnet mask | Purpose |
|---|---|---|---|---|
| PC-A | Ethernet | 192.168.10.10 | 255.255.255.0 | User device |
| R1 | G0/0/0 | 192.168.10.1 | 255.255.255.0 | PC-A default gateway |
| R1 | G0/0/1 | 10.0.0.1 | 255.255.255.252 | Link to R2 |
| R2 | G0/0/1 | 10.0.0.2 | 255.255.255.252 | Link to R1 |
The /30 link contains network address 10.0.0.0, usable addresses 10.0.0.1 and 10.0.0.2, and broadcast address 10.0.0.3.
Before configuring an interface, identify the names available on your router:
Router# show ip interface briefSome platforms use GigabitEthernet0/0, while others use GigabitEthernet0/0/0. Always use the name shown by the router.
How do you configure the router's basic identity and security?
Set a descriptive hostname, protect privileged mode and configure local administrative access. These settings do not replace a complete security policy, but they create a safer lab baseline than leaving all access unprotected.
On R1, enter:
Router> enable
Router# configure terminal
Router(config)# hostname R1
R1(config)# no ip domain-lookup
R1(config)# enable secret LabEnable9
R1(config)# username netadmin privilege 15 secret LabAdmin9
R1(config)# service password-encryption
R1(config)# banner motd #Authorized access only#no ip domain-lookup prevents IOS from trying to resolve mistyped commands as hostnames. enable secret stores a protected privileged EXEC password, while service password-encryption only obscures supported plain-text passwords and should not be treated as strong encryption.
The sample passwords are for an isolated lab only. Production credentials should follow the organisation's password and identity-management policy.
Configure console authentication and improve terminal usability:
R1(config)# line console 0
R1(config-line)# login local
R1(config-line)# logging synchronous
R1(config-line)# exec-timeout 10 0
R1(config-line)# exitlogging synchronous redraws partially typed commands after system messages appear. exec-timeout 10 0 disconnects an idle console session after 10 minutes.
How do you assign IP addresses to Cisco router interfaces?
Enter interface configuration mode, add a description and IP address, and issue no shutdown. Router Ethernet interfaces are often administratively disabled until they are explicitly enabled.
Configure R1:
R1(config)# interface gigabitEthernet 0/0/0
R1(config-if)# description LAN_TO_PC_A
R1(config-if)# ip address 192.168.10.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface gigabitEthernet 0/0/1
R1(config-if)# description LINK_TO_R2
R1(config-if)# ip address 10.0.0.1 255.255.255.252
R1(config-if)# no shutdown
R1(config-if)# endConfigure R2 through its console:
Router> enable
Router# configure terminal
Router(config)# hostname R2
R2(config)# interface gigabitEthernet 0/0/1
R2(config-if)# description LINK_TO_R1
R2(config-if)# ip address 10.0.0.2 255.255.255.252
R2(config-if)# no shutdown
R2(config-if)# endMessages such as the following indicate that the physical and data-link states have become operational:
%LINK-3-UPDOWN: Interface GigabitEthernet0/0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1, changed state to upConfigure PC-A with IP address 192.168.10.10, mask 255.255.255.0 and default gateway 192.168.10.1.
How do you verify the interface configuration?
Use show ip interface brief for a quick status check and show interfaces when you need detailed counters and error information. A usable interface normally shows both Status and Protocol as up.
R1# show ip interface briefExpected output resembles:
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0/0 192.168.10.1 YES manual up up
GigabitEthernet0/0/1 10.0.0.1 YES manual up up
GigabitEthernet0/0/2 unassigned YES unset administratively down downInterpret the common state combinations as follows:
| Status and protocol | Likely meaning |
|---|---|
up/up | Interface is operational |
administratively down/down | Interface is shut down in the configuration |
down/down | Physical connection, transceiver or remote device problem |
up/down | Physical layer is up, but a Layer 2 or platform-specific issue remains |
Inspect one interface in detail with:
R1# show interfaces gigabitEthernet 0/0/1
R1# show running-config interface gigabitEthernet 0/0/1Check for input errors, CRC errors, duplex problems, resets and the configured address. A growing CRC counter can indicate a faulty cable, connector, transceiver or physical-layer issue.
How do you perform the first ping?
Ping the directly connected R2 address from R1 after both ends show up/up. A successful result confirms that the local interface, physical link, Layer 2 operation and remote IPv4 address work well enough to exchange ICMP packets.
R1# ping 10.0.0.2A successful Cisco IOS result looks like this:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 msEach ! represents a successful echo reply. A . represents a timeout, and U indicates that an ICMP destination-unreachable response was received. The first packet can occasionally time out while Address Resolution Protocol, or ARP, resolves the neighbouring MAC address.
View the ARP entry and connected routes:
R1# show arp
R1# show ip route connectedR1 should have connected routes for 192.168.10.0/24 and 10.0.0.0/30. To test from PC-A to R2's 10.0.0.2 address, R2 also needs a return route to the PC LAN:
R2# configure terminal
R2(config)# ip route 192.168.10.0 255.255.255.0 10.0.0.1
R2(config)# endWithout that route, the request may reach R2, but R2 will not know how to send the reply back to 192.168.10.10.
How do you configure SSH for remote management?
SSH requires a hostname, domain name, local user, RSA keys and VTY line configuration. Test SSH only after basic IP connectivity works, because console access should remain available if the remote configuration fails.
On R1:
R1# configure terminal
R1(config)# ip domain-name lab.local
R1(config)# crypto key generate rsa modulus 2048
R1(config)# ip ssh version 2
R1(config)# line vty 0 4
R1(config-line)# login local
R1(config-line)# transport input ssh
R1(config-line)# exec-timeout 10 0
R1(config-line)# endFrom a host that can reach R1:
ssh netadmin@192.168.10.1Avoid enabling Telnet because it sends session data without SSH encryption. Access restrictions and central authentication can be added later as the design grows; the principles are covered further in practical Cisco ACL configuration exercises.
How do you save a Cisco router configuration?
Copy the running configuration to the startup configuration after verifying that the router works. The running configuration is held in active memory, while the startup configuration is loaded during the next boot.
R1# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]The shorter command write memory is supported on many Cisco IOS platforms, but copy running-config startup-config clearly states the source and destination.
Verify the saved file:
R1# show startup-config
R1# dir nvram:Saving a mistake does not make it correct. Test interfaces, routes, login access and reachability before saving.
Why does the first ping fail?
Most first-ping failures are caused by a shut interface, incorrect IP address, wrong subnet mask, bad cable or missing return route. Troubleshoot from the local interface outward instead of changing several commands at once.
Use this sequence:
- Run
show ip interface briefon both routers. - Confirm that the connected interfaces are
up/up. - Compare every address and mask with the addressing table.
- Check that
no shutdownappears under the correct interfaces. - Ping the local interface address.
- Ping the directly connected neighbour.
- Inspect ARP with
show arp. - Inspect routes with
show ip route. - Check interface errors with
show interfaces. - Verify the destination device has a return route.
Useful focused commands include:
R1# show running-config interface gigabitEthernet 0/0/1
R1# show interfaces gigabitEthernet 0/0/1
R1# show ip route 10.0.0.2
R1# ping 10.0.0.2 source 10.0.0.1
R1# traceroute 10.0.0.2An incorrect mask can make a router treat a remote destination as local or place connected networks in an unexpected range. A duplicate address may produce intermittent communication or ARP entries that change between MAC addresses.
Once IPv4 interface configuration is comfortable, compare the process with IPv6 addressing, SLAAC and dual-stack configuration.
Summary
A first Cisco router lab follows a repeatable process: connect through the console, understand IOS modes, plan addresses, configure security basics, enable interfaces, verify status and test with ping. Always inspect interface state and routing information before assuming that the network or simulator is faulty.
The most important commands from this lab are:
enable
configure terminal
show ip interface brief
interface gigabitEthernet 0/0/0
ip address ADDRESS MASK
no shutdown
show ip route
show arp
ping DESTINATION
copy running-config startup-configTo practise these steps in guided router, switching and troubleshooting labs, enquire about CCNA course batch details.
Reviewed by Network Rhinos networking trainers.
