Читать книгу CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies - Ben Piper, David Higby Clinton - Страница 60

Active and Allowed VLANs

Оглавление

In order for two switches to participate in a Spanning Tree instance for a VLAN, they must each have the VLAN configured and the VLAN must be allowed on the trunk. For example, to have a Spanning Tree instance for VLAN 100 between SW1 and SW2, both need VLAN 100 configured:

SW1#conf t Enter configuration commands, one per line. End with CNTL/Z. SW1(config)#vlan 100 SW1(config-vlan)#no shut %VLAN 100 is not shutdown. SW1(config-vlan)#end SW1#show vlan id 100 VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 100 VLAN0100 active Gi0/0, Gi0/1, Gi1/0, Gi1/1 Gi2/0, Gi2/1

VLAN 100 is active on the switch, meaning it's not shut down. Notice that it's active on six ports, all of which are terminating 802.1Q trunks. Using Gi0/0 as an example, we can see that VLAN 100 is allowed and active on the trunk:

SW1#show interfaces gi0/0 trunk Port Mode Encapsulation Status Native vlan Gi0/0 on 802.1q trunking 1 Port Vlans allowed on trunk Gi0/0 1-4094 Port Vlans allowed and active in management domain Gi0/0 1-10,100 Port Vlans in spanning tree forwarding state and not pruned Gi0/0 1-10,100

A VLAN must be configured on the switch before it can be allowed or active on a trunk. All VLANs are allowed on an 802.1Q trunk by default, but it is possible to remove or prune a VLAN, like so:

SW1(config)#int gi0/0 SW1(config-if)#switchport trunk allowed vlan remove 100 SW1(config-if)#do show interfaces gi0/0 trunk Port Mode Encapsulation Status Native vlan Gi0/0 on 802.1q trunking 1 Port Vlans allowed on trunk Gi0/0 1-99,101-4094 Port Vlans allowed and active in management domain Gi0/0 1-10 Port Vlans in spanning tree forwarding state and not pruned Gi0/0 1-10

To allow a VLAN on a trunk, replace remove in the preceding command with add:

SW1(config-if)#switchport trunk allowed vlan add 100

Be careful with this command. If you leave out add, then the trunk will allow only VLAN 100 and prune all other VLANs.

CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies

Подняться наверх