Cisco private protocol CDP

Source: Internet
Author: User

Cisco router CDP protocol,
 
Note: cdp is rarely used, and the private protocol for Cisco devices is used. Therefore, you can understand it. But you must know that you may have used this thing for a day. Since Cisco has developed this protocol, it cannot be said that it is useless.
 
CDP is a Cisco proprietary protocol that enables Cisco network devices to discover adjacent, directly connected other Cisco devices. CDP is a data layer protocol. Therefore, Cisco devices that use different network layer protocols can also obtain information from each other. CDP is enabled by default. Below is a small experiment:

Because the interface of the Cisco router device is disabled by default, we open the router interface:
 
Router # configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router (config) # hostname
Router (config) # hostname R1
R1 (config) # int f0/0
R1 (config-if) # no sh // This is an abbreviated command. Open the interface, no shutdown ~ Shutdown ~
 
% LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
 
% LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
 
R1 (config-if) # exit // return to the upper-level, exit port, or return the privileged mode from the configuration mode, return the privileged mode to the user mode, and exit the router from the user mode,
R1 (config) # int s0/3/0
R1 (config-if) # no sh
 
% LINK-5-CHANGED: Interface Serial0/3/0, changed state to down
R1 (config-if) # clock rate 64000 // configure the WAN port clock. We can use 64000, and the interface clock must be the same for communication.
 
Then, enable the interfaces connected to r2. The switch interface is enabled by default, so you do not need to manually enable it. Next we will see that all the routers find their neighbors.

View CDP Configuration:
R1> en
R1 # show cdp // view CDP Configuration
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled // CDP is enabled by default. Every 60 s, the neighbor who sends CDP messages from interfaces and sends CDP messages will save 180 s for him, if no CDP message is sent from a neighbor over S, the neighbor is lost.
R1 # show cdp interface // view the interfaces running CDP
Vlan1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/0 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/3/0 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
Serial0/3/1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
The above shows the interface that the local machine discovers to run CDP.
 
View CDP neighbors:
R1 # 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 151 S 2960 Fas 0/1
R2 Ser 0/3/0 173 R C2800 Ser 0/3/0
R1 #
The preceding information indicates that router R1 has two CDP neighbors: R2 and S1. "Device ID" indicates the Host Name of the neighbor, and "Local Intrfce" indicates that the Local host is connected to the neighbor through this interface. Note that this refers to the Local host. "Holdtme" indicates the time when the neighboring CDP message is received. It is counted down. "Capability" indicates the device (S switch, R router) of the neighbor ). "Platform" indicates the hardware model of the neighbor device. "Port ID" indicates the Port of the neighbor that the local machine connects to when it connects to the neighbor.

R1 # show cdp entry R2
 
Device ID: R2
Entry address (es ):
Platform: cisco C2800, Capabilities: Router
Interface: Serial0/3/0, Port ID (outgoing port): Serial0/3/0
Holdtime: 166
 
Version:
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4 (15) T1, release software (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 06:21 by pt_rel_team
 
Advertisement version: 2
Duplex: full
---------------------------
 
R1 #
The preceding figure shows the details of the neighbor R2. You can even view the ISO version of the neighbor.
 
R1 # clear cdp table // clear cdp neighbors.
 
Next, let's turn on and off the cdp protocol and adjust the cdp protocol parameters:
R1 #
R1 # configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1 (config) # int f0/0
R1 (config-if) # no cdp enable
R1 (config-if )#
The cdp protocol is disabled on interface f0/0 and does not affect other interfaces.
 
R1 (config-if) # exit
R1 (config) # no cdp run // disable cdp protocol on the entire Device
R1 (config) # cdp run // enable cdp protocol on the entire Device

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.