Spanning Tree – Understanding STP, CDP, and DTP

cdppacket-tracerspanning tree

I have made the following simple network model on packet-tracer consisting of two laptops and a switch. I don't do any configurations on laptops or switches, the only thing I do is connecting them with straight-through cables.

enter image description here

On "simulation" mode, I can see that the switch is continuously sending mostly STP and sometimes CDP and DTP packet to the laptops. To understand how STP protocol works, I studied this. But I still have these questions in mind:

  • What do "red crosses" mean shown in the above packet-tracer screen-shot?
  • How are STP, CDP and DTP protocols related to each other?

Best Answer

When connecting a PC to a Cisco switch, it may sometimes take 30 seconds or more before the PC can communicate on the network. When you're waiting for something to work, 30 seconds can seem like an eternity. Let's look at how you can speed up the switch port initialization process.

Understand the phases of switch port initialization

When you connect a device to an enabled switch port, the switch port goes through four phases by default. Let's take a closer look.

Spanning Tree Protocol (STP) initialization

STP is the IEEE 802.1d protocol, and it prevents loops in a LAN. Testing this switch port is necessary; disabling STP can create a loop on a LAN. If a hub, switch, or router connected to this port, STP would be very important. On the other hand, if a PC, printer, server, or laptop connected to this port (and remains connected ), the STP initialization process isn't necessary.

During the STP initialization phase, the port goes through the five phases of STP: blocking, listening, learning, forwarding, and disabled. This process takes about 15 seconds. However, if you know that a client will remain connected to this port, you can disable the process.

Testing for Ether Channel configuration

The next process the switch port goes through is testing for Ether Channel, which is the bonding together of switch ports to create larger aggregate Ethernet connections. Ether Channel also provides redundancy if one of the channels goes down. This process, which uses the Port Aggregation Protocol (PAgP), takes about 15 seconds.

Testing for trunk configuration

Next, the switch tests to see if the port is a trunk port. Trunking delivers data for multiple VLANs across a single switch port. While testing for a trunk port doesn't take that long, you can disable it to save a few more seconds.

Auto-negotiation of switch port speed and duplex

Finally, the switch port goes through auto-negotiation of the speed and duplex. For example, a switch port may support 1000-Mb (1Gb) Full Duplex, but a client PC may only support 100-Mb Full Duplex. The switch and the client work this out to negotiate the fastest speed that both can support.

CDP is primarily used to obtain protocol addresses of neighboring devices and discover the platform of those devices. CDP can also be used to display information about the interfaces your router uses. CDP is media- and protocol-independent, and runs on all Cisco-manufactured equipment including routers, bridges, access servers, and switches. A few other manufacturers like HP and Juniper support CDP.

If you want to limit the information sent to your laptops you could set the switch to run spanning-tree portfast, which will forward packets before asking who the neighbor is.

Related Topic