EdgeRouter - How to Add a Static Route


Overview


Readers will learn how to add a static route to the EdgeRouter using the Web UI or Command Line Interface.

NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Please see the Related Articles below for more information.
 
Device used in this article:

Adding a Static Route


Static routes can be configured in the Routing tab in the Web UI and support the following options:

  • Destination network
  • Next-hop address or interface
  • Description
  • Distance
  • Enable/Disable

A commonly used static route is the default gateway (0.0.0.0/0). Follow the steps below to add a static default gateway route:

GUI: Access the EdgeRouter Web UI.

Routing > Routes > + Add Static Route

Select Route Type: Gateway
Destination network: 0.0.0.0/0
Next-hop address: <gateway-address>
Description: default
Distance: 1
Enable: Checked
NOTE: The usage of next-hop interface routes is generally only recommended on Point-to-Point interfaces (for example PPPoE or VTI). 

The above configuration can also be set using the CLI:

CLI: Access the Command Line Interface. You can do this using the CLI button in the GUI or by using a program such as PuTTY.
configure
set protocols static route 0.0.0.0/0 next-hop <gateway-address> description default
set protocols static route 0.0.0.0/0 next-hop <gateway-address> distance 1
commit ; save

Related Articles


Back to Top

Intro to Networking - How to Establish a Connection Using SSH


We're sorry to hear that!