Help Center Help Articles Community RMA & Warranty Downloads Tech Specs

EdgeRouter - Configuring Public Static IP Addresses

Translated by AI

Overview

Readers will learn how to add static public IP address(es) to an interface on the EdgeRouter.

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:

Table of Contents

  1. WAN Connection Types
  2. Configure Static IP Addresses using the Web UI
  3. Configure Static IP Addresses using the Command Line
  4. Related Articles

WAN Connection Types

There are different ways in which an Internet Service Provider (ISP) can provide you a public IP address, for example:

  • Static The ISP provides you an IP range and requires you to manually add your own address(es) and gateway.
  • DHCP The ISP provides you with an automatically assigned address through DHCP.
  • PPPoE The ISP requires you to manually add your own PPPoE interface and authentication credentials.

If your service provider is providing you with a static IP address range, the information may be similar to:

Network Address: 203.0.113.0
Broadcast Address: 203.0.113.7
Subnet Mask: 255.255.255.248
Gateway Address: 203.0.113.6
DNS Servers: 192.0.2.1 - 192.0.2.2

The EdgeRouter requires IP addresses to be written in the CIDR format. This means that the ISP provided subnet mask (255.255.255.248) needs to be converted to a routing prefix. An easy way to convert from subnet masks to CIDR prefixes is to use an IPv4 subnet calculator.

Subnet Mask
CIDR prefix
255.255.255.255 /32
255.255.255.254 /31
255.255.255.252 /30
255.255.255.248 /29
Subnet Mask CIDR prefix
255.255.255.240 /28
255.255.255.224 /27
255.255.255.192 /26
255.255.255.128 /25

In this example the prefix will be /29 and the available IP addresses that we can add to the EdgeRouter are 203.0.113.1 - 203.0.113.5.

Configure Static IP Addresses using the Web UI

Back to Top

GUI: Access the EdgeRouter Web UI.

1. Navigate to the Dashboard tab and assign the IP address(es) to the WAN interface.

Dashboard > Eth0 > Actions > Config

Address: Manually define IP address
IP: 203.0.113.1/29

+ Add IP

Address: Manually define IP address
IP: 203.0.113.2/29
IP: 203.0.113.3/29
IP: 203.0.113.4/29
IP: 203.0.113.5/29

2. Navigate to the System tab in the bottom-left of the web UI to add the default gateway and DNS servers.

System > Name Server

System name server: 192.0.2.1

+ Add New

System name server: 192.0.2.2

System > Gateway

System gateway address: 203.0.113.6
NOTE: You can also configure the default gateway under the Routing tab.

Configure Static IP Addresses using the Command Line

Back to Top

CLI: Access the EdgeRouter Command Line Interface.

1. Enter configuration mode.

configure

2. Delete the existing IP address configuration from the WAN interface.

delete interfaces ethernet eth0 address

3.Assign the IP address(es) to the WAN interface.

set interfaces ethernet eth0 address 203.0.113.1/29
set interfaces ethernet eth0 address 203.0.113.2/29
set interfaces ethernet eth0 address 203.0.113.3/29
set interfaces ethernet eth0 address 203.0.113.4/29
set interfaces ethernet eth0 address 203.0.113.5/29

4. Add the default gateway address.

set system gateway-address 203.0.113.6
NOTE: You can also configure the default gateway using theset protocols static route 0.0.0.0/0 next-hop <gateway-address> command.

5. Add the DNS servers.

set system name-server 192.0.2.1
set system name-server 192.0.2.2

6. Commit the changes and save the configuration.

commit ; save

Related Articles

Back to Top

EdgeRouter - How to Create a WAN Firewall Rule

EdgeRouter - Beginners Guide to EdgeRouter

EdgeRouter - How to Add a Static Route

Was this article helpful?
0 out of 0 found this helpful