Managing Network Environment

Various CDP commands and the Telnet utility will help you to gather diagnostic information. By using CDP, you can gather hardware and protocol information about neighboring devices which is very useful information for troubleshooting. In this lesson, you will learn various CDP commands used to verify the network. Network administrator can use CDP commands to gather information about devices and their network which are directly connected to the device. The function of CDP is limited to gathering information about immediate neighbors. But other tools such as Telnet can be used to collect information about remote devices. In this lesson, you will also learn how to use Telnet to gather information about remote devices.

Gathering Information about Neighboring Device

Cisco Discovery protocol (CDP) is a network and media independent layer 2 protocol which is used to discover information about neighboring network device. As CDP operates at Data Link Later, it does not require any Network Layer protocol such as IP or IPX to transfer information.

CDP runs on all Cisco-manufactured equipment including routers, bridges, access servers and switches. Using CDP you cam view information about all Cisco devices which are directly attached to the switch or router. CDP is primarily used to gather protocol addresses of neighboring devices. It can be also used to show information about interfaces used by router.

CDP runs on all media that support sub-network .Access protocol (SNAP) including local-area network (LAN), Frame Relay and Asynchronous transfer Mode (ATM) physical media.

Each device configured for CDP sends periodic messages known as advertisements to a MAC multicast address 0100.0ccc.cccc, every 60 seconds by default. Each device sends at least one address at which it can receive SNMP (Simple Network Management Protocol) message. The advertisements also contain time-to-live or hold time information. This indicates the time length the receiving device should hold CDP information before discarding it. Each device also listens to the periodic CDP message sent by other device which helps to know about other neighboring devices. The information gathered includes type of device, software version and network layer addresses if configured. This information will be stored in the device’s RAM.

To view CDP output, use show cdp command. CDP has several keywords which help to view different types of information and different levels of details. CDP packet made up of ASCII strings represent information such as device name, protocol addressing information, port connectivity information and device operating system information.

CDP functionality is enabled by default on all the devices. To prevent other non-devices from getting information about your device, it has to be disabled at the device level. This can be done by using global configuration command no cdp run. This will disable CDP protocol on entire device. To disable CDP on particular interface, you can use no cdp enable command; which will protect the bandwidth while connecting to non-Cisco device.

Router(config-if)#no cdp enable
To re-enable CDP on an interface, use the cdp enable interface configuration command.

Displaying CDP information about neighboring device
One of the most important commands regarding CDP is the show cdp neighbors command. The output is as shown below.
Router#show cdp ?
entry Information for specific neighbor entry
interface CDP interface status and configuration
neighbors CDP neighbor entries

Router#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/0 165 S 2950 Fas 0/1
Switch Fas 0/1 165 S 2950 Fas 0/1

The output displays following information
  • Type of device that is discovered
  • Name of the device
  • Number and type of the local interface
  • Number of seconds the CDP advertisement valid for the port
  • Device type
  • Device product number
  • Port ID
The format of show cdp neighbor output may vary depending on the type of device but information displayed will be same across devices. The show cdp neighbors command can also be used on Catalyst switch to display CDP updates received on the local interface. Local interface is also referred as local port on a switch.

Displaying detailed CDP information about neighboring device

To view detailed information about neighboring device, use show cdp neighbor detail command. The information displayed by using show cdp neighbor detail command includes additional information such as IP address and IOS version about neighboring device. The output from show cdp neighbor detail command is same as that produced by using show cdp entry * command.
Router#show cdp ?
entry Information for specific neighbor entry
interface CDP interface status and configuration
neighbors CDP neighbor entries
The show cdp entry * command displays information about specific neighbor when the neighbor’s name is added in the command string. The name entered is case sensitive and it can be obtained by using show cdp command.
Router#show cdp entry *

Device ID: Switch
Entry address(es):
Platform: cisco 2950, Capabilities: Switch
Interface: FastEthernet0/0, Port ID (outgoing port): FastEthernet0/1
Holdtime: 123

Version :
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4,
RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

advertisement version: 2
Duplex: full
---------------------------

Device ID: Switch
Entry address(es):
Platform: cisco 2950, Capabilities: Switch
Interface: FastEthernet0/1, Port ID (outgoing port): FastEthernet0/1
Holdtime: 123

Version :
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4,
RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

advertisement version: 2
Duplex: full
The output from the show cdp entry * command displays the following information
  • The IP address of the neighboring device.
  • Information on Layer 3 protocol.
  • Device’s platform information.
  • The capabilities of the device.
  • The type of local interface and ID of outgoing remote port.
  • Hold time value in seconds.
  • The type of IOS and its version.
Note: On router either show cdp neighbors detail or show cdp entry * command can be used. But on 1900 switches, only show cdp neighbors detail command is available.

Displaying Configuration Information and Interface Status for a Device
The show cdp interface command is used to display interface status and configuration information about the local device. It displays information about the interfaces on which CDP is enabled.

The show cdp interface command displays the following status fields
  • Administrative and protocol condition of the interface.
  • Encapsulation type for the interface.
  • Frequency at which CDP packets are sent
  • Hold time in seconds.


0 comments:

Post a Comment