EdgeRouter - Configuration and Operational Mode


In this article, readers will learn about the different modes that are used in the EdgeOS Command Line Interface (CLI).

NOTES & REQUIREMENTS:Applicable to the latest EdgeOS firmware on all EdgeRouter models. Knowledge of the Command Line Interface (CLI) and basic networking knowledge is required. Please see the Related Articles below for more information.
Device used in this article:

Table of Contents

  1. Configuration and Operational Mode Basics
  2. Making Configuration Changes
  3. Related Articles

Configuration and Operational Mode Basics

Back to Top

There are two modes in the EdgeOS command line, this article describes what each does, how to switch from one to another in the Command Line Interface and finally how to make configuration changes via CLI. The Operational Mode, represented by a dollar sign $ is used to display the status of the device. The Configuration Mode, represented by a hashtag # is used to make configuration changes to the device.

The default mode when logging into the command line is Operational Mode. To switch to Configuration Mode, use the configure command:

ubnt@edgerouter:~$ configure
[edit] ubnt@edgerouter#
NOTE: Operational Mode is indicated by a dollar sign $, whereas Configuration Mode uses the hashtag #.

To go back to operational mode, use the exit command:

ubnt@edgerouter# exit


Each mode has its own unique commands. You can use the question mark ? key to display all the available commands in both modes. Press the ? key twice to also display the command descriptions:

ubnt@edgerouter:~$ ?

Possible completions:
  configure     Enter configure mode
  ping          Send Internet Control Message Protocol (ICMP) echo request
  reboot        Reboot the system
  show          Show system information
  shutdown      Shutdown the system
  traceroute    Track network path to <hostname|IPv4 address>
  traceroute6   Track network path to <hostname|IPv6 address>
  <...output shortened...>

ubnt@edgerouter:~$ configure

ubnt@edgerouter# ?

Possible completions:
  commit        Commit the current set of changes
  compare       Compare configuration revisions
  delete        Delete a configuration element
  edit          Edit a sub-element
  exit          Exit from this configuration level
  run           Run an operational-mode command
  save          Save configuration to a file
  set           Set the value of a parameter or create a new element
  show          Show the configuration (default values may be suppressed)
  <...output shortened...>
NOTE: The second question mark? does not display onscreen.

If you wish to run an Operational Mode command from while in Configuration Mode, use the run command.

ubnt@edgerouter# run show ?

Possible completions:
  interfaces    Show network interface information
  ip            Show IPv4 routing information
  ipv6          Show IPv6 routing information
  <...output shortened...>

Making Configuration Changes

Back to Top

The EdgeRouter uses three configuration sets:

  • Boot/Startup Config When the EdgeRouter reboots, it loads the boot/startup configuration (config.boot)
  • Active Config Currently active configuration with changes that have not been saved to the boot/startup configuration yet.
  • Working Config Non-active configuration with changes that have not been applied (committed) yet.

Use the following commands to make changes to the configuration:

  • set Adds a configuration statement from the device
  • delete Removes a configuration statement from the device
  • commit Applies any changes that were added with the set or delete commands
  • save Saves the active configuration to the boot/startup configuration

Let's say that we want to enable the Telnet service, we would issue the following:

ubnt@edgerouter# set service telnet port 23

ubnt@edgerouter# compare
[edit service]
+telnet {
+ port 23

ubnt@edgerouter# commit

[ service telnet ]
Starting the telnet service. Check /var/log/messages.
NOTE: Thecompare command will show you the difference between the working and the active configurations.

Save the configuration changes to the boot/startup configuration by using the save command:

ubnt@edgerouter# save
Saving configuration to '/config/config.boot'...

Instead of applying changes with the commit command, you can also use commit-confirm. The latter command reboots the device in 10 minutes (you can customize this value) unless the commit is confirmed with the confirm command. This is helpful when you are making changes to a remote device and you do not want to risk losing access to it. If you accidentally lock yourself out of the device, the EdgeRouter will reboot after 10 minutes and the boot/startup configuration is re-loaded.

ubnt@edgerouter# delete service telnet

ubnt@edgerouter# commit-confirm 5

commit-confirm will automatically reboot in 5 minutes unless confirmed
Proceed? [yes][y]
Type 'confirm' to stop reboot

ubnt@edgerouter# confirm

Related Articles

Back to Top

EdgeRouter - How to Configure an Interface

EdgeRouter - User Accounts

EdgeRouter - How to Create a WAN Firewall Rule

EdgeRouter - Archiving and Managing the Configuration Files

Intro to Networking - How to Establish a Connection Using SSH

Was this article helpful?
82 out of 130 found this helpful