User Tools

Site Tools


tech:network:vlan-access-port-configuration:vlan-access-port-configuration

VLAN Access Port Configuration

VLAN Creation

DSW2#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0/1, Fa1/0/2, Fa1/0/3
                                                Fa1/0/4, Fa1/0/5, Fa1/0/6
                                                Fa1/0/7, Fa1/0/8, Fa1/0/9
                                                Fa1/0/10, Fa1/0/11, Fa1/0/12
                                                Fa1/0/13, Fa1/0/14, Fa1/0/15
                                                Fa1/0/16, Fa1/0/17, Fa1/0/18
                                                Fa1/0/19, Fa1/0/20, Fa1/0/21
                                                Fa1/0/22, Fa1/0/23, Fa1/0/24
                                                Gi1/0/1, Gi1/0/2
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------
en
conf t
vlan 10
name Executive
vlan 20,30
vlan 40-45
end
DSW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
DSW2(config)#vlan 10
DSW2(config-vlan)#name Executive
DSW2(config-vlan)#vlan 20,30
DSW2(config-vlan)#vlan 40-45
DSW2(config-vlan)#end
DSW2#
*Mar  1 00:05:37.381: %SYS-5-CONFIG_I: Configured from console by console
DSW2#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0/1, Fa1/0/2, Fa1/0/3
                                                Fa1/0/4, Fa1/0/5, Fa1/0/6
                                                Fa1/0/7, Fa1/0/8, Fa1/0/9
                                                Fa1/0/10, Fa1/0/11, Fa1/0/12
                                                Fa1/0/13, Fa1/0/14, Fa1/0/15
                                                Fa1/0/16, Fa1/0/17, Fa1/0/18
                                                Fa1/0/19, Fa1/0/20, Fa1/0/21
                                                Fa1/0/22, Fa1/0/23, Fa1/0/24
                                                Gi1/0/1, Gi1/0/2
10   Executive                        active
20   VLAN0020                         active
30   VLAN0030                         active
40   VLAN0040                         active
41   VLAN0041                         active
42   VLAN0042                         active
43   VLAN0043                         active
44   VLAN0044                         active
45   VLAN0045                         active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
10   enet  100010     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
30   enet  100030     1500  -      -      -        -    -        0      0
40   enet  100040     1500  -      -      -        -    -        0      0
41   enet  100041     1500  -      -      -        -    -        0      0
42   enet  100042     1500  -      -      -        -    -        0      0
43   enet  100043     1500  -      -      -        -    -        0      0
44   enet  100044     1500  -      -      -        -    -        0      0
45   enet  100045     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

delete vlan 10. and names vlan 43 Internetwork Expert.

conf t
no vlan 10
vlan 43
name "Internetwork Expert"
DSW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
DSW2(config)#no vlan 10
DSW2(config)#vlan 43
DSW2(config-vlan)#name Internetwork Expert
                                    ^
% Invalid input detected at '^' marker.

Oops, space included name not permitted. Let's quote space contained name.

DSW2(config-vlan)#name "Internetwork Expert"
DSW2(config-vlan)#^Z
DSW2#
*Mar  1 00:07:54.375: %SYS-5-CONFIG_I: Configured from console by console

passed.

DSW2#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0/1, Fa1/0/2, Fa1/0/3
                                                Fa1/0/4, Fa1/0/5, Fa1/0/6
                                                Fa1/0/7, Fa1/0/8, Fa1/0/9
                                                Fa1/0/10, Fa1/0/11, Fa1/0/12
                                                Fa1/0/13, Fa1/0/14, Fa1/0/15
                                                Fa1/0/16, Fa1/0/17, Fa1/0/18
                                                Fa1/0/19, Fa1/0/20, Fa1/0/21
                                                Fa1/0/22, Fa1/0/23, Fa1/0/24
                                                Gi1/0/1, Gi1/0/2
