Cisco Router Basic Configuration (Step by Step)

Listen to this Post

Cisco routers are essential components in network infrastructure, and understanding their basic configuration is crucial for network engineers. This article provides a step-by-step guide to configuring a Cisco router, covering device setup, interface configuration, VLANs, trunking, routing, ACLs, port security, and troubleshooting.

1. Basic Device Setup

Login and Basic Commands:

– `enable` – Enter privileged EXEC mode.
– `configure terminal` – Enter global configuration mode.
– `hostname ` – Set the device hostname.
– `exit` – Exit the current mode.

Saving and Viewing Configurations:

– `copy running-config startup-config` – Save the current configuration.
– `show running-config` – Display the active configuration.
– `show startup-config` – View the saved configuration.

Erasing Configurations:

– `erase startup-config` – Erase the startup configuration.
– `reload` – Restart the device.

2. Interface Configuration

Basic Interface Setup:

interface <type> <number>
description <description>
ip address <IP> <subnet mask>
no shutdown
exit

Common Interface Commands:

– `show ip interface brief` – View a summary of interfaces.
– `shutdown` – Disable an interface.
– `no shutdown` – Enable an interface.

3. VLAN Configuration

VLAN Setup:

vlan <vlan-id>
name <vlan-name>
exit
interface <type> <number>
switchport mode access
switchport access vlan <vlan-id>
exit

Verifying VLANs:

– `show vlan brief` – Display VLAN information.

4. Trunk Configuration

Trunk Setup:

interface <type> <number>
switchport mode trunk
switchport trunk allowed vlan <vlan-id>
exit

Verifying Trunk:

– `show interfaces trunk` – View trunk settings.

5. Routing

Static Route:

ip route <destination network> <subnet mask> <next hop IP or exit interface>

Enable Routing Protocol (OSPF Example):

router ospf <process-id>
network <network> <wildcard mask> area <area-id>
exit

Verifying Routes:

– `show ip route` – Display the routing table.

6. Access Control Lists (ACLs)

Standard ACL Example:

access-list <1-99> permit <source> <wildcard>
interface <type> <number>
ip access-group <1-99> in/out
exit

Extended ACL Example:

access-list <100-199> permit tcp <source> <wildcard> <destination> <wildcard> eq <port>

Verifying ACLs:

– `show access-lists` – View configured ACLs.

7. Switch Port Security

Port Security Setup:

interface <type> <number>
switchport port-security
switchport port-security maximum <number>
switchport port-security mac-address <MAC>
switchport port-security violation {shutdown | restrict | protect}
exit

Verifying Port Security:

– `show port-security interface `

8. Troubleshooting

– `ping ` – Check connectivity.
– `traceroute ` – Trace the path to a destination.
– `show cdp neighbors` – View directly connected Cisco devices.
– `show ip arp` – View the ARP table.
– `show version` – View hardware and IOS details.
– `debug ` – Enable debugging for specific protocols.

You Should Know:

  • Linux Equivalent Commands:
  • Use `ip addr` to view IP addresses on Linux.
  • Use `traceroute` or `mtr` for network path tracing.
  • Use `netstat` or `ss` to view network connections.

  • Windows Equivalent Commands:

  • Use `ipconfig` to view IP configurations.
  • Use `tracert` for path tracing.
  • Use `netsh` for advanced network configurations.

  • Practice Commands:

  • On Linux, simulate VLANs using `vconfig` or ip link.
  • Use `iptables` for ACL-like configurations.
  • Use `nmap` for network scanning and troubleshooting.

What Undercode Say:

Configuring Cisco routers is a foundational skill for network engineers. This guide provides a comprehensive overview of basic configurations, from device setup to advanced features like VLANs, routing, and ACLs. By mastering these commands, you can ensure efficient network management and troubleshooting. Additionally, understanding equivalent commands in Linux and Windows can enhance your versatility as an IT professional.

Expected Output:

  • A fully configured Cisco router with hostname, interfaces, VLANs, trunking, routing, ACLs, and port security.
  • Verified configurations using commands like show running-config, show ip route, and show access-lists.
  • Troubleshooting network issues using ping, traceroute, and `debug` commands.

References:

Reported By: Mohammed Haneef – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image