84
4.5.5
CLI Commands of the VLAN
Command Lines of the VLAN port configuration, VLAN configuration and VLAN
table display
Feature
Command Line
VLAN Port Configuration
VLAN Port PVID
Switch(config-if)# switchport trunk native vlan 2
Set port default vlan id to 2 success
Port Accept Frame
Type
Switch(config)# inter fa1
Switch(config-if)# acceptable frame type all
any kind of frame type is accepted!
Switch(config-if)# acceptable frame type
vlantaggedonly
only vlan-tag frame is accepted!
Ingress Filtering
(for fast Ethernet
port 1)
Switch(config)# interface fa1
Switch(config-if)# ingress filtering enable
ingress filtering enable
Switch(config-if)# ingress filtering disable
ingress filtering disable
Egress rule –
Untagged (for VLAN 2)
Switch(config-if)# switchport access vlan 2
switchport access vlan - success
Egress rule – Tagged
(for VLAN 2)
Switch(config-if)# switchport trunk allowed vlan
add 2
Display – Port
Ingress Rule (PVID,
Ingress Filtering,
Acceptable Frame
Type)
Switch# show interface fa1
Interface fastethernet1
Administrative Status : Enable
Operating Status : Not Connected
Duplex : Auto
Speed : Auto
Flow Control :off
Default Port VLAN ID: 2
Ingress Filtering : Disabled
Acceptable Frame Type : All
Port Security : Disabled
Auto Negotiation : Enable
Loopback Mode : None
STP Status: disabled
Default CoS Value for untagged packets is 0.