Using Agreement Mode to Put Interfaces into VLANs
To accomplish a VLAN operational, the VLAN charge be created, and again about-face ports charge be assigned
to the VLAN. Example 2-2 shows how to accessory the interfaces with the actual VLANs, once
again on Switch3.
Assigning Interfaces to VLANs–Switch3
! First, the switchport admission command assigns the VLAN numbers to the
! corresponding interfaces.
Switch3# config t
Enter agreement commands, one per line. End with CNTL/Z.
Switch3(config)# int fa 0/3
Switch3(config-if)# switchport admission vlan 22
Switch3(config-if)# int fa 0/7
Switch3(config-if)# switchport admission vlan 21
Switch3(config-if)# ^Z
! Below, appearance vlan abrupt lists these aforementioned two interfaces as now actuality in
! VLANs 21 and 22, respectively.
Switch3# appearance vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 absence alive Fa0/1, Fa0/2, Fa0/4, Fa0/5
Fa0/6, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/13, Fa0/14, Fa0/15
Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22, Fa0/23
21 VLAN0021 alive Fa0/7
22 ccie-vlan-22 alive Fa0/3
! Lines bare for brevity
! While the VLAN agreement is not apparent in the running-config at this point,
! the switchport admission command that assigns the VLAN for the interface is in the
! configuration, as apparent with the appearance run int fa 0/3 command.
Switch3# appearance run int fa 0/3
interface FastEthernet0/3
switchport admission vlan 22
NOTE At the end of Example 2-1, VLAN 22 had not been auspiciously created. The
assumption for Example 2-2 is that VLAN 22 has been auspiciously created.