# 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