ConfD User Community

Is there any built command to change the banner for CLI


#1

In the confd.conf, the banner is default set to “Welcome to CLI”.
Is there any built in command to change this banner setting?

For CLI, I can see these settings can be changed:
config-mode-prompt
operational-mode-promp
session-timeout
show-default
telnet

But I did not see how to enable one command to let the user to edit the banner?


#2

As banner is part of dynconfig, it can be changed during runtime when dynconfig is used. Seeconfd.conf/confdConfig/runtimeReconfiguration` in the ConfD User Guide.

Then you can configure it directly (set confdConfig cli banner "my banner" + commit) or create e.g. clispec custom command, that changes dynconfig value.

Similar example how to change prompt is in confdconf/dyncfg example directory.


#3

What is the limit of the string length for banner can be configured?


#4

If you make the effort to peek into src/confd/dyncfg/confd_dyncfg.yang you will notice that the banner is of YANG string built-in type. If you then check out YANG 1.1 RFC 7950 you can find the answer to your question under https://tools.ietf.org/html/rfc7950#section-9.4.4.

What string length did you have in mind for the banner? Something larger than a string length of 18446744073709551615?


#5

Can we restrict this length size ? When I try to limit using data-model with tailf:link…It was not working. W
As of now my system is taking such big string but eventually crashing.

Whenever the length is increasing more than 256k lenght it is throwing “Bad Packet lenght”.

output:
Bad packet length 262156.
Disconnecting: Packet corrupt


#6

Using tailf:link to restrict the length of a string seems a bit odd, normally you would use the YANG lenght statement.