Showing results for 
Search instead for 
Did you mean: 

SG500 CLI Commands


Hello everybody,


Please I have a SG500-52port managed switch and I'm trying to add a custom SmartPort roles and set these customs to gi1/x ports.


I've done creating custom Smartport roles but I see errors when try to attempt this to gi1/x ports as below. Could anyone help me with this ? Since now thanks a not!



User Name:cisco

switchc04d73(config)#interface gi1/2
switchc04d73(config-if)#macro trace automationdevice
Applying command...'switchport host'
% Unrecognized command
Applying command...'switchport port-security'
% Unrecognized command
Applying command...'switchport port-security maximum 1'
% Unrecognized command
Applying command...'switchport port-security violation restrict'
% Unrecognized command
Applying command...'switchport port-security aging type inactivity'
% Unrecognized command
Applying command...'switchport access vlan $access_vlan'
% Wrong number of parameters or invalid range, size or characters entered
Applying command...'service-policy input CIP-PTP-Traffic'
Cannot attach CIP-PTP-Traffic , policy does not exist.
Applying command...'service-policy output PTP-Event-Priority'
% bad parameter value
Applying command...'alarm profile ab-alarm'
% Unrecognized command
Applying command...'load-interval 30'
% Unrecognized command
Applying command...'no cdp enable'
switchc04d73#show parser macro description interface gi1/2
Interface Macro Description
gi1/1/2   automationdevice
9 Replies 9

Flavio Miranda
VIP Mentor VIP Mentor
VIP Mentor

Ola @EduardoS


Switchport host requer que a porta Ja tenha o comando switchport inserido.

 Tenta editar sua macro e adiciona switch port access antes  do switchport host.

 Como ele não aceito o comando switchport host, ele também não aceitou o comando switchport port-security.


Qualquer coisa da um toque.


-If I helped you somehow, please, rate it as useful.-





@Flavio Miranda,


Obrigado pelo retorno porém não funcionou, o comando retorna unrecognized command. Tem alguma outra sugestão do que pode ser ?



Thanks for reply! the switchport access don't work and this command returns unrecognized command. Have you something to workaround ?

Thank you!

@EduardoS  something is wrong. Every switch I know has the command "switchport mode access".

Can you check it again? 





-If I helped you somehow, please, rate it as useful.-

@Flavio Miranda, yes i can select the interface gi1/X in conf t and set it to switchport mode access but after i can't set switchport mode host or switchport host


switchc04d73(config-if)#switchport mode access
switchc04d73(config-if)#switchport host
% Unrecognized command
switchc04d73(config-if)#switchport mode host
% bad parameter value

@Flavio Miranda


Another information... i'm using SG500-52port with 1.3.0 firmware... but even in 1.4.x CLI user guide, i can't found these commands like service nagle and switchports

This from the command reference from the SG500 version 1.3:


34.11 switchport mode
Use the switchport mode Interface Configuration (Ethernet, port-channel) mode
command to configure the VLAN membership mode (access, trunk, general,
private-vlan promiscuous, private-vlan host or customer) of a port. Use the no form
of this command to restore the default configuration.
switchport mode {access | trunk | general | customer}
no switchport mode
• access—Specifies an untagged layer 2 VLAN port.
• trunk—Specifies a trunking layer 2 VLAN port.
• general—Specifies a full 802-1q-supported VLAN port.
• customer—Specifies that the port is connected to customer equipment.
Used when the switch is in a provider network.
Default Configuration
Trunk mode.


Here the full document for your reference:


-If I helped you somehow, please, rate it as useful.-

@Flavio Miranda


Thanks for reply! Then i can't use this switchport with port-security, right ? ( just to confirm )


I'm using this CLI guide also... About the Service Nagle... is it the same case ?


since now thank you so much

I don't have a SG500 right here, but, I think it has. The link below show how to configure it in web interface:



Do you have this command "sh ports security detailed" ?



-If I helped you somehow, please, rate it as useful.-

@Flavio Miranda  Yes! I have this command

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers