Configuring a Range of Switch Interfaces

Configuring a range of interfaces or ports on your switch prevents you from having to configure each of these interfaces individually. Putting your switch into Interface Range Configuration mode allows you to configure multiple ports at the same time, reducing your work when making major configuration changes on your switch.


You denote a range for interfaces by specifying the starting interface and the last interface in the range. The following code example uses this technique to configure interfaces 8 through 12. Once the proper Configuration mode is specified, you use the switchport access command to place these ports in vlan 5.


Trunk ports are ports used for inter-switch connections, while access ports are used to connect devices to your switch. The switchport command is used to change between Trunk mode and Access mode. The following example lists the other directives available to the switchport command:


Switch1>enable
Switch1#configure terminal
Switch1(config)#interface range fastEthernet 0/8 , fastEthernet 0/12
Switch1(config-if-range)#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
Switch1(config-if-range)#switchport access vlan 5
Switch1(config-if-range)#end

With ports 8 through 12 now associated with VLAN 5, you can verify this configuration using the trusty show command.


In this case, the most appropriate command is show vlan brief, whose output appears in the next command example. Be sure to notice the difference in the VLAN names that appear in this listing. VLAN 2 is assigned a descriptive name; VLAN 15 is assigned a name that is not very descriptive; VLAN 10 is not assigned a name at all, making it even less descriptive.


If you want to ensure the proper devices and ports are assigned to the proper VLANs, use descriptive names on your VLANs.


Switch1>enable
Switch1#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7
2 Executives active
5 VLAN0005 active Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12
10 VLAN0010 active
15 VLAN_15 active
20 Test_VLAN active
1002 fddi-default act/unsup
1003 trcrf-default act/unsup
1004 fddinet-default act/unsup
1005 trbrf-default act/unsup



dummies

Source:http://www.dummies.com/how-to/content/configuring-a-range-of-switch-interfaces.html

No comments:

Post a Comment