交换机专题2( 三 )


3524XL#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/4, Fa0/5,
!-- Note that Fa0/2 is added back,
to the default vlan
Fa0/6, Fa0/7, Fa0/8, Fa0/9,
Fa0/10, Fa0/11, Fa0/12, Fa0/13,
Fa0/14, Fa0/15, Fa0/16, Fa0/17,
Fa0/18, Fa0/19, Fa0/20, Fa0/21,
Fa0/22, Fa0/23, Fa0/24, Gi0/1,
Gi0/2
2 cisco_vlan_2 active Fa0/3
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 IBM - 0 0
1005 trnet 101005 1500 - - 1 IBM - 0 0
3524XL#
To delete the VLAN, use no vlancommand from the vlan database mode. Interfaces that were in that VLAN, will remain a part of that VLAN and be deactivated since they no longer belong to any VLAN.
For example, if you want to delete cisco_vlan_2 from the switch, use the following set of commands in the privileged mode:
3524XL#vlan database!-- Entering the vlan database mode
3524XL(vlan)#no vlan 2!-- Removing the VLAN from the database
Deleting VLAN 2...
3524XL(vlan)#exit
APPLY completed.
Exiting....
3524XL#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/4, Fa0/5,
Fa0/6, Fa0/7, Fa0/8, Fa0/9,
Fa0/10, Fa0/11, Fa0/12, Fa0/13,
Fa0/14, Fa0/15, Fa0/16, Fa0/17,
Fa0/18, Fa0/19, Fa0/20, Fa0/21,
Fa0/22, Fa0/23, Fa0/24, Gi0/1,
Gi0/2
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
(Output Suppressed...)
Notice that port Fa0/3 is not displayed in the above show vlan command, as it is deactivated by the removal of VLAN 2. Unless you add it back in any other VLAN, it will not be displayed noruseable.
3524XL#show interfaces fastEthernet 0/3
FastEthernet0/3 is down, line protocol is down
(Output Suppressed...)
Configuring Multi-VLAN Port on Catalyst 2900 XL/35
Step 1: In the lab, to show how the multi-VLAN port is configured, we have created three VLANs on a Catalyst 3512 XL switch, and one port of the switch is connected to an external router. The port connected to the router will be configured as a multi-VLAN port.
6-3512xl#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/3, Fa0/6, Fa0/7,
Fa0/8, Fa0/9, Fa0/10, Fa0/11,
Fa0/12, Gi0/1, Gi0/2
2 VLAN0002 active Fa0/2, Fa0/4
3 VLAN0003 active Fa0/5
4 VLAN0004 active
5 VLAN0005 active
6 VLAN0006 active
Here, port Fa0/1 is connected to external router. For more information on learning how to create VLANs and assigning ports to VLANs, refer to the Configuring the VLAN on Catalyst 2900/3500 XL, 2950, and 3550 Series Switches section of this document.
Step 2: Configure the Fa0/1 port in multi-VLAN mode, and add assigned VLANs to the multi-VLAN port.
6-3512xl#configure t
Enter configuration commands, one per line. End with CNTL/Z.
6-3512xl(config)#int fa0/1
6-3512xl(config-if)#switchport mode multi
!
-- The port Fa0/1 mode is changed to multi.
6-3512xl(config-if)#switchport multi vlan ?
LINE VLAN IDs of VLANs to be used in multi-VLAN mode
add add VLANs to the current list

推荐阅读