Cisco IOS
Let's start out by discussing some of the base CISCO devices configuration commands:
To configure a CISCO device, connect to the CONSOLE port using a ROLLOVER cable. If you're on a Windows system, on PuTTY, select Serial, set baud rate to 9600 from Device manager of the computer, figure out which COM port is connected. You would be presented with a user-mode with a command line display as follows:
Switch>
The first thing to know is that you can type enter without any text without any consequences on the command line. Second, if you'd like to get a list of commands that you can enter at any screen or if you're unsure of how to proceed further with any command, use the '?' to get a list of successive commands.
Command 1 -> Switch> enable
The above 'enable' command takes you to the privileged-mode from the user-mode.
Command 2 -> Switch# configure terminal
You can use tab to complete the command or view a list of commands starting with what you have typed down. 'configure terminal' or 'conf t' command takes you to the global configuration mode. Think of different modes as doors leading to different rooms and each room lets you configure a certain setting.
Let's see how to perform 10 actions:
1. Set Hostname to VAN-RT01
Switch> enable
Switch# conf t
Switch(config)# hostname VAN-RT01
2. Set IP address to 10.0.0.1 with a subnet mask of 255.255.255.0 on FastEthernet0/1
Switch> enable
Switch# conf t
Switch(config)# interf fa0/1
Switch(config-if)# ip addr 10.0.0.1 255.255.255.0
3. Activate the above interface
Switch> enable
Switch# conf t
Switch(config)# interf fa0/1
Switch(config-if)# no shutdown
4. Set a login banner
Switch> enable
Switch# conf t
Switch(config)# banner motd %
Multi-line banner
%
5. Set synchronous logging on console
Switch> enable
Switch# conf t
Switch(config)# line console 0
Switch(config-line)# logging synchronous
Switch(config-line)# do show running config
NOTE: Use the word 'do' to run a command belonging to another mode without having to switch mode.
6. Set a console password as 'cisco'
Switch> enable
Switch# conf t
Switch(config)# line console 0
Switch(config-line)# password cisco
Switch(config-line)#login
7. Secure the system such that password 'cisco' is required to access the privileged mode
Switch> enable
Switch# conf t
Switch(config)# enable secret cisco
8. Set password 'cisco' for Telnet connections to the device
Switch> enable
Switch# conf t
Switch(config)# line vty 0 4
Switch(config)# password cisco
Switch(config)# login
NOTE: Remember that setting password without the login line is meaningless since everyone lands at the user-mode directly.
9. No domain lookup -> If you enter incorrect commands, this will save you time.
Switch> enable
Switch# conf t
Switch(config)# no ip domain-lookup
10. Encrypt all passwords
Switch> enable
Switch# conf t
Switch(config)#service password-encryption
BONUS -> 11. Save settings
Switch> enable
Switch# wr
---
One thing to note with Cisco IOS is that when you're typing commands, you're editing the running-config. The running-config gets stored in the RAM which is a volatile type of storage. If you would like to persist the changes across reboots, you need to save the changes to the startup-config. You can do it with the following command:
Switch# copy running-config startup-config
Comments
Post a Comment