20   VLAN0020                         active
30   VLAN0030                         active
40   VLAN0040                         active
41   VLAN0041                         active
42   VLAN0042                         active
43   Internetwork Expert              active
44   VLAN0044                         active
45   VLAN0045                         active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
30   enet  100030     1500  -      -      -        -    -        0      0
40   enet  100040     1500  -      -      -        -    -        0      0
41   enet  100041     1500  -      -      -        -    -        0      0
42   enet  100042     1500  -      -      -        -    -        0      0
43   enet  100043     1500  -      -      -        -    -        0      0
44   enet  100044     1500  -      -      -        -    -        0      0
45   enet  100045     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

remove default vlans.

conf t
no vlan 1
no vlan 1002
no vlan 1003
no vlan 1004
no vlan 1005
no vlan 1002-1005
end

results

DSW2# conf t
Enter configuration commands, one per line.  End with CNTL/Z.
DSW2(config)#no vlan 1
%Default VLAN 1 may not be deleted.
DSW2(config)#no vlan 1002
%Default VLAN 1002 may not be deleted.
DSW2(config)#no vlan 1003
%Default VLAN 1003 may not be deleted.
DSW2(config)#no vlan 1004
%Default VLAN 1004 may not be deleted.
DSW2(config)#no vlan 1005
%Default VLAN 1005 may not be deleted.
DSW2(config)#no vlan 1002-1005
%Default VLAN 1002 may not be deleted.
%Default VLAN 1003 may not be deleted.
%Default VLAN 1004 may not be deleted.
%Default VLAN 1005 may not be deleted.
DSW2(config)#end
DSW2#
*Mar  1 00:19:25.781: %SYS-5-CONFIG_I: Configured from console by console
DSW2#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0/1, Fa1/0/2, Fa1/0/3
                                                Fa1/0/4, Fa1/0/5, Fa1/0/6
                                                Fa1/0/7, Fa1/0/8, Fa1/0/9
                                                Fa1/0/10, Fa1/0/11, Fa1/0/12
                                                Fa1/0/13, Fa1/0/14, Fa1/0/15
                                                Fa1/0/16, Fa1/0/17, Fa1/0/18
                                                Fa1/0/19, Fa1/0/20, Fa1/0/21
                                                Fa1/0/22, Fa1/0/23, Fa1/0/24
                                                Gi1/0/1, Gi1/0/2
20   VLAN0020                         active
30   VLAN0030                         active
40   VLAN0040                         active
41   VLAN0041                         active
42   VLAN0042                         active
43   Internetwork Expert              active
44   VLAN0044                         active
45   VLAN0045                         active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
20   enet  100020     1500  -      -      -        -    -        0      0
30   enet  100030     1500  -      -      -        -    -        0      0
40   enet  100040     1500  -      -      -        -    -        0      0
41   enet  100041     1500  -      -      -        -    -        0      0
42   enet  100042     1500  -      -      -        -    -        0      0
43   enet  100043     1500  -      -      -        -    -        0      0
44   enet  100044     1500  -      -      -        -    -        0      0
45   enet  100045     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

Switch port mode configuration

Access Port Configuration

DSW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
DSW2(config)#swi
DSW2(config)#int f1/0/23
DSW2(config-if)#switchport mode access
DSW2(config-if)#switchport access vlan 43
DSW2(config-if)#^Z
DSW2#
*Mar  1 05:00:34.600: %SYS-5-CONFIG_I: Configured from console by console
DSW2#sh run int f1/0/23
Building configuration...

Current configuration : 87 bytes
!
interface FastEthernet1/0/23
 switchport access vlan 43
 switchport mode access
end
Remote
access trunk dynamic desirable dynamic auto
Local access access N/A access access
trunk N/A trunk trunk trunk
dynamic desirable access trunk trunk trunk
dynamic auto access trunk trunk access

Let's see both end of link's configured switch port combination result in.

4 x 4 / 2 = 8 patterns.

Verify in ASW1-2 link f0/4.

pre-configuration.

en
conf t
vlan 10
name Executive
vlan 20
name Engineer
vlan 30
name Sales
vlan 40
name Corporate
end
ASW1#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Gi0/1
10   Executive                        active
20   Engineer                         active
30   Sales                            active
40   Corporate                        active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup
ASW2#show vlan brief

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2, Fa0/3, Fa0/4
                                                Fa0/5, Fa0/6, Fa0/7, Fa0/8
                                                Gi0/1
