Commands For VLAN and MAC Address Configuration
Commands For VLAN and MAC Address Configuration
Content
Content
CHAPTER 1 VLAN CONFIGURATION..........................................1
1.1 Commands for VLAN Configuration.......................................................................1 1.1.1 debug gvrp event...............................................................................................1 1.1.2 debug gvrp packet.............................................................................................1 1.1.3 dot1q-tunnel enable..........................................................................................2 1.1.4 dot1q-tunnel selective enable..........................................................................2 1.1.5 dot1q-tunnel selective s-vlan...........................................................................2 1.1.6 dot1q-tunnel tpid...............................................................................................3 1.1.7 garp timer join....................................................................................................3 1.1.8 garp timer leave.................................................................................................3 1.1.9 garp timer leaveAll............................................................................................4 1.1.10 gvrp (Global)....................................................................................................4 1.1.11 gvrp (Port)........................................................................................................4 1.1.12 no garp timer....................................................................................................5 1.1.13 name.................................................................................................................5 1.1.14 private-vlan......................................................................................................5 1.1.15 private-vlan association.................................................................................6 1.1.16 show dot1q-tunnel...........................................................................................7 1.1.17 show garp timer...............................................................................................7 1.1.18 show gvrp fsm information............................................................................7 1.1.19 show gvrp leaveAll fsm information..............................................................8 1.1.20 show gvrp leavetimer running information..................................................8 1.1.21 show gvrp port-member.................................................................................9 1.1.22 show gvrp port registerd vlan........................................................................9 1.1.23 show gvrp timer running information.........................................................10 1.1.24 show gvrp vlan registerd port......................................................................10 1.1.25 show vlan.......................................................................................................10 1.1.26 show vlan-translation...................................................................................12 1.1.27 switchport access vlan.................................................................................12 1.1.28 switchport dot1q-tunnel...............................................................................12 1.1.29 switchport forbidden vlan............................................................................12 1.1.30 switchport hybrid allowed vlan....................................................................13 1.1.31 switchport hybrid native vlan.......................................................................14 1.1.32 switchport interface......................................................................................14 1.1.33 switchport mode............................................................................................15 1.1.34 switchport mode trunk allow-null................................................................15 1.1.35 switchport trunk allowed vlan......................................................................16 1.1.36 switchport trunk native vlan.........................................................................16 1
Content
1.1.37 vlan.................................................................................................................17 1.1.38 vlan internal...................................................................................................17 1.1.39 vlan ingress enable.......................................................................................18 1.1.40 vlan-translation..............................................................................................18 1.1.41 vlan-translation enable.................................................................................18 1.1.42 vlan-translation miss drop...........................................................................19 1.2 Commands for Dynamic VLAN Configuration......................................................19 1.2.1 dynamic-vlan mac-vlan prefer........................................................................19 1.2.2 dynamic-vlan subnet-vlan prefer...................................................................20 1.2.3 mac-vlan...........................................................................................................20 1.2.4 mac-vlan vlan...................................................................................................21 1.2.5 protocol-vlan....................................................................................................21 1.2.6 show dynamic-vlan prefer..............................................................................22 1.2.7 show mac-vlan.................................................................................................22 1.2.8 show mac-vlan interface.................................................................................22 1.2.9 show protocol-vlan..........................................................................................23 1.2.10 show subnet-vlan..........................................................................................23 1.2.11 show subnet-vlan interface..........................................................................23 1.2.12 subnet-vlan....................................................................................................24 1.2.13 switchport mac-vlan enable.........................................................................24 1.2.14 switchport subnet-vlan enable.....................................................................25 1.3 Commands for Voice VLAN Configuration...........................................................25 1.3.1 show voice-vlan...............................................................................................25 1.3.2 switchport voice-vlan enable.........................................................................25 1.3.3 voice-vlan.........................................................................................................26 1.3.4 voice-vlan vlan.................................................................................................26
Content
2.2.8 switchport port-security...................................................................................6 2.2.9 switchport port-security convert.....................................................................6 2.2.10 switchport port-security lock.........................................................................7 2.2.11 switchport port-security mac-address..........................................................7 2.2.12 switchport port-security maximum...............................................................7 2.2.13 switchport port-security timeout...................................................................8 2.2.14 switchport port-security violation.................................................................8
Attribute Index Length Event Value -------------------- --------- ------------1 10 joinIn 100 2 10 joinEmpty 140 3 10 leaveIn 150 4 10 leaveEmpty 180
Example: Set the value of garp leave timer as 600ms. Switch(config)#garp timer leave 600
1.1.13 name
Command: name <vlan-name> no name Function: Specify a name, a descriptive string, for the VLAN; the no operation of the command will delete the name of the VLAN. Parameters: <vlan-name> is the specified name string. Command Mode: VLAN Configuration Mode. Default: The default VLAN name is vlanXXX, where xxx is VID. Usage Guide: The switch can specify names for different VLANs, making it easier for users to identify and manage VLANs. Examples: Specify the name of VLAN100 as TestVlan. Switch(Config-Vlan100)#name TestVlan
1.1.14 private-vlan
Command: private-vlan {primary | isolated | community} no private-vlan Function: Configure current VLAN to Private VLAN. The no command cancels the Private VLAN configuration. Parameter: primary set current VLAN to Primary VLAN, isolated set current VLAN to Isolated VLAN, community set current VLAN to Community VLAN. Command Mode: VLAN mode Default: Private VLAN is not configured by default. Usage Guide: There are three Private VLANs: Primary VLAN, Isolated VLAN and Community VLAN. Ports in Primary there are three Private VLANs: Primary VLAN,
Isolated VLAN and Community VLAN can communicate with ports of Isolated VLAN and Community VLAN related to this Primary VLAN; Ports in Isolated VLAN are isolated between each other and only communicate with ports in Primary VLAN they related to; ports in Community VLAN can communicate both with each other and with Primary VLAN ports they related to; there is no communication between ports in Community VLAN and port in Isolated VLAN. Only VLANs containing empty Ethernet ports can be set to Private VLAN, and only the Private VLANs configured with associated private relationships can set the Access Ethernet ports their member ports. Normal VLAN will clear its Ethernet ports when set to Private VLAN. It is to be noted Private VLAN messages will not be transmitted by GVRP. Example: Set VLAN100, 200, 300 to private vlans, with respectively primary, Isolated, Community types. Switch(config)#vlan 100 Switch(Config-Vlan100)#private-vlan primary Note:This will remove all the ports from vlan 100 Switch(Config-Vlan100)#exit Switch(config)#vlan 200 Switch(Config-Vlan200)#private-vlan isolated Note:This will remove all the ports from vlan 200 Switch(Config-Vlan200)#exit Switch(config)#vlan 300 Switch(Config-Vlan300)#private-vlan community Note:This will remove all the ports from vlan 300 Switch(Config-Vlan300)#exit
whose association is deleted are removed from the Private VLANs. Example: Associate Isolated VLAN200 and Community VLAN300 to Primary VLAN100. Switch(Config-Vlan100)#private-vlan association 200;300
Default: MT for registered machine and VO for request state machine. Usage Guide: Show the corresponding state of all registered machines and request state machines. Example: Show the state of all state machines. Switch#show gvrp fsm information interface ethernet 1/0/1 VAVery anxious Active memberAAAnxious Active memberQAQuiet Active member VP Very anxious Passive member AP Anxious Passive member QP Quiet Passive member VOVery anxious ObserverAOAnxious ObserverQOQuiet Observer LALeaving Acitve memberLOleaving Observer Interface ethernet 1/0/1 gvrp fsm information: Index VLANID Applicant Registrar ---- ----------------------------1 100 VO LV 2 300 VP IN
Default: leavetimer is disabled. Usage Guide: Show running state and expiration time of each leave timer. Example: Show running state and expiration time of each leave timer on current port. Switch#show gvrp leavetimer running information interface ethernet 1/0/1 VLANID running state expired time ------------ -----------------100 UP 0.2 s 300 DOWN non
Commands for VLAN and MAC Address Configuration Vlan10 vlan20 Vlan40 vlan60 Current port static registerd vlan included Vlan10 vlan30 Vlan40 vlan200
10
usage [id <vlan-id> | name <vlan-name>]] [private-vlan [id <vlan-id> | name <vlan-name> ]] Function: Display detailed information for all VLANs or specified VLAN. Parameter: brief stands for brief information; summary for VLAN statistics; <vlan-id> for VLAN ID of the VLAN to display status information, the valid range is 1 to 4094; <vlan-name> is the VLAN name for the VLAN to display status information, valid length is 1 to 11 characters. private-vlan displays the ID, name, relating VLAN and port of the private-vlan relative information. Command mode: Admin Mode and Configuration Mode. Usage Guide: If no <vlan-id> or <vlan-name> is specified, then information for all VLANs in the switch will be displayed. Example: Display the status for the current VLAN; display statistics for the current VLAN. Switch#show vlan VLAN Name Type Media Ports ---- ------------ ---------- --------- ---------------------------------------1 default Static ENET Ethernet1/0/1Ethernet1/0/2 Ethernet1/0/3 Ethernet1/0/4 Ethernet1/0/9 Ethernet1/0/10 Ethernet1/0/11 Ethernet1/0/12 2 VLAN0002 Static ENET Ethernet1/0/5 Ethernet1/0/6 Ethernet1/0/7 Ethernet1/0/8 Switch#show vlan summary The max. vlan entrys: 4094 Existing Vlans: Universal Vlan: 1 12 13 15 16 22 Total Existing Vlans is:6 Displayed information VLAN Name Type Media Ports Explanation VLAN number VLAN name VLAN type, statically dynamically learned. Access port within a VLAN configured or
Switch(config)#show vlan private-vlan VLAN Name Type Asso VLAN Ports ---- ------------ ---------- --------- ---------------------------------------100 VLAN0100 Primary 101 102 Ethernet1/0/9 Ethernet1/0/10 Ethernet1/0/11 Ethernet1/0/12 Ethernet1/0/13 101 VLAN0101 Community 100 Ethernet1/0/9 Ethernet1/0/10
11
remove WORD} no switchport forbidden vlan Function: Configure the forbidden vlan for a port. Note that this command can only be used to configure on trunk or hybrid ports and the port with GVRP not enabled. No command cancels the forbidden vlanlist for a port. Parameters: WORD, add the vlanList as forbidden vlan and cover the previous configuration all, set all VLANs as forbidden vlan add WORD, add vlanList to the current forbidden vlanList except WORD, set all VLANs as forbidden vlan except vlanList remove WORD, remove vlan specified by vlanList from current forbidden vlanList Command Mode: Port mode Default: Forbidden vlanList is empty Usage Guide: Tag the corresponding position for forbidden vlanList and clear allow vlanList flags in ports. A port leaves these VLANs if it joins them statically, and it sends message to GVRP module to enable corresponding registered machine of the port to enter forbidden mode. Example: Port quits the corresponding VLAN and the corresponding registered machine of GVRP to enter forbidden mode. Switch(config-if-ethernet1/0/1)#switchport forbidden vlan all
13
between tag and untag mode by setting allowed vlan: set VLAN to untag mode, the frame sent via hybrid port without VLAN tag; set VLAN to tag mode, the frame sent via hybrid port with corresponding VLAN tag. The same VLAN can not be allowed with tag and untag mode by a Hybrid port at the same time. If configure the tag (or untag) allowed VLAN to untag (or tag) allowed VLAN, the last configuration will cover the previous. Example: Set hybrid port allowed vlan 1, 3, 5-20 with untag mode and allow vlan 100; 300; 500-2000 with tag mode. Switch(config)#interface ethernet 1/0/5 Switch(Config-If-Ethernet1/0/5)#switchport mode hybrid Switch(Config-If-Ethernet1/0/5)#switchport hybrid allowed vlan 1;3;5-20 untag Switch(Config-If-Ethernet1/0/5)#switchport hybrid allowed vlan 100; 300; 500-2000 tag Switch(Config-If-Ethernet1/0/5)#exit
14
Default: A newly created VLAN contains no port by default. Usage Guide: Access ports are normal ports and can join a VLAN, but a port can only join one VLAN for a time. Example: Assign Ethernet port 1, 3, 4-7, 8 of VLAN100. Switch(Config-Vlan100)#switchport interface ethernet 1/0/1;3;4-7;8
15
and does not join any VLANs by default for enabling GVRP on trunk port is appropriate. It is recommended to configure a port as trunk with this command before enabling GVRP. This command can also be used when a port has been configured as trunk already, which equals to clearing allow-list and quits all VLANs. Parameters: None Command Mode: Port mode Default: access mode. Usage Guide: Configure the port as trunk, enable it to leave all VLANs and clear allowlist. Example: Switch(config-if-ethernet1/0/1)#switchport mode trunk allow-null
16
untagged frames. When an untagged frame enters a Trunk port, the port will tag the untagged frame with the native PVID set with this commands for VLAN forwarding. Example: Set the native VLAN for a Trunk port to 100. Switch(config)#interface ethernet 1/0/5 Switch(Config-If-Ethernet1/0/5)#switchport mode trunk Switch(Config-If-Ethernet1/0/5)#switchport trunk native vlan 100 Switch(Config-If-Ethernet1/0/5)#exit
1.1.37 vlan
Command: vlan WORD no vlan WORD Function: Create VLANs and enter VLAN configuration mode. If using ';' and '-' connect with multi-VLANs, then only create these VLANs. If only existing VLAN, then enter VLAN configuration mode; if the VLAN is not exist, then create VLAN and enter VLAN configuration mode. In VLAN Mode, the user can set VLAN name and assign the switch ports to the VLAN. The no command deletes specified VLANs. Parameter: WORD is the VLAN ID to be created/deleted, valid range is 1 to 4094, connect with ';' and '-'. Command mode: Global Mode. Default: Only VLAN1 is set by default. Usage Guide: VLAN1 is the default VLAN and cannot be configured or deleted by the user. The maximal VLAN number is 4094. It should be noted that dynamic VLANs learnt by GVRP cannot be deleted by this command. Example: Create VLAN100 and enter the configuration mode for VLAN 100. Switch(config)#vlan 100 Switch(Config-Vlan100)#
17
Commands for VLAN and MAC Address Configuration Switch(config)#vlan 100 internal
1.1.40 vlan-translation
Command: vlan-translation <old-vlan-id> to <new-vlan-id> in no vlan-translation <old-vlan-id> in Function: Add VLAN translation by creating a mapping between original VLAN ID and current VLAN ID; the no form of this command deletes corresponding mapping. Parameter: old-vlan-id is the original VLAN ID; new-vlan-id is the translated VLAN ID; in indicates ingress translation. Command Mode: Port Mode. Default: There is no VLAN translation relation. Usage Guide: The command is for configuring the in and out translation relation of the VLAN translation function. The data packets will be matched according to the configured translation relations, and its VLAN ID will be changed to the one in the configured item once matched, while the vlan-translation miss drop command will determine the next forwarding if not match. Example: Move the VLAN100 data entered from the port1 to VLAN2 after ingress translation. Switch#config Switch(config)#interface ethernet 1/0/1 Switch(Config-If-Ethernet1/0/1)#vlan-translation enable Switch(Config-If-Ethernet1/0/1)#vlan-translation 100 to 2 in Switch(Config-If-Ethernet1/0/1)#exit Switch(config)#
18
no vlan-translation enable Function: Enable VLAN translation on the port; the no command restores to the default value. Parameter: None. Command Mode: Port Mode. Default: VLAN translation has not been enabled on the port by default. Usage Guide: This command and dot1q-tunnel are mutually exclusive. Example: Enable VLAN translation function on port1. Switch#config Switch(config)#interface ethernet 1/0/1 Switch(Config-If-Ethernet1/0/1)#vlan-translation enable
1.2 Commands for Dynamic VLAN Configuration 1.2.1 dynamic-vlan mac-vlan prefer
Command: dynamic-vlan mac-vlan prefer Function: Set the MAC-based VLAN preferred. Parameter: None. Command Mode: Global Mode. Default: MAC-based VLAN is preferred by default. Usage Guide: Configure the preference of dynamic-vlan on switch. The default priority sequence is MAC-based VLAN IP-subnet-based VLAN Protocol-based VLAN, namely the preferred order when several dynamic VLAN is available. After the IP-subnet-based VLAN is set to be preferred and the user wish to restore to preferring the MAC-based
19
VLAN, please use this command. Example: Set the MAC-based VLAN preferred. Switch#config Switch(config)#dynamic-vlan mac-vlan prefer
1.2.3 mac-vlan
Command: mac-vlan mac <mac-addrss> vlan <vlan-id> priority <priority-id> no mac-vlan {mac <mac-addrss>|all} Function: Add the correspondence between MAC address and VLAN, namely specify certain MAC address to join specified VLAN. The no form of this command deletes all/the correspondence. Parameter: mac-address is the MAC address which is shown in the form of XX-XX-XXXX-XX-XX, vlan-id is the ID of the VLAN with a valid range of 1~4094; priority-id is the level of priority and is used in the VLAN tag with a valid range of 0~7 ; all refers to all the MAC addresses. Command Mode: Global Mode. Default: No MAC address joins the VLAN by default. Usage Guide: With this command user can add specified MAC address to specified VLAN. If there is a non VLAN label data packet enters from the switch port from the specified MAC address, it will be assigned with specified VLAN ID so sent enter specified VLAN. Their belonging VLAN are the same no matter which port did they enter through. The command does not have any interfere on the VLAN label data packet. Example: Add network device of MAC address as 00-03-0f-11-22-33 to VLAN 100. Switch#config Switch(config)#mac-vlan mac 00-03-0f-11-22-33 vlan 100 priority 0
20
1.2.5 protocol-vlan
Command: protocol-vlan mode {ethernetii etype <etype-id> | llc {dsap <dsap-id> ssap <ssap-id>} | snap etype <etype-id>} vlan <vlan-id> priority <priority-id> no protocol-vlan {mode {ethernetii etype <etype-id> | llc {dsap <dsapid> ssap <ssap-id>} | snap etype <etype-id>} | all} Function: Add the correspondence between the protocol and the VLAN namely specify the protocol to join specified VLAN. The no form of this command deletes all/the correspondence. Parameter: mode is the encapsulate type of the configuration which is ethernetii, llc, snap; the encapsulate type of the ethernetii is EthernetII; etype-id is the type of the packet protocol, with a valid range of 1536~65535; llc is LLC encapsulate format; dsapid is the access point of the destination service, the valid range is 0~255; ssap-id is the access point of the source service with a valid range of 0~255; snap is SNAP encapsulate format; etype-id is the type of the packet protocol, the valid range is 1536~65535; vlan-id is the ID of VLAN, the valid range is 1~4094; priority is the priority, the range is 0~7; all indicates all the encapsulate protocols. Command Mode: Global Mode. Default: No protocol joined the VLAN by default. Usage Guide: The command adds specified protocol into specified VLAN. If there is any non VLAN label packet from specified protocol enters through the switch port, it will be assigned with specified VLAN ID and enter the specified VLAN. No matter which port the packets go through, their belonging VLAN is the same. The command will not interfere with VLAN labeled data packets. It is recommended to configure ARP protocol together with the IP protocol or else some application may be affected. Example: Assign the IP protocol data packet encapsulated by the EthernetII to VLAN200. Switch#config Switch(config)#protocol-vlan mode ethernetii etype 2048 vlan 200 21
22
Commands for VLAN and MAC Address Configuration Ethernet1/0/3(A) Ethernet1/0/5(H) Ethernet1/0/4(A) Ethernet1/0/6(T)
1.2.12 subnet-vlan
Command: subnet-vlan ip-address <ipv4-addrss> mask <subnet-mask > vlan <vlanid> priority <priority-id> no subnet-vlan {ip-address <ipv4-addrss> mask <subnet-mask> | all} Function: Add a correspondence between the IP subnet and the VLAN, namely add specified IP subnet into specified VLAN; the no form of this command deletes all/the correspondence. Parameter: ipv4-address is the IPv4 address shown in dotted decimal notation; the valid range of each section is 0~255; subnet-mask is the subnet mask code shown in dotted decimal notation; the valid range of each section is 0~255; priority-id is the priority applied in the VLAN tag with a valid range of 0~7; vlan-id is the VLAN ID with a valid range of 1~4094;all indicates all the subnets. Command Mode: Global Mode. Default: No IP subnet joined the VLAN by default. Usage Guide: This command is used for adding specified IP subnet to specified VLAN. When packet without VLAN label and from the specified IP subnet enters through the switch port, it will be matched with specified VLAN id and enters specified VLAN. These packets will always come to the same VLAN no matter through which port did they enter. This command will not interfere with VLAN labeled data packets. Example: Add the network equipment with IP subnet of 192.168.1.0/24 to VLAN 300. Switch#config Switch(config)#subnet-vlan ip-address 192.168.1.1 mask 255.255.255.0 vlan 300 priority 0
24
Command: switchport voice-vlan enable no switchport voice-vlan enable Function: Enable the Voice VLAN function on the port; the no form of this command disables Voice VLAN function on the port. Parameter: None. Command Mode: Port Mode. Default: Voice VLAN is enabled by default. Usage Guide: When voice equipment is added to the Voice VLAN, the Voice VLAN is enabled globally by default. This command disables Voice VLAN on specified port to meet specified application of the user. Example: Disable the Voice VLAN function on port3. Switch#config Switch(config)#interface ethernet 1/0/3 Switch(Config-If-Ethernet1/0/3)#no switchport voice-vlan enable
1.3.3 voice-vlan
Command: voice-vlan mac <mac-address> mask <mac-mask> priority <priority-id> [name <voice-name>] no voice-vlan {mac <mac-address> mask <mac-mask> | name <voice-name> | all} Function: Specify certain voice equipment to join in Voice VLAN; the no form of this command will let the equipment leave the Voice VLAN. Parameter: Mac-address is the voice equipment MAC address, shown in xx-xx-xx-xxxx-xx format; mac-mask is the last eight digit of the mask code of the MAC address, the valid values are: 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0,0x80, 0x0; priority-id is the priority of the voice traffic, the valid range is 07; the voice-name is the name of the voice equipment, which is to facilitate the equipment management; all indicates all the MAC addresses of the voice equipments. Command Mode: Global Mode. Default: This command will add a specified voice equipment into the Voice VLAN, if a non VLAN labeled data packet from the specified voice equipment enters through the switch port, then no matter through which port the packet enters, it will belongs to Voice VLAN. The command will not interfere with the packets of VLAN labels. Example: Add the 256 sets of voice equipments of the R&D department with MAC address ranging from 00-03-0f-11-22-00 to 00-03-0f-11-22-ff to the Voice VLAN. Switch#config Switch(config)#voice-vlan vlan 100 Switch(config)#voice-vlan mac 00-03-0f-11-22-00 mask 0 priority 5 name test
26
no voice-vlan Function: Configure the specified VLAN to Voice VLAN; the no voice-vlan command cancels the Voice VLAN configuration of this VLAN. Parameter: Vlan id is the number of the specified VLAN. Command Mode: Global Mode. Default: No Voice VLAN is configured by default. Usage Guide: Set specified VLAN for Voice VLAN, There can be only one Voice VLAN at the same time. The voice VLAN can not be applied concurrently with MAC-based VLAN. Example: Set VLAN100 to Voice VLAN. Switch#config Switch(config)#voice-vlan vlan 100
27
Configure a static multicast MAC 01-00-5e-00-00-01, the egress is ehernet 1/0/1. Switch(config)#mac-address-table static-multicast address 01-00-5e-00-00-01 vlan 1 interface ethernet1/0/1
2.2 Commands for Mac Address Binding configuration 2.2.1 clear port-security dynamic
Command: clear port-security dynamic [address <mac-addr> | interface <interfaceid>] Function: Clear the Dynamic MAC addresses of the specified port. Command mode: Admin Mode. Parameter: <mac-addr> stands MAC address; <interface-id> for specified port number. Usage Guide: The secure port must be locked before dynamic MAC clearing operation can be perform in specified port. If no ports and MAC are specified, then all dynamic MAC in all locked secure ports will be cleared; if only port but no MAC address is specified, then all MAC addresses in the specified port will be cleared. Example: Delete all dynamic MAC in port1. Switch#clear port-security dynamic interface Ethernet 1/0/1
Parameter: <5-86400>: the interval is 5 to 86400 seconds. Command mode: Global Mode. Default: 60 seconds. Usage Guide: Example: Set the MAC monitor interval as 120 seconds. Switch(Config)#mac-address-table periodic-monitor-time 120
Commands for VLAN and MAC Address Configuration Max Addresses System limit in
Chapter 2 Commands for MAC Address Table Configuration The maximum secure MAC address number of the system.
Commands for VLAN and MAC Address Configuration Violation mode: Protect Maximum MAC Addresses: 1 Total MAC Addresses: 1 Configured MAC Addresses: 1 Lock Timer is ShutDown Mac-Learning function is: Opened Displayed information Port Security Port status Violation mode Maximum MAC Addresses Total MAC Addresses Configured MAC Addresses Lock Timer Mac-Learning function
Explanation Is port enabled as a secure port. Port secure status. Violation mode set for the port. The maximum secure number set for the port. MAC address
Current secure MAC address number for the port. Current secure static MAC address number for the port. Whether locking timer (timer timeout) is enabled for the port. Whether the MAC function is enabled. address learning
Command mode: Port Mode. Usage Guide: The port dynamic MAC convert command can only be executed after the secure port is locked. After this command has been executed, dynamic secure MAC addresses learned by the port will be converted to static secure MAC addresses. The command does not reserve the configuration. Example: Converting MAC addresses in port 1 to static secure MAC addresses. Switch(config)#interface Ethernet 1/0/1 Switch(Config-If-Ethernet1/0/1)#switchport port-security convert
Function: Sets the maximum number of secure MAC addresses for a port; the no command restores the maximum secure address number of 1. Command mode: Port Mode. Parameter: < value> is the up limit for static secure MAC address, the valid range is 1 to 128. Default: The default maximum port secure MAC address number is 1. Usage Guide: The MAC address binding function must be enabled before maximum secure MAC address number can be set. If secure static MAC address number of the port is larger than the maximum secure MAC address number set, the setting fails; extra secure static MAC addresses must be deleted, so that the secure static MAC address number is no larger than the maximum secure MAC address number for the setting to be successful. Example: Set the maximum secure MAC address number as 4 for port1. Switch(config)#interface Ethernet 1/0/1 Switch(Config-If-Ethernet1/0/1)#switchport port-security maximum 4
implement shutdown violation operation <30-3600>: the recovery time, do not recover it by default Default: The port violation mode is protect by default. Usage Guide: The port violation mode configuration is only available after the MAC address binding function is enabled. when the port secure MAC address exceeds the security MAC limit, if the violation mode is protect, the port only disable the dynamic MAC address learning function; while the port will be shut if at shutdown mode. Users can manually open the port with no shutdown command. Example: Set the violation mode of port 1 to shutdown. Switch(config)#interface Ethernet 1/0/1 Switch(Config-If-Ethernet1/0/1)#switchport port-security violation shutdown recovery 60