Configuring a Single Cisco Router

This chapter provides information and commands concerning the following topics:

• Router modes

• Entering global configuration mode

• Configuring a router, specifically

— Passwords

— Password encryption

— Interface names

— Moving between interfaces

— Configuring a serial interface

— Configuring a Fast Ethernet interface

— Creating a message-of-the-day (MOTD) banner

— Creating a login banner

— Setting the clock time zone

— Assigning a local host name to an IP address

— The no ip domain-lookup command

— The logging synchronous command

— The exec-timeout command

— Saving configurations

— Erasing configurations

• show commands to verify the router configurations

• EXEC commands in configuration mode: the do command

Router Modes

Router>

User mode

Router#

Privileged mode (also known as EXEC-level mode)

Router(config)#

Global configuration mode

Router(config-if)#

Interface mode

Router(config-subif)#

Subinterface mode

Router(config-line)#

Line mode

Router(config-router)#

Router configuration mode

TIP: There are other modes than these. Not all commands work in all modes. Be careful. If you type in a command that you know is correct—show running-config, for example—and you get an error, make sure that you are in the correct mode.

Entering Global Configuration Mode

Router>

Limited viewing of configuration. You cannot make changes in this mode.

Router#

You can see the configuration and move to make changes.

Router#configure terminal

Router(config)#

Moves to global configuration mode. This prompt indicates that you can start making changes.

Configuring a Router Name

This command works on both routers and switches.

Router(config)#hostname Cisco

The name can be any word you choose.

Cisco(config)#

Configuring Passwords

These commands work on both routers and switches.

Router(config)#enable password cisco

Sets enable password

Router(config)#enable secret class

Sets enable secret password

Router(config)#line console 0 Router(config-line)#password console

Router(config-line)#login

Enters console line mode

Sets console line mode password to console

Enables password checking at login

Router(config)#line vty 0 4

Router(config-line)#password telnet Router(config-line)#login

Enters vty line mode for all five vty lines

Sets vty password to telnet

Enables password checking at login

Router(config)#line aux 0 Router(config-line)#password backdoor

Router(config-line)#login

Enters auxiliary line mode

Sets auxiliary line mode password to backdoor

Enables password checking at login

CAUTION: The enable secret password is encrypted by default. The enable password is not. For this reason, recommended practice is that you never use the enable password command. Use only the enable secret password command in a router or switch configuration.

You cannot set both enable secret password and enable password to the same password. Doing so defeats the use of encryption.

Password Encryption

Router(config)#service password-encryption

Applies a weak encryption to passwords

Router(config)#enable password cisco

Sets enable password to cisco

Router(config)#line console 0

Moves to console line mode

Router(config-line)#password Cisco

Continue setting passwords as above

Router(config)#no service password-encryption

Turns off password encryption

CAUTION: If you have turned on service password encryption, used it, and then turned it off, any passwords that you have encrypted will stay encrypted. New passwords will remain unencrypted.

Interface Names

One of the biggest problems that new administrators face is the interface names on the different models of routers. With all the different Cisco devices in production networks today, some administrators are becoming confused about the names of their interfaces.

The following chart is a sample of some of the different interface names for various routers. This is by no means a complete list. Refer to the hardware guide of the specific router that you are working on to see the different combinations, or use the following command to see which interfaces are installed on your particular router:

router#show ip interface brief

Location/Slot Number

Slot/Port Type

Slot Numbering Range

Example

2501

On board

Ethernet

Interface-type number

ethernet0 (e0)

On board

Serial

Interface-type number

serialO (s0) & s1

2514

On board

Ethernet

Interface-type number

e0 & e1

On board

Serial

Interface-type number

s0 & s1

1721

On board

Fast Ethernet

Interface-type number

fastethernet0 (fa0)

Slot 0

WAC (WIN interface card) (serial)

Interface-type number

s0 & s1

1760

On Board

Fast Ethernet

Interface-type 0/port

fa0/0

Slot 0

WIC/VIC (voice interface card)

Interface-type 0/port

s0/0 & s0/1 v0/0 & v0/1

Slot 1

WIC/VIC

Interface-type 1/port

s1/0 & s1/1 v1/0 & v1/1

Slot 2

VIC

Interface-type 2/port

v2/0 & v2/1

Slot 3

VIC

Interface-type 3/port

v3/0 & v3/1

2610

On board

Ethernet

Interface-type 0/port

e0/0

Slot 0

WIC (Serial)

Interface-type 0/port

s0/0 & s0/1

2611

On board

Ethernet

Interface-type 0/port

e0/0 & e0/1

Slot 0

WIC (Serial)

Interface-type 0/port

s0/0 & s0/1

2620

On board

Fast Ethernet

Interface-type 0/port

fa0/0

Slot 0

WIC (serial)

Interface-type 0/port

s0/0 & s0/1

2621

On board

Fast Ethernet

Interface-type 0/port

fa0/0 & fa0/1

Slot 0

WIC (serial)

Interface-type 0/port

s0/0 & s0/1

1841

On board

Fast Ethernet

Interface-type 0/port

fa0/0 & fa0/1

Slot 0

High-speed WAN interface card (HWIC)/ WIC/VWIC

Interface-type 0/slot/ port

s0/0/0 & s0/0/1

1841

Slot 1

HWIC/WIC/ VWIC

Interface-type 0/slot/ port

s0/1/0 & s0/1/1

2801

On board

Fast Ethernet

Interface-type 0/port

fa0/0 & fa0/1

Slot 0

VIC/VWIC (voice only)

Interface-type 0/slot/ port

voice0/0/0-voice0/0/3

Slot 1

HWIC/WIC/ VWIC

Interface-type 0/slot/ port

(single-wide

HWIC)

(double-wide

HWIC)

Slot 2

WIC/VIC/ VWIC

Interface-type 0/slot/ port

0/2/0-0/2/3

Slot 3

HWIC/WIC/ VWIC

Interface-type 0/slot/ port

(single-wide

HWIC)

(double-wide

HWIC)

2811

Built in to chassis front

USB

Interface-type port

usb0 & usb 1

Built in to chassis rear

Fast Ethernet Gigabit Ethernet

Interface-type 0/port

fa0/0 & fa0/1 gi0/0 & gi0/1

Slot 0

HWIC/HWIC-D/WIC/VWIC/ VIC

Interface-type 0/slot/ port

s0/0/0 & s0/0/1 fa0/0/0 & 0/0/1

Slot 1

HWIC/HWIC-D/WIC/VWIC/ VIC

Interface-type 0/slot/ port

s0/1/0 & s0/1/1 fa0/1/0 & 0/1/1

NME slot

NM/NME

Interface-type 1/port

gi1/0 & gi1/1 s1/0 & s1/1

Moving Between Interfaces

What happens in Column 1 is the same thing occurring in Column 3.

Responses

  • Kevin
    How to configure 0/0 and 0/1 fastethernet in cisco?
    2 months ago

Router(config) #interface serial 0/0/0

Moves to serial interface configuration mode

Router(config)# interface serial 0/0/0

Moves to serial interface configuration mode

Router(config-if)#exit

Returns to global configuration mode

Router(config-if)#interface fastethernet 0/0

Moves directly to Fast Ethernet 0/0 configuration mode

Router(config) # interface fastethernet 0/0

Moves to Fast Ethernet interface configuration mode

Router(config-if)#

In Fast Ethernet 0/0 configuration mode now

Router(config-if)#

In Fast Ethernet 0/0 configuration mode now

Router(config-if)#

Prompt does not change; be careful

Configuring a Serial Interface

Router(config)#interface S0/0/0

Moves to serial interface 0/0/0 configuration mode

Router(config-if)#description Link to ISP

Optional descriptor of the link is locally significant

Router(config-if)#ip address 192.168.10.1 255.255.255.0

Assigns address and subnet mask to interface

Router(config-if)#clock rate 56000

Assigns a clock rate for the interface

Router(config-if)#no shutdown

Turns interface on

TIP: The clock rate command is used only on a serial interface that has a DCE cable plugged into it. There must be a clock rate set on every serial link between routers. It does not matter which router has the DCE cable plugged into it or which interface the cable is plugged into. Serial 0 on one router can be plugged into Serial 1 on another router.

Configuring a Fast Ethernet Interface

Router(config)#interface fastethernet 0/0

Moves to Fast Ethernet 0/0 interface configuration mode

Router(config-if)#description Accounting LAN

Optional descriptor of the link is locally significant

Router(config-if)#ip address 192.168.20.1 255.255.255.0

Assigns address and subnet mask to interface

Router(config-if)#no shutdown

Turns interface on

Creating a Message-of-the-Day Banner

Router(config)#banner motd # Building Power will be interrupted next Tuesday evening from 8 - 10 PM. #

Router(config)#

# is known as a delimiting character. The delimiting character must surround the banner message and can be any character so long as it is not a character used within the body of the message.

TIP: The MOTD banner is displayed on all terminals and is useful for sending messages that affect all users. Use the no banner motd command to disable the MOTD banner. The MOTD banner displays before the login prompt and the login banner, if one has been created.

Creating a Login Banner

Router(config)#banner login # Authorized Personnel Only! Please enter your username and password. #

Router(config)#

# is known as a delimiting character. The delimiting character must surround the banner message and can be any character so long as it is not a character used within the body of the message.

TIP: The login banner displays before the username and password login prompts. Use the no banner login command to disable the login banner. The MOTD banner displays before the login banner.

Setting the Clock Time Zone

Sets the time zone for display purposes. Based on coordinated universal time. (Eastern standard time is 5 hours behind UTC.)

Assigning a Local Host Name to an IP Address

Router(config)#ip host london 172.16.1.3

Assigns a host name to the IP address. After this assignment, you can use the host name rather than an IP address when trying to Telnet or ping to that address.

Router#ping london Router#ping 172.16.1.3

Both commands execute the same objective: sending a ping to address 172.16.1.3.

TIP: The default port number in the ip host command is 23, or Telnet. If you want to Telnet to a device, just enter the IP host name itself:

Router#london = Router#telnet london = Router#telnet 172.16.1.3

The no ip domain-lookup Command

Router(config)#no ip domain-lookup Router(config)#

Turns off trying to automatically resolve an unrecognized command to a local host name

TIP: Ever type in a command incorrectly and are left having to wait for a minute or two as the router tries to translate your command to a domain server of 255.255.255.255? The router is set by default to try to resolve any word that is not a command to a Domain Name System (DNS) server at address 255.255.255.255. If you are not going to set up DNS, turn off this feature to save you time as you type, especially if you are a poor typist.

The logging synchronous Command

Router(config)#line console 0

Moves to line console configuration mode.

Router(config-line)#logging synchronous

Turns on synchronous logging. Information items sent to the console will not interrupt the command you are typing. The command will be moved to a new line.

TIP: Ever try to type in a command and an informational line appears in the middle of what you were typing? Lose your place? Do not know where you are in the command, so you just press (Enter] and start all over? The logging synchronous command tells the router that if any informational items get displayed on the screen, your prompt and command line should be moved to a new line, so as not to confuse you.

The informational line does not get inserted into the middle of the command you are trying to type. If you were to continue typing, the command would execute properly, even though it looks wrong on the screen.

The exec-timeout Command

Router(config)#line console 0

Moves to line console configuration mode.

Router(config-line)#exec-timeout 0 0

Sets the time limit when the console automatically logs off. Set to 0 0 (minutes seconds) means the console never logs off.

Router(config-line)#

TIP: The command exec-timeout 0 0 is great for a lab environment because the console never logs out. This is considered to be bad security and is dangerous in the real world. The default for the exec-timeout command is 10 minutes and zero (0) seconds (exec-timeout 10 0).

Saving Configurations

Router#copy running-config startup-config

Saves the running configuration to local NVRAM

Router#copy running-config tftp

Saves the running configuration remotely to a TFTP server

Erasing Configurations

Router#erase startup-config

Deletes the startup configuration file from NVRAM

TIP: The running configuration is still in dynamic memory. Reload the router to clear the running configuration.

show Commands

Router#show ?

Lists all show commands available.

Router#show interfaces

Displays statistics for all interfaces.

Router#show interface serial 0/0/0

Displays statistics for a specific interface (in this case, serial 0/0/0).

Router#show ip interface brief

Displays a summary of all interfaces, including status and IP address assigned.

Router#show controllers serial 0/0/0

