banner
Cisco IOS banner tokens
Since Cisco IOS Release 12.0(3)T there is an option to use tokens when configuring different types of banner messages on routers. The tokens are replaced with the respective parameter value when the banner is displayed, and they can reference different parameters of the device and/or configuration.
The table below lists the possible tokens and their support in different banner messages:
|
Банер\token
|
motd
|
login
|
exec
|
incoming
|
slip-ppp
|
Description
|
|
$(hostname)
|
YES
|
YES |
YES
|
YES
|
YES
|
Hostname of the device |
|
$(domain)
|
YES
|
YES
|
YES | YES | YES | Domain |
|
$(peer-ip)
|
NO
|
NO
|
NO
|
NO
|
YES | IP Address of the peer device |
|
$(gate-ip)
|
NO
|
NO
|
NO
|
NO |
YES
|
IP Address of the gateway |
|
$(encap)
|
NO
|
NO
|
NO |
NO
|
YES | Encapsulation type |
|
$(encap-alt)
|
NO
|
NO
|
NO
|
NO | YES | Encapsulation shown as SL/IP instead of SLIP. |
|
$(mtu)
|
NO
|
NO |
NO
|
NO |
YES
|
MTU |
|
$(line)
|
YES
|
YES |
YES
|
YES | NO | Number of the line hosting the incoming connection |
|
$(line-desc)
|
YES
|
YES
|
YES |
YES
|
NO | Description of the line hosting the incoming connection |
Here’s an exmaple of using the $(hostname) token when configuring a login banner:
R1(config)#banner login # You are connected to $(hostname). Authorized users only! #
This option comes in quite handy in cases of a global rollout including banner configuration on multiple devices (using a tool for configuration management/automated rollout, such as Expect, or a commercial one such as CiscoWorks).
Българска версия
Chat
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Nov | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | |||
Recent Posts
Recent Comments
- ravi on VRF Lite - VRFs without MPLS
- Thiyagu on BGP RIB-Failure