204
[Sysname-rtm-test] user-role network-admin
[Sysname-rtm-test] commit
[Sysname-rtm-test] quit
Verifying the configuration
# Shut down GigabitEthernet 1/0/1.
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] shutdown
# Display BGP peer information.
<Sysname> display bgp peer ipv4
BGP local router ID: 1.1.1.1
Local AS number: 100
Total number of peers: 0 Peers in established state: 0
* - Dynamically created peer
Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
The command output shows that Device A does not have any BGP peers.
CLI-defined policy with EAA environment variables
configuration example
Network requirements
Define an environment variable to match the IP address 1.1.1.1.
Configure a policy from the CLI to monitor the event that occurs when a command line that contains
loopback0
is executed. In the policy, use the environment variable for IP address assignment.
When the event occurs, the system performs the following tasks:
•
Creates the Loopback 0 interface.
•
Assigns 1.1.1.1/24 to the interface.
•
Sends the matching command line to the information center.
Configuration procedure
# Configure an EAA environment variable for IP address assignment. The variable name is
loopback0IP
, and the variable value is
1.1.1.1
.
<Sysname> system-view
[Sysname] rtm environment loopback0IP 1.1.1.1
# Create the CLI-defined policy
test
and enter its view.
[Sysname] rtm cli-policy test
# Add a CLI event that occurs when a command line that contains
loopback0
is executed.
[Sysname-rtm-test] event cli async mode execute pattern loopback0
# Add an action that enters system view when the event occurs.
[Sysname-rtm-test] action 0 cli system-view
# Add an action that creates the interface Loopback 0 and enters loopback interface view.
[Sysname-rtm-test] action 1 cli interface loopback 0
# Add an action that assigns the IP address 1.1.1.1 to Loopback 0. The
loopback0IP
variable is
used in the action for IP address assignment.
Summary of Contents for FlexNetwork 10500 SERIES
Page 224: ...213 ...
Page 311: ...300 Now the system can record log information to the specified file ...