10   Executive                        active
20   Engineer                         active
30   Sales                            active
40   Corporate                        active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup
access x access
  • Configuration
conf t
int f0/4
switchport mode access
switchport access vlan 20
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport
  • Console I/O
ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport mode access
ASW1(config-if)#switchport access vlan 20
ASW1(config-if)#end
ASW1#
*Mar  1 22:21:15.588: %SYS-5-CONFIG_I: Configured from console by console
ASW1#sh run int f0/4
Building configuration...

Current configuration : 84 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport mode access
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport mode access
ASW2(config-if)#switchport access vlan 20
ASW2(config-if)#end
ASW2#
*Mar  1 22:20:54.549: %SYS-5-CONFIG_I: Configured from console by console
ASW2#sh run int f0/4
Building configuration...

Current configuration : 84 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport mode access
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
  • Cleanup configuration
conf t
int f0/4
no switchport mode access
no switchport access vlan 20
end
trunk x trunk
  • Configuration
conf t
int f0/4
switchport mode trunk
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport
  • Console I/O
ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport mode trunk
ASW1(config-if)#end
ASW1#
*Mar  1 22:35:14.071: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:35:15.070: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW1#
*Mar  1 22:35:18.098: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW1#sh run int f0/4
Building configuration...

Current configuration : 56 bytes
!
interface FastEthernet0/4
 switchport mode trunk
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport mode trunk
ASW2(config-if)#end
ASW2#
*Mar  1 22:34:53.024: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:34:54.022: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW2#
*Mar  1 22:34:57.042: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW2#sh run int f0/4
Building configuration...

Current configuration : 56 bytes
!
interface FastEthernet0/4
 switchport mode trunk
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

stop DTP(Dynamic Trunking Protocol).

conf t
int f0/4
switchport nonegotiate
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport
  • Console I/O
ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport nonegotiate
ASW1(config-if)#end
ASW1#
*Mar  1 22:40:04.980: %SYS-5-CONFIG_I: Configured from console by console
ASW1#sh run int f0/4
Building configuration...

Current configuration : 80 bytes
!
interface FastEthernet0/4
 switchport mode trunk
 switchport nonegotiate
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport nonegotiate
ASW2(config-if)#end
ASW2#
*Mar  1 22:39:43.924: %SYS-5-CONFIG_I: Configured from console by console
ASW2#sh run int f0/4
Building configuration...

Current configuration : 80 bytes
!
interface FastEthernet0/4
 switchport mode trunk
 switchport nonegotiate
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Off
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
  • Cleanup configuration
conf t
int f0/4
no switchport mode trunk
no switchport nonegotiate
end
ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#no switchport mode trunk
Command rejected: An interface must be configured to the "Access" or "Trunk" modes to be configured to "NoNegotiate."
ASW1(config-if)#no switchport nonegotiate
ASW1(config-if)#end
ASW1#
*Mar  1 22:41:03.490: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:41:04.463: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW1#
*Mar  1 22:41:07.500: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#no switchport mode trunk
Command rejected: An interface must be configured to the "Access" or "Trunk" modes to be configured to "NoNegotiate."
ASW2(config-if)#no switchport nonegotiate
ASW2(config-if)#end
ASW2#
*Mar  1 22:40:42.435: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:40:43.416: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW2#
*Mar  1 22:40:46.453: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up

no switchport mode trunk before no switchport nonegotiate command rejected. says switchport nonegotiate must be configured explicitly access or trunk.

correct remove configuration list are:

conf t
int f0/4
no switchport nonegotiate
no switchport mode trunk
end

then

ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#no switchport mode trunk
ASW1(config-if)#end
ASW1#
*Mar  1 22:46:16.587: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:46:17.560: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW1#
*Mar  1 22:46:20.580: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#no switchport mode trunk
ASW2(config-if)#end
ASW2#
*Mar  1 22:45:55.531: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:45:56.504: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW2#
*Mar  1 22:45:59.533: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
access x trunk

Let's configure malformed combination.

  • Configuration
conf t
int f0/4
switchport mode access
switchport access vlan 20
end
conf t
int f0/4
switchport mode trunk
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport
  • Console I/O

