Lab 69: Assigning Multiple Instances to a VLAN Simultaneously

Lab Objective:

The objective of this lab exercise is to understand how to configure many interfaces that share the same common configuration at the same time without having to do them one at a time

Lab Purpose:

Configuring multiple interfaces on a switch at the same time is a fundamental skill. Some high-end Cisco Catalyst Switches can have in excess of 500 interfaces that may need to be configured almost identically. In such situations, configuring a single interface at a time would not be acceptable. As a Cisco engineer, as well as in the Cisco CCNA exam, you will be expected to know how to configure multiple switch interfaces at the same time using user-defined macros.

Certification Level:

This lab is suitable for CCNA certification exam preparation.

Lab Difficulty:

This lab has a difficulty rating of 4/10.

Readiness Assessment:

When you are ready for your certification exam, you should complete this lab in no more than 5 minutes.

Lab Topology:

You can use any stand-alone (single) switch to complete this lab. This lab is strictly about configuration syntax.

Task 1:

Configure a hostname of your liking on your lab switch, which should have at least 24 ports.

Task 2:

Configure VLAN10 named SALES on the switch and VLAN20 named TECH on the switch.

Task 3:

To simplify configuration tasks, you should create a macro called VLAN_10_Macro for configuring ports FastEthernet0/1 to FastEthernet0/12 that will be in VLAN10 and a macro called VLAN_20_Macro for configuring ports FastEthernet0/13 to FastEthernet0/24 that will be in VLAN20.

NOTE: Because this lab is for practicing macro configuration, do NOT use the interface range command.

Task 4:

Configure interfaces FastEthernet0/1 to 12 and FastEthernet0/13 to 24 in VLAN10 and VLAN20, respectively, using the macro. These ports should be configured as access ports.

Task 5:

Verify your configuration using the appropriate commands in Cisco IOS.

Configuration and Verification

Task 1:

For reference information on configuring hostnames, please refer to earlier labs.

Task 2:

For reference information on configuring standard VLANs, please refer to earlier labs.

Task 3:

Sw1#config t 
Enter configuration commands, one per line.  End with CTRL/Z. 
Sw1(config)#define interface-range VLAN_10_Macro FastEthernet 0/1 - 12 
Sw1(config)#define interface-range VLAN_20_Macro FastEthernet 0/13 – 24 

Task 4:

Sw1#conf t 
Enter configuration commands, one per line.  End with CNTL/Z. 
Sw1(config)#interface range macro VLAN_10_Macro 
Sw1(config-if-range)#switchport mode access 
Sw1(config-if-range)#switchport access vlan10 
Sw1(config)#interface range macro VLAN_20_Macro 
Sw1(config-if-range)#switchport mode access 
Sw1(config-if-range)#switchport access vlan20 

Task 5:

Sw1#show vlan brief 

VLAN Name                    Status    Ports
 ---- ----------------------- --------- ------------------------------- 
1    default                 active    Gi0/1, Gi0/2 
2    VLAN0002                active 
10   SALES                   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 
20   MANAGERS                active    Fa0/13, Fa0/14, Fa0/15, Fa0/16 
                                       Fa0/17, Fa0/18, Fa0/19, Fa0/20 
                                       Fa0/21, Fa0/22, Fa0/23, Fa0/24 
[Output Truncated]
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments