0% found this document useful (0 votes)
1 views23 pages

Switch Router Intial Config

The document provides a comprehensive guide on configuring a Cisco router or Layer 3 switch, including initial setup, hostname, passwords, interface IP assignment, and SSH configuration. It outlines the steps for both router and switch configurations, as well as how to undo each command if needed. Additionally, it emphasizes the importance of following a specific order during configuration to ensure a reliable management path before implementing advanced features.

Uploaded by

durgasoftzoom793
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views23 pages

Switch Router Intial Config

The document provides a comprehensive guide on configuring a Cisco router or Layer 3 switch, including initial setup, hostname, passwords, interface IP assignment, and SSH configuration. It outlines the steps for both router and switch configurations, as well as how to undo each command if needed. Additionally, it emphasizes the importance of following a specific order during configuration to ensure a reliable management path before implementing advanced features.

Uploaded by

durgasoftzoom793
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Bash

ip [Link]/24 [Link]

Verify

On PC1:

ping [Link]
pingBash
[Link]

If the pings succeed, the IP configuration is correct.

If you're using a different type of PC in GNS3 (VPCS, TinyCore Linux, Ubuntu, Windows,
etc.), let me know which one it is, and I can provide the exact commands for that
environment.

layer3 switch or router ip assignment and console and ssh


configuration

Below is a real-world CCNA configuration for a Layer 3 Switch or Router, including:


1. Initial setup
2. Hostname
3. Passwords
4. Interface IP assignment
5. VLAN management IP (Layer 2 switch)
6. Layer 3 Switch SVI configuration
7. Default gateway
8. SSH configuration
9. Console configuration
10. VTY configuration
11. Verification commands
12. Configuration save

Scenario 1: Router Configuration


Topology

PC
|
G0/0 |
Router R1

PC IP

[Link]/24
Gateway
[Link]

Router Interface

G0/0
[Link]/24

Step 1 Configure Hostname

enable

configure terminal

cisco R1
hostname

Prompt becomes

R1(config)#

Step 2 Disable DNS Lookup


Avoids delays if you mistype a command.

cisco
no ip domain-lookup
Step 3 Configure Enable Secret

cisco
enable secret Cisco@123

Step 4 Configure Console Password

line console 0

password Console@123

login

logging synchronous

exec-timeout 10 0

exitcisco

Step 5 Configure Banner

banner motd #

Unauthorized Access Prohibited

# cisco

Step 6 Configure Interface IP

interface GigabitEthernet0/0

ip address [Link] [Link]

no shutdown
description Connected_to_PC

cisco
exit

Verify

showcisco
ip interface brief

Expected

Interface IP-Address Status

Gig0/0 [Link] up

SSH Configuration
Step 1 Domain Name

cisco
ip domain-name [Link]

Step 2 Create Local User

cisco admin privilege 15 secret Admin@123


username

Step 3 Generate RSA Keys

cisco
crypto key generate rsa

Choose

2048
Step 4 Force SSH Version 2

cisco
ip ssh version 2

Step 5 Configure VTY Lines

line vty 0 4

login local

transport input ssh

exec-timeout 10 0

exitcisco

Save Configuration

copycisco
running-config startup-config

Verify SSH

show ip ssh

show ssh

showcisco
users

Connect From PC
ssh -l admin [Link]

or

ssh admin@[Link]

Scenario 2 Layer 3 Switch


Example Switch

3560
3650
3850
9300

Configure Hostname

enable

configure terminal

cisco SW1
hostname

Create VLAN

vlan 10

name SALES

exitcisco

Configure SVI
interface vlan10

ip address [Link] [Link]

no shutdown

exitcisco

Configure Access Port

interface GigabitEthernet0/1

switchport mode access

switchport access vlan 10

cisco
no shutdown

Enable Layer 3 Routing

cisco
ip routing

Without this command, the switch cannot route between VLANs.

SSH Configuration
Same as router

ip domain-name [Link]

username admin privilege 15 secret Admin@123

crypto key generate rsa


2048

ip ssh version 2

line vty 0 4

login local

transport input ssh


cisco
exit

Console Configuration

line console 0

password Console@123

login

logging synchronous

exec-timeout 10 0

exitcisco

Save

copycisco
running-config startup-config

Verification Commands

show running-config

show startup-config
show ip interface brief

show vlan brief

show interfaces status

show ip route

show ip ssh

show ssh

show users

show version

show inventory

show interfaces

show interfaces description

show mac address-table

cisco
show arp

Typical Initial Configuration Template

enable

configure terminal

hostname R1

no ip domain-lookup

enable secret Cisco@123

service password-encryption

banner motd # Unauthorized Access Prohibited #

line console 0
password Console@123
login
logging synchronous
exec-timeout 10 0
exit

ip domain-name [Link]

username admin privilege 15 secret Admin@123

crypto key generate rsa


2048

ip ssh version 2

line vty 0 4
login local
transport input ssh
exec-timeout 10 0
exit

interface GigabitEthernet0/0
description Connected_to_PC
ip address [Link] [Link]
no shutdown
exit

end

copycisco
running-config startup-config

Real-world order of configuration


When setting up a new Cisco router or Layer 3 switch from scratch, network engineers
typically follow this sequence:
1. Connect using the console cable.
2. Enter privileged mode ( enable ) and global configuration mode ( configure
terminal ).
3. Set the hostname and disable DNS lookup ( no ip domain-lookup ).
4. Configure the enable secret, console access, and banner.
5. Configure interface IP addresses (or SVIs on a Layer 3 switch) and enable them with
no shutdown .
6. If using a Layer 3 switch, enable ip routing if it will perform inter-VLAN routing.
7. Configure the management settings for SSH: domain name, local username, RSA
keys, SSH version, and VTY lines.
8. Verify connectivity (ping, interface status, SSH login).
9. Save the configuration with copy running-config startup-config .

This order ensures you always have a working management path before moving on to
more advanced features.
after doing below, if i have to undo give me in detail

enable

configure terminal

hostname R1

no ip domain-lookup

enable secret Cisco@123


Show more

Excellent question. In Cisco IOS, there are three ways to undo configurations:
1. Use the no form of the command (most common)
2. Use the default command (restore a command to its factory default)
3. Erase the entire configuration (factory reset)

I'll explain how to undo every command from your configuration, what it actually
removes, and what happens afterward.

Original Configuration

enable

configure terminal

hostname R1

no ip domain-lookup

enable secret Cisco@123

service password-encryption

banner motd # Unauthorized Access Prohibited #


line console 0
password Console@123
login
logging synchronous
exec-timeout 10 0
exit

ip domain-name [Link]

username admin privilege 15 secret Admin@123

crypto key generate rsa


2048

ip ssh version 2

line vty 0 4
login local
transport input ssh
exec-timeout 10 0
exit

interface GigabitEthernet0/0
description Connected_to_PC
ip address [Link] [Link]
no shutdown
exit

end

copycisco
running-config startup-config

1) Undo Hostname
Current

cisco R1
hostname

Undo

cisco
no hostname

or
cisco Router
hostname

What happens?
Before

R1#

After

Router#

The hostname changes back to the default ( Router ) or to whatever name you set.

2) Undo no ip domain-lookup
Current

cisco
no ip domain-lookup

Undo

cisco
ip domain-lookup

What happens?
The router will again try to resolve mistyped commands as DNS names.

Example:

R1#pingg

Without DNS lookup disabled, IOS may pause while attempting a DNS lookup.

3) Remove Enable Secret


Current
cisco
enable secret Cisco@123

Undo

cisco secret
no enable

Verify

showcisco
running-config | include enable

Nothing should be displayed.

4) Undo Password Encryption


Current

ciscopassword-encryption
service

Undo

cisco password-encryption
no service

Important
Existing encrypted passwords stay encrypted.
New passwords will not be automatically encrypted.

5) Remove Banner
Current

