Device Setup and Basic Configuration

Renaming a Device

The running config displayed in the earlier example showed router as the hostname. This is the default name for a Cisco router, just as switch is the default name for a Cisco switch. The device’s name appears in the command prompt.

Use the hostname command to change a device’s name. Select a unique name for each device to ensure easy identification within the network. In the example below, we changed the router’s name to NorthOfficeRouter. Notice how the new name is a part of the final prompt.

Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config)#hostname NorthOfficeRouter
NorthOfficeRouter (config)#

Assigning an IP Address

You will also want to assign an IP address to the device to remotely manage it. Use the following commands:

Command Description
interface <interface-name> Enter Interface Configuration mode
ip address <IP-address> <subnet-mask> Assign an IP address and subnet mask
no shutdown Enable the interface

Here is what this procedure looks like in the Cisco IOS. Note that config-if indicates that you are in Interface Configuration sub-mode.

Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router (config) #hostname NorthOfficeRouter
NorthOfficeRouter (config)#
NorthOfficeRouter (config)#
NorthOfficeRouter (config)#interface GigabitEthernet0/0/1
NorthOfficeRouter (config-if)# ip address 192.168.1.1 255.255.255.0
NorthOfficeRouter (config-if)#no shutdown
NorthOfficeRouter (config-if)#
*LINK-5-CHANGED: Interface GigabitEthernet0/0/1, changed state to up
NorthOfficeRouter (config-if)#

Configuring Passwords

Because we logged onto a new device, we didn’t have to enter a password. Here are the commands for enabling passwords to enhance security:

Command Description
enable password <pass-value> Defines the password required when using the enable command
enable secret <pass-value> Sets the password required for any user to enter enable mode and encrypts it
service password-encryption Encrypts passwords in the configuration file

Configuring Banners

There are also a variety of banners you can configure:

Command Description
banner motd #message# Configures a message of the day (motd) banner
banner login #message# Configures a login banner
banner exec #message# Configures an exec banner