6. LW2 Programmer's Reference
RAP-B511 series
– User's Manual
62
Applied firmware package: v1.1.0b3b3 | LDC software: v2.5.1b5
6.4. Network Configuration
6.4.1. Querying the Current IP Status
The IP address settings can be queried as follows.
#dhcp #ipaddress
#network
Command and Response
{IP_STAT=?}
(IP_STAT=
<type>
;
<ip_address>
;
<subnet_mask>
;
<gateway_addr>
)CrLf
Parameters
Parameter
Parameter description
Value
Value description
<type>
Assignment of the IP address
0
static
1
dynamic (DHCP)
<ip_addr>
IP address
(four decimal octets separated by dots)
<subnet_mask>
Subnet mask
(four decimal octets separated by dots)
<gateway_addr>
Gateway address
(four decimal octets separated by dots)
Example
{ip_stat=?}
(IP_STAT=0;192.168.0.100;255.255.255.0;192.168.0.1)
The device has a static (fix) IP address: 192.168.0.100; the subnet mask is 255.255.255.0, the gateway
address is 192.168.0.1.
6.4.2.
Setting the IP Address
IP address can be set as follows.
Command and Response
{IP_ADDRESS=
<type>
;
<ip_address>
}
(IP_ADDRESS=
<type>
;
<ip_address>
)CrLf
Parameters
See the previous section.
Example
{ip_address=0;192.168.0.110}
(IP_ADDRESS=0;192.168.0.110)
INFO:
The IP address can be queried by typing the
{ip_address=?}
command. The response contains the fix
IP address that is stored in the device even if DHCP is enabled; in this case, this IP address is not valid.
6.4.3.
Setting the Subnet Mask
Subnet mask can be set as follows.
Command and Response
{IP_NETMASK=
<subnet_mask>
}
(IP_NETMASK=
<subnet_mask>
)CrLf
Parameters
See the
Querying the Current IP Status
Example
{ip_netmask=255.255.255.0}
(IP_NETMASK=255.255.255.0)
INFO:
The subnet mask can be queried by typing the {ip_address=?} command. The response contains
the fix IP subnet mask that is stored in the device even if DHCP is enabled; in this case, this IP subnet
mask is not valid.
6.4.4.
Setting the Gateway Address
Gateway address can be set as follows.
Command and Response
{IP_GATEWAY=
<gateway_addr>
}
(IP_GATEWAY=
<gateway_addr>
)CrLf
Parameters
See the
Querying the Current IP Status
Example
{ip_gateway=192.168.0.50}
(IP_GATEWAY=192.168.0.50)
INFO:
The gateway address can be queried by typing the {ip_gateway=?} command. The response contains
the static IP gateway address that is stored in the device even if DHCP is enabled. In that case, the latest
valid gateway address (for static IP) is stored.
6.4.5.
Applying the Network Settings
Apply the network settings and restart the network interface.
Command and Response
{ip_apply}
(IP_APPLY)CrLf
Example
{ip_apply}
(IP_APPLY)