cisco
banner motd # Unauthorized Access Prohibited #

Undo

cisco motd
no banner

Verify

showcisco
running-config | include banner

6) Remove Console Password


Enter console configuration:

linecisco
console 0

Remove password

cisco
no password

Remove login

cisco
no login

Remove logging synchronous

cisco synchronous
no logging

Restore default timeout


ciscoexec-timeout
default

or

cisco
exec-timeout 10 0

if you simply want a different timeout.

Verify

showcisco
running-config | section line con

7) Remove Domain Name


Current

cisco
ip domain-name [Link]

Undo

cisco
no ip domain-name

Verify

showcisco
running-config | include domain

8) Delete Local Username


Current
cisco admin privilege 15 secret Admin@123
username

Undo

cisco
no username admin

Verify

showcisco
running-config | include username

9) Remove RSA Keys


Current

cisco
crypto key generate rsa

Undo

cisco
crypto key zeroize rsa

or, on some platforms:

cisco
crypto key zeroize rsa general-keys

What happens?
Deletes the RSA key pair.
SSH stops working because it requires these keys.

Verify

cisco
show crypto key mypubkey rsa

No keys should be listed.

10) Remove SSH Version


Current

cisco
ip ssh version 2

Undo

cisco
no ip ssh version 2

The router returns to its default SSH behavior (if supported by the IOS version).

11) Remove VTY SSH Configuration


Enter VTY configuration:

linecisco
vty 0 4

Undo login local:

cisco local
no login

Restore the default login behavior if needed:

cisco
login

Remove SSH-only access:

cisco
cisco
transport input all

or, if you want only Telnet:

cisco input telnet


transport

Restore timeout:

ciscoexec-timeout
default

Verify

showcisco
running-config | section line vty

12) Remove Interface Description


Enter the interface:

cisco GigabitEthernet0/0
interface

Undo description

cisco
no description

Verify

showcisco
interfaces description

13) Remove IP Address


Current
cisco [Link] [Link]
ip address

Undo

cisco
no ip address

Verify

showcisco
ip interface brief

The IP address should show as unassigned .

14) Shut Down the Interface


Current

cisco
no shutdown

Undo

cisco
shutdown

Verify

showcisco
ip interface brief

Status will indicate the interface is administratively down.

15) Remove Saved Configuration


Your configuration is stored in two places:
Running Configuration (RAM): Active configuration.
Startup Configuration (NVRAM): Loaded when the device boots.

To erase the saved configuration:

cisco
erase startup-config

or

cisco
write erase

Confirm the prompt.

Then reload:

cisco
reload

Choose No if prompted to save the running configuration.

After reboot, the device returns to its factory-default configuration.

Summary Table
Configured Command Undo Command

hostname R1 no hostname (or hostname Router )

no ip domain-lookup ip domain-lookup

enable secret Cisco@123 no enable secret

service password-encryption no service password-encryption

banner motd ... no banner motd

password Console@123 no password (under line console 0 )

login (console) no login

ChatGPT Upgrade
pg
Configured Command Undo Command

logging synchronous no logging synchronous

exec-timeout 10 0 default exec-timeout

ip domain-name [Link] no ip domain-name

username admin ... no username admin

crypto key generate rsa crypto key zeroize rsa

ip ssh version 2 no ip ssh version 2

login local (VTY) no login local

transport input ssh transport input all (or transport input telnet )

description ... no description

ip address ... no ip address

no shutdown shutdown

CCNA exam tip


Most Cisco IOS configuration commands follow these rules:
Enable a feature: enter the command (for example, service password-encryption ).
Disable or remove the feature: prefix it with no (for example, no service password-
encryption ).
Restore the factory default for a setting: use default <command> (for example,
default exec-timeout ).
Erase everything and start fresh: use erase startup-config (or write erase )
followed by reload .

Understanding these three methods— no , default , and a full configuration erase—will


help you troubleshoot and reverse configurations confidently in both the CCNA exam and
real-world Cisco networks.

You might also like