Les différents modes de l’interface :
SW1(config-if)#switchport mode ? access Set trunking mode to ACCESS unconditionally dynamic Set trunking mode to dynamically negotiate access or trunk mode trunk Set trunking mode to TRUNK unconditionally
DTP – Dynamic Trunk Protocol
« dynamic desirable »
- permet de négocier avec un autre switch et détermine le bon mode
- envoi des paquets de négociation DTP
« dynamic auto »
- reçoit et rebond aux paquets DTP
3 modes d’encapsulation :
SW2(config-if)#switchport trunk encapsulation ? dot1q Interface uses only 802.1q trunking encapsulation when trunking isl Interface uses only ISL trunking encapsulation when trunking negotiate Device will negotiate trunking encapsulation with peer on interface
Vérifications
SW1#show interfaces fa0/1 switchport Name: Fa0/1 Switchport: Enabled Administrative Mode: dynamic auto Operational Mode: static access Administrative Trunking Encapsulation: negotiate Operational Trunking Encapsulation: native Negotiation of Trunking: On SW1#show interfaces trunk Port Mode Encapsulation Status Native vlan Fa0/1 desirable n-isl trunking 1
Désactivation du DTP
Le « Dynamic Trunk Protocol » peut être désactivé avec la commande « switchport nonegotiate »,
mais uniquement après la commande « switchport mode trunk »
SW1(config)#int fa0/1 SW1(config-if)#switchport trunk encapsulation dot1q SW1(config-if)#switchport mode trunk SW1(config-if)#switchport nonegotiate
Vlans autorisés
- switch trunk allowed vlan
- switch trunk allowed vlan add
- switch trunk allowed vlan remove
- switch trunk allowed vlan none
- switch trunk allowed vlan exept
- switch trunk allowed vlan all
SW1(config)#int fastEthernet 0/1 SW1(config-if)#switchport trunk allowed vlan 101 SW1(config-if)#switchport trunk allowed vlan add 9-11 SW1#show interfaces trunk Port Vlans allowed on trunk Fa0/1 9-11,101