Catalyst 2950 and 3550 Series
Catalyst 2950 and 3550 Series To configure VLANs on an IOS-based switch, first you need to enter the VLAN database. This mode is entered by typing the command vlan database. This command changes the prompt, as can be seen from the next example. Once in this new privileged mode, use vlan vlan# name vlan_ name. Note that you do not enter the standard configuration mode to enter this configuration: Terry_2950#vlan database Terry_2950(vlan)#vlan ? <1-1005> ISL VLAN index Terry_2950(vlan)#vlan 2 ? are Maximum number of All Route Explorer hops for this VLAN backupcrf Backup CRF mode of the VLAN bridge Bridging characteristics of the VLAN media Media type of the VLAN mtu VLAN Maximum Transmission Unit name Ascii name of the VLAN parent ID number of the Parent VLAN of FDDI or Token Ring type VLANs ring Ring number of FDDI or Token Ring type VLANs said IEEE 802.10 SAID 454 Chapter 14 VLANs, Trunks, and VTP state Operational state of the VLAN ste Maximum number of Spanning Tree Explorer hops for this VLAN stp Spanning tree characteristics of the VLAN tb-vlan1 ID number of the first translational VLAN for this VLAN (or zero if none) tb-vlan2 ID number of the second translational VLAN for this VLAN (or zero if none) <cr> Terry_2950(vlan)#vlan 2 name ? WORD The ascii name for the VLAN Terry_2950(vlan)#vlan 2 name marketing VLAN 2 added: Name: marketing Terry_2950(vlan)#vlan 3 name production VLAN 3 added: Name: production Terry_2950(vlan)#exit APPLY completed. Exiting....
Remember that a created VLAN is unused until it is mapped to a switch port or ports, and that all ports are always in VLAN 1 unless set otherwise. After you create the VLANs that you want, you use the show vlan command to see the configured VLANs. However, notice that, by default, all ports on the switch are in VLAN 1. To change that, you need to go to each interface and tell it what VLAN to be a part of: Terry_2950#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2, Fa0/3, 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 2 marketing active Scaling the Switch Block 455 3 production active 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 - - - - - 0 0 2 enet 100002 1500 - - - - - 0 0 3 enet 100003 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0 VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 1004 fdnet 101004 1500 - - - ieee - 0 0 1005 trnet 101005 1500 - - - ibm - 0 0 Remote SPAN VLANs ------------------------------------------------------------------------------ Primary Secondary Type Ports ------- --------- ----------------- ------------------------------------------
Terry_2950(config-if)#switchport ? access Set access mode characteristics of the interface host Set port host mode Set trunking mode of the interface nonegotiate Device will not engage in negotiation protocol on this interface port-security Security related command priority Set appliance 802.1p priority protected Configure an interface to be a protected port trunk Set trunking characteristics of the interface voice Voice appliance attributes 456 Chapter 14 VLANs, Trunks, and VTP Terry_2950(config-if)#switchport access ? vlan Set VLAN when interface is in access mode Terry_2950(config-if)#switchport mode access Terry_2950(config-if)#^Z Terry_2950#conf t Enter configuration commands, one per line. End with CNTL/Z. Terry_2950(config)#int fa 0/2 Terry_2950(config-if)#switchport ? access Set access mode characteristics of the interface host Set port host mode Set trunking mode of the interface nonegotiate Device will not engage in negotiation protocol on this interface port-security Security related command priority Set appliance 802.1p priority protected Configure an interface to be a protected port trunk Set trunking characteristics of the interface voice Voice appliance attributes Terry_2950(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 Terry_2950(config-if)#switchport mode access Terry_2950(config-if)#switchport access ? vlan Set VLAN when interface is in access mode Terry_2950(config-if)#switchport access vlan 2 Terry_2950(config-if)#^Z Now you need to confirm that the configuration has been accepted and the port to VLAN relationship has been established. You can use the show vlan command we used earlier, but the VLANs will also be shown in the running configuration: Terry_2950#show run 00:49:36: %SYS-5-CONFIG_I: Configured from console by consolesho run Building configuration...
Current configuration : 1512 bytes version 12.1 [output cut] interface FastEthernet0/2 switchport access vlan 2 switchport mode access no ip address Now, type show vlan to see the ports assigned to each VLAN: Terry_2950#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/3, 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 2 marketing active Fa0/2 3 production active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active [output truncated] Terry_2950#
298 times read
|