Showing posts with label banner tokens. Show all posts
Showing posts with label banner tokens. Show all posts

Sunday, January 18, 2009

banner tokens

There are the 3 banner commands: motd, login and exec. motd is displayed upon arriving at the router, login when prompted for login, and exec when arriving at the exec prompt. Pretty self explanatory.

Commands to enter the banners are
i) banner motd
ii) banner login
iii) banner exec

The message is then delimited by the control character of your choice.

However did you know there are a few dynamic messages or 'tokens' that can be added to the message!


$(hostname) Displays the host name for the router.

$(domain) Displays the domain name for the router.

$(line) Displays the vty or tty (asynchronous) line number.

$(line-desc) Displays the description attached to the line.


By way of an example
Router_1(config)#banner login @
Enter TEXT message. End with the character '@'.
you are on router $(hostname)
@


So telnetting onto the router, the output is as follows :

Router_1>1.1.1.1
Trying 1.1.1.1 ... Open

you are on router Router_1


User Access Verification

Password: