04-17-2025 10:05 PM
As shown in the image below, my switch is allocating 15.4W instead of the full 30W for my class 4 non-Cisco AP(Unifi U6E with 22W max consumption). The power is insufficient under load and causes the AP to reboot whenever a client is streaming video. So, I want to set power to static for this switchport as detailed here:
I need help to execute the following in the Web CLI. Please help!
configure terminal interface gi0/2 power inline static 22000 end
When I enter the configure terminal command, the switch responds:
Thu Apr 17 2025 21:53:35 GMT-0700 (Pacific Daylight Time) =================================================================================== #configure terminal Enter configuration commands, one per line. End with CNTL/Z.
Then, when I enter any of the following commands, they fail:
Thu Apr 17 2025 21:54:48 GMT-0700 (Pacific Daylight Time) =================================================================================== #interface gi0/2 Failed to execute: interface gi0/2 #power inline static 22000 Failed to execute: power inline static 22000 #end Failed to execute: end
I would try to execute these commands in SSH CLI, but I cannot access SSH with putty with my Web GUI credentials:
Thu Apr 17 2025 21:59:27 GMT-0700 (Pacific Daylight Time) =================================================================================== #sh ip ssh SSH Enabled - version 1.99 Authentication methods:publickey,keyboard-interactive,password Authentication Publickey Algorithms:x509v3-ssh-rsa,ssh-rsa Hostkey Algorithms:x509v3-ssh-rsa,ssh-rsa Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr MAC Algorithms:hmac-sha1,hmac-sha1-96 Authentication timeout: 120 secs; Authentication retries: 3 Minimum expected Diffie Hellman key size : 1024 bits IOS Keys in SECSH format(ssh-rsa, base64 encoded): TP-self-signed-3003940864 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCq+u4M+k0yimUplQsA2+I0mS16bnik8fXjkPd3PIYa tGSb5tpNxBvDg9RZaDhq3pknXwaFV63vcKqV9P5kTyzTl7UU06uEWQMYw4bDOsLObgHb1iQppFUTwPgG J/L4wqFm6bSIsahoYa4Kv4toJLIqb0iHtbqPk43fBQim5BaMiQ==
Solved! Go to Solution.
04-18-2025 03:11 AM - edited 04-18-2025 03:32 AM
Hi @truematic,
you can change the power setting on the port either via CLI or via the WebGUI just as you like.
Using the CLI the correct command is "power inline static max 22000".
This should not be done while the device is connected so either disconnect the device or shutdown the port before issueing this command.
You can do the same using the WebGUI.
Go to "General Settings" --> "Power Management", then select the port of the device, change the mode to "static" and the power to the required level, e.g. 22.0, finally select "Update & Apply to Device":
If you then check the running-config you will notice that the above mentioned command has been added to the config.
Background:
Even for Class 4 powered devices (up to 30W), the initial power allocation on these switches is 15.4 W.
When the plugged-in device starts up, the switch waites for CDP or LLDP messages from the device to see whether it requests more than 15.4 W and then the switch will adjust power as requested in the CDP/LLDP message.
Hence enabling LLDP on your switch might solve such problems as well, in case the PoE+ device supports LLDP.
HTH!
04-19-2025 09:57 AM
Glad to hear that your AP is working now! Yes, I indeed run IOS version 15.2(7)E11 on my switch and it is in general a good idea to keep the software up-to-date.
Enabling LLDP is really easy. Using the WebGUI you go to "Configuration" --> "Switch" and under the tab "Switch" you can select to enable LLDP on your switch:
This is a global command so it enables LLDP on all interfaces in a single step. This is a lab device so I simply use DHCP on this one.
The reason for your problems with the WebCLI lies in the nature of this GUI.
You cannot execute the commands one-by-one but have send them as a logical block to the device.
So if you want to change the power settings of a port, then you have to first select "Configure", then select the port and finally set the properties for this port as required:
If you send the commands one-by-one it fails because the switch does not memorize which port you selected in the previous step. So if you want to change another parameter later, you need once again to start with selecting the port before changing any parameter. This is different from the CLI access via Putty and you have to keep this in mind when using the WebCLI.
From the output you posted so far I can see that SSH is enabled on your switch and you obviously have an account with admin rights. So what is the output of the following command:
show run | begin line vty
On my Lab Switch this looks as follows:
The key command here is "login local" which tells the switch to check for locally configured users when you try to connect via SSH. In case your switch shows just "login" instead - which is the default - then this needs to be changed.
If you still have problems using Putty to access the switch, then please let us know what error messages you get.
HTH and please do not forget to rate helpful posts and solutions!
04-18-2025 02:15 AM
- @truematic >....power inline static 22000
Check if that is a an allowed value on the switch by executing the command : power inline static ?
M.
04-18-2025 09:32 PM
Thank you for your reply. If you mean to execute command "power inline static" sans "22000", here is the output from the web CLI:
Fri Apr 18 2025 21:32:07 GMT-0700 (Pacific Daylight Time)
===================================================================================
#power inline static
Invalid input detected.
Fri Apr 18 2025 21:32:00 GMT-0700 (Pacific Daylight Time)
===================================================================================
#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
04-18-2025 10:38 PM
- @truematic >... If you mean to execute command "power inline static" sans "22000", here is the output from the web CLI....
No , as I pointed outed I mean to execute the command power inline static ? to check the
the available command options,
M.
04-18-2025 03:11 AM - edited 04-18-2025 03:32 AM
Hi @truematic,
you can change the power setting on the port either via CLI or via the WebGUI just as you like.
Using the CLI the correct command is "power inline static max 22000".
This should not be done while the device is connected so either disconnect the device or shutdown the port before issueing this command.
You can do the same using the WebGUI.
Go to "General Settings" --> "Power Management", then select the port of the device, change the mode to "static" and the power to the required level, e.g. 22.0, finally select "Update & Apply to Device":
If you then check the running-config you will notice that the above mentioned command has been added to the config.
Background:
Even for Class 4 powered devices (up to 30W), the initial power allocation on these switches is 15.4 W.
When the plugged-in device starts up, the switch waites for CDP or LLDP messages from the device to see whether it requests more than 15.4 W and then the switch will adjust power as requested in the CDP/LLDP message.
Hence enabling LLDP on your switch might solve such problems as well, in case the PoE+ device supports LLDP.
HTH!
04-18-2025 09:50 PM
Thank you for your reply. Your screenshots helped me find a solution for the meantime.
In WebCLI, executing power inline static max 22000 still fails.
Fri Apr 18 2025 21:35:22 GMT-0700 (Pacific Daylight Time)
===================================================================================
#power inline static max 22000
Invalid input detected.
I'm not sure what I'm doing wrong there, as this is a brand new switch and should not have any previous configuration.
From your screenshots, I noticed that you have a Power Management section in WebGUI and I do not. My switch had the originally shipped IOS version 15.2(6)E. I downloaded(with much effort - error messages when trying to download the new .tar file after creating Cisco account, add address to download anything, agree to import controls agreements, etc.) the IOS software, 15.2.7E11:
Web UNIVERSAL WITH WEB BASED DEV MGR
https://software.cisco.com/download/home/286309132/type/280805680/release/15.2.7E11
c2960l-universalk9-tar.152-7.E11.tar
It takes a bit, but be patient. In the screenshot below of the original IOS version, it shows that there was no Power Management section under Management.
Now, I have Power Management! I set the port to static 22W and the AP has stayed online without reboot for hours of heavy use.
Can you point me in the right direction to enable LLDP on the switch? I can try a few things, but I really need some help to understand my problem using the WebCLI or inability to SSH into my switch. I already use Putty with some websites. Thank you!
04-19-2025 09:57 AM
Glad to hear that your AP is working now! Yes, I indeed run IOS version 15.2(7)E11 on my switch and it is in general a good idea to keep the software up-to-date.
Enabling LLDP is really easy. Using the WebGUI you go to "Configuration" --> "Switch" and under the tab "Switch" you can select to enable LLDP on your switch:
This is a global command so it enables LLDP on all interfaces in a single step. This is a lab device so I simply use DHCP on this one.
The reason for your problems with the WebCLI lies in the nature of this GUI.
You cannot execute the commands one-by-one but have send them as a logical block to the device.
So if you want to change the power settings of a port, then you have to first select "Configure", then select the port and finally set the properties for this port as required:
If you send the commands one-by-one it fails because the switch does not memorize which port you selected in the previous step. So if you want to change another parameter later, you need once again to start with selecting the port before changing any parameter. This is different from the CLI access via Putty and you have to keep this in mind when using the WebCLI.
From the output you posted so far I can see that SSH is enabled on your switch and you obviously have an account with admin rights. So what is the output of the following command:
show run | begin line vty
On my Lab Switch this looks as follows:
The key command here is "login local" which tells the switch to check for locally configured users when you try to connect via SSH. In case your switch shows just "login" instead - which is the default - then this needs to be changed.
If you still have problems using Putty to access the switch, then please let us know what error messages you get.
HTH and please do not forget to rate helpful posts and solutions!
04-19-2025 05:44 PM - edited 04-19-2025 05:45 PM
Hello @Jens Albrecht,
I found the LLDP after looking around the new IOS version after I posted. Some findings about LLDP and Unifi U6E AP:
With LLDP enabled, setting switchport to:
Auto
Max:30W(default for class 4)
results in correct power negotiation and AP stays online and does not reboot under load. But, if the Max:22W(max consumption for the AP), results in repeating reboots. I tried this so that I can budget more power to the pool, but I'm happy as is and so are my clients, aka wife and children.
Thank you for the tip on executing with configure in the WebCLI.
This is the output of show run | begin line vty:
Sat Apr 19 2025 17:34:30 GMT-0700 (Pacific Daylight Time)
===================================================================================
#show run | begin line vty
line vty 0 4
login local
transport input telnet
transport output telnet
line vty 5 10
login local
transport input telnet
transport output telnet
line vty 11 15
login
transport input none
!
end
"login local" is there. Should I be able to SSH in with my credentials that I use to login to the local WebGUI?
04-20-2025 02:42 AM
Hi @truematic,
your findings are correct and you should indeed either use LLDP/CDP or the power inline static commands. The reason is pretty simple.
With LLDP/CDP enabled, the protocol will negotiate necessary parameters including power consumption.
As a result only the actual power drawn by the device will be substracted from the power budget of your switch. You can easily verify this behavior using the command "show power inline":
So in case of the AP that I connected to my lab-switch the power budget was reduced by 23.2W even though the maximum is still set to 30.0W. Hence no need to worry about the power budget and simply let LLDP do its magic.
Regarding SSH your output also clarifies why it is not working.
Your terminal lines are configured with the command "transport input telnet" which only allows access via telnet and prohibits all other remote access protocols including ssh. The default for this command is "transport input all" allowing both protocols, i.e. telnet and ssh. Since telnet is unsecure the recommended setting is "transport input ssh" which only allows incoming ssh sessions and prohibits telnet.
The "transport output <option>" command is used to define which protocols you want to use for outgoing connections from this device. So if you have other network devices and want to be able to ssh from one device to another this should also be set to ssh. If you do not have other devices or do not want to allow jumping from one device to another this should be set to none.
Hence a possible configuration for the terminal lines that are currently set might look as follows:
After successfully executing these commands you should be ready to access your switch via SSH.
In case of any further problems just let us know.
HTH!
04-20-2025 10:09 PM
Very enlightening! I now see the reason that this AP would reboot with Max:22W, because it is drawing 25.5W according to the switch.
===================================================================================
#show power inline
Available:120.0(w) Used:25.5(w) Remaining:94.5(w)
Interface Admin Oper Power Device Class Max
(Watts)
--------- ------ ---------- ------- ------------------- ----- ----
Gi0/1 auto off 0.0 n/a n/a 30.0
Gi0/2 auto on 25.5 Ieee PD 4 30.0
Thanks for the commands to enable SSH. I executed the commands successfully in WebCLI, but was still unable to login via Putty.
I thought that this maybe because my only switch user is privilege 15. So, I modified the command as follows and was able to login via SSH.
line vty 0 15
transport input ssh
transport output none
===================================================================================
#show run | begin line vty
line vty 0 4
login local
transport input ssh
transport output none
line vty 5 10
login local
transport input ssh
transport output none
line vty 11 15
login
transport input ssh
transport output none
!
end
I'm thinking this privilege 15 is similar to superuser in linux. I'm not sure why this works, as vty does not seem equal to privilege. I was just noticing that line vty 11 15, and tried adding the 15 to the vty range.
But I'm the only admin, so is this configuration acceptable or not good practice? TYTY
04-21-2025 02:48 AM
Yepp, the privilege level does not have anything to do with the vty numbers. Not sure why it did not work at first try but glad to hear that SSH is working now. You can easily verify that there is no relation between privilege level and vty numbers with the following commands:
"show users" tells you which vty lines are currently in use and you are probably connected via vty 0. If you then start a second Putty session it will show up as vty 1 and so on.
"show privilege" tells you the privilege level of the current user which is 15 for your admin account.
In fact your terminal lines vty 11 15 can still not be used for SSH! This is because these lines have the default "login" command and this needs to be changed to "login local" as explained in one of my previous posts.
When you ask about best practices you should also turn off SSH version 1 because it is broken and should never be used.
Your output shows that your switch is running SSH version 1.99 which is Cisco's way of saying that versions 1 and 2 are active.
Use the command "ip ssh version 2" to turn off version 1 and allow version 2 only. You can then verify this change with the command "show ip ssh" which should then display "SSH Enabled - version 2.0", meaning that only version 2 is running.
HTH and please rate helpful posts!
04-29-2025 10:39 PM - edited 04-29-2025 10:43 PM
Got it. I think this "login local" is good now.
#show run | begin line vty
line vty 0 4
login local
transport input ssh
transport output none
line vty 5 15
login local
transport input ssh
transport output none
!
end
I'm not sure why vty group 5-10 is now not separated but encompassed by 5-15, but it seems ok.
After running "ip ssh version 2", this is the output of "show ip ssh":
#show ip ssh
SSH Enabled - version 2.0
Authentication methods:publickey,keyboard-interactive,password
Authentication Publickey Algorithms:x509v3-ssh-rsa,ssh-rsa
Hostkey Algorithms:x509v3-ssh-rsa,ssh-rsa
Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
MAC Algorithms:hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96
KEX Algorithms:diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
Authentication timeout: 120 secs; Authentication retries: 3
Minimum expected Diffie Hellman key size : 2048 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded): TP-self-signed-3003940864
Modulus Size : 1024 bits
ssh-rsa [redacted]
04-30-2025 01:26 AM
@truematic wrote:
I'm not sure why vty group 5-10 is now not separated but encompassed by 5-15, but it seems ok.
This separation is simply due to historic reasons.
The very first Cisco devices had 5 terminal lines only. Later this limit was raised to 16 terminal lines and nowadays some devices even have over 800 terminal lines.
In order to make sure that you can use the configuration file to restore it on some older device, the config of the VTYs is separated into 2 or even 3 blocks by default. So if all VTYs have the same config, then you see those blocks of 0-4, 5-15 and 16-<max num> in your config. Of course, if the config is different like in your previous config then you get more blocks.
So it's all about backward compatibility and your config looks good now.
HTH!
04-30-2025 11:08 AM
Thank you very much @Jens Albrecht!
04-30-2025 01:17 PM
You are welcome @truematic. Always glad if I can help!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide