Dynamic Truncking Protocol (DTP) and VLAN Trunking Protocol (VTP)
DTP - Dynamic Trunking Protocol
Dynamic Trunking Protocol (DTP) is a Cisco proprietary protocol used to negotiate trunking between two switches. Here are some common DTP-related commands and their descriptions:
1. Enable DTP on an Interface:
- Description: To enable DTP on an interface, allowing it to negotiate trunking with its neighboring switch, use the following command:
bashSwitch(config-if)# switchport mode dynamic {auto | desirable}- Description:
dynamic auto: The interface will actively listen for DTP negotiation but won't initiate it.dynamic desirable: The interface will actively seek DTP negotiation and will initiate it if the neighboring interface supports it.
2. Disable DTP on an Interface:
- Description: If you want to explicitly disable DTP on an interface and ensure it remains in a specific mode (access or trunk), use the following command:
bashSwitch(config-if)# switchport nonegotiate- Description: This command disables DTP on the interface, preventing it from engaging in any trunk negotiation.
3. Verify DTP Status:
- Description: To check the DTP status and negotiation mode of an interface, use the following command:
bashSwitch# show interfaces interface_name switchport- Description: This command provides information about the interface's DTP status, negotiation mode, and VLAN information.
4. Set Default DTP Behavior:
- Description: You can set the default DTP behavior for an entire switch. This means that any new interface will inherit the specified DTP mode.
bashSwitch(config)# interface range type range Switch(config-if-range)# switchport mode dynamic {auto | desirable}- Description: This sets the default DTP mode for a range of interfaces. Any new interface created within this range will use the specified DTP mode.
5. Disable DTP Globally:
- Description: To globally disable DTP on the entire switch and ensure that none of the interfaces engage in DTP negotiation, use the following command:
bashSwitch(config)# no dtp run- Description: This command globally disables DTP on the switch, making all interfaces act as access ports by default.
Please note that DTP is a Cisco proprietary protocol, and its usage is typically recommended in environments where you have control over both ends of the link.
===========================================================
VLAN Trunking Protocol (VTP) is a Cisco proprietary protocol used to manage VLAN configurations across a network of Cisco switches. Here are some common VTP-related commands and their descriptions:
1. Enable VTP:
- Description: To enable VTP on a Cisco switch, use the following command:
bashSwitch(config)# vtp mode {server | client | transparent}
- Description:
server: Configures the switch as a VTP server, allowing you to create, modify, and delete VLANs.client: Configures the switch as a VTP client, which receives and updates VLAN information from VTP servers but cannot make changes.transparent: Configures the switch as a VTP transparent mode, which forwards VTP advertisements but does not participate in VTP updates.
2. Set VTP Domain:
- Description: Define the VTP domain name, which must match on all switches within the same VTP domain:
bashSwitch(config)# vtp domain domain_name
3. Configure VTP Password (Optional):
- Description: If you want to secure your VTP updates with a password, use the following command:
bashSwitch(config)# vtp password password
4. Assign VTP Pruning (Optional):
- Description: To enable VTP pruning, which helps restrict the flooding of VLAN information over trunk links, use the following command:
bashSwitch(config)# vtp pruning
5. Verify VTP Configuration:
- Description: To check the VTP configuration status, use the following command:
bashSwitch# show vtp status
- Description: This command displays the current VTP mode, domain name, revision number, and other relevant information.
6. View VTP VLAN Information:
- Description: To view the VLAN information distributed by VTP, use the following command:
bashSwitch# show vlan
- Description: This command displays a list of VLANs along with their status and associated ports.
7. Reset VTP Configuration (Caution):
- Description: If you want to reset the VTP configuration on a switch (e.g., to clear the VLAN database), use the following command:
bashSwitch(config)# vtp reset
- Description: Be extremely cautious with this command, as it can result in the loss of VLAN configurations.
These are some common VTP-related commands for configuring and managing VLANs across Cisco switches
Comments
Post a Comment