CDP Discover Native VLAN Mismatch.

ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport mode access
ASW1(config-if)#switchport access vlan 20
ASW1(config-if)#end
ASW1#
*Mar  1 22:52:57.386: %SYS-5-CONFIG_I: Configured from console by console
ASW1#
*Mar  1 22:53:06.865: %SPANTREE-7-RECV_1Q_NON_TRUNK: Received 802.1Q BPDU on non trunk FastEthernet0/4 VLAN20.
*Mar  1 22:53:06.865: %SPANTREE-7-BLOCK_PORT_TYPE: Blocking FastEthernet0/4 on VLAN0020. Inconsistent port type.
ASW1#
*Mar  1 22:53:06.882: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW1#
*Mar  1 22:53:08.685: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW1#
*Mar  1 22:53:09.692: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW1#
*Mar  1 22:53:10.699: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW1#
*Mar  1 22:53:11.705: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW1#
*Mar  1 22:53:12.712: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20)
, with ASW2 FastEthernet0/4 (1).
ASW1#
*Mar  1 22:53:13.719: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW1#
*Mar  1 22:53:14.725: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW1#
*Mar  1 22:53:15.732: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW1#sh run int f0/4
Building configuration...

Current configuration : 84 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport mode access
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW1#
*Mar  1 22:54:15.736: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (20), with ASW2 FastEthernet0/4 (1).
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport mode trunk
ASW2(config-if)#end
ASW2#
*Mar  1 22:52:41.808: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:52:42.807: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW2#
*Mar  1 22:52:45.827: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW2#
*Mar  1 22:53:07.603: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (1), with ASW1 FastEthernet0/4 (20).
ASW2#sh run int f0/4
Building configuration...

Current configuration : 56 bytes
!
interface FastEthernet0/4
 switchport mode trunk
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#
*Mar  1 22:54:07.607: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/4 (1), with ASW1 FastEthernet0/4 (20).
  • Cleanup configuration
conf t
int f0/4
no switchport mode access
no switchport access vlan 20
end
conf t
int f0/4
no switchport mode trunk
end
dynamic desirable x dynamic desirable
  • Configuration
conf t
int f0/4
switchport mode dynamic desirable
switchport access vlan 20
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport
  • Console I/O

Administrative Mode: dynamic desirable, result in Operational Mode: trunk.

ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport mode dynamic desirable
ASW1(config-if)#switchport access vlan 20
ASW1(config-if)#end
ASW1#
*Mar  1 22:57:00.177: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:57:01.159: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW1#
*Mar  1 22:57:04.204: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW1#sh run int f0/4
Building configuration...

Current configuration : 95 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport mode dynamic desirable
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport mode dynamic desirable
ASW2(config-if)#switchport access vlan 20
ASW2(config-if)#end
ASW2#
*Mar  1 22:56:39.122: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 22:56:40.104: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW2#
*Mar  1 22:56:43.149: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW2#sh run int f0/4
Building configuration...

Current configuration : 95 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport mode dynamic desirable
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
  • Cleanup configuration
conf t
int f0/4
no switchport mode dynamic desirable
no switchport access vlan 20
end
dynamic auto x dynamic auto
  • Configuration
conf t
int f0/4
switchport mode dynamic auto
switchport access vlan 20
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport
  • Console I/O

Administrative Mode: dynamic auto, result in Operational Mode: static access.

ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport mode dynamic auto
ASW1(config-if)#switchport access vlan 20
ASW1(config-if)#end
ASW1#
*Mar  1 22:58:43.852: %SYS-5-CONFIG_I: Configured from console by console
ASW1#sh run int f0/4
Building configuration...

Current configuration : 60 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport mode dynamic auto
ASW2(config-if)#switchport access vlan 20
ASW2(config-if)#end
ASW2#
*Mar  1 22:58:22.797: %SYS-5-CONFIG_I: Configured from console by console
ASW2#sh run int f0/4
Building configuration...

Current configuration : 60 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
  • Cleanup configuration
conf t
int f0/4
no switchport mode dynamic auto
no switchport access vlan 20
end
dynamic desirable x dynamic auto
  • Configuration
conf t
int f0/4
switchport mode dynamic desirable
switchport access vlan 20
end
conf t
int f0/4
switchport mode dynamic auto
switchport access vlan 20
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport
  • Console I/O

Result in Operational Mode: trunk.

ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport mode dynamic desirable
ASW1(config-if)#switchport access vlan 20
ASW1(config-if)#end
ASW1#
*Mar  1 23:00:58.129: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 23:00:59.110: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW1#
*Mar  1 23:01:02.155: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW1#sh run int f0/4
Building configuration...

Current configuration : 95 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport mode dynamic desirable
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport mode dynamic auto
ASW2(config-if)#switchport access vlan 20
ASW2(config-if)#end
ASW2#
*Mar  1 23:00:47.895: %SYS-5-CONFIG_I: Configured from console by console
ASW2#sh run int f0/4
Building configuration...

Current configuration : 60 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
  • Cleanup configuration
conf t
int f0/4
no switchport mode dynamic desirable
no switchport access vlan 20
end
conf t
int f0/4
no switchport mode dynamic auto
no switchport access vlan 20
end
dynamic desirable x access
  • Configuration
conf t
int f0/4
switchport mode dynamic desirable
switchport access vlan 20
end
conf t
int f0/4
switchport mode access
switchport access vlan 20
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport
  • Console I/O

Result in Operational Mode: static access.

ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport mode dynamic desirable
ASW1(config-if)#switchport access vlan 20
ASW1(config-if)#end
ASW1#
*Mar  1 23:04:04.389: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 23:04:05.362: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW1#|
*Mar  1 23:04:08.408: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW1#
*Mar  1 23:04:17.350: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW1#
*Mar  1 23:04:20.370: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW1#sh run int f0/4
Building configuration...

Current configuration : 95 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport mode dynamic desirable
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: On
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport mode access
ASW2(config-if)#switchport access vlan 20
ASW2(config-if)#end
ASW2#
*Mar  1 23:03:55.338: %SYS-5-CONFIG_I: Configured from console by console
ASW2#sh run int f0/4
Building configuration...

Current configuration : 84 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
 switchport mode access
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
  • Cleanup configuration
conf t
int f0/4
no switchport mode dynamic desirable
no switchport access vlan 20
end
conf t
int f0/4
no switchport mode access
no switchport access vlan 20
end
dynamic auto x trunk
  • Configuration
conf t
int f0/4
switchport mode dynamic auto
switchport access vlan 20
end
conf t
int f0/4
switchport mode trunk
end
  • Verify command
sh run int f0/4
sh int f0/4 switchport

Result in Operational Mode: trunk.

  • Console I/O
ASW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW1(config)#int f0/4
ASW1(config-if)#switchport mode dynamic auto
ASW1(config-if)#switchport access vlan 20
ASW1(config-if)#end
ASW1#
*Mar  1 23:28:52.713: %SYS-5-CONFIG_I: Configured from console by console
ASW1#
*Mar  1 23:29:02.888: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW1#
*Mar  1 23:29:05.908: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW1#sh run int f0/4
Building configuration...

Current configuration : 60 bytes
!
interface FastEthernet0/4
 switchport access vlan 20
end

ASW1#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 20 (Engineer)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
ASW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ASW2(config)#int f0/4
ASW2(config-if)#switchport mode trunk
ASW2(config-if)#end
ASW2#
*Mar  1 23:28:40.826: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 23:28:41.816: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
ASW2#
*Mar  1 23:28:44.844: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to up
ASW2#sh run int f0/4
Building configuration...

Current configuration : 56 bytes
!
interface FastEthernet0/4
 switchport mode trunk
end

ASW2#sh int f0/4 switchport
Name: Fa0/4
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none
  • Cleanup configuration
conf t
int f0/4
no switchport mode dynamic auto
no switchport access vlan 20
end
conf t
int f0/4
no switchport mode trunk
end

Configuration and Verification that's all.

References

tech/network/vlan-access-port-configuration/vlan-access-port-configuration.txt · Last modified: 2018/04/02 02:52 by 5.9.98.130