Overview
This article will review how to configure an interface with a static IP address
Web UI
To configure an interface with a static IP address, log into the web UI, then navigate to System, IP, choose the desired interface tab, in this screenshot Network Interface, select the Static radial in the Configuration Method section at the top of the settings, then populate the IP Address, Subnet Mask, and Gateway (optional) fields, once done press enter or scroll to the bottom of the page and click Apply.
Command line
To set an interface with a static IP via cli, you will use the below commands and replace 'interface value' with the appropriate interface. Valid interface values are: wan, lan, oobfo, and wlan.
# Passing the command "as one line"
config \
-s config.interfaces.'interface value'.mode='static' \
-s config.interfaces.'interface value'.address='opengear interface ip' \
-s config.interfaces.'interface value'.netmask='subnet mask' \
-s config.interfaces.'interface value'.gateway='gateway ip' -a
# Passing the command with multiple lines
config -s config.interfaces.'interface value'.mode='static'
config -s config.interfaces.'interface value'.address='opengear interface ip'
config -s config.interfaces.'interface value'.netmask='subnet mask'
config -s config.interfaces.'interface value'.gateway='gateway ip' -a
Example for NET1 (eth0, wan)
config \
-s config.interfaces.wan.mode=static \
-s config.interfaces.wan.address='10.1.1.5' \
-s config.interfaces.wan.netmask='255.255.255.0' \
-s config.interfaces.wan.gateway='10.1.1.1' -a
config -s config.interfaces.wan.mode='static'
config -s config.interfaces.wan.address='10.1.1.5'
config -s config.interfaces.wan.netmask='255.255.255.0'
config -s config.interfaces.wan.gateway='10.1.1.1' -a
Example for NET2 (eth1, lan)
config \
-s config.interfaces.lan.mode=static \
-s config.interfaces.lan.address='10.1.1.5' \
-s config.interfaces.lan.netmask='255.255.255.0' \
-s config.interfaces.lan.gateway='10.1.1.1' -a
config -s config.interfaces.lan.mode='static'
config -s config.interfaces.lan.address='10.1.1.5'
config -s config.interfaces.lan.netmask='255.255.255.0'
config -s config.interfaces.lan.gateway='10.1.1.1' -a
Comments
0 comments
Please sign in to leave a comment.