0% found this document useful (0 votes)
218 views

Commands For Cisco

This document provides instructions for basic configuration of a switch and router, including setting hostnames and passwords, assigning IP addresses, configuring login banners, and enabling SSH. The switch configuration sets the hostname, IP address, gateway, encrypts passwords, and configures console and vty passwords. The router configuration also sets the hostname, encrypts passwords, configures console and vty passwords, and further includes IP addressing an interface, domain configuration, and enabling SSH login.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
218 views

Commands For Cisco

This document provides instructions for basic configuration of a switch and router, including setting hostnames and passwords, assigning IP addresses, configuring login banners, and enabling SSH. The switch configuration sets the hostname, IP address, gateway, encrypts passwords, and configures console and vty passwords. The router configuration also sets the hostname, encrypts passwords, configures console and vty passwords, and further includes IP addressing an interface, domain configuration, and enabling SSH login.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

# Basic Switch Configuration

Switch> enable
Switch# configure terminal
Switch(config)# hostname [YourSwitchName]
Switch(config)# no ip domain-lookup
# Assign an IP Address and Default Gateway
Switch(config)# interface vlan1
Switch(config-if)# ip address [IP_ADDRESS] [SUBNET_MASK]
Switch(config-if)# no shutdown
Switch(config)# ip default-gateway [GATEWAY_IP]
# Encrypt Clear Text Passwords
Switch(config)# service password-encryption
# Configure Console and VTY Passwords
Switch(config)# line console 0
Switch(config-line)# password cisco
Switch(config-line)# login
Switch(config-line)# logging synchronous
Switch(config)# line vty 0 4
Switch(config-line)# password cisco
Switch(config-line)# login
Switch(config-line)# logging synchronous
# Privileged EXEC Password
Switch(config)# enable secret class
# Banner Configuration
Switch(config)# banner login #Unauthorised access is prohibited and will be strictly prosecuted.#

# Basic Router Configuration


Router> enable
Router# configure terminal
Router(config)# hostname [YourRouterName]
# Disable DNS Lookup
Router(config)# no ip domain-lookup
# Assign and Encrypt Privileged EXEC Password
Router(config)# enable secret class
# Console and VTY Passwords
Router(config)# line console 0
Router(config-line)# password cisco
Router(config-line)# login
Router(config-line)# logging synchronous
Router(config)# line vty 0 4
Router(config-line)# password cisco
Router(config-line)# login
Router(config-line)# logging synchronous
# Encrypt Clear Text Passwords
Router(config)# service password-encryption
# Banner Configuration
Router(config)# banner login #Unauthorised access is prohibited and you will be strictly
prosecuted.#
# IP Address Configuration
Router(config)# interface [INTERFACE_TYPE] [INTERFACE_NUMBER]
Router(config-if)# ip address [IP_ADDRESS] [SUBNET_MASK]
Router(config-if)# ipv6 address [IPv6_ADDRESS]/[PREFIX]
Router(config-if)# no shutdown
# SSH Configuration
Router(config)# ip domain-name networklab.com
Router(config)# crypto key generate rsa
Router(config)# username admin privilege 15 secret adminpass
Router(config)# line vty 0 4
Router(config-line)# transport input ssh
Router(config-line)# login local

You might also like