Cisco Nuggets (Part 1)
So I decided to do a little series called "Nuggets" and use this as a platform to capture all the stuff I have rattling around in my head. The first part of this series is going to be over everything I know and use that's related to Cisco configurations and commands. I use Cisco on a daily basis ranging from my home lab consisting of: 2x Catalyst 2960s in a stacked configuration, 2x Cisco 1921 Routers setup with a Port-Channel to the stacked switches, and many Cloud Services Routers (CSR1000v) virtual routers for labbing out different topologies and setups, to my work environment scaling across the globe and using all flavors of Cisco routers and switches both virtual and physical. I am going to put every command I can think of with what its used for and how to set it up the way I use it. **Word of caution** some of the ways I configure things may not be the correct way and feel free to point it out so I can also learn from you guys reading this.
To begin I am going to list out some very basic commands and what they do. This is more tailored to someone who has never used a Cisco device so this could get a little boring for some of you who use Cisco products.
- enable
- This command is used to enter privileged mode to run commands. The prompt will change from 'hostname>' to 'hostname#'
 |
Privileged Mode |
- configure terminal
- This command is used to enter terminal configuration mode, this will be where most commands are entered for configuration of the device. The prompt will change from 'hostname#' to 'hostname(config)#'
 |
Terminal Configuration |
- interface [f/g/t] <interface number>
- This command enters configuration for a specific interface or range of interfaces. [f: fastEthernet, g: gigabitEthernet, t: tenGigabitEthernet, etc] <interfaces can be found by running 'show ip interface brief' from privileged mode>
 |
Interface Configuration |
- show running-config
- This command is ran from the privileged mode and shows the current running configuration. This command can be filtered and we will cover that a little later on.
 |
Snippet of running config |
- write memory
- This command is used to save the running configuration into the startup configuration. Another command that can be used is 'copy running-config startup-config' which will do the same thing.
 |
Write Memory |
- write erase
- This is used to erase the startup configuration. *Note: if this command is accidentally ran the configuration can be saved back to the startup configuration by running the above command prior to a reboot*
- reload
- This will reload the device. Usually this is done after a write erase or to complete an upgrade of the operating system
- shutdown
- This is used to turn an interface off in the configuration. This is handy from a security standpoint as it doesn't allow a device to connect without the configuration being updated.
- no
- This will conduct the opposite of most commands (i.e 'no shutdown', 'no ip address', etc)
- do
- This will allow you to run privileged commands from the terminal configuration mode (i.e 'do show running-config', do write memory', etc)
- username [user]
- This will allow the creation of a local user. There are a few other commands that have to be added along with this command for specific permissions and password setting.
 |
This will create user 'test' with and encrypted password of 'password' |
These are most of the basic commands that I use on a semi-regular basis. For all Cisco commands there is shorthand and tab completion. What that means is once you enter enough characters to make the command unique you can either space and type the next portion or use the tab button to complete the full command. Both are handy as sometimes you know and sometimes you want to be sure. This is where I will stop for tonight with the basics. Tomorrow I will cover a few of what I like to refer to as 'intermediate basic' commands.
Leave me a comment below and let me know what questions you have and check back tomorrow for some more commands.
Comments
Post a Comment