You are on page 1of 9

‫‪Republic of Iraq‬‬ ‫جمهوريت العراق‬

‫‪Ministry of Higher Education and‬‬ ‫وزارة التعليم العالي والبحث العلمي‬


‫‪Scientific Research‬‬ ‫جامع ــتباب ــل‬
‫‪University of Babylon‬‬ ‫كلي ـ ــتجكنولوجيااملعلوماث‬
‫‪College of Information Technology‬‬ ‫قسم شبكاث املعلوماث‬
‫‪Department of Information Network‬‬ ‫التقريرالنهائي‬

‫التقريرالنهائي‬
‫للعام الدراس ي ‪ 9191-9102‬الفصل الدراس ي (الاول ‪ /‬الثاني)‬

‫جقريربعنوان‬
‫‪Describe the Use of The CDP Protocol‬‬

‫اعداد الطالب‬
‫حيدرابراهيم حسين السبيدي‬
‫املادة ‪Internetworking with Routers And Switches -:‬‬
‫املرحلت ‪ -:‬الرابعت‬

‫الدراست ‪ -:‬املسائي‬

‫باشراف الاستاذ‬
‫عالء حمود‬

‫‪Page 1 of 9‬‬
Republic of Iraq ‫جمهوريت العراق‬
Ministry of Higher Education and ‫وزارة التعليم العالي والبحث العلمي‬
Scientific Research ‫جامع ــتباب ــل‬
University of Babylon ‫كلي ـ ــتجكنولوجيااملعلوماث‬
College of Information Technology ‫قسم شبكاث املعلوماث‬
Department of Information Network ‫التقريرالنهائي‬

Abstract

Cisco Discovery Protocol (CDP) is a proprietary Data Link Layer protocol


developed by Cisco Systems in 1994 by Keith McCloghrie and Dino Farinacci. It is
used to share information about other directly connected Cisco equipment, such as
the operating system version and IP address CDP can also be used for On-Demand
Routing which is a method of including routing information in CDP announcements
so that dynamic routing protocols do not need to be used in simple networks.
Cisco devices send CDP announcements to the destination MAC address
01:00:0c:cc:cc:cc, out each connected network interfacen These
multicast frames may be received by Cisco switches and other networking devices
that support CDP into their connected network interface. This multicast destination is
also used in other Cisco protocols such as Virtual Local Area Network (VLAN)
Trunking Protocol (VTP). By default, CDP announcements are sent every 60
seconds on interfaces that support Subnetwork Access Protocol (SNAP) headers,
including Ethernet, Frame Relay and Asynchronous Transfer Mode (ATM). Each
Cisco device that supports CDP stores the information received from other devices
in a table that can be viewed using the show cdp neighbors command. This table is
also accessible via Simple Network Management Protocol (SNMP). The CDP table
information is refreshed each time an announcement is received, and the holdtime
for that entry is reinitialized. The holdtime specifies the lifetime of an entry in the
table - if no announcements are received from a device for a period in excess of the
holdtime, the device information is discarded (default 180 seconds).
The information contained in CDP announcements varies by the type of device and
the version of the operating system running on it. This information may include
the operating system version, hostname, every address (i.e. IP address) from all
protocol(s) configured on the port where CDP frame is sent, the port identifier from
which the announcement was sent, device type and
model, duplex setting, VTP domain, native VLAN, power draw (for Power over
Ethernet devices), and other device specific information. The details contained in
these announcements is easily extended due to the use of the type-length-
value (TLV) frame format. See external links for a technical definition.

Page 2 of 9
Republic of Iraq ‫جمهوريت العراق‬
Ministry of Higher Education and ‫وزارة التعليم العالي والبحث العلمي‬
Scientific Research ‫جامع ــتباب ــل‬
University of Babylon ‫كلي ـ ــتجكنولوجيااملعلوماث‬
College of Information Technology ‫قسم شبكاث املعلوماث‬
Department of Information Network ‫التقريرالنهائي‬

Introduction

you can use CDP (Cisco Discovery Protocol) to help you build network
maps and what other information it can reveal.
Most networks have multiple switches and/or routers and to make our life
easier it’s good to have a network map that shows us how everything is
connected to each other, what kind of devices we have, to what VLAN
they belong and the IP addresses that we are using. CDP is a Cisco
protocol that runs on all Cisco devices that helps us discover Cisco devices
on the network. CDP is Cisco proprietary, runs on the data-link layer and
is enabled by default.

Page 3 of 9
Republic of Iraq ‫جمهوريت العراق‬
Ministry of Higher Education and ‫وزارة التعليم العالي والبحث العلمي‬
Scientific Research ‫جامع ــتباب ــل‬
University of Babylon ‫كلي ـ ــتجكنولوجيااملعلوماث‬
College of Information Technology ‫قسم شبكاث املعلوماث‬
Department of Information Network ‫التقريرالنهائي‬

R1#show cdp neighbors

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

S - Switch, H - Host, I - IGMP, r - Repeater

Device ID Local Intrfce Holdtme Capability Platform Port ID

R2 Ser 0/0 167 R S I 3640 Ser 0/0

Use the show cdp neighbors command to see all directly connected neighbors.

Above you see that R1 is connected to R2 and you can also see the platform (3640

router) and the interfaces on both sides. Let me show you the other
routers as well:

R2#show cdp neighbors

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

S - Switch, H - Host, I - IGMP, r - Repeater

Device ID Local Intrfce Holdtme Capability Platform Port ID

R1 Ser 0/0 144 R S I 3640 Ser 0/0

R3 Fas 1/0 164 R S I 3640 Fas 1/0

Page 4 of 9
Republic of Iraq ‫جمهوريت العراق‬
Ministry of Higher Education and ‫وزارة التعليم العالي والبحث العلمي‬
Scientific Research ‫جامع ــتباب ــل‬
University of Babylon ‫كلي ـ ــتجكنولوجيااملعلوماث‬
College of Information Technology ‫قسم شبكاث املعلوماث‬
Department of Information Network ‫التقريرالنهائي‬

R3#show cdp neighbors

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

S - Switch, H - Host, I - IGMP, r - Repeater

Device ID Local Intrfce Holdtme Capability Platform Port ID

R2 Fas 1/0 135 R S I 3640 Fas 1/0

Now we have all the information we need to build a network map with the router names
and interfaces. CDP can tell us even more however

Page 5 of 9
Republic of Iraq ‫جمهوريت العراق‬
Ministry of Higher Education and ‫وزارة التعليم العالي والبحث العلمي‬
Scientific Research ‫جامع ــتباب ــل‬
University of Babylon ‫كلي ـ ــتجكنولوجيااملعلوماث‬
College of Information Technology ‫قسم شبكاث املعلوماث‬
Department of Information Network ‫التقريرالنهائي‬

How Does CDP Work?


A simple way of describing how CDP works is that each device that is running
CDP will send out announcements on each of its connected interfaces; each of
these announcements includes basic information about the device and the
interface. Devices that receive CDP announcements will process them and hold
on to them for a specified amount of time. CDP announcements are sent to a
multicast address, and because CDP is a Layer 2 protocol, none of these packets
are routed.

Configuring CDP
Typically, CDP announcements are sent every 60 seconds, but you can verify
the frequency by using the show cdp interface command.
P2R3#show cdp interface
FastEthernet0/0 is up, line protocol is up
encapsulation ARPA
Sending CDP packets every 60 seconds
Holdtime is 180 seconds

[figure 5 – show cdp interface output]

Page 6 of 9
Republic of Iraq ‫جمهوريت العراق‬
Ministry of Higher Education and ‫وزارة التعليم العالي والبحث العلمي‬
Scientific Research ‫جامع ــتباب ــل‬
University of Babylon ‫كلي ـ ــتجكنولوجيااملعلوماث‬
College of Information Technology ‫قسم شبكاث املعلوماث‬
Department of Information Network ‫التقريرالنهائي‬

You can change the frequency of announcements by using the cdp


timer seconds command from global configuration mode.

You’ll notice in figure 5 that the holdtime value is 180 seconds. This value is
the amount of time that the device will hold on to the CDP packet before
discarding it. So, if you disconnect a neighboring device, the CDP information
will still show until the holdtime has expired. You can change the holdtime
value by using the cdp holdtime seconds command from global configuration
mode.

CDP can be enabled or disabled globally on the device, or per interface. If you
want to disable CDP for a device, you should use the command no cdp
run from global configuration mode. To disable CDP per interface, use the no
cdp enable command from interface configuration mode. Figure 6 illustrates
disabling and enabling CDP globally on P2R3 and on a single interface,
FastEthernet 0/0:

P2R3(config)#no cdp run


P2R3(config)#cdp run
P2R3(config)#interface fa0/0
P2R3(config-if)#no cdp enable
P2R3(config-if)#cdp enable
[figure 6 – disable/enable CDP globally or per interface]

Page 7 of 9
Republic of Iraq ‫جمهوريت العراق‬
Ministry of Higher Education and ‫وزارة التعليم العالي والبحث العلمي‬
Scientific Research ‫جامع ــتباب ــل‬
University of Babylon ‫كلي ـ ــتجكنولوجيااملعلوماث‬
College of Information Technology ‫قسم شبكاث املعلوماث‬
Department of Information Network ‫التقريرالنهائي‬

The Cisco Discovery Protocol (CDP) is designed to help tackle such a problem.
Physically inspecting devices to document a network is often inefficient and
impractical. With CDP, you can use a few show commands to quickly view
information about directly connected devices. Depending on the type of device
and version of IOS, you can view information such as the host name, the local
and remote ports, and the device platform..

Page 8 of 9
Republic of Iraq ‫جمهوريت العراق‬
Ministry of Higher Education and ‫وزارة التعليم العالي والبحث العلمي‬
Scientific Research ‫جامع ــتباب ــل‬
University of Babylon ‫كلي ـ ــتجكنولوجيااملعلوماث‬
College of Information Technology ‫قسم شبكاث املعلوماث‬
Department of Information Network ‫التقريرالنهائي‬

References
1. (his command is supported in the Cisco IOS Release 12.2SX train.
Support in a specific 12.2SX release of this train depends on your
feature set, 2014)
2. (Official, CCNA Routing and Switching ICND2 200-105 Official,
2016)

Page 9 of 9

You might also like