Configuration
Last updated
Last updated
To configure the device, we configure from the terminal; type the command configure terminal followed by [return].
The prompts clearly indicate that we are in config mode. One of the first things we do on a new system is to give it an unambiguous name, in this case I use the command host Core1 followed by [return]. The full command would be hostname.
You can see that the prompt has changed. In a convex environment, I might be working on several network devices simultaneously. This prompt is one of the reminders to me of which device I am currently working on. To exit from config mode, I used the command exit followed by [return]. A shortcut used by most administrators is [ctrl] [z] and it works on most manufacturers’ equipment.
From this point on, I am going to mention new commands and assume you press return!
If you type show run and examine the top of the configuration, you can see a new line, hostname Core1. Clearly our configuration has changed. But if you type dir you will see the config file still has a zero length. When we make changes in the way I have been showing you, we are making changes to the running configuration in DRAM. The configuration file in flash memory is the start-up configuration. If I were to reboot now, the hostname change I’ve made would disappear. Try it! Use the command reload to reboot the switch, if you asked to save the system configuration, type no.
Once the switch reboots, use the show run command to verify that the hostname has not been saved. Repeat the configurations commands on this page and name the switch again.
To copy a file in any operating system the standard syntax is copy [source] [destination] and it is no different in most network switches. Try the command copy running config start-up config and then type dir; nothing changed in flash? If you try dir nvram: you should see a new configuration file. Now we know where things are kept!
You can use a delete command to erase a file, for example the command delete nvram:startup-config should remove the configuration. We need to know this for later, where we will need to be able to manually manipulate configuration files.
An easy way to wipe a pre-configured device is to use the command erase startup-config and this is the first command I would run before beginning a new configuration just in case someone had pre-configured something.
If you mistype a command, the switch will attempt to do a DNS lookup of whatever you mistyped, until it times out. This is annoying! To prevent it doing this, type the command no ip domain-lookup