Displays statistics for interface hardware. Statistics display if the clock rate is set and if the cable is DCE, DTE, or not attached.

Router#show clock

Displays time set on device.

Router#show hosts

Displays local host-to-IP address cache. These are the names and addresses of hosts on the network to which you can connect.

Router#show users

Displays all users connected to device.

Router#show history

Displays the history of commands used at this edit level.

Router#show flash

Displays info about flash memory.

Router#show version

Displays info about loaded software version.

Router#show arp

Displays the Address Resolution Protocol (ARP) table.

Router#show protocols

Displays status of configured Layer 3 protocols.

Router#show startup-config

Displays the configuration saved in NVRAM.

Router#show running-config

Displays the configuration currently running in RAM.

EXEC Commands in Configuration Mode: The do Command

Router(config)#do show running-config

Executes the privileged-level show running-config command while in global configuration mode.

Router(config)#

The router remains in global configuration mode after the command has been executed.

TIP: The do command is useful when you want to execute EXEC commands, such as show, clear, or debug, while remaining in global configuration mode or in any configuration submode. You cannot use the do command to execute the configure terminal command because it is the configure terminal command that changes the mode to global configuration mode.

Configuration Example: Basic Router Configuration

Figure 6-1 illustrates the network topology for the configuration that follows, which shows a basic router configuration using the commands covered in this chapter.

Figure 6-5 Network Topology for Basic Router Configuration

Figure 6-5 Network Topology for Basic Router Configuration

Boston Router

Router>enable

Enters privileged mode.

Router#clock set 18:30:00 15 May 2007

Sets the local time on the router.

Router#configure terminal

Enters global configuration mode.

Router(config)#hostname Boston

Sets the router name to Boston.

Boston(config)#no ip domain-lookup

Turns off name resolution on unrecognized commands (spelling mistakes).

Boston(config)#banner motd # This is the Boston Router.

Authorized Access Only

#

Creates an MOTD banner.

Boston(config)#clock timezone EST -5

Sets time zone to eastern standard time (-5 from UTC).

Boston(config)#enable secret cisco

Enables secret password set to cisco.

Boston(config)#service password-encryption

Passwords will be given weak encryption.

Boston(config)#line console 0

Enters line console mode.

Boston(config-line)#logging synchronous

Commands will not be interrupted by unsolicited messages.

Boston(config-line)#password class

Sets the password to class.

Boston(config-line)#login

Enables password checking at login.

Boston(config-line)#line vty 0 4

Moves to virtual Telnet lines 0 through 4.

Boston(config-line)#password class

Sets the password to class.

Boston(config-line)#login

Enables password checking at login.

Boston(config-line)#line aux 0

Moves to line auxiliary mode.

Boston(config-line)#password class

Sets the password to class.

Boston(config-line)#login

Enables password checking at login.

Boston(config-line)#exit

Moves back to global configuration mode.

Boston(config)#no service password-encryption

Turns off password encryption.

Boston(config)#interface fastethernet 0/0

Moves to interface Fast Ethernet 0/0 configuration mode.

Boston(config-if)#description Engineering LAN

Sets locally significant description of the interface.

Boston(config-if)#ip address 172.16.10.1 255.255.255.0

Assigns an IP address and subnet mask to the interface.

Boston(config-if)#no shutdown

Turns on the interface.

Boston(config-if)#interface serial 0/0/0

Moves directly to interface serial 0/0/0 configuration mode.

Boston(config-if)#description Link to Buffalo Router

Sets locally significant description of the interface.

Boston(config-if)#ip address 172.16.20.1 255.255.255.252

Assigns an IP address and subnet mask to the interface.

Boston(config-if)#clock rate 56000

Sets a clock rate for serial transmission. The DCE cable must be plugged into this interface.

Boston(config-if)#no shutdown

Turns on the interface.

Boston(config-if)#exit

Moves back to global configuration mode.

Boston(config)#ip host buffalo 172.16.20.2

Sets a local host name resolution to IP address 172.16.20.2.

Boston(config)#exit

Moves back to privileged mode.

Boston#copy running-config startup-config

Saves the running configuration to NVRAM.

Continue reading here: Routing

Was this article helpful?

0 0