set network
Purpose
Sets and displays interface-specific settings for LAN or Wireless LAN (WLAN) networks, and global network settings that are independent of a LAN or WAN interface.
The interface-specific options are for Digi products that support multiple network interfaces. In Digi device firmware, the following interface names are in use:
- LAN interfaces: eth0, eth1, wln0. The interface-specific settings in this command apply to LAN interfaces only.
- WAN interfaces: mobile0 (cellular), wmx0 (WiMAX)
- The name static is for DNS server IP address values that can be configured using the set network options dns1 and dns2. These values are not associated with a specific LAN or WAN interface.
The WAN interfaces (cellular or WiMAX) are configured/managed elsewhere in the command-line interface.
Global network settings include setting a gateway priority; that is, the default gateway is used to route IP packets to an outside network, unless controlled by another route, and the device’s use of Domain Name Server (DNS). Additional options control the device’s use of Transmission Control Protocol, and Address Resolution Protocol (ARP). The ARP options garp and rto_min can be used to optimize for latency at the network level.
Required permissions
For Digi products with two or more users, permissions must be set to set permissions s-network=read to display settings, and set permissions s-network=rw to display and configure settings. See set permissions for details on setting user permissions for commands.
Syntax
Set network configuration options
set network [interface specific options]
[global options]
[tcp keepalive options}
[tcp time wait option]
[tcp retransmit options]
[arp options] [DHCP client ID options]
Where:
interface specific options:
[interface=interface name]
[ip=ip address]
[submask=subnet mask]
[gateway=gateway ip address]
[static={on|off)]
[dhcp={on|off}]
[autoip={on|off}]
[mtu=576-1500] Note: 'if' can be used as an abbreviation for 'interface'
global options:
globalsettings
valid names are: mobile0,eth0
[dns1=primary dns server ip address]
[dns2=secondary dns server ip address]
[dnspriority=comma separated priority list]
valid names are: static,mobile0,eth0
tcp keepalive options:
[idle=10-86400] (seconds)
[probe_count=5-30]
[probe_interval=10-75] (seconds)
tcp retransmit options:
[rto_min=30-1000] (milliseconds)
[rto_max=1-240] (seconds)
tcp time wait option:
[timewait=(10-240)] (seconds)
DHCP client ID options [client_identifier=string] [client_id_type=type]
Note Changes to the TCP options do not affect existing connections.
TCP service listeners continue to use the previous option values until the service is restarted or a reboot is performed.
arp options:
[arp_ttl=1-20] (minutes)
[garp=30-3600] (seconds)
Display current network configuration options
set network
Options
interface specific options
Set configuration options for network interfaces for the Digi device.
interface=interface name
The name of the network interface. Any of the LAN interface names are valid for this option:
eth0
eth1
wln0
ip=device ip address
Sets the device IP address when DHCP is off. This option is only applicable if the static option is set to on.
submask=subnet mask
Sets the device submask address when DHCP is off. This option is only applicable if the static option is set to on.
gateway=gateway ip address
The following three IP address options have a precedence. That is, if all three options are turned on, the order of precedence is: static, dhcp, autoip.
static={on|off}
When enabled, the device uses the specified IP address, gateway address, and submask. The default is off.
The ip, submask, and gateway options are meaningful only if static=on is configured. If static=off, IP configuration values that are applied to the device are obtained via DHCP or auto-IP. This is illustrated by the split display of the set network command output, in which one column shows values in use by the device, while the other shows the values configured in the settings. Even if ip, submask, and gateway are specified in the configuration settings, they are not actually used if static=off.
dhcp={on|off}
When enabled, the device attempts to use the DHCP protocol to find an IP address, gateway address, and submask. The default is on.
The dhcp option is enabled by default in almost all Digi devices, except static is enabled by default for these: all Digi Connect WAN products except Digi Connect WAN IA (which is DHCP default) and ConnectPort WAN VPN.
autoip={on|off}
When enabled, the device attempts to use the Auto IP protocol to find an IP address, gateway address, and submask. The default is on.
mtu=576-1500
This option allows for configuring a Maximum Transmit Unit (MTU) size octets (bytes) when sending packets through the specified network interface. This is the size of the IP packet that follows the network media-specific (for example, Ethernet) packet header. Setting this option limits the maximum size of outbound IP datagrams. Typically, and as the default value, the MTU is 1500 bytes.
A smaller MTU size than the default can be configured if necessary to communicate with remote hosts over a routed network connection that requires smaller packets and will not support IP fragmentation. While this reduces the number of bytes per packet, which results in more packets being required to carry the same payload data, if a lot of data is sent, there are cases where a reduced maximum size is necessary.
For example, some routers in the Internet do not support maximum-size packets, particularly if they are being run through a tunnel (such as a VPN) in the path between sender and receiver. Although there is a convention/protocol called Path MTU Discovery (PMTUD) that can assist in such cases, using that protocol involves the use of ICMP packets to communicate back to the packet sender that it should send smaller packets. Some routers do not actually return those ICMP packets to the sender of the “too large” packet, which breaks the PMTUD mechanism. While this is more likely a problem for cellular and other WAN interfaces, it is the case that Ethernet and Wi-Fi also can be used as WAN interfaces in Digi products, such that they interface directly to the public Internet. In that case, setting the MTU size smaller of the eth0 or wln0 interface may be beneficial.
global options
globalsettings
Displays the global network settings.
gwpriority=comma-separated interface name list
A list of network interfaces, in priority order, used to determine the default gateway. The default gateway is used to route IP packets to an outside network, unless controlled by another route. All of the LAN and WAN interface names are valid for the gwpriority option value list:
eth0
eth1
wln0
mobile0
wmx0
A network interface can have a static gateway configured, or obtain a gateway from DHCP or other means when it is connected. The first interface in this list that supplies a gateway is used as the default gateway. The default gateway may change as interfaces connect and disconnect.
The IP Network Failover feature provides a dynamic method for selecting the default gateway. If IP Network Failover is properly configured and enabled, it overrides the gateway priority setting on this command. For a description of the failover feature and information on how to configure it, see "set failover" on page 219.
dns1=primary dns server ip address
dns2=secondary dns server ip address
For DNS, these options specify the DNS nameservers to use. Name lookups will be performed using the nameserver specified on dns1 first, and if that fails, the nameserver specified on dns2 will be used.
dnspriority=comma separated priority list
A list of DNS servers, in priority order, used to resolve computer host names. All of the LAN and WAN interface names, plus the keyword static, are valid for this value list:
eth0
eth1
wln0
mobile0
wmx0
static
Each type of server is tried, starting with the first in the list. For each server type, the primary server is tried first. If no response is received, the secondary server is tried. If neither server can be contacted, the next server type in the list is tried.
A network interface can obtain a DNS server from DHCP or other means when it is connected. If an interface does not obtain a DNS server, it is skipped and the next server in the priority list is tried.
tcp keepalive options
Options that configure how TCP keep-alive probes are sent.
The keep-alive options (idle, probe_count, probe_interval) should be configured for various services that are configured by set service keepalive={on|off}, or clients such as autoconnect, configured by set autoconnect keepalive={on|off}.
idle=10-86400
The amount of time, in seconds, to wait while not receiving TCP packets before sending out a keep-alive probe.
probe_count=5-30
The number of TCP keep-alive probes (specially formatted TCP frames) to send out before closing the TCP connection.
probe_interval=10-75
The amount of time, in seconds, to wait between sending TCP keep-alive probes.
tcp retransmit options
Options that control retransmission of TCP packets, including:
rto_min=30-1000 (milliseconds)
The lower bound or threshold for the TCP retransmission timeout (RTO), in milliseconds. The default is 1000 milliseconds.
TCP uses progressively larger retransmit values, starting at a minimum value that is calculated from a sliding window of ACK response round-trip times that is bounded at the bottom by rto_min. So, essentially, rto_min is not necessarily the timeout that will be used as the starting retransmit timeout, but it is the smallest such value that could be used.
This affects latency, because lowering rto_min ensures that retransmits take place in less time if they occur. By occurring sooner, the network is able to recover the lost data in less time at the expense of possibly retransmitting data that is still in-flight or successfully received by the other side, but unacknowledged due to a “delayed ACK” mechanism or something similar. Choosing a value lower than the default of 1000 milliseconds may help achieve improved latency performance when retransmissions occur.
rto_max=1-240 (seconds)
The upper bound or threshold for the TCP retransmission timeout (RTO), in seconds. When one side of a TCP connection sends a packet and does not receive an acknowledgment from the other side within the timeout period, the sending station retransmits the packet and sets an exponential backoff timeout. This is done for each successive retransmit until the maximum retransmission timeout is reached. Then, the TCP connection resets.
arp options
Options that control Address Resolution Protocol (ARP) requests.
arp_ttl=1-20 (minutes)
The initial value of the ARP time-to-live variable, which is the amount of time that an ARP entry remains in the network ARP cache. When an ARP cache entry first populated, the ARP time-to-live variable is set to this value. When the entry has existed in the table for this long without being updated, another ARP cache request is performed to make sure that there is not a new a new device at that IP.
garp=30-3600 (seconds)
The frequency of Gratuitous ARP (GARP) announcements. A Gratuitous ARP is a broadcast announcement to the network of a device’s MAC address and the IP address being used for it. This allows the network to update its ARP cache tables without performing an ARP request on the network.
Gratuitous ARP announcements can affect latency in a limited way, because some systems stall or dispose of data that is transmitted during an ARP cache refresh. If this happens, setting the Gratuitous ARP frequency to be more often than the problem system’s time-to-live variable can cause it to refresh the cache without needing to perform a request.
DHCP client ID options
Options that you can use to specify a client identifier.
client_identifier=string
A text string consisting of 30 or fewer characters, which must be surrounded by quotation marks if it contains spaces. The default is an empty string. To enter non-printable characters, use hexadecimal format, which is \xn, where n is a hexadecimal value from 0 through F. To use the backslash character as the string, use two consecutive backslash characters (\\).
client_id_type=type
A number between 0 and 255 that can be used to define the type of information in the client_identifier string. For example, all routers could be assigned 11 as the client_id_type.
Examples
Configure global network settings
#> show network globalsettings Global (interface independent) settings: Currently in use by the network stack Stored configuration -------------------- ------------------- keepalive idle : 7200 7200 probe count : 9 9 probe interval : 75 75 dns1 : 209.183.33.23 0.0.0.0 dns2 : 209.183.33.23 0.0.0.0 rto_min : 1000 1000 rto_max : 60 60 timewait : 60 60 arp_ttl : 15 15 garp : 3600 3600 gwpriority : mobile0,eth0 dnspriority : static,mobile0,eth0
Configure settings for Ethernet interface eth0
#> show network interface=eth0 "eth0" interface configuration: MAC Address : 00:40:9D:36:DE:A8 Currently in use by the network stack Stored configuration -------------------- ------------------- ipaddress : 10.30.1.121 192.168.1.1 submask : 255.255.255.0 255.255.255.0 gateway : 10.30.1.1 0.0.0.0 static : off off dhcp : supplied IP address on dhcp server : 10.30.1.11 lease duration : 86400 (seconds) renew after : 43200 (seconds) rebind after : 75600 (seconds) lease remaining : 61943 (seconds) autoip : on on mtu : 1500 1500
Manually set the device IP address
#> set network ip=10.0.0.1 gateway=255.255.255.0 submask=255.255.255.0 dhcp=off static=on autoip=off
Use DHCP to find an IP address, gateway address, and submask
#> set network static=off dhcp=on
Use DHCP or the Auto IP protocol to automatically configure network settings
#> set network static=off dhcp=on autoip=on
See also
- revert: The revert network command reverts the settings configured by this command.
- set autoconnect
- set dhcpserver
- set mobile and set mobileppp to configure settings for a cellular (mobile) network interface
- set sharing
- set service
- set wlan
- set wimax to configure settings for a WiMAX network interface.
- show: The show network command shows the current network settings in a Digi device.
- The “Latency tuning” chapter of the Digi Connect Family User Guide (Digi part number 9000565).