标题: CatOS下定义VLAN [打印本页] 作者: msw_smith 时间: 2008-09-16 16:40 标题: CatOS下定义VLAN Step 1 Before you can create a VLAN, the switch must be in VTP server mode or VTP transparent mode. If the switch is a VTP server, you must define a VTP domain name before you can add any VLANs. This has to be defined regardless of the number of switches in the network (one or many), or whether or not you will be using VTP to propagate VLANs to other switches in the network. For details on VTP, please refer to the Understanding and Configuring VLAN Trunk Protocol (VTP) document.
The default VTP configuration on the switch is as follows:
CatosSwitch> (enable) show vtp domain
Domain Name Domain Index VTP Version Local Mode Password
If you have the output of a show vtp domain command from your Cisco device, you can use Output Interpreter to display potential issues and fixes. To use Output Interpreter , you must be a registered user, be logged in, and have JavaScript enabled.
Step 3 Once the VTP domain has been set and verified, you can begin to create VLANs on the switch. By default, there is only a single VLAN for all ports, and this VLAN is called the default. VLAN1 cannot be renamed or deleted.
You can use the show vlan command to display the parameters for all configured VLANs in the administrative domain, as shown below:
To remove ports from a VLAN, use the set vlan ... command and place the ports in a different VLAN. This is essentially what you are doing when you assign a port to any VLAN, because the ports initially belonged to VLAN 1.
To delete the VLAN, use the clear vlan command, but the ports will remain a part of that VLAN and be deactivated because they no longer belong to any VLAN. The switch will display a warning and give you the opportunity to cancel the current request.
Note: Ports 3/13-3/15 are not displayed in the above show vlan command, as they are deactivated by the removal of VLAN 3. Unless you add them back in any other VLAN, they will not be displayed.