Ubiquiti EdgeRouter [56/57] Ubiquiti networks inc

Ubiquiti EdgeRouter [56/57] Ubiquiti networks inc
53
Appendix A: Command Line InterfaceEdgeOS
User Guide
Ubiquiti Networks, Inc.
Note: The following commands require that the
configuration option, commit-revisions, be set first.
show system commit diff commit-confirm
show system commit file confirm
show system commit rollback
commit comment
For details on the commit-revisions option, go to
“Manage the Configuration File” on page 52.
To display the changes in revision 0, use the show system
commit diff command.
ubnt@RTR:~$ show system commit diff 0
[edit system login]
+user joe {
+ authentication {
+ encrypted-password
$1$CWVzYggs$NyJXxC3S572rfm6pY8ZMO.
+ plaintext-password ““
+ }
+ level admin
+}
To display the entire configuration file for revision 0, use
the show system commit file command.
ubnt@RTR:~$ show system commit file 0
To add a comment to the commit, use the comment
command.
ubnt@RTR# set system login user joe level operator
[edit]
ubnt@RTR# commit comment “change joe from admin to op”
[edit]
ubnt@RTR# save; exit
Saving configuration to ‘/config/config.boot’...
Done
exit
Now you will see the comment when you use the show
system commit command.
ubnt@RTR:~$ show system commit
0 2012-08-17 18:44:41 by ubnt via cli change joe
from admin to op
1 2012-08-17 18:34:01 by ubnt via cli commit
2 2012-08-17 18:32:13 by ubnt via cli commit
3 2012-08-17 18:31:52 by ubnt via cli commit
4 2012-08-17 18:31:51 by root via init commit
When you work on a remote router, certain changes,
such as a firewall or NAT rule, can cut off access to the
remote router, so you then have to visit the remote router
and reboot it. To avoid such issues when you make risky
changes, use the commit-confirm command first. Then
use the confirm command to save your changes.
ubnt@RTR:~$ configure
[edit]
ubnt@RTR# set firewall name WAN_IN rule 50 action drop
[edit]
ubnt@RTR# set firewall name WAN_IN rule 50 destination
address 172.16.0.0/16
[edit]
ubnt@RTR# commit-confirm
commit confirm will be automatically reboot in
10 minutes unless confirmed
Proceed? [confirm][y]
[edit]
After you verify that the changes should be saved, use the
confirm command.
ubnt@RTR# confirm
[edit]
You can also specify the number of minutes to wait, but
you must remember to also use the confirm command.
Otherwise, if you forget, then you can be surprised by the
EdgeRouter’s reboot to its previous configuration.
ubnt@RTR# commit-confirm 1
commit confirm will be automatically reboot in 1 minutes
unless confirmed
Proceed? [confirm][y]
[edit]
ubnt@RTR#
Broadcast message from root@RTR (Mon Aug 20 14:00:06
2012):
The system is going down for reboot NOW!
INIT: Switching to runlevel: 6
INIT: Stopping routing services...zebra...done.
Removing all Quagga Routes.
[SNIP]
To roll back to an earlier commit, use the show system
commit and rollback commands.
ubnt@RTR:~$ show system commit
0 2012-08-21 14:46:41 by admin_5 via cli
fix bgp policy maps
1 2012-08-21 14:45:59 by admin_5 via cli
commit
2 2012-08-21 14:45:33 by admin_5 via cli
fix port forwarding
3 2012-08-21 14:45:15 by admin_5 via cli
fix firewall
4 2012-08-21 14:44:29 by ubnt via cli
commit
5 2012-08-21 14:21:15 by ubnt via cli
add port forward for port 2222 to build-server
6 2012-08-21 14:20:24 by ubnt via cli
add dmz interface to eth2
7 2012-08-21 14:19:53 by ubnt via cli
add ipsec tunnel to office_exchange
8 2012-08-21 14:07:18 by ubnt via cli
add firewall for WAN_IN
9 2012-08-21 14:06:37 by ubnt via cli
add user first_last
10 2012-08-21 14:04:47 by ubnt via cli
commit
11 2012-08-21 14:04:46 by root via init
commit
After viewing the history of system commits, you decide
to discard the last four commits by admin_5. Roll back the
system configuration file to commit 4:
ubnt@RTR# rollback 4
Proceed with reboot? [confirm] [y]
Broadcast message from root@RTR (ttyS0) (Mon Aug 21
15:09:12 2012):
The system is going down for reboot NOW!

Содержание

Похожие устройства

Скачать