If you've ever looked at a packet capture from a Cisco Catalyst switch with a default configuration, you know they produce a good amount of ambient noise out of the box. CDP, STP, DTP, keepalives - these are all turned on by default and, combined, generate a significant amount of traffic. This isn't a bad thing; most of these protocols are enabled for good reason (DTP being the evil, evil exception). But it does give rise to an interesting question: can we make a Catalyst switch absolutely silent and transparent to connected devices?
Turning off CDP
We'll start out with an easy one: globally disabling Cisco Discovery Protocol (CDP).
S1(config)# no cdp run
This prevents CDP packets from being broadcast out all interfaces every 60 seconds.
Turning off DTP
Cisco's Dynamic Trunking Protocol (DTP) allows switches to automatically form trunks among themselves. It is, for some reason, enabled on all switch ports by default. To disable it, we configure all ports for static access mode and issue the command
switchport nonegotiate to completely disable DTP. (Incidentally, this is also considered a best practice for production devices.)
S1(config)# interface range f0/1 -24 S1(config-if-range)# switchport mode access S1(config-if-range)# switchport nonegotiate
Turning off STP -- Wait, What?!
For the purpose of our experiment only, we need to disable spanning tree. Do not do this on a production device. STP is your friend.
S1(config)# no spanning-tree vlan 1
Turning off Ethernet Keepalives
While sniffing a link on a Catalyst switch, you may have noticed "LOOP" packets being sent from the switch to itself every ten seconds. These are Ethernet keepalives, and they can be disabled under interface configuration.
S1(config)# interface range f0/1 -24 S1(config-if-range)# no keepalive
Layer 2 Protocol Tunneling
At this point, our switch should be completely silent. But it's not quite transparent, yet. Going one step further, we can enable layer 2 protocol tunneling (not to be confused with Layer 2 Tunneling Protocol) to enable the pass-through transport of L2 protocols which would normally terminate at the switch.
S1(config)# interface range f0/1 -24 S1(config-if-range)# l2protocol-tunnel S1(config-if-range)# l2protocol-tunnel point-to-point
Our interface configurations should all now look like this:
S1# show running-config interface f0/1 Building configuration... Current configuration : 291 bytes ! interface FastEthernet0/1 switchport mode access switchport nonegotiate no keepalive l2protocol-tunnel cdp l2protocol-tunnel stp l2protocol-tunnel vtp l2protocol-tunnel point-to-point pagp l2protocol-tunnel point-to-point lacp l2protocol-tunnel point-to-point udld end
...and now we have a completely silent, transparent switch! In effect, a switching hub.
We can verify that CDP is passed through the switch so that all other connected switches appear to be reachable via a single interface:
S2# 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 S3 Fas 0/13 120 S I WS-C3550- Fas 0/13 S4 Fas 0/13 120 S I WS-C3550- Fas 0/13