Cisco Discovery Protocol CDP

This chapter provides information and commands concerning the following topic: • Cisco Discovery Protocol (CDP)

Cisco Discovery Protocol

Router#show cdp

Displays global CDP information (such as timers)

Router#show cdp neighbors

Displays information about neighbors

Router#show cdp neighbors detail

Displays more detail about the neighbor device

Router#show cdp entry word

Displays information about the device named word

Router#show cdp entry *

Displays information about all devices

Router#show cdp interface

Displays information about interfaces that have CDP running

Router#show cdp interface x

Displays information about specific interface x running CDP

Router#show cdp traffic

Displays traffic information—packets in/out/version

Router(config)#cdp holdtime x

Changes the length of time to keep CDP packets

Router(config)#cdp timer x

Changes how often CDP updates are sent

Router(config)#cdp run

Enables CDP globally (on by default)

Router(config)#no cdp run

Turns off CDP globally

Router(config-if)#cdp enable

Enables CDP on a specific interface

Router(config-if)#no cdp enable

Turns off CDP on a specific interface

Router#clear cdp counters

Resets traffic counters to 0

Router#clear cdp table

Deletes the CDP table

Router#debug cdp adjacency

Monitors CDP neighbor information

Router#debug cdp events

Monitors all CDP events

Router#debug cdp ip

Monitors CDP events specifically for IP

Router#debug cdp packets

Monitors CDP packet-related information

CAUTION: Although CDP is necessary for some management applications, CDP should still be disabled in some instances.

Disable CDP globally if

• The device is located in an insecure environment. Use the command no cdp run to disable CDP globally:

RouterOrSwitch(config)#no cdp run Disable CDP on any interface if

• Management is not being performed.

• The switch interface is a nontrunk interface.

• The interface is connected to a nontrusted network.

Use the interface configuration command no cdp enable to disable CDP on a specific interface:

RouterOrSwitch(config)#interface fastethernet 0/1

RouterOrSwitch(config-if)#no cdp enable

This chapter provides information and commands concerning the following topics:

• Using Telnet to remotely connect to other devices

• Configuring the Secure Shell Protocol (SSH)

Using Telnet to Remotely Connect to Other Devices

The following five commands all achieve the same result: the attempt to connect remotely to the router named Paris at IP address 172.16.20.1.

Denver>telnet paris

Enter if ip host command was used previously to create a mapping of an IP address to the word paris.

Denver>telnet 172.16.20.1

Denver>paris

Enter if ip host command is using default port #.

Denver>connect paris

Denver>172.16.20.1

Any of the preceding commands lead to the following configuration sequence:

Paris>

As long as vty password is set. See the Caution following this table.

Paris>exit

Terminates the Telnet session and returns you to the Denver prompt.

Denver>

Paris>logout

Terminates the Telnet session and returns you to the Denver prompt.

Denver>

Paris> M-kShift)-6. release, then press ®

Suspends the Telnet session but does not terminate it, and returns you to the Denver prompt.

Denver>

Denver>(^Enter)

Resumes the connection to Paris.

Paris>

Denver>resume

Resumes the connection to Paris.

Paris>

Denver>disconnect paris

Terminates the session to Paris.

Denver>

Denver#show sessions

Displays connections you opened to other sites.

Denver#show users

Displays who is connected remotely to you.

Denver#clear line x

Disconnects the remote user connected to you on line x.

The line number is listed in the output gained from the show users command.

Denver(config)#line vty 0 4

Moves to line configuration mode for vty lines 0-4.

Denver(config-line) session-limit x

Limits the number of simultaneous sessions per vty line to x number.

CAUTION: The following configuration creates a big security hole. Never use it in a live production environment. Use it in the lab only!

Denver(config)#line vty 0 4

Moves you to line configuration mode for vty lines 0-4.

Denver(config-line)#no password

The remote user is not challenged when Telnetting to this device.

Denver(config-line)#no login

The remote user moves straight to user mode.

NOTE: A device must have two passwords for a remote user to be able to make changes to your configuration:

Line vty password (or have it explicitly turned off; see the preceding Caution)

• Enable or enable secret password

Without the enable or enable secret password, a remote user will only be able to get to user mode, not to privileged mode. This is extra security.

Configuring the Secure Shell Protocol (SSH)

CAUTION: SSH Version 1 implementations have known security issues. It is recommended to use SSH Version 2 whenever possible.

NOTE: To work, SSH requires a local username database, a local IP domain, and an RSA key to be generated.

The Cisco implementation of SSH requires Cisco IOS Software to support Rivest-Shamir-Adleman (RSA) authentication and minimum Data Encryption Standard (DES) encryption—a cryptographic software image.

Router(config)#username Roland password tower

Creates a locally significant username/ password combination. These are the credentials needed to be entered when connecting to the router with SSH client software.

Router(config)#ip domain-name test.lab

Creates a host domain for the router.

Router(config)#crypto key generate rsa

Enables the SSH server for local and remote authentication on the router and generates an RSA key pair.

This page intentionally left blank

Continue reading here: The ping and traceroute Commands

Was this article helpful?

0 0