05-Application Commands
05-Application Commands
2. DHCP Commands
3. DNS Commands
4. DDNS Commands
5. NTP Commands
6. SNTP Commands
7. SMART-DNS Commands
Parameter
Parameter Description
Description
owner User index
test-name Test index
Defaults N/A
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
1.2 ping
Use this command to test the connectivity of a network to locate the network connectivity problem. The
command format is as follows:
ping [ ip ] { hostname | ipv4-address } [ data data | detail | df-bit | interval interval | length length |
ntimes times | out-interface interface-type interface-number [ next-hop next-hop ] | [ source
interface-type interface-number | source source-ipv4-address ] | timeout time | validate ] *
ping oob { hostname | ipv4-address } [ data data | detail | df-bit | interval interval | length length | ntimes
times | out-interface interface-type interface-number [ next-hop next-hop ] | [ source interface-type
1-1
Command Reference Network Connectivity Test Tool Commands
Parameter
Parameter Description
Description
hostname Destination host name.
ipv4-address Destination IPv4 address.
Specifies the padding data of the packet. The format is a string
data data
of 1 to 255 characters. By default, abcd is padded.
Configures whether to display the detailed information. By
detail default, only the exclamation mark (!) and period (.) are
displayed..
Configures the DF bit of the IP address. If the DF bit is set to 1,
df-bit
the packet is not segmented. The default value is 0.
Specifies the interval between the Ping packets, in
interval interval milliseconds. The value range is from 10 to 300000, and the
default value is 100.
Specifies the length of the padding section in the sent packet,
length length in bytes. The value range is from 36 to 18024, and the default
value is 100.
Specifies the number of sent packets. The value range is from
ntimes times
1 to 4294967295. The default value is 5.
out-interface interface-type Specifies the type and number of the outbound interface used
interface-number to send the packets.
Specifies the type and number of the source interface of the
source interface-type interface-number
packets.
source source-ipv4-address Specifies the source IPv4 address or source interface of the
packets. A loopback interface, for example, 127.0.0.1, cannot
be configured as the source address.
timeout time Specifies the timeout, in seconds. The value range is from 1 to
10, and the default value is 2.
validate Indicates that an out-of-band channel is used. This parameter
is mandatory if the MGMT interface is configured as the source
interface.
oob Specifies the ping interval, in the range from 10 to 300000
milliseconds. Default: 100 milliseconds.
via mgmt-name Specifies the outbound MGMT interface of packets where the
Ping operation is performed.
Defaults Five packets with 100Byte in length are sent to the specified IP address within specified time (2s by
default).
1-2
Command Reference Network Connectivity Test Tool Commands
Usage If the device can be pinged, the response information is displayed, and the statistics is listed at the end.
Guide For the extension functions of ping, the number, quantity and timeout time of the packets to be sent can be
specified, and the statistics is also displayed in the end. To use the domain name function, configure the
domain name server firstly. For the concrete configuration, refer to the DNS Configuration section.
Configurati The following example tests the connectivity of a network to locate the network connectivity problem.
on (regular ping).Ruijie# ping 192.168.21.26
Examples Sending 5, 100-byte ICMP Echoes to 192.168.21.26, timeout is 2 seconds:
< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms
VRF is not supported by NBR devices. The example in this document is only for your reference.
The following example tests the connectivity of a network to locate the network connectivity problem
(extension ping).
Ruijie# ping 192.168.21.26 length 1500 ntimes 100 data ffff source 192.168.21.99
timeout 3
Sending 100, 1500-byte ICMP Echoes to 192.168.21.26, timeout is 3 seconds:
< press Ctrl+C to break >
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 2/2/3 ms
The following example displays the details.
ping 192.168.21.26 length 1500 ntimes 20 data ffff source 192.168.21.99 timeout
3 detail
Sending 20, 1500-byte ICMP Echoes to 192.168.21.26, timeout is 3 seconds:
< press Ctrl+C to break >
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
Reply from 192.168.21.26: bytes=1500 time=1ms TTL=64
1-3
Command Reference Network Connectivity Test Tool Commands
Related
Command Description
Commands
N/A N/A
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
Use this command to test the connectivity of a network to locate the network connectivity problem. The
command format is as follows:
ping [ ipv6 ] { hostname | ipv6-address } [ data data | detail | interval interval | length length | ntimes
times | out-interface interface-type interface-number [ next-hop next-hop ] | [ source interface-type
interface-number | source source-ipv6-address ] | timeout time ] *
ping oob { hostname | ipv6-address } [ data data | detail | interval interval | length length | ntimes times |
out-interface interface-type interface-number [ next-hop next-hop ] | [ source interface-type
interface-number | source source-ipv6-address ] | timeout time | validate | via mgmt-name ] *
Parameter
Parameter Description
Description
hostname Destination host name.
ipv6-address Destination IPv6 address.
Specifies the padding data of the packet. The format is a string
data data
of 1 to 255 characters. By default, abcd is padded.
1-4
Command Reference Network Connectivity Test Tool Commands
Defaults Five packets with 100 Byte in length are sent to the specified IP address within specified time (2s by
default).
Usage If the device can be pinged, the response information is displayed, and the statistics is listed at the end.
Guide For the extension functions of ping, the number, quantity and timeout time of the packets to be sent can be
specified, and the statistics is also displayed in the end. To use the domain name function, configure the
domain name server firstly. For the concrete configuration, refer to the DNS Configuration section.
Configurati The following example executes the common Ping IPv6 function.
on //When the details are not shown:
Examples Ruijie# ping ipv6 2001::5
Sending 5, 100-byte ICMP Echoes to 2001::5, timeout is 2 seconds:
< press Ctrl+C to break >
!!!!!
1-5
Command Reference Network Connectivity Test Tool Commands
Related
Command Description
Commands
N/A N/A
1-6
Command Reference Network Connectivity Test Tool Commands
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
Parameter
Parameter Description
Description
N/A N/A
Defaults N/A
Usage Guide This command is used to display the Rping information such as numbers of test accounts and users.
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
1-7
Command Reference Network Connectivity Test Tool Commands
1.5 traceroute
Use this command to display all gateways passed by the IPv4 test packets from the source address
to the destination address.
traceroute [ ip ] { hostname | ipv4-address } [ out-interface interface-type interface-number
[ next-hop next-hop ] | probe probe | [ source interface-type interface-number | source
source-ipv4-address ] | timeout time | ttl minimum maximum ] *
Parameter
Parameter Description
Description
hostname Destination host name.
ipv4-address Destination IPv4 address.
out-interface interface-type Specifies the type and number of the outbound interface used to send
interface-number the packets.
Specifies the IPv4 address of the next hop of the outbound interface
next-hop next-hop
used to send the packets.
Specifies the number of sent probe packets. The value range is from
probe probe
1 to 255, and the default value is 3.
source interface-type
Specifies the type and number of the source interface of the packets.
interface-number:
Specifies the source IPv4 address or source interface of the packets.
source source-ip-address A loopback interface, for example, 127.0.0.1, cannot be configured as
the source address.
timeout time Specifies the timeout, in seconds. The value range is from 1 to 10,
and the default value is 3.
ttl minimum maximum Specifies the minimum and maximum TTL values. The value range is
from 1 to 255. By default, the minimum TTL is 1, and the maximum
TTL is 255.
oob Indicates that an out-of-band channel is used. This parameter is
mandatory if the MGMT interface is configured as the source
interface.
via mgmt-name Specifies the outbound MGMT interface of packets where the
Traceroute operation is performed.
Defaults By default, seconds is 3 seconds, number is 3, minimum and maximum are 1 and 255.
1-8
Command Reference Network Connectivity Test Tool Commands
Usage Guide Use the traceroute command to test the connectivity of a network to exactly locate the network
connectivity problem when the network failure occurs. To use the function domain name, configure
the domain name server. For the concrete configuration, refer to the DNS Configuration part.
Configuration The following is two examples of the application bout traceroute, the one is of the smooth network,
Examples and the other is the network in which some gateways aren’t connected successfully.
1. When the network is connected smoothly:
Ruijie# traceroute 61.154.22.36
< press Ctrl+C to break >
Tracing the route to 61.154.22.36
1-9
Command Reference Network Connectivity Test Tool Commands
The above result clearly shown that the gateways passed by the packets sent
to the host with an IP address of 202.108.37.42 (gateways 1~17) and the spent
time are displayed, and gateway 4 fails.
Ruijie# traceroute www.ietf.org
Translating "www.ietf.org"...[OK]
< press Ctrl+C to break >
Tracing the route to 64.170.98.32
Related
Command Description
Commands
N/A N/A
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
Use this command to display all gateways passed by the IPv6 test packets from the source address
to the destination address.
traceroute [ ipv6 ] { hostname | ipv6-address } [ out-interface interface-type interface-number
[ next-hop next-hop ] | probe probe | [ source interface-type interface-number | source
source-ipv6-address ] | timeout time | ttl minimum maximum ] *
1-10
Command Reference Network Connectivity Test Tool Commands
Parameter
Parameter Description
Description
hostname Destination host name.
ipv6-address Destination IPv6 address.
out-interface interface-type Specifies the type and number of the outbound interface used to send
interface-number the packets.
Specifies the IPv4 address of the next hop of the outbound interface
next-hop next-hop
used to send the packets.
Specifies the number of sent probe packets. The value range is from
probe probe
1 to 255, and the default value is 3.
source interface-type
Specifies the type and number of the source interface of the packets.
interface-number:
Specifies the source IPv6 address or source interface of the packets.
source source-ipv6-address A loopback interface, for example, ::1, cannot be configured as the
source address.
timeout time Specifies the timeout, in seconds. The value range is from 1 to 10,
and the default value is 3.
ttl minimum maximum Specifies the minimum and maximum TTL values. The value range is
from 1 to 255. By default, the minimum TTL is 1, and the maximum
TTL is 255.
oob Indicates that an out-of-band channel is used. This parameter is
mandatory if the MGMT interface is configured as the source
interface.
via mgmt-name Specifies the outbound MGMT interface of packets where the
Traceroute operation is performed.
Defaults By default, seconds is 3 seconds, number is 3, minimum and maximum are 1 and 255.
Usage Guide Use the traceroute ipv6 command to test the connectivity of a network to exactly locate the network
connectivity problem when the network failure occurs. To use the function domain name, configure
the domain name server. For the concrete configuration, refer to the DNS Configuration part.
Configuration The following is two examples of the application bout traceroute, the one is of the smooth network,
Examples and the other is the network in which some gateways aren’t connected successfully.
1. When the network is connected smoothly:
Ruijie# traceroute ipv6 3004::1
< press Ctrl+C to break >
Tracing the route to 3004::1
1-11
Command Reference Network Connectivity Test Tool Commands
Related
Command Description
Commands
N/A N/A
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
1-12
Command Reference DHCP Commands
2 DHCP Commands
Use this command to specify the network segment range of the addresses that can be allocated by
CLASS associated with DHCP address pool. Use the no form of this command to restore the default
setting.
address range low-ip-address high-ip-address
no address range
Defaults By default, the associated CLASS is not configured with the network segment range. The default is
the address pool range.
Usage Guide This command is configured on a Dynamic Host Configuration Protocol (DHCP) server. Each CLASS
corresponds to one network range which must be from low address to high address, so as to allow
the duplication of network segment range between multiple CLASSes. If the CLASS associated with
the address pool is specified without configuring the corresponding network segment range, the
default network segment range of this CLASS is same as the range of the address pool where this
CLASS is.
Configuration The following example configures the network segment of class1 associated with address pool
Examples mypool0 ranging from 172.16.1.1 to 172.16.1.8.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# class class1
Ruijie (config-dhcp-pool-class)# address range 172.16.1.1 172.16.1.8
Platform N/A
Description
2-1
Command Reference DHCP Commands
2.2 bootfile
Use this command to define the startup mapping file name of the DHCP client. Use the no or default
form of this command to restore the default setting.
bootfile file-name
no bootfile
default bootfile
Configuration The following example defines the device.conf as the startup file name.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# bootfile device.conf
Platform N/A
Description
2.3 class
Use this command to configure the associated CLASS in the DHCP address pool. Use the no form of
this command to restore the default setting.
class class-name
no class
2-2
Command Reference DHCP Commands
Configuration The following example configures the address mypool0 to associate with class1.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# class class1
Platform N/A
Description
Parameter
Parameter Description
Description
* Clears the entries of DHCP clients to be authorized.
Clears the entries of DHCP clients to be authorized of the specified MAC
mac-addr
addresses.
2-3
Command Reference DHCP Commands
Default Level 14
Usage Guide This command is configured on a DHCP server. This command can only clear entries of DHCP clients to be
authorized that are generated upon terminal access without fixed bindings when the solidify attribute is
enabled for the address pool.
Configuration The following example clears entries of the DHCP client with the MAC address of 00d0.5564.8899.
Examples Ruijie# clear ip dhcp auth-agent 00d0.5564.8899
Notification -
Platform
-
Description
Use this command to clear the DHCP binding table in the privileged user mode.
clear ip dhcp binding { * | ip-address }
Defaults N/A.
Configuration The following example clears the DHCP binding with the IP address 192.168.12.100.
Examples Ruijie# clear ip dhcp binding 192.168.12.100
Platform N/A
Description
2-4
Command Reference DHCP Commands
Defaults N/A.
Usage Guide This command is configured on a DHCP server. The DHCP server uses the ping session to detect the
address conflict, while the DHCP client uses the address resolution protocol (ARP) to detect the
address conflict. The clear ip dhcp conflict command can be used to delete the history conflict
record.
Platform N/A
Description
Parameter
Parameter Description
Description
* Clears all dynamic online DHCP entries.
Clears the dynamic online DHCP entries for terminals with the
mac-addr
specified MAC addresses.
2-5
Command Reference DHCP Commands
Default Level 14
Usage Guide This command is configured on a DHCP server. This command can only clear online entries that are
dynamic assigned, but cannot clear online entries of fixed bindings.
Configuration The following example clears dynamic online DHCP entries of the terminal with the MAC address of
Examples 00d0.5564.8899.
Ruijie# clear ip dhcp dynamic-binding 00d0.5564.8899
Notification N/A
Platform
N/A
Description
Use this command to clear the address assigned by the DHCP server.
clear ip dhcp history { * | mac-address }
Defaults N/A
Usage Guide This command is configured on the DHCP server. A DHCP server saves information about all
assigned IP addresses. This command is used to clear all historical address records.
Configuration The following example clears all addresses assigned by the DHCP server.
Examples Ruijie# clear ip dhcp history *
Platform N/A
Description
2-6
Command Reference DHCP Commands
Defaults N/A
Usage Guide The DHCP relay is configured with the counter to count various packets received or transmitted by
the relay. This command is used to clear the counters.
Platform N/A
Description
Use this command to clear statistics about the fake DHCP server.
clear ip dhcp server detect { * | ip-address }
Defaults N/A
Command
Privileged EXEC mode
Mode
Usage Guide This command is configured on a DHCP server. The detected fake DHCP server addresses are
saved on the server. You can use the clear ip dhcp server detect command to clear statistics about
the fake DHCP server.
Configuration The following example clears statistics about all fake DHCP servers.
Examples Ruijie# clear ip dhcp server detect *
2-7
Command Reference DHCP Commands
Platform N/A
Description
Use this command to clear statistics about the packet processing rate of every module.
clear ip dhcp server rate
Defaults N/A
Usage Guide This command is configured on a DHCP server. This command is used to clear statistics about the
packet processing rate of every module, including arp, hot backup, lsm, and socket.
Configuration The following example clears statistics about the packet processing rate of every module.
Examples Ruijie# clear ip dhcp server rate
Platform N/A
Description
Parameter
Parameter Description
Description
N/A N/A
2-8
Command Reference DHCP Commands
Default Level 14
Usage Guide This command is configured on a DHCP server. This command is used to clear historical DHCP statistics on
the number of online IP addresses.
Notification N/A
Platform
N/A
Description
Use this command to reset the counter of the DHCP server in the privileged user mode.
clear ip dhcp server statistics
Defaults N/A
Configuration The following example clears the statistics record of the DHCP server.
Examples Ruijie# clear ip dhcp server statistics
Platform N/A
Description
2-9
Command Reference DHCP Commands
Parameter
Parameter Description
Description
- -
Default Level 14
Usage Guide This command is configured on a DHCP server. This command can only clear online entries that are
assigned after fixed bindings are configured and cancel the fixed bindings.
Notification N/A
Platform
N/A
Description
Parameter
Parameter Description
Description
history Specifies historical alarm information.
current Specifies current alarm information.
Default Level 14
Usage Guide This command is configured on a DHCP server. This command is used to clear the alarm information
including terminal migration, address exhaustion, terminals to be authorized, and address conflicts.
2-10
Command Reference DHCP Commands
Notification N/A
Platform
N/A
Description
2.16 client-identifier
Use this command to define the unique ID of the DHCP client (indicated in hex, separated by dot) in the
DHCP address pool configuration mode. Use the no form of this command to restore the default
setting.
client-identifier unique-identifier
no client-identifier
Defaults N/A.
Usage Guide This command is configured on a DHCP server. When some DHCP clients request the DHCP server to
assign IP addresses, they use their client IDs rather than their hardware addresses. The client ID
consists of media type, MAC addresses and interface name. For instance, the MAC address is
00d0.f822.33b4, the interface name is GigabitEthernet 0/1, and the corresponding client ID is
0100.d0f8.2233.b467.6967.6162.6974.4574.6865.726e.6574.302f.31, where, 01 denotes the type of
the Ethernet media.
The 67.6967.6162.6974.4574.6865.726e.6574.302f.31 is the hex code of GigabitEthernet0/1. For the
definition of the media code, refer to the Address Resolution Protocol Parameters section in RFC1700.
This command is used only when the DHCP is defined by manual binding.
Configuration The following example defines the client ID of the Ethernet DHCP client whose MAC address is
Examples 00d0.f822.33b4.
Ruijie(dhcp-config)# client-identifier 0100.d0f8.2233.b467.6967.6162.6974.45
74.6865.726e.6574.302f.31
2-11
Command Reference DHCP Commands
Defines the name of the DHCP address pool and enters the DHCP address
ip dhcp pool
pool configuration mode.
Platform N/A
Description
2.17 client-name
Use this command to define the name of the DHCP client in the DHPC address pool configuration
mode. Use the no or default form of this command to restore the default setting.
client-name client-name
no client-name
Usage Guide This command can be used to define the name of the DHCP client only when the DHCP is defined by
manual binding. This name should not include the suffix domain name.
Configuration The following example defines a string river as the name of the client.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# client-name river
Platform N/A
Description
2.18 default-router
Use this command to define the default gateway of the DHCP client in the DHPC address pool
2-12
Command Reference DHCP Commands
configuration mode. Use the no or default form of this command to restore the default setting.
default-router ip-address [ ip-address2…ip-address8 ]
no default-router
Usage Guide In general, the DHCP client should get the information of the default gateway from the DHCP server.
The DHCP server should specify one gateway address for the client at least, and this address should
be of the same network segment as the address assigned to the client.
Platform N/A
Description
2.19 dns-server
Use this command to define the DNS server of the DHCP client in the DHPC address pool
configuration mode. Use the no or default form of this command to restore the default setting.
dns-server ip-address [ ip-address2…ip-address8 ]
no dns-server
default dns-server
2-13
Command Reference DHCP Commands
Usage Guide When more than one DNS server is defined, the former will possess higher priory, so the DHCP client
will select the next DNS server only when its communication with the former DNS server fails.
If the RGOS software also acts as the DHCP client, the DNS server information obtained by the client
can be transmitted to the DHCP client.
Configuration The following example specifies the DNS server 192.168.12.3 for the DHCP client.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# dns-server 192.168.12.3
Platform N/A
Description
2.20 domain-name
Use this command to define the suffix domain name of the DHCP client in the DHPC address pool
configuration mode. Use the no or default form of this command to restore the default setting.
domain-name domain-name
no domain-name
Usage Guide After the DHCP client obtains specified suffix domain name, it can access a host with the same suffix
domain name by the host name directly.
Configuration The following example defines the suffix domain name i-net.com.cn for the DHCP client.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# domain-name ruijie.com.cn
2-14
Command Reference DHCP Commands
Platform N/A
Description
2.21 hardware-address
Use this command to define the hardware address of the DHCP client in the DHPC address pool
configuration mode. Use the no or default form of this command to restore the default setting.
hardware-address hardware-address [ type ]
no hardware-address
default hardware-address
Usage Guide This command can be used only when the DHCP is defined by manual binding.
Configuration The following example defines the MAC address 00d0.f838.bf3d with the type ethernet.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# hardware-address 00d0.f838.bf3d
2-15
Command Reference DHCP Commands
Defines the name of the DHCP address pool and enter the DHCP
ip dhcp pool
address pool configuration mode.
default-router Defines the default route of the DHCP client.
Platform N/A
Description
2.22 host
Use this command to define the IP address and network mask of the DHCP client host in the DHCP
address pool configuration mode. Use the no or default form of this command to restore the default
setting.
host ip-address [ netmask ]
no host
defaut host
Usage Guide If the network mask is not defined definitely, the DHCP server will use the natural network mask of
this IP address: 255.0.0.0 for class A IP address, 255.255.0 for class B IP address, and
255.255.255.0 for class C IP address.
This command can be used only when the DHCP is defined by manual binding.
Configuration The following example sets the client IP address as 192.168.12.91, and the network mask as
Examples 255.255.255.240.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# host 192.168.12.91 255.255.255.240
2-16
Command Reference DHCP Commands
Platform N/A
Description
Use this command to make the Ethernet interface or the PPP, HDLC and FR encapsulated interface
obtain the IP address information by the DHCP in the interface configuration mode. Use the no or
default form of this command to restore the default setting.
ip address dhcp
no ip address dhcp
defaut ip address dhcp
Defaults The interface cannot obtain the ID address by the DHCP by default.
Usage Guide When requesting the IP address, the DHCP client of the RGOS software also requires the DHCP
server provide 5 configuration parameter information: 1) DHCP option 1, client subnet mask, 2)
DHCP option 3, it is the same as the gateway information of the same subnet, 3) DHCP option 6, the
DNS server information, 4) DHCP option 15, the host suffix domain name, and 5) DHCP option 44,
the WINS server information (optional).
The client of the RGOS software is allowed to obtain the address on the PPP, FR or HDL link by the
DHCP, which should be supported by the server. At present, our server can support this function.
Configuration The following example makes the FastEthernet 0 port obtain the IP address automatically.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1) ip address dhcp
Platform N/A
Description
Use this command to configure fixed binding to allocate a fixed IP address based on the access location,
2-17
Command Reference DHCP Commands
Use the default form of this command to restore the default setting.
default ip dhcp add-client { solidify-ip ip ip-addr | solidify-location ip ip-addr | solidify-mac mac
mac-addr }
Parameter
Parameter Description
Description
Binding type of the fixed address. The address can be bound
binding-type based on the access location, terminal host name, and terminal
MAC address.
ip-addr Fixed IP address to be assigned.
dev-addr IP or MAC address of the access device.
vlanid VLAN ID to which the terminal access port belongs.
portid Number of the terminal access port on the access device.
hostname Host name of the terminal.
mac-addr MAC address of the terminal.
Default Level 14
Usage Guide This command is used to assign a fixed IP address based on one or more among the specified access
location, host name, and terminal MAC address.
The fixed binding information can also be used for authorization. When the solidify attribute is enabled for
the address pool, only terminals with matching fixed binding information can obtain addresses from the
address pool.
Configuration The following example configures fixed IP address assignment based on the terminal MAC address.
Examples Ruijie(config)# ip dhcp add-client solidify-ip ip 192.168.100.100 mac
00d0.cce2.eefa binding-type ip-mac
2-18
Command Reference DHCP Commands
Notification When fixed binding fails to be configured because the IP address to be bound is not configured, the
following notification will be displayed:
Failed to set solidify agent(x.x.x.x. type = XX), because of wrong parameter(ip
= 0.0.0.0).
When fixed binding fails to be configured because the terminal MAC address to be bound is not
configured, the following notification will be displayed:
Failed to set solidify agent(H.H.H type = XX),because of wrong parameter(mac =
0000.0000.0000).
When fixed binding is configured for the same terminal again, the following notification will be displayed:
Solidify agent(%s type = %s) ip has been set by other solidify.
When fixed binding fails to be configured because the host name to be bound is not configured, the
following notification will be displayed:
Failed to set solidify agent(%s type = %s), because of wrong parameter (hostname
is NULL).
When fixed binding fails to be configured because the access location to be bound is not configured, the
following notification will be displayed:
Failed to set solidify agent(%s type = %s), because of wrong parameter (acc-dev
ip = 0.0.0.0).
Failed to set solidify agent(%s type = %s), because of wrong parameter (acc-dev
mac = 0000.0000.0000).
When fixed binding fails to be configured because it conflicts with static binding, the following notification
will be displayed:
Solidify agent(%s type = %s) has been set by static(ret = %d).
When fixed binding fails to be configured because it conflicts with dynamic online terminal information,
the following notification will be displayed:
Solidify agent(%s type = %s) has been set by dynamic.
Common
N/A
Errors
Platform
This command is supported only on devices that support external storage.
Description
Use this command to define a CLASS and enter the global CLASS configuration mode. Use the no
form of this command to restore the default setting.
2-19
Command Reference DHCP Commands
Usage Guide After executing this command, it enters the global CLASS configuration mode which is shown as
“Ruijie (config-dhcp-class)#”. In this configuration mode, user can configure the Option82 information
that matches the CLASS and the CLASS identification information.
Platform N/A
Description
Use this command to define some IP addresses and make the DHCP server not assign them to the
DHCP client in the global configuration mode. Use the no form of this command to restore the default
setting.
ip dhcp excluded-address low-ip-address [ high-ip-address ]
no ip dhcp excluded-address low-ip-address [ high-ip-address ]
default ip dhcp excluded-address low-ip-address [ high-ip-address ]
Defaults The DHCP server assigns the IP addresses of the whole address pool by default.
Usage Guide If the excluded IP address is not configured, the DHCP server attempts to assign all IP addresses in
2-20
Command Reference DHCP Commands
the DHCP address pool. This command can reserve some IP addresses for specific hosts to prevent
these addresses are assigned to the DHCP client, and define the excluded IP address accurately to
reduce the conflict detecting time when the DHCP server assigns the address.
Configuration In the following example, the DHCP server will not attempt to assign the IP addresses within
Examples 192.168.12.100~150.
Ruijie(config)# ip dhcp excluded-address 192.168.12.100 192.168.12.150
Platform N/A
Description
Use this command to configure the forcible NAK packet sending function. Use the no or default form
of this command to restore the default setting.
ip dhcp force-send-nak
no ip dhcp force-send-nak
default ip dhcp force-send-nak
Usage Guide The DHCP client checks the previously used IP address every time it is started and sends a
DHCPREQUEST packet to continue leasing this IP address. If the address is not available, the DHCP
server sends an NAK packet to let the client resend a DHCPDISCOVER packet to apply for a new IP
address. If no corresponding lease record can be found on the server, the client keeps sending
DHCPDISCOVER packets. The forcible NAK packet sending function is added to shorten the interval
at which the client sends DHCPDISCOVER packets.
Configuration The following example enables the forcible NAK packet sending function in global configuration
Examples mode.
Ruijie(config)# ip dhcp force-send-nak
2-21
Command Reference DHCP Commands
Platform N/A
Description
Use this command in layer-3 configuration mode to enable the DHCP Server to monitor the status of
VRRP interfaces so that the DHCP Server processes only those packets sent from a VRRP interface
in the Master state. Use the no or default form of this command to restore the default setting. If it is
canceled, the DHCP Server processes packets from VRRP interfaces in the Master or Backup state.
ip dhcp monitor-vrrp-state
no ip dhcp monitor-vrrp-state
default ip dhcp monitor-vrrp-state
Usage Guide If a VRRP address is configured for an interface, the DHCP Server processes packets sent from the
master interface and discards packets sent from the backup interface. If no VRRP address is
configured, the DHCP Server does not monitor the status of VRRP interfaces. All DHCP packets will
be processed.
Configuration The following example enables the DHCP Server to monitor the status of VRRP interfaces.
Examples Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip dhcp monitor-vrrp-state
Platform N/A
Description
Use this command to configure the times of pinging the IP address when the DHCP server detects
2-22
Command Reference DHCP Commands
address conflict in the global configuration mode. Use the no or default form of this command to
restore the default setting.
ip dhcp ping packets [ number ]
no ip dhcp ping packets
default ip dhcp ping packets
Usage Guide When the DHCP server attempts to assign the IP address from the DHCP address pool, use the ping
operation to check whether this address is occupied by other hosts. Record it if the address is
occupied, otherwise, assign it to the DHCP client. The Ping operation will send up to 10 packets, two
packets by default.
Configuration The following example sets the number of the packets sent by the ping operation as 3.
Examples Ruijie(config)# ip dhcp ping packets 3
Platform N/A
Description
Use this command to configure the timeout that the DHCP server waits for response when it uses the
ping operation to detect the address conflict in the global configuration mode. Use the no or default
form of this command to restore the default setting.
ip dhcp ping timeout milli-seconds
no ip dhcp ping timeout
default ip dhcp ping timeout
2-23
Command Reference DHCP Commands
Usage Guide This command defines the time that the DHCP server waits for a ping response packet.
Configuration The following example configures the waiting time of the ping response packet to 600ms.
Examples Ruijie(config)# ip dhcp ping timeout 600
Platform N/A
Description
Use this command to define a name of the DHCP address pool and enter the DHCP address pool
configuration mode in the global configuration mode. Use the no or default form of this command to
restore the default setting.
ip dhcp pool pool-name [ set-real-pool rpool-name | unset-real-pool ]
no ip dhcp pool pool-name
default ip dhcp pool pool-name
2-24
Command Reference DHCP Commands
Usage Guide Execute the command to enter the DHCP address pool configuration mode:
Ruijie(dhcp-config)#
In this configuration mode, configure the IP address range, the DNS server and the default gateway.
Configuration The following example defines a DHCP address pool named mypool0.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)#
Related
Command Description
Commands
Defines the IP address and network mask, which is used to configure
host
the DHCP manual binding.
Defines the IP addresses that the DHCP server cannot assign to the
ip dhcp excluded-address
clients.
Defines the network number and network mask of the DHCP address
network (DHCP)
pool.
Platform N/A
Description
Defaults N/A
Platform N/A
Description
2-25
Command Reference DHCP Commands
Use this command to enable the ip dhcp relay check server-id function. Use the no form of this
command to restore the default setting.
ip dhcp relay check server-id
no ip dhcp relay check server-id
Configuration The following example enables the ip dhcp relay check server-id function.
Examples Ruijie# configure terminal
Ruijie(config)# ip dhcp relay check server-id
Platform N/A
Description
Use this command to enable the ip dhcp relay information option82 function. Use the no form of
this command to restore the default setting.
ip dhcp relay information option82
no ip dhcp relay information option82
2-26
Command Reference DHCP Commands
Configuration The following example enables the option82 function on the DHCP relay.
Examples Ruijie# configure terminal
Ruijie(config)# ip dhcp relay information option82
Platform N/A
Description
Use this command to enable the fake DHCP server detection. Use the no or default form of this
command to restore the default setting.
ip dhcp server detect
no ip dhcp server detect
default ip dhcp server detect
Usage Guide After this function is enabled, any fake DHCP server detected is logged.
Configuration The following example enables the fake DHCP server detection.
Examples Ruijie(config)# ip dhcp server detect
2-27
Command Reference DHCP Commands
Platform N/A
Description
Use this command to configure the authorization inheritance mode in authorization mode.
ip dhcp sort-pool { cloud-office { check { location | mac | mac-location } | enable } | relate-oui mac-str }
Use the default form of this command to restore the default setting.
defaut ip dhcp sort-pool { cloud-office { check { location | mac | mac-location } | enable } | relate-oui
mac-str }
Parameter
Parameter Description
Description
cloud-office Enables the authorization inheritance mode.
Specifies the authorization inheritance mode option, including access
check location inheritance, MAC address inheritance, and access
location+MAC address inheritance.
Specifies MAC-OUI information associated with global address pools,
relate-oui
that is, the first 3 bytes of the MAC address.
Default Level 14
Usage Guide The authorization inheritance mode is used in a cloud office scenario where the solidify attribute is enabled
for the address pool for authorization. When the VM of a cloud terminal goes online and requests address
assignment, it inherits the authorization result of the fixed binding of the physical machine, and no additional
authorization is required to obtain an address. Select an authorization inheritance mode option based on the
application scenario:
MAC address inheritance: The last 3 bytes of the VM MAC address is the same as that of the physical
machine.
Access location inheritance: The access locations of the VM and physical machine of the cloud terminal are
2-28
Command Reference DHCP Commands
the same.
MAC-OUI information associated with address pools: Different IP address segments need to be assigned to
the VM and physical machine of a cloud terminal based on the first 3 bytes of the MAC addresses. The global
MAC-OUI configuration takes effect for all the address pools that are not associated with MAC-OUI
information in address pool mode. The priority of address pool MAC-OUI configuration is higher than that of
the global MAC-OUI configuration. When the MAC-OUI information of a terminal matches the global
MAC-OUI configuration, it can obtain an address from any address pools that are not associated with
MAC-OUI information in address pool mode.
Configuration The following example configures the authentication inheritance mode in global configuration mode.
Examples Ruijie(config)# ip dhcp sort-pool cloud-office enable
Ruijie(config)# ip dhcp sort-pool relate-oui edfa25
Notification When the length or characters of the relay-oui parameter are invalid and the first 3 bytes of the MAC address
should be set, the following notification will be displayed:
1. The length of oui string is invalid.
2. The character of oui string is invalid.
When the total number of MAC-OUI information associations configured in the global or address pool
configuration mode exceeds the upper limit, the following notification will be displayed:
3. The number of global relate oui has reached the maximum.
4. The number of pool's relate oui has reached the maximum.
Common
N/A
Errors
Platform
This command is supported only on devices that support external storage.
Description
Use this command to enable the configuration for sending the information on IP addresses assigned by the
DHCP server to the syslog server. Use the no form of this command to disable this function.
ip dhcp syslog enable
no ip dhcp syslog enable
Parameter
Parameter Description
Description
N/A N/A
Defaults By default, information on IP addresses assigned by the DHCP server is not sent to the syslog server.
2-29
Command Reference DHCP Commands
Command
Global configuration mode
Mode
Configuration The following example enables the configuration for sending the information on terminal IP addresses
Examples assigned by the DHCP server to the syslog server.
Ruijie(config)# ip dhcp syslog enable
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
Use this command to enable the CLASS to allocate addresses in the global configuration mode. Use
the no form of this command can be used to disable the CLASS.
ip dhcp use class
no ip dhcp use class
Defaults Enabled
Platform N/A
Description
2-30
Command Reference DHCP Commands
2.39 ip helper-address
Use this command to add an IP address of the DHCP server. Use the no form of this command to
delete an IP address of the DHCP server.
The server address can be configured globally or on a specific interface. Therefore, this command
can run in the global configuration mode or the interface configuration mode to add the DHCP server
information.
ip helper-address { cycle-mode | A.B.C.D }
no ip helper-address { cycle-mode | A.B.C.D }
Defaults N/A
Configuration The following example sets the IP address for the global server to 192.168.1.1
Examples Ruijie# configure terminal
Ruijie(config)# ip helper-address 192.168.1.1
Platform N/A
Description
2-31
Command Reference DHCP Commands
2.40 lease
Use this command to define the lease time of the IP address that the DHCP server assigns to the
client in the DHCP address pool configuration mode. Use the no form of this command to restore the
default setting. A limited lease time ranges from 1 minute to 23 hours and 59 minutes.
lease { days [ hours ] [ minutes ] | infinite }
no lease
Defaults This command is configured on a DHCP server. The lease time for a static address pool is infinite.
The lease time for other address pools is 1 day.
Usage Guide When the lease is getting near to expire, the DHCP client will send the request of renewal of lease. In
general, the DHCP server will allow the renewal of lease of the original IP address.
Platform N/A
Description
2-32
Command Reference DHCP Commands
2.41 lease-threshold
Use this command in DHCP address pool configuration mode to define the DHCP alarm threshold.
Use the default or no form of this command to restore the default setting.
lease-threshold percentage
default lease-threshold
no lease-threshold
Defaults 90
Usage Guide This command is configured on a DHCP server. If the maximum IP usage of the address pool
reaches the threshold, the DHCP Server generates a SYSLOG alarm. The IP usage indicates the
ratio of the number of assigned address pools to the total number of assignable address pools. If the
number of assigned pools stays above the alarm threshold, an alarm is generated every 5 minutes.
Platform N/A
Description
2-33
Command Reference DHCP Commands
2.42 netbios-name-server
Use this command to configure the WINS name server of the Microsoft DHCP client NETBIOS in the
DHCP address pool configuration mode. The no or default form of this command can be used to
restore the default setting.
netbios-name-server ip-address [ ip-address2…ip-address8 ]
no netbios-name-server
defaut netbios-name-server
Usage Guide This command is configured on a DHCP server. When more than one WINS server is defined, the
former has higher priory. The DHCP client will select the next WINS server only when its
communication with the former WINS server fails.
Configuration The following example specifies the WINS server 192.168.12.3 for the DHCP client.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# netbios-name-server 192.168.12.3
Platform N/A
Description
2.43 netbios-node-type
Use this command to define the node type of the master NetBIOS of the Microsoft DHCP client in the
DHCP address configuration mode. Use the no or default form of this command to restore the default
setting.
netbios-node-type type
2-34
Command Reference DHCP Commands
no netbios-node-type
defaut netbios-node-type
Usage Guide This command is configured on a DHCP server. There are 4 types of the NetBIOS nodes of the
Microsoft DHCP client:
1) Broadcast, which carries out the NetBIOS name resolution by the broadcast method.
2) Peer-to-peer, which directly requests the WINS server to carry out the NetBIOS name resolution.
3) Mixed, which requests the name resolution by the broadcast method firstly, and then carry out
the name resolution by the WINS server connection.
4) Hybrid, which requests the WINS server to carry out the NetBIOS name resolution firstly, and it
will carry out the NetBIOS name resolution by the broadcast method if the response is not
received.
By default, the node type for Microsoft operating system is broadcast or hybrid. If the WINS server is
not configured, broadcast node is used. Otherwise, hybrid node is used. It is recommended to set the
type of the NetBIOS node as Hybrid.
Configuration The following example sets the NetBIOS node of Microsoft DHCP client as Hybrid.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# netbios-node-type h-node
2-35
Command Reference DHCP Commands
Platform N/A
Description
Use this command to define the network number and network mask of the DHCP address pool in the
DHCP address pool configuration mode. Use the no or default form of this command to restore the
default setting.
network net-number net-mask [ low-ip-address high-ip-address ]
no network
defaut network
Usage Guide This command is configured on a DHCP server. This command defines the subnet and subnet mask
of a DHCP address pool, and provides the DHCP server with an address space which can be
assigned to the clients. Unless excluded addresses are configured, all the addresses of the DHCP
address pool can be assigned to the clients. The DHCP server assigns the addresses in the address
pool orderly. If the DHCP server found an IP address is in the DHCP binding table or in the network
segment, it checks the next until it assigns an effective IP address.
The show ip dhcp binding command can be used to view the address assignment, and the show ip
dhcp conflict command can be used to view the address conflict detection configuration.
Configuration The following example defines the network number of the DHCP address pool as 192.168.12.0, and
Examples the network mask as 255.255.255.240.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# network 192.168.12.0 255.255.255.240
Platform N/A
2-36
Command Reference DHCP Commands
Description
2.45 next-server
Use this command to define the startup sever list that the DHCP client accesses during startup in the
DHCP address configuration mode. Use the no or default form of this command to restore the default
setting.
next-server ip-address [ ip-address2…ip-address8 ]
no next-server
default next-server
Defaults N/A
Usage Guide This command is configured on a DHCP server. When more than one startup server is defined, the
former will possess higher priory. The DHCP client will select the next startup server only when its
communication with the former startup server fails.
Configuration The following example specifies the startup server 192.168.12.4 for the DHCP client.
Examples Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# next-server 192.168.12.4
Platform N/A
Description
2.46 option
Use this command to configure the option of the DHCP server in the DHCP address pool
configuration mode. Use the no form of this command to restore the default setting.
2-37
Command Reference DHCP Commands
Parameter
Parameter Description
Description
code Defines the DHCP option codes.
ascii string Defines an ASCII string.
hex string Defines a hex string.
ip ip-address Defines an IP address list.
Defaults N/A
Usage Guide This command is configured on a DHCP server. The DHCP provides a mechanism to transmit the
configuration information to the host in the TCP/IP network. The DHCP message has a variable
option field that can be defined according to the actual requirement. The DHCP client needs to carry
the DHCP message with 32 bytes of option information at least. Furthermore, the fixed data field in
the DHCP message is also referred to as an option. For the definition of current DHCP option, refer to
RFC 2131.
Configuration The following example defines the option code 19, which determines whether the DHCP client can
Examples enable the IP packet forwarding. 0 indicates to disable the IP packet forwarding, and 1 indicates to
enable the IP packet forwarding. The configuration below enables the IP packet forwarding on the
DHCP client.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# option 19 hex 1
The following example defines the option code 33, which provides the DHCP client with the static
route information. The DHCP client will install two static routes: 1) the destination network
172.16.12.0 and the gateway 192.168.12.12, 2) the destination network 172.16.16.0 and the gateway
192.168.12.16.
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# option 33 ip 172.16.12.0 192.168.12.12 172.16.16.0
192.168.12.16
Platform N/A
Description
2-38
Command Reference DHCP Commands
2.47 pool-status
Usage Guide This command is configured on a DHCP server. This command is configured on the DHCP server.
Platform N/A
Description
Use this command to enter the Option82 matching information configuration mode in the global
CLASS configuration mode. Use the no form of this command to delete the Option82 matching
information of the CLASS.
relay agent information
no relay agent information
Defaults N/A
Usage Guide This command is configured on a DHCP server. After executing this command, it enters the Option82
2-39
Command Reference DHCP Commands
Configuration The following example configures a global CLASS and enters the Option82 matching information
Examples configuration mode.
Ruijie(config)# ip dhcp class myclass
Ruijie(config-dhcp-class)# relay agent information
Ruijie(config-dhcp-class-relayinfo)#
Platform N/A
Description
Use this command to enter the Option82 matching information configuration mode. Use the no form
of this command to delete a piece of matching information.
relay-information hex aabb.ccdd.eeff… [ * ]
no relay-information hex aabb.ccdd.eeff… [ * ]
Defaults N/A
Configuration The following example configures a global CLASS which can match multiple Option82 information.
Examples Ruijie(config)# ip dhcp class myclass
Ruijie(config-dhcp-class)# relay agent information
Ruijie(config-dhcp-class-relayinfo)# relay-information
hex 0102256535
Ruijie(config-dhcp-class-relayinfo)# relay-information
hex 010225654565
Ruijie(config-dhcp-class-relayinfo)# relay-information
hex 060225654565
Ruijie(config-dhcp-class-relayinfo)# relay-information
2-40
Command Reference DHCP Commands
hex 060223*
Platform N/A
Description
2.50 relate-oui
Use this command to set MAC-OUI information for address segment assignment based on the first 3
bytes of the terminal MAC address. (Use the host command to configure the range of address
segments.)
relate-oui mac-oui
Use the no form of this command to disassociate the MAC-OUI information from the address pool.
no relate-oui mac-oui
Parameter
Parameter Description
Description
mac-oui The first 3 bytes of the terminal MAC address.
Default Level 14
Usage Guide This command is used to assign different IP address segments to the VM and physical machine of a
cloud terminal based on the first 3 bytes of the MAC addresses. After MAC-OUI information is associated
with the address pool, only terminals with matched MAC-OUI information are assigned with addresses.
Configuration The following example associates the MAC-OUI information with the address pool test.
Examples Ruijie(config)# ip dhcp pool test
Ruijie(dhcp-config)# relate-oui ddcae2
Notification When the length or characters of the relay-oui parameter are invalid and the first 3 bytes of the MAC
address should be set, the following notification will be displayed:
1. The length of oui string is invalid.
2. The character of oui string is invalid.
2-41
Command Reference DHCP Commands
2.51 remark
Use this command to configure the identification which is used to describe the CLASS in this global
CLASS configuration mode. Use the no form of this command to delete the identification.
remark class-remark
no remark
Defaults N/A.
Configuration The following example configures the identification information for a global CLASS.
Examples Ruijie(config)# ip dhcp class myclass
Ruijie(config-dhcp-class)# remark used in #1 build
Platform N/A
Description
Use this command to enable the DHCP server and the DHCP relay on the device in global
configuration mode.
To enable the DHCP server and the DHCP relay on fit APs, run the service dhcp command in the
ap-config or ap-group mode of the AC.
Use the no or default form of this command to restore the default setting.
service dhcp
no service dhcp
default service dhcp
2-42
Command Reference DHCP Commands
Usage Guide The DHCP server can assign the IP addresses to the clients automatically, and provide them with the
network configuration information such as DNS server and default gateway. The DHCP relay can
forward the DHCP requests to other servers, and the returned DHCP responses to the DHCP client,
serving as the relay for DHCP packets.
Configuration The following example enables the DHCP server and the DHCP relay feature.
Examples service dhcp
Platform N/A
Description
Use this command to display the lease information of the IP address obtained by the DHCP client.
show dhcp lease
Defaults N/A
Usage Guide If the IP address is not defined, display the binding condition of all addresses. If the IP address is
defined, display the binding condition of this IP address.
Configuration The following example displays the result of the show dhcp lease.
Examples Ruijie# show dhcp lease
Temp IP addr: 192.168.5.71 for peer on Interface: FastEthernet0/0
Temp sub net mask: 255.255.255.0
DHCP Lease server: 192.168.5.70, state: 3 Bound
2-43
Command Reference DHCP Commands
Platform N/A
Description
Use this command to display the binding condition of the DHCP address.
show ip dhcp binding [ ip-address ]
Defaults N/A
Usage Guide If the IP address is not defined, show the binding condition of all addresses. If the IP address is
defined, show the binding condition of this IP address
Client-Identifier
The client identifier or hardware address of the DHCP client.
/Hardware address
2-44
Command Reference DHCP Commands
Platform N/A
Description
Use this command to show the conflict history record of the DHCP sever.
show ip dhcp conflict
Defaults N/A
Usage Guide This command can display the conflict address list detected by the DHCP server.
Configuration The following example displays the output result of the show ip dhcp conflict command.
Examples Ruijie# show ip dhcp conflict
IP address Detection Method
192.168.12.1 Ping
Field Description
2-45
Command Reference DHCP Commands
Platform N/A
Description
Use this command to display the total number of assignment records stored in the DHCP database.
show ip dhcp database table-name [ table-name ] item-count
Use this command to display the record details in the DHCP database.
show ip dhcp database table-name [ table-name ] item-limit [ limit-num ] item-offset [ offset-num ]
Use this command to filter the record details in the DHCP database to be displayed.
show ip dhcp database table-name [ table-name ] field-name [ field-name ] { equal | less-than |
more-than } [ field-value ] item-limit [ limit-num ] item-offset [ offset-num ]
Parameter
Parameter Description
Description
table-name Name of the database table.
Maximum number of records displayed in the database query result. The
limit-num
range is from 0 to 1000.
offset-num Item offset in the queried database table. The range is from 0 to 1000000.
field-name Field name in the database table.
field-value Field value in the database table.
Default Level 14
Usage Guide Currently, the database table name of DHCP assignment records is server_dist_rec, and the upper limit of
item-limit is 1000.
To query database records based on the timestamp, you need to convert a string date into an integer first.
For example, to query the log record at 2023-01-05 02:22:27 on a Linux platform, run the date -d
"2023-01-05 02:22:27" "+%s" command to convert the date into 1672856547 first.
Configuration The following example displays the total number of assignment records stored in the DHCP database.
Examples Ruijie# show ip dhcp database table-name server_dist_rec item-count
[server_dist_rec] table has 25 record
The following example displays the top 10 assignment records in the DHCP database.
Ruijie# show ip dhcp database table-name server_dist_rec item-limit 10 item-offset
0
mac ip timestamp
2-46
Command Reference DHCP Commands
2-47
Command Reference DHCP Commands
mac ip timestamp
------------ ------------ ---------
00e0.4c36.0d2e 192.168.2.17 2023-01-04 10:43:19
300d.9e3b.7eb0 192.168.1.17 2023-01-04 14:17:15
5254.003b.7eb0 192.168.1.18 2023-01-04 14:17:17
5254.003b.7eb0 192.168.1.18 2023-01-04 14:20:38
0800.2793.af3a 192.168.1.19 2023-01-04 14:24:24
0800.2793.af3a 192.168.1.19 2023-01-04 14:26:07
5254.003b.7eb0 192.168.1.18 2023-01-04 14:37:36
0800.2793.af3a 192.168.1.19 2023-01-04 15:19:07
0800.2793.af3a 192.168.1.19 2023-01-04 15:20:39
300d.9e3b.7eb0 192.168.1.17 2023-01-04 17:31:16
The following example displays the assignment records generated later than 2023-01-05 02:22:27 in the
DHCP database.
Ruijie# show ip dhcp database table-name server_dist_rec field-name timestamp
more-than 1672856547 item-limit 10 item-offset 0
mac ip timestamp
------------ ------------ ---------
300d.9e3b.7eb0 192.168.1.17 2023-01-05 04:18:38
300d.9e3b.7eb0 192.168.1.17 2023-01-05 05:00:09
5254.003b.7eb0 192.168.1.18 2023-01-05 06:22:28
300d.9e3b.7eb0 192.168.1.17 2023-01-05 08:04:32
300d.9e3b.7eb0 192.168.1.17 2023-01-05 08:16:16
5254.003b.7eb0 192.168.1.18 2023-01-05 10:22:27
300d.9e3b.7eb0 192.168.1.17 2023-01-05 11:09:49
300d.9e3b.7eb0 192.168.1.17 2023-01-05 11:24:21
Notification N/A
Platform
N/A
Description
Defaults N/A
2-48
Command Reference DHCP Commands
Client-Identifier
The client identifier or hardware address of the DHCP client.
/Hardware address
Platform N/A
Description
Command N/A
Mode
2-49
Command Reference DHCP Commands
Usage Guide Use this command to show the address statistics of an address pool.
Configuration The following example displays the output result of the show ip dhcp pool poolname command.
Examples Ruijie# show ip dhcp pool
Ruijie#sh ip dh pool
Pool name Total Distributed Remained Percentage
------------ ----------- ----------- -------- -----------
net20 253 11 242 4.34782
test 0 0 0 0.00000
The meaning of various fields in the show result is described as follows.
Field Description
Platform N/A
Description
Defaults N/A
Usage Guide This command is used to display the statistics of the DHCP relay.
Configuration The following example displays the statistics of the DHCP relay.
Examples Ruijie# show ip dhcp relay-statistics
2-50
Command Reference DHCP Commands
Cycle mode 0
Message Count
Discover 0
Offer 0
Request 0
Ack 0
Nak 0
Decline 0
Release 0
Info 0
Bad 0
Direction Count
Rx client 0
Rx client uni 0
Rx client bro 0
Tx client 0
Tx client uni 0
Tx client bro 0
Rx server 0
Tx server 0
The meaning of various fields in the show result is described as follows.
Field Description
Rx client uni The number of unicast packets received from the client.
Rx client bro The number of broadcast packets received from the client.
2-51
Command Reference DHCP Commands
Platform N/A
Description
Defaults N/A
Configuration The following example displays the fake DHCP server detected.
Examples Ruijie#show ip dhcp server detect
The DHCP Server information:
Server IP = 10.1.10.40, DHCP server interface = GigabitEthernet 0/1
Platform N/A
Description
2-52
Command Reference DHCP Commands
Defaults N/A
Usage Guide This command displays the statistics of the DHCP server.
Configuration The following example displays the output result of the show ip dhcp server statistics command.
Examples
Ruijie# show ip dhcp server statistics
Address pools 2
Lease counter 4
Active Lease Counter 0
Expired Lease Counter 4
Malformed messages 0
Dropped messages 0
Message Received
BOOTREQUEST 216
DHCPDISCOVER 33
DHCPREQUEST 25
DHCPDECLINE 0
DHCPRELEASE 1
DHCPINFORM 150
Message Sent
BOOTREPLY 16
DHCPOFFER 9
DHCPACK 7
DHCPNAK 0
DHCPREQTIMES 0
DHCPREQSUCTIMES 0
DISCOVER-PROCESS-ERROR 0
LEASE-IN-PINGSTATE 0
NO-LEASE-RESOURCE 0
SERVERID-NO-MATCH 0
--------------------------------------------
recv 0
send 0
2-53
Command Reference DHCP Commands
Field Description
Malformed
Number of malformed messages received by the DHCP.
messages
Message Received Number of the messages received and sent by the DHCP server
or Sent respectively.
Platform N/A
Description
Use this command to display the socket used by the DHCP server.
show ip dhcp socket
Defaults N/A
Configuration The following example displays the socket used by the DHCP server.
Examples ruijie#show ip dhcp socket
dhcp socket = 47.
Platform N/A
Description
2-54
Command Reference DHCP Commands
Use this command to enable DHCP to add trusted ARP when allocating addresses. Use the no or
default form of this command to restore the default setting.
update arp
no update arp
default update arp
Usage Guide This command is configured on a DHCP server. After this command is configured for an address
pool, the DHCP server adds trusted ARP entries when assigning IP addresses from the address pool.
A trusted ARP entry has a higher priority than a dynamic ARP entry and is not overridden by a
dynamic ARP entry.
Configuration The following example enables DHCP to add trusted ARP when allocating addresses.
Examples Ruijie(dhcp-config)# update arp
Platform N/A
Description
2-55
Command Reference DNS Commands
3 DNS Commands
Parameter
Parameter Description
Description
host-name Deletes the specified dynamic domain name buffer.
* Deletes all dynamic domain name buffer.
Defaults N/A
Usage Guide You can obtain the mapping record of the host name buffer table in two ways: 1) the ip host static
configuration, 2) the DNS dynamic learning. Execute this command to delete the host name records
learned by the DNS dynamically.
Configuration The following configuration deletes the dynamically learned mapping records from the host name-IP
Examples address buffer table.
Ruijie# clear host *
Related
Command Description
Commands
show hosts Displays the host name buffer table.
Platform N/A
Description
3.2 ip domain-lookup
Use this command to enable DNS domain name resolution. Use the no form of this command to
disable the DNS domain name resolution function.
ip domain-lookup
no ip domain-lookup
Parameter
Parameter Description
Description
3-1
Command Reference DNS Commands
N/A N/A
Usage Guide This command enables the domain name resolution function.
Configuration The following example disables the DNS domain name resolution function.
Examples Ruijie(config)# no ip domain-lookup
Related
Command Description
Commands
Displays the DNS related configuration
show hosts
information.
Platform N/A
Description
3.3 ip host
Use this command to configure the mapping of the host name and the IP address. Use the no form of
the command to remove the host list.
ip host host-name ip-address
no ip host host-name ip-address
Parameter
Parameter Description
Description
host-name The host name of the equipment
ip-address The IP address of the equipment
Defaults N/A
Configuration The following example configures IPv4 address 192.168.5.243 for domain name www .test.com.
Examples Ruijie(config)# ip host www.test.com 192.168.5.243
Related
Command Description
Commands
3-2
Command Reference DNS Commands
Platform N/A
Description
3.4 ip name-server
Use this command to configure the IP address of the domain name server. Use the no form of this
command to delete the configured domain name server.
ip name-server [ oob ] { ip-address | ipv6-address }
no ip name-server [ oob ] { ip-address | ipv6-address }
Parameter
Parameter Description
Description
Enables the out-band channel. It must be set when the MGMT port is
oob
specified as the source port for communication with the server.
ip-address The IP address of the domain name server.
ipv6-address The IPv6 address of the domain name server.
Usage Guide Add the IP address of the DNS server. Once this command is executed, the equipment will add a
DNS server. When the device cannot obtain the domain name from a DNS server, it will attempt to
send the DNS request to subsequent servers until it receives a response.
Up to 6 DNS servers are supported. You can delete a DNS server with the ip-address option or all the
DNS servers.
Configuration N/A
Examples
Related
Command Description
Commands
Displays the DNS related configuration
show hosts
information.
Platform N/A
Description
3-3
Command Reference DNS Commands
Parameter
Parameter Description
Description
hostname Displays the specified domain name information,
Usage Guide This command is used to display the DNS related configuration information.
Related
Command Description
Commands
Configures the host name and IP address
ip host
mapping by manual.
ip name-server Configures the DNS server.
Platform N/A
Description
3-4
Command Reference DDNS Commands
4 DDNS Commands
Use this command to configure the account and password of the Dynamic DNS (DDNS), and bind to an
interface.
ddns service service [ domain domain ] username username password password service service
[ interface interface-name ]
Use the no form of this command to remove the Oray dynamic domain name.
no ddns service oray username username
Use the no form of this command to remove the 3322 dynamic domain name.
no ddns service 3322 domain domain
Parameter
Parameter Description
Description
username username DDNS account
password password DDNS password
Indicates the DDNS provider.
service service 3322 indicates 3322.org.
oray indicates the oray.org.
domain domain Domain name of the 3322. It is used only for the 3322.org service.
The external interface, which can be a physical interface or a PPPoE
interface inteface-name
interface.
Usage Guide After the DDNS account and password are configured, the device automatically connects to the DDNS
server.
If the interface binding is configured, the interface IP address will be bound to the domain name.
4-1
Command Reference DDNS Commands
Verification Run the show ddns command to check the DDNS account and password and the interface connection
status.
Use this command to check the DDNS account and password and the connection status.
show ddns
Parameter
Parameter Description
Description
N/A N/A
Usage Guide Use this command to check the DDNS account and password and the connection status of the device.
Configuratio #Check the DDNS account and password and the connection status of the device.
n Example Ruijie#show ddns
------------------[0]-------------------
status: Success
code: none
service: oray
username: hy84119
password: hy123456
domain: 21p7o78186.imwork.net
interface: Gi0/7
------------------[1]-------------------
status: Success
code: good
service: 3322
username: hy84111
password: hy123456
domain: hy84111.f3322.net
interface:
4-2
Command Reference NTP Commands
5 NTP Commands
5.1 no ntp
Use this command to disable Network Time Protocol (NTP), and clear all NTP configuration.
no ntp
Parameter
Parameter Description
Description
N/A N/A
Usage Guide By default, NTP is disabled. However, once the NTP server or the NTP authentication is configured,
the NTP service will be enabled.
Related
Command Description
Commands
ntp server Specifies an NTP server.
Platform N/A
Description
Use this command to configure an access group to control NTP access. Use the no form of this
command to remove the peer access group.
ntp access-group { peer | serve | serve-only | query-only } access-list-number | access-list-name
no ntp access-group { peer | serve | serve-only | query-only } access-list-number |
access-list-name
Parameter
Parameter Description
Description
Allows the device to receive time requests and NTP control queries to
peer
synchronize itself to the servers specified in the access list.
5-1
Command Reference NTP Commands
Allows the device to receive time requests and NTP control queries
serve from the servers specified in the access list but not to synchronize
itself to the specified servers.
Allows the device to receive only time requests from the servers
serve-only
specified in the access list.
Allows the device to receive only NTP control queries from servers
query-only
specified in the access list.
access-list-number Access control list number, ranging from 1 to 99 and 1300 to 1999.
access-list-name Access control list name.
Defaults No access rule to control NTP access is configured by default, namely, NTP access is granted to all
devices.
Usage Guide Use this command to configure an access group to control NTP access, providing a minimal security
measures (more secure way is to use the NTP authentication mechanism).
The NTP service enables the access group options to be scanned in the following order, from least
restrictive to most restrictive: peer, serve, serve-only, query-only.
If you do not configure any access groups, NTP access is granted to all devices. However, once you
configure the access rule, NTP access is granted only to the devices specified in the access list.
NTP control query is not supported in the current system. Although it matches with the order in
accordance with the above rules, the related requests about the control and query are not
supported.
Configuration The following example shows how to allow the device to only receive time requests from the device of
Examples 192.168.1.1.
Ruijie(config)# access-list 1 permit 192.168.1.1
Ruijie(config)# ntp access-group serve-only 1
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Use this command to enable NTP authentication. Use the no form of this command to disable NTP
5-2
Command Reference NTP Commands
authentication.
ntp authenticate
no ntp authenticate
Parameter
Parameter Description
Description
N/A N/A
Defaults Disabled.
Usage Guide If NTP authentication is disabled, the synchronization communication is not encrypted. To enable
encrypted communication on the server, enable the NTP authentication and configure other keys
globally.
NTP authentication is implemented through the trusted key specified by the ntp authentication-key
and ntp trusted-key commands.
Configuration After an authentication key is configured and specified as the global trusted key, enable NTP
Examples authentication.
Ruijie(config)#ntp authentication-key 6 md5 wooooop
Ruijie(config)#ntp trusted-key 6
Ruijie(config)#ntp authenticate
Related
Command Description
Commands
ntp authentication-key Sets the global authentication key.
ntp trusted-key Configures the global trusted key.
Platform N/A
Description
Use this command to configure an NTP authentication key. Use the no form of this command to
remove the NTP authentication key.
ntp authentication-key key-id md5 key-string [enc-type]
no ntp authentication-key key-id
Parameter
Parameter Description
Description
key-id Key ID, ranging from 1 to 4294967295.
key-string Key string
5-3
Command Reference NTP Commands
enc-type (Optional) Whether this key is encrypted, where, 0 indicates the key is
not encrypted, 7 indicates the key is encrypted simply. The key is not
encrypted by default.
Usage Guide Use this command to configure an NTP authentication key and enables the md5 algorithm for
authentication. Each key presents a unique key ID, which can be configured as a trusted key using
the ntp trusted-key command.
You can configure up to 1024 NTP authentication keys. However, each server can support only one
key.
Related
Command Description
Commands
ntp authenticate Enables NTP authentication.
ntp trusted-key Configures an NTP trusted key.
ntp server Specifies an NTP server.
Platform N/A
Description
Use this command to disable the device to receive NTP packets on the specified interface.
ntp disable
Parameter
Parameter Description
Description
N/A N/A
Usage Guide The NTP message received on any interface can be provided to the client to carry out the clock
adjustment. The function can be set to shield the NTP message received from the corresponding
interface.
5-4
Command Reference NTP Commands
By default, the device receives NTP packets on all interfaces, and adjust clock for the client. You can
use this command to disable the device to receive NTP packets on the specified interface.
This command is configured only the interface that can receive and send IP packets.
Configuration The following example disables the device to receive the NTP packets.
Examples Ruijie(config-if)# no ntp disable
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Use this command to configure the device to act as an authoritative NTP server, synchronizing time
to other devices. Use the no form of this command to remove the device as an authoritative NTP
server.
ntp master [ stratum ]
no ntp master
Parameter
Parameter Description
Description
stratum Stratum level. The range is from 1 to 15. The default is 8.
Defaults N/A
Usage Guide In general, the local device synchronizes time from the external time source directly or indirectly.
However, if the time synchronization fails due to network connection trouble, you can use this
command to configure the local device to act as an authoritative NTP server to synchronize time to t
other devices. Once configured, the device will not perform time synchronization with the time source
which is of a higher stratum.
Configuring the device to act as an authoritative NTP server (in particular, specify a lower
stratum level), may be likely to overwrite the effective time. If multiple devices in the same
network are configured with this command, the time synchronization may be instable due to the
time difference between the devices.
Before configuring this command, you need to manually correct the system clock to avoid too
much bias if the device has never performed time synchronization with the external clock
5-5
Command Reference NTP Commands
source.
Configuration The following example configures the device to act as an authoritative NTP server, and sets the
Examples stratum level to 12:
Ruijie(config)# ntp master 12
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Use this command to specify a NTP server for the NTP client. Use the no form of this command to
delete the specified NTP server.
ntp server [ oob ] { ip-addr | domain | ip domain | ipv6 domain } [ version version ] [ source if-name ]
[ key keyid ] [ prefer]
no ntp server ip-addr
Parameter
Parameter Description
Description
(Optional) Accesses the NTP server from the MGMT interface. By
oob
default, this option is disabled.
Sets the IP address of the NTP server. Both IPv4 and IPv6 formats
ip-addr
are supported.
domain Sets the domain name of the NTP server, supporting IPv4 and IPv6
version (Optional) Specifies the NTP version (1-3). The default is NTPv3.
(Optional) Specifies the source interface from which the NTP
if-name
message is sent (L3 interface).
(Optional) Specifies the encryption key adopted when communication
keyid with the corresponding server. The key ID range is from 1 to
4,294,967,295.
prefer (Optional) Specifies the given NTP server as the preferred one.
Usage Guide At present, RGOS system only supports clients other than servers. Up to 20 servers can be
synchronized.
5-6
Command Reference NTP Commands
To carry out the encrypted communication with the server, set the global encryption key and global
trusted key firstly, and then specify the corresponding key as the trusted key of the server to launch
the encrypted communication of the server. It requires the server presents identical global encryption
key and global trust key to complete the encrypted communication with the server.
In the same condition (for instance, precision), the prefer clock is used for synchronization.
The source interface of NTP packets must be configured with the IP address and can be
communicated with the peer.
Related
Command Description
Commands
no ntp Disables NTP.
Platform The NBR6120-E does not support IPv6 NTP server function.
Description
Use this command to set a global trusted key. Use the no form of this command to remove the global
trusted key.
ntp trusted-key key-id
no ntp trusted-key key-id
Parameter
Parameter Description
Description
key-id Global trusted key ID, ranging from 1 to 4294967295.
Defaults N/A
Usage Guide The NTP communication parties must use the same trusted key. The key is identified by ID and is not
transmitted to improve security.
Configuration The following example configures an authentication key and sets it as a trusted key.
Examples Ruijie(config)#ntp authentication-key 6 md5 wooooop
Ruijie(config)#ntp trusted-key 6
Ruijie(config)#ntp server 192.168.210.222 key 6
5-7
Command Reference NTP Commands
Related
Command Description
Commands
ntp authenticate Enables NTP authentication.
ntp authentication-key Configures an NTP authentication key.
ntp server Configures an NTP server.
Platform N/A
Description
Use this command to enable the NTP client to periodically update the device clock with the time
synchronized from the external source clock. Use the no form of this command to remove this
function.
ntp update-calendar
no ntp update-calendar
Parameter
Parameter Description
Description
N/A N/A
Usage Guide By default, the NTP update-calendar is not configured. After configuration, the NTP client updates the
calendar at the same time when the time synchronization of external time source is successful. It is
recommended to enable this function for keeping the accurate calendar.
Configuration The following example configures the NTP update calendar periodically.
Examples Ruijie(config)# ntp update-calendar
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
5-8
Command Reference NTP Commands
Parameter
Parameter Description
Description
N/A N/A
Defaults N/A
Command Privileged EXEC mode, global configuration mode, interface configuration mode, VLAN configuration
mode mode
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Parameter
Parameter Description
Description
N/A N/A
Defaults N/A
Command Privileged EXEC mode, global configuration mode, interface configuration mode, VLAN configuration
mode mode
Usage Guide Use this command to display the NTP configuration. No configuration is displayed before the
synchronization server is configured for the first time.
5-9
Command Reference NTP Commands
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
5-10
Command Reference SNTP Commands
6 SNTP Commands
Parameter
Parameter Description
Description
N/A N/A
Defaults
Command Privileged EXEC mode, global configuration mode, interface configuration mode.
mode
Related
Command Description
Commands
sntp enable Enables SNTP.
Platform N/A
Description
Use this command to enable the SNTP function. Use the no form of this command to restore the
default value.
sntp enable
no sntp enable
Parameter
Parameter Description
Description
6-1
Command Reference SNTP Commands
N/A N/A
Related
Command Description
Commands
show sntp Displays the SNTP configuration.
Platform N/A
Description
Use this command to set the interval for the SNTP client to synchronize its clock with the NTP/SNTP
server. Use the no form of this command to restore the default synchronization interval.
sntp interval seconds
no sntp interval
Parameter
Parameter Description
Description
seconds Synchronization interval. The unit is second, and the range is from 60 to 65,535.
Usage Guide To make the synchronization interval configuration effective, run the sntp enable command.
Configuration The following example configures the synchronization interval to 3,600 seconds.
Examples Ruijie(config)# sntp interval 3600
Related
Command Description
Commands
sntp enable Enables SNTP.
6-2
Command Reference SNTP Commands
Platform N/A
Description
Use this command to specify an SNTP server. Use the no form of this command to remove the SNTP
server.
sntp server [ oob ] { ip- address | domain } [ source source-ip-address ]
no sntp server
Parameter
Parameter Description
Description
oob (Optional) Accesses the SNTP server from the MGMT interface.
ip-address IP address of the SNTP server.
domain Specifies the domain name of the SNTP server.
source-ip-address (Optional) Indicates the specified source IP address.
Usage Guide As SNTP is fully compatible with NTP, the SNTP server can be used as an NTP server in Internet.
Related
Command Description
Commands
show sntp Displays the SNTP configuration.
sntp enable Enables SNTP.
Platform N/A
Description
6-3
Command Reference SMART-DNS Commands
7 SMART-DNS Commands
Parameter
Parameter Description
Description
config Queries the SMART-DNS configurations.
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Platform
The NBR6120-E does not support the SMART-DNS function.
Description
7.2 smartdns
Parameter
Parameter Description
Description
enable Enables SMART-DNS.
sip Indicates the IP address of the intranet business server.
interface Indicates the interface on which the source IP address is translated
7-1
Command Reference SMART-DNS Commands
Platform
The NBR6120-E does not support the SMART-DNS function.
Description
7-2
Command Reference DNS Proxy Commands
Parameter
Parameter Description
Description
start-ip Indicates the start IP address of a blacklist.
end-ip Indicates the end IP address of a blacklist.
Usage Guide A DNS blacklist will shield IP addresses or URLs that match certain rules. Use this command to check
the IP address or URL in DNS response packets and prevent users from being directed to some invalid
IP addresses provided in false DNS response packets. A maximum of 10 IP addresses or URLs can be
configured.
Configuration #Add the IP segment 1.1.1.1–1.1.1.100 to the blacklist in DNS proxy mode.
Example Ruijie(config)#dns-proxy
Ruijie(config-dns-proxy)# blacklist domain-ip 1.1.1.1 1.1.1.100
Verification Run the show running-config command to display the configuration result.
Use this command to clear the statistical information of the DNS proxy in privileged EXEC mode.
clear dns-proxy statistics
Parameter
Parameter Description
Description
N/A N/A
8-1
Command Reference DNS Proxy Commands
Mode
Usage Guide Use this command to clear the statistical information of the DNS proxy.
Configuration #Clear the statistical information of the DNS proxy in privileged EXEC mode.
Example Ruijie# clear dns-proxy statistics
Use the no form of this command to disable the DNS proxy debugging switch.
no debug dns-proxy
Parameter
Parameter Description
Description
N/A N/A
Usage Guide Debugging information includes debugging information of various types of events generated during
DNS proxy running:
DNS proxy change events
Various handling events generated during changes to the protocol state machine
Handling for various types of packets received
Interface related event handling
Enable this debugging switch to display all events and handling information of the DNS proxy. The
events and handling information are usually used for tracing the working process of the DNS
proxy.
Debugging information generated during handling failures helps diagnose and locate problems.
8-2
Command Reference DNS Proxy Commands
8.4 dns-proxy
Use this command to enter the DNS proxy configuration mode in global configuration mode.
dns-proxy
Parameter
Parameter Description
Description
N/A N/A
Defaults N/A
Usage Guide Before configuring the DNS proxy, enter the DNS proxy configuration mode.
Configuration #Enter the DNS proxy configuration mode in global configuration mode.
Example Ruijie(config)#dns-proxy
Ruijie(config-dns-proxy)#exit
Ruijie(config)#
Parameter
Parameter Description
Description
N/A N/A
Usage Guide Use this command to enable the DNS proxy on a L3 interface. The DNS proxy does not limit the type of
the L3 interface. Generally, the DNS proxy provides extranet services for intranets; therefore, run the
dns-proxy enable command on a LAN interface, and run the ip name-server command on a WAN
8-3
Command Reference DNS Proxy Commands
interface.
Verification Run the show running-config command to display the configuration result.
8.6 ip name-server
Use the no form of this command to delete the IP address of the DNS.
no ip name-server ip-address [track id]
Parameter
Parameter Description
Description
ip-address Specifies an IP address.
id Indicates an associated track ID.
Usage Guide The DNS proxy can be used on a WAN interface only after the DNS server is configured. Generally,
operators provide an active DNS server and a standby DNS server. Both the DNS servers can be
configured on the WAN interface, so that the DNS proxy can enable the standby DNS server when the
active one fails. A maximum of four DNS servers can be configured on one interface.
Associate the DNS proxy with the track module to check whether the link to the DNS server is
reachable. If the association is not configured, the link is reachable by default when the interface is in
the Up state.
Verification Run the show running-config command to display the configuration result.
8-4
Command Reference DNS Proxy Commands
8.7 load-balance
Use the no form of this command to restore the default load balancing policy.
no load-balance
Parameter
Parameter Description
Description
load Indicates the load-based policy.
bandwidth Indicates the bandwidth-based policy.
Usage Guide Use this command to switch the load balancing policy of the DNS proxy. The bandwidth-based policy is
configured by default. Users can manually switch the policy to the bandwidth utilization rate-based
policy.
Configuration #Configure the load-based load balancing policy for the DNS proxy.
Example Ruijie(config)#dns-proxy
Ruijie(config-dns-proxy)#load-balance load
#Configure the bandwidth-based load balancing policy for the DNS proxy.
Ruijie(config-dns-proxy)#load-balance bandwidth
Verification Run the show running-config command to display the configuration result.
Use this command to display all configuration information of the DNS proxy in privileged EXEC mode.
show dns-proxy configure
Parameter
Parameter Description
Description
N/A N/A
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display all configuration information of the DNS proxy.
8-5
Command Reference DNS Proxy Commands
Configuration #Display all configuration information of the DNS proxy in privileged EXEC mode.
Example Ruijie# show dns-proxy configure
>dns-proxy load balance:bandwidth
---------------------------------------------------------------------------
------
>dns-proxy whitelist
---------------------------------------------------------------------------
------
Type:source-ip
Source-ip:192.168.1.1 192.168.1.10
Type:name-server
Nameserver:8.8.8.8
>Dns-proxy blacklist
----------------------------------------------------------------
Start-ip End-ip
--------------- ---------------
1.1.1.1 1.1.1.10
Field description:
Field Description
bandwidth Indicates the bandwidth-based policy.
whitelist Indicates a whitelist.
source-ip Indicates the source IP address.
name-server Indicates a DNS server.
blacklist Indicates a blacklist.
Use this command to display the blacklist configuration information of the DNS proxy in privileged
EXEC mode.
show dns-proxy configure blacklist
Parameter
Parameter Description
Description
N/A N/A
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display the blacklist configuration information of the DNS proxy.
8-6
Command Reference DNS Proxy Commands
Configuration #Display the blacklist configuration information of the DNS proxy in privileged EXEC mode.
Example Ruijie(config)#show dns-proxy configure blacklist
>Dns-proxy blacklist
----------------------------------------------------------------
Start-ip End-ip
--------------- ---------------
1.1.1.1 1.1.1.10
Field description:
Field Description
blacklist Indicates a blacklist.
Start-ip Indicates the start IP address.
End-ip Indicates the end IP address.
Use this command to display the whitelist configuration information of the DNS proxy in privileged
EXEC mode.
show dns-proxy configure whitelist
Parameter
Parameter Description
Description
N/A N/A
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display the whitelist configuration information of the DNS proxy.
Configuration #Display the whitelist configuration information of the DNS proxy in privileged EXEC mode.
Example Ruijie(config)#show dns-proxy configure whitelist
>dns-proxy whitelist
---------------------------------------------------------------
Type:source-ip
Source-ip:192.168.1.1 192.168.1.10
Type:name-server
Nameserver:8.8.8.8
Field description:
Field Description
whitelist Indicates a whitelist.
source-ip Indicates the source IP address.
name-server Indicates a DNS server.
8-7
Command Reference DNS Proxy Commands
Verify that the whitelist configuration information of the DNS proxy is displayed.
Ruijie(config)#show dns-proxy configure whitelist
>dns-proxy whitelist
---------------------------------------------------------------
Type: source-ip
Host-name: 192.168.1.1 192.168.1.10
Use this command to display the DNS configuration information of the DNS proxy in privileged EXEC
mode.
show dns-proxy name-server
Parameter
Parameter Description
Description
N/A N/A
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display the DNS configuration information of the DNS proxy.
Configuration #Display the DNS configuration information of the DNS proxy in privileged EXEC mode.
Example Ruijie(config)#show dns-proxy name-server
>Dns-proxy name-server
------------------------------------------------------------------------
Interface Dns-server TrackId State Description
-------------------------- --------------- ------- ----- -----------
GigabitEthernet 0/0 192.168.58.110 1 down static
Field description:
Field Description
Interface Indicates the interface information.
dns-server Indicates a DNS.
trackid Indicates a track line.
state Indicates a state.
Use this command to display the statistical information of the DNS proxy in privileged EXEC mode.
show dns-proxy statistics
Parameter
Parameter Description
Description
8-8
Command Reference DNS Proxy Commands
N/A N/A
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display the statistical information of the DNS proxy.
Configuration #Display the statistical information of the DNS proxy in privileged EXEC mode.
Example Ruijie# show dns-proxy statistics
>recv dns request counts:494
>send dns request counts:463
>recv dns reply counts:493
>send dns reply counts:473
>hit the whitelist counts:11
>hit the anti-hijacklist counts:30
8.13 whitelist
Parameter
Parameter Description
Description
start-ip Indicates the start source IP address of the whitelist.
end-ip Indicates the end source IP address of the whitelist.
8-9
Command Reference DNS Proxy Commands
Usage Guide Use this command to prevent packets that match whitelist rules from being intercepted by the DNS
proxy. Whitelist rules involve the network segment, domain name, and destination DNS. The whitelist
supports the longest suffix match and precise match of a domain name.
A maximum of 10 items can be configured in a whitelist. The topmost configuration item has the highest
priority, which can be changed by moving the position of the configuration item upward or downward.
Configuration #Add the DNS 8.8.8.8 into the whitelist in DNS proxy mode.
Example Ruijie(config)# dns-proxy
Ruijie(config-dns-proxy)# whitelist name-server 8.8.8.8
Verification Run the show running-config command to display the configuration result.
8-10
Command Reference FTP Server Commands
Use this command to enable the FTP server. Use the default form of this command to restore the
default setting.
ftp-server enable
default ftp-server enable
Parameter
Parameter Description
Description
N/A N/A
Usage Guide This command is used to enable the FTP server to connect the FTP client to upload/download the
files.
To enable the FTP client to access to the FTP server files, this command shall be co-used with
the ftp-server topdir command.
Configuration The following example enables the FTP Server and confines the FTP client access to the syslog
Examples subdirectory:
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
9-11
Command Reference FTP Server Commands
Use this command to set the timeout interval for login to the FTP server. Use the no or default form
of this command to restore the default setting.
ftp-server login timeout time
no ftp-server login timeout
default ftp-server login timeout
Parameter
Parameter Description
Description
time Sets the timeout interval for login to the FTP server, in the range from
1 to 30 in the unit of minutes.
Usage Guide The timeout interval refers to the maximum time when your account is allowed online after you login
to the server. If you don’t perform authentication again before the timeout interval expires, you will be
forced offline.
Configuration The following example sets the timeout interval for login to the FTP server to 5 minutes.
Examples Ruijie(config)# ftp-server login timeout 5
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Use this command to set the number of login attempts. Use the no or default form of this command
to restore the default setting.
ftp-server login times time
no ftp-server login times
default ftp-server login times
9-12
Command Reference FTP Server Commands
Parameter
Parameter Description
Description
time Sets the number of login attempts, in the range from 1 to 10.
Usage Guide The number of login attempts refers to the maximum count you are allowed to perform authentication.
If the number of your login attempts exceeds 3, you will be forced offline.
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Use this command to set the FTP session idle timeout. Use the no form of this command to restore
the default setting.
ftp-server timeout time
no ftp-server timeout
Parameter
Parameter Description
Description
Sets the session idle timeout, in the range from 1 to 3600 in the unit of
time
minutes.
Usage Guide Use this command to set the FTP session idle timeout. If the session is idle, the FTP server deems
9-13
Command Reference FTP Server Commands
The session idle time refers to the time for the FTP session between two FTP operations
Configuration The following example sets the session idle timeout to 5 minutes:
Examples Ruijie(config)# ftp-server timeout 5
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Use this command to set the directory range for the FTP client to access to the FTP server files. Use
the no form of this command to restore the default setting.
ftp-server topdir directory
no ftp-server topdir
Parameter
Parameter Description
Description
directory Sets the top-directory.
Usage Guide The FTP server top directory specifies the directory range of the files accessed by the client. Can the
FTP client accesses to the files on the FTP server with the top directory correctly specified.
Without this command configured, FTP client fails to access to any file or directory on the FTP server.
Configuration The following example enables the FTP Server and confines the FTP client access to the syslog
Examples subdirectory.
9-14
Command Reference FTP Server Commands
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Use this command to set the login username and password for the FTP server. Use the no form of
this command to restore the default setting.
ftp-server username username password [type] password
no ftp-server username username
default ftp-server username username
Parameter
Parameter Description
Description
username Sets the login username.
password Sets the log password
Usage Guide Use this command to set the login username for the FTP server. To log in to the FTP server, the
correct username and password shall be provided.
The maximum length of the username is 64 characters and the spaces are not allowed in the middle
of the username. The username consists of letters, semiangle number and semiangle mark. One
username can be configured for the FTP server at most.
The password must contain letters or numbers. Spaces before or behind the password are allowed
but will be ignored. The spaces within are part of the password.
The plaintext password is in the range from 1 to 25 characters. The encrypted password is in the
range from 4 to 52 characters.
The anonymous user login is not supported on the FTP server. The client fails to pass the
identity verification if the username is removed.
9-15
Command Reference FTP Server Commands
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Use this command to show the status information of the FTP server.
show ftp-server
Parameter
Parameter Description
Description
N/A N/A
Defaults N/A
Enabled/Disabled server
The FTP server user information, including username, password and connection number. If
connection is set up, the IP address, port, transmission type, active/passive mode is shown
Configuration The following example displays the related status information of the FTP server:
Examples Ruijie#show ftp-server
ftp-server information
===================================
enable : Y
9-16
Command Reference FTP Server Commands
topdir : tmp:/
timeout: 10min
client IP:192.168.21.26[3927]
client IP:192.168.21.26[3929]
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
9-17
Command Reference Time Range Commands
10.1 absolute
Use the no form of this command to remove the absolute time range.
no absolute
Parameter
Parameter Description
Description
start time date Indicates the start time of the range.
end time date Indicates the end time of the range.
Defaults The default absolute time range is the maximum range, which is from 00:00 January 1, 0 to 23:59
December 31, 9999.
Default Level 14
Usage Guide Use the absolute command to configure a time absolute time range between a start time and an end
time to allow a certain function to take effect within the absolute time range.
The maximum absolute time range is from 00:00 January 1, 0 to 23:59 December 31, 9999.
Configuration The following example creates a time range and enters time range configuration mode.
Examples Ruijie(config)# time-range no-http
Ruijie(config-time-range)#
Check
Use the show time-range [ time-range-name ] command to display the time range configuration.
Method
Prompt
-
Message
Platform
-
Description
10-1
Command Reference Time Range Commands
10.2 periodic
Use the no form of this command to remove the configured periodic time.
no periodic day-of-the-week time to [ day-of-the-week ] time
Parameter
Parameter Description
Description
day-of-the-week Indicates the week day when the periodic time starts or ends.
time Indicates the exact time when the periodic time starts or ends.
Default Level 14
Usage Guide Use the periodic command to configure a periodic time interval to allow a certain function to take effect
within the periodic time.
Configuration The following example creates a time range and enters time range configuration mode.
Examples Ruijie(config)# time-range no-http
Ruijie(config-time-range)#
Check
Use the show time-range [ time-range-name ] command to display the time range configuration.
Method
Prompt
-
Message
Platform
-
Description
10-2
Command Reference Time Range Commands
Parameter
Parameter Description
Description
time-range-name Displays a specified time range.
Default Level 14
Usage Guide Use this command to check the time range configuration.
Prompt
-
Message
Platform
-
Description
10.4 time-range
Use this command to create a time range and enter time range configuration mode.
time-range time-range-name
Use the no form of this command to remove the configured time range.
no time-range time-range-name
Parameter
Parameter Description
Description
time-range-name Time range name
Default Level 2
Usage Guide Some applications (such as ACL) may run based on time. For example, an ACL can be effective within
certain time ranges of a week. To this end, first you must configure a time range. After the time range is
10-3
Command Reference Time Range Commands
created, you can configure relevant time control in time range mode.
Check
Use the show time-range [ time-range-name ] command to display the time range configuration.
Method
Prompt
-
Message
Platform
-
Description
10-4
Command Reference SFTP Commands
11 SFTP Commands
11.1 sftp
Use this command to connect to the SFTP server to enter the SFTP client mode.
sftp [ oob ] [-c {3des | aes128-cbc | aes192-cbc | aes256-cbc} ] [ -p port-num ] [ -v { 1 | 2 } ] [ -m
{ hmac-md5-128 | hmac-md5-96 | hmac-sha1-160 | hmac-sha1-96 } ] { address } [ /source { ip A.B.C.D |
interface interface-name } ]
11-1
Command Reference SFTP Commands
Default Level 1
Usage Guide This command is used to log into the SFTP server, and enter the SFTP client mode. In this mode, run put,
get, ls, rm, rmdir and mkdir commands to upload and download files to and from the server, add or delete
a file to and from the server and display files of the server.
Configuration Connect to the SFTP server and enter the SFTP client mode.
Examples Ruijie# sftp 192.168.57.55
User Name: ruijie
[email protected]'s password:
Connected to 192.168.57.55, 22
sftp-client>
Verification N/A
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11.2 put
Defaults N/A
Default Level 1
Usage Guide This command is used to upload the file of the local device to the server in the SFTP client mode.
11-2
Command Reference SFTP Commands
=>100%
Upload file /a.txt(44 bytes) success
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11.3 get
Defaults N/A
Default Level 1
Usage Guide Run this command to download a file from the server to the local device in the SFTP client mode.
=>100%
Download file /b.txt(377 bytes) success
Verification Check whether the downloaded file can be seen in the working directory of the device.
Notification N/A
11-3
Command Reference SFTP Commands
Common
N/A
Errors
Platform
N/A
Description
11.4 quit
Defaults N/A
Default Level 1
Usage Guide Similar to the commands of bye and exit, this command is used to exit the SFTP client mode, or to be precise,
to interrupt the connection between the port and the server.
Verification Check whether the command mode turns back to privilege EXEC mode.
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11.5 rm
11-4
Command Reference SFTP Commands
Defaults N/A
Default Level 1
Usage Guide Run this command to delete a file from the server in the SFTP client mode.
Verification Check whether the file has been deleted from the server.
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11.6 rmdir
Defaults N/A
Default Level 1
11-5
Command Reference SFTP Commands
Usage Guide In the SFTP client mode, run this command is used to delete a folder from the server.
Verification Check whether the folder has been deleted from the server.
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11.7 mkdir
Defaults N/A
Default Level 1
Usage Guide In the SFTP client mode, run this command to create a folder in the server.
Verification Check whether the folder has been created on the server.
Notification N/A
11-6
Command Reference SFTP Commands
Common
N/A
Errors
Platform
N/A
Description
11.8 ls
Defaults N/A
Default Level 1
Usage Guide In the SFTP client mode, run this command to check the information of the files and folders in the server. If
no parameter is specified, display the names of the files in the working directory.
Verification Check the query information displayed in the SFTP client mode.
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11-7
Command Reference SFTP Commands
11.9 cd
Defaults N/A
Default Level 1
Usage Guide In the SFTP client mode, run this command to change the working directory of the server.
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11.10 rename
Defaults N/A
11-8
Command Reference SFTP Commands
Default Level 1
Usage Guide In the SFTP client mode, run this command to change the name of the file in the server.
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11.11 pwd
Use this command to display the working path where the server resides.
pwd
Defaults N/A
Default Level 1
Usage Guide In the SFTP client mode, run this command to display the working directory of the server.
Configuration The following example displays the working directory of the server.
Examples sftp-client> pwd
Remote working directory: /
11-9
Command Reference SFTP Commands
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11.12 help
Defaults N/A
Default Level 1
Usage Guide In the SFTP mode, run this command to display the help information about supported commands.
Configuration The following example displays the help information about the supported commands.
Examples sftp-client> help
Available commands:
bye Quit sftp
cd path Change remote directory to 'path'
exit Quit sftp
get remote [local] Download file
help Display this help text
mkdir path Create remote directory
put local [remote] Upload file
pwd Display remote working directory
quit Quit sftp
rename oldpath newpath Rename remote file
rm path Delete remote file
rmdir path Remove remote directory
ls [-al] [path] Display remote directory listing
? Synonym for help
11-10
Command Reference SFTP Commands
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
Use this command to configure the source address for SFTP client.
sftp-client source [ ip address | interface interface-num ]
Use the no form of this command to delete the source address of SFTP client.
no sftp-client source [ ip | interface ]
Defaults N/A
Default Level 1
Usage Guide Run this command to specify the source address for SFTP client.
Configuration 1: The following example specifies a source address for SFTP client.
Examples Ruijie(config)#sftp-client source ip 192.168.1.1
2: The following example specifies a source interface for SFTP client.
Ruijie(config)# sftp-client source interface mgmt 0
Notification N/A
Common
N/A
Errors
11-11
Command Reference SFTP Commands
Platform
N/A
Description
Use this command to configure the top-level directory of the SFTP server.
sftp-client topdir Directory
Defaults N/A
Default Level 1
Usage Guide In the SFTP client mode, if the underlying working directory of the local device is consistent with the
configured one, the top-level directory of the server is flash by default.
Configuration The following example specifies the top level working directory for the server.
Examples Ruijie(config)# sftp-client topdir flash2:
Notification N/A
Common
N/A
Errors
Platform
N/A
Description
11-12