URI | Description |
---|---|
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security | Configures port security on an interface. Valid interface types: Ethernet and Port-channel. |
GET URIs | Description |
---|---|
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security | Retrieves port security details. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/max | Retrieves the maximum number of secure MAC addresses allowed on the interface. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/port-security-mac-address | Retrieves the details of the MAC addresses used for port security on an interface port. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/port-security-mac-address/{mac-address},{vlan} | Retrieves the details of the MAC address-based VLAN classifier rule used to map to a specific VLAN. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/sticky | Retrieves the details of sticky MAC learning. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/sticky/sticky-flag | Retrieves details of sticky MAC learning on the port that converts the dynamically learned MAC addresses to sticky secure MAC addresses. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/sticky/port-security-mac-address | Retrieves details of sticky MAC addresses. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/sticky/port-security-mac-address/{mac-address},{vlan} | Retrieves details of sticky MAC learning on the port that converts the dynamically learned MAC addresses to sticky secure MAC addresses. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/shutdown-time | Retrieves the details of configured auto recovery time for port security violation. Valid interface types: Ethernet and Port-channel. |
POST URIs | Payload | Description |
---|---|---|
<base_URI>/config/running/interface/Ethernet/{name}/switchport/port-security | <port-security-mac-address><mac-address>{mac-address-type}</mac-address><vlan>{vlan-type}</vlan></port-security-mac-address> | Configures PMS Static Secure Address. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/Ethernet/{name}/switchport | <port-security /> | Configures port security on an interface. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/sticky | <port-security-mac-address><mac-address>{mac-address-type}</mac-address><vlan>{vlan-type}</vlan></port-security-mac-address> | Configures sticky MAC learning on the port to convert the dynamically learned MAC addresses to sticky secure MAC addresses. Valid interface types: Ethernet and Port-channel. |
PATCH URIs | Payload | Description |
---|---|---|
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security | <port-security><max>{uint32}</max></port-security> | Configures port security on an interface with the maximum limit for the number of secure MAC addresses allowed on the interface. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security /sticky | <sticky><sticky-flag>enumeration</sticky-flag></sticky> | Configures sticky MAC learning. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security | <port-security><shutdown-time>{uint32}</shutdown-time></port-security> | Configures auto recovery time for port security violation. Valid interface types: Ethernet and Port-channel. |
PUT URIs | Payload | Description |
---|---|---|
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/max | <max>{uint32}</max> | Configures port security on an interface with the maximum limit for the number of secure MAC addresses allowed on the interface. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/sticky/sticky-flag | <sticky-flag>enumeration</sticky-flag> | Configures sticky MAC learning. Valid interface types: Ethernet and Port-channel. |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/shutdown-time | <shutdown-time>{uint32}</shutdown-time> | Configures auto recovery time for port security violation. Valid interface types: Ethernet and Port-channel. |
DELETE URIs |
---|
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/max |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/sticky/sticky-flag |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/shutdown-time |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/port-security-mac-address/{mac-address},{vlan} |
<base_URI>/config/running/interface/{interface-type}/{interface-name}/switchport/port-security/sticky/port-security-mac-address/{mac-address},{vlan} |
GET, PATCH, PUT, DELETE, OPTIONS, and HEAD operations are supported.
The following example uses the GET option to retrieve the configuration details.
http://host:80/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security
None
<port-security-mac-address y:self="/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security/ port-security-mac-address/3200.1110.0811%2C250"> <mac-address>3200.1110.0811</mac-address> <vlan>250</vlan> </port-security-mac-address> <port-security-mac-address y:self="/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security/ port-security-mac-address/3200.1110.0812%2C250"> <mac-address>3200.1110.0812</mac-address> <vlan>250</vlan> </port-security-mac-address> <sticky y:self="/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security/sticky"> <sticky-flag>true</sticky-flag> <port-security-mac-address y:self="/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security/ sticky/port-security-mac-address/3200.1110.0001%2C250"> <mac-address>3200.1110.0001</mac-address> <vlan>250</vlan> </port-security-mac-address> <port-security-mac-address y:self="/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security/ sticky/port-security-mac-address/3200.1110.0002%2C250"> <mac-address>3200.1110.0002</mac-address> <vlan>250</vlan> </port-security-mac-address> </sticky> <shutdown-time>5</shutdown-time> </port-security>
The following example uses the POST option to configure port security.
http://host:80/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security
<port-security-mac-address><mac-address>3200.1110.0812</mac-address><vlan>250</vlan></port-security-mac-address>
None
The following example uses the PATCH option to remove port security.
URI - http://host:80/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security
Request Body - <port-security><max>5</max></port-security>
None
The following example uses the DELETE option to remove port security.
http://host:80/rest/config/running/interface/Ethernet/%223/2%22/switchport/port-security
None
None