Top Banner
CISCO Discovery Protocol (CDP) By Alexander Alperovich Alexandra Davidov Boris Kostenko
26

CISCO Discovery Protocol (CDP)

Jan 03, 2016

Download

Documents

slade-mcbride

CISCO Discovery Protocol (CDP). ByAlexander Alperovich Alexandra Davidov Boris Kostenko. What Is CDP?. Cisco Discovery Protocol Runs on all Cisco-manufactured equipment including routers, bridges, access servers, and switches Embedded virtually in every Cisco platform - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CISCO Discovery Protocol (CDP)

CISCO Discovery Protocol (CDP)By Alexander Alperovich

Alexandra DavidovBoris Kostenko

Page 2: CISCO Discovery Protocol (CDP)

What Is CDP?

Cisco Discovery ProtocolRuns on all Cisco-manufactured equipment including routers, bridges, access servers, and switchesEmbedded virtually in every Cisco platformMedia and network protocol independentProvides a mechanism for two neighboring devices to learn about each otherDetects native VLAN and port duplex mismatches

Page 3: CISCO Discovery Protocol (CDP)

How it works

router1

switch 1 switch 2

…networks…

LANs LANs

Neighbors:-

Neighbors:-

Neighbors:-

Two switches and router don’t know about each other – they are not connected

Page 4: CISCO Discovery Protocol (CDP)

How it works (cont.)

router1

switch 1 switch 2

…networks…

LANs LANs

Neighbors:-

Neighbors:-

Neighbors:-

After connection devicesreport about themselves

CDP packet fromswitchrouter

Page 5: CISCO Discovery Protocol (CDP)

How it works (cont.)

router1

switch 1 switch 2

…networks…

LANs LANs

Neighbors:router1

Neighbors:router1

Neighbors:switch 1switch 2

Now router knows about 2 its neighbors and each switch knows about neighbor-router

Note, switch2 doesn’t know about switch1 andswitch1 about switch2 – they are not neighbors!CISCO devices don’t allow the CDP packets to pass by.

Page 6: CISCO Discovery Protocol (CDP)

How it works (cont.) CDP runs on all media that support Sub Network Access Protocol (SNAP), including LAN, Frame Relay and Asynchronous Transfer Mode (ATM). CDP runs over the Data Link layer only. Cisco devices never forward CDP packets When new CDP information is received, Cisco devices discard old information.

Page 7: CISCO Discovery Protocol (CDP)

How it works (cont.)Each device configured for CDP periodically sends messages to a multicast address 0100.0CCC.CCCCEach device advertises at least one address at which it can receive SNMP messagesEach device reads from the LAN CDP messages sent by others in order to learn about neighboring devices and determine when their interfaces to the media go up or down

Page 8: CISCO Discovery Protocol (CDP)

Each CDP packet containsheadertype/length/value triplets

Version(1 byte)

Time-to-live

(1 byte)

Checksum(2 bytes)

Type(2 bytes)

Length(2 bytes)

Value(variable

)

Header Triplet

Version – version of CDP packet (can be 0x01 or 0x02)

Time-to-live – the amount of time, in seconds, that a receiver should retain the information contained in this packetChecksum – the standard IP checksum

Page 9: CISCO Discovery Protocol (CDP)

Each CDP packet containsheadertype/length/value triplets

Version(1 byte)

Time-to-live

(1 byte)

Checksum(2 bytes)

Type(2 bytes)

Length(2 bytes)

Value(variable

)

Header Triplet

Type – the type of information of the triplet.

Length – the length of current triplet (includes type and length fields)

Value – corresponding information

Page 10: CISCO Discovery Protocol (CDP)

Possible triple typesTriples can contain information of some possible types:

Device ID Address Port ID Capabilities Version Platform IP Network Prefix VTP Management Domain Native VLAN Full/half Duplex

For each type “type” and “value” fields contain corresponding information

Page 11: CISCO Discovery Protocol (CDP)

Why do we need CDP?

Use of SNMP with the CDP Management Information Base (MIB) allows network management applications to learn the device type and the SNMP agent address of neighboring devicesEnables applications to send SNMP queries to neighboring devicesTwo systems that support different network-layer protocols can learn about each other (protocol works over layer-2)

Page 12: CISCO Discovery Protocol (CDP)

Application features and abilities

Page 13: CISCO Discovery Protocol (CDP)

Main application abilities

Connect and disconnect LAN in DLC level Run CDP protocol: Sending CDP packets containing the data of

the computer that runs the application Receiving CDP packets and presenting

discovered neighbor devices on screen

Simulate running CDP of different devices.Dump the current neighbor devices status to the disc

Page 14: CISCO Discovery Protocol (CDP)

More features

Creating new simulation devices: New devices for simulation can be created

and activated immediately at runtime Created simulation devices can be saved to

disc in XML format, for future use and edit

Change settings at runtime:TTL of sent packets and time interval between packets can be changed any time during runtime

Page 15: CISCO Discovery Protocol (CDP)

CDP Application description and the User interface

Page 16: CISCO Discovery Protocol (CDP)

CDP Application Main Dialog Window

Page 17: CISCO Discovery Protocol (CDP)

Working modes

The application has three working modes: Transmission mode: CDP packets are sent and read from the LANFrozen mode: no CDP packets sent, no packets readRead only mode: CDP packets read, no packets are sent

Page 18: CISCO Discovery Protocol (CDP)

Simulation devices

Devices for simulation are saved in XML format and read by the application directly from the diskSimulated device can be changed anytime using “choose simulated device” option

Page 19: CISCO Discovery Protocol (CDP)

Creating new simulation device

New devices for the simulation can be created any time using the “Creating new device” dialogThe dialog is a form of CDP packet properties which represent the desirable deviceAfter the obligatory fields are filled (those are the fields marked by *), created device can be saved as XML and immediately loaded for simulation

Important: “Device name” at the form is the name that will be presented to the screen, NOT sent in CDP packet, while “Device ID” is the ID sent in CDP packet

“Device name” is also the default of the created XML file

Page 20: CISCO Discovery Protocol (CDP)

Creating new device dialog

Page 21: CISCO Discovery Protocol (CDP)

Settings

Following sending settings can be changed directly using settings dialog:

Sending interval: time interval CDP packets are sent with

TTL of sent packets: value of TTL field in sent CDP packets

Page 22: CISCO Discovery Protocol (CDP)

Representation of neighboring devices

Neighboring devices (devices from which CDP packets were received) are represented in a form of a treeRepresented devices are divided to two groups:

Active devices – a CDP packet was received from the device and TTL time hasn’t passed yet

Time out devices – TTL time has passed since last CDP packet was received from the device, but no “expiring packet” (packet with TTL=0) was received from the device

Expired devices are not represented at the application dialog, but still appear at the status file, as explained bellow

User can choose whether the local device will be shown (this option is relevant only in transmission mode)

Page 23: CISCO Discovery Protocol (CDP)

Example:

There are three active devicesProperties of “31000” device are open to view

There are no devices in TimeOutReadOnly mode is chosen

Page 24: CISCO Discovery Protocol (CDP)

Another example:

“20cmFrying” device is Active“31000” is in TimeOutUser had chosen not to see local devices

Transmission mode is chosenChosen device is “this computer”

Page 25: CISCO Discovery Protocol (CDP)

Saving statusCurrent status can be saved any time as a text file, using “Save status button”, saved status includes: Active devices: a CDP packet was received

from the device and TTL time hasn’t passed yet

Time out devices: TTL time has passed since last CDP packet was received from the device, but no “expiring packet” (packet with TTL=0) was received from the device

Expired devices: devices that sent a packet with TTL=0

Page 26: CISCO Discovery Protocol (CDP)

The end