The following example shows how to enable port security on Gigabitethernet 2/1.
Ruijie# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)# interface gigabitethernet 2/1
Ruijie(config-if)# switchport port-security
Ruijie(config-if)# end
For more information on configuring the speed, duplexing, and flow control of an interface, see
the section of Setting Speed, Duplexing, and Flow Control foran Interface.
The following example shows how to set Gigabitethernet 2/1 to access port, its VLAN to 100,
its speed, duplexing, and flow control to self-negotiation and enable port security.
Ruijie# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie (config)# interface gigabitethernet 2/1
Ruijie (config-if)# switchport access vlan 100
Ruijie (config-if)# speed auto
Ruijie (config-if)# duplex auto
Ruijie (config-if)# flowcontrol auto
Ruijie (config-if)# switchport port-security
Ruijie (config-if)# end
Configuring Hybrid Port
You can configure the hybrid port by performing the following steps:
Ruijie# configure terminal
Ruijie(config)# interface g 0/1
Ruijie(config-if)# switchport mode hybrid
Ruijie(config-if)# switchport hybrid native vlan 3
Ruijie(config-if)# switchport hybrid allowed vlan untagged 20-30
Ruijie(config-if)# end
Ruijie# show running interface g 0/1