IP Address & Application Commands
1. IP Address/Service Commands
2. ARP Commands
3. IPv6 Commands
4. DHCP Commands
5. DHCPv6 Commands
6. DNS Commands
7. FTP Server Commands
8. FTP Client Commands
9. Tunnel Commands
10. Network Connectivity Test Tool Commands
11. TCP Commands
12. IPv4/IPv6 REF Commands
13. TFTP Server Commands
14. NAT Commands
15. Proxy ARP Commands
Command Reference
IP Address/Service Commands
1 IP Address/Service Commands
1.1 ap-interface bvi num ip address
Use this command to configure an IP address and network mask for the bridge virtual interface
(BVI) of the specified AP. Use the no form of this command to restore the setting.
ap-interface bvi num ip address { ip-address network-mask | dynamic }
no ap-interface bvi num ip address
Parameter
Parameter
Description
Description
num
Configures the BVI interface number.
ip-address
Configures an IP addresses for the BVI interface.
network-mask
Configures a network mask for the BVI interface.
dynamic
Obtains an IP address and mask for the BVI interface dynamically.
Defaults
This function is disabled by default.
Command
ap-config mode/ap-group mode
Mode
Usage Guide
This command can be configured in either ap-config or ap-group mode. The ap-config mode can
be further divided into ap-config all and ap-config apname modes. The modes are sorted by
priority from high to low as follows: ap-config apname,ap-group and ap-config all. In whatever
mode, each BVI interface can be configured with only one IP address. The AC pushes configuration
to APs based on priority.
If the ap-interface bvi num ip address ip-address network-mask command is configured, you need
to separate APs into different VLANs to avoid address collision.
Configuration
The following example configures IP address 192.168.2.1and network mask 255.255.255.0 for BVI
Examples
2 in ap-config ap120 mode.
Ruijie(config)#ap-config ap120
You are going to config AP(ap120), which is online now.
Ruijie(config-ap)#ap-interface bvi 2 ip address 192.168.2.1 255.255.255.0
The following example configures IP address 192.168.3.1 and network mask 255.255.255.0 for BVI
3 in ap-group mode.
Ruijie(config)#ap-group default
Ruijie(config-group)#ap-interface bvi 3 ip address 192.168.3.1 255.255.255.0
The following example configures IP address192.168.4.1 and network mask 255.255.255.0 for BVI
4 in ap-config all mode.
Ruijie(config)#ap-config all
Ruijie(config-ap)#ap-interface bvi 4 ip address 192.168.4.1 255.255.255.0
The following example obtains an IP address and network mask for BVI 4 dynamically in ap-config
Command Reference
IP Address/Service Commands
all mode.
Ruijie(config)#ap-config all
Ruijie(config-ap)#ap-interface bvi 4 ip address dynamic
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.2 ip-address
Use this command to configure the IP address of an interface. Use the no form of this command to
restore the default setting.
ip address ip-address network-mask [ secondary ]
no ip address [ ip-address network-mask [ secondary ] ]
Parameter
Description
Parameter
Description
ip-address
32-bit IP address, with 8 bits in one group in decimal format. Groups
are separated by dots.
network-mask
32-bit network mask. 1 stands for the mask bit, 0 stands for the host
bit, with 8 bits in one group in decimal format. Groups are separated by
dots.
Defaults
No IP address is configured for the interface by default.
Command
Interface configuration mode.
Mode
Usage Guide
The equipment cannot receive and send IP packets before it is configured with an IP address. After
an IP address is configured for the interface, the interface is allowed to run the Internet Protocol
(IP).
The network mask is also a 32-bit value that identifies which bits among the IP address is the
network portion. Among the network mask, the IP address bits that correspond to value “1” are the
network address. The IP address bits that correspond to value “0” are the host address. For
example, the network mask of Class A IP address is “255.0.0.0”. You can divide a network into
different subnets using the network mask. Subnet division means to use the bits in the host address
part as the network address part, so as to reduce the capacity of a host and increase the number of
networks. In this case, the network mask is called subnet mask.
The RGOS software supports multiple IP address for an interface, in which one is the primary IP
address and others are the secondary addresses. Theoretically, there is no limit for the number of
secondary IP addresses. The primary IP address must be configured before the secondary IP
addresses. The secondary IP address and the primary IP address must belong to the same
Command Reference
IP Address/Service Commands
network or different networks. Secondary IP addresses are often used in network construction.
Typically, you can try to use secondary IP addresses in the following situations:
A network hasn’t enough host addresses. At present, the LAN should be a class C network where
254 hosts can be configured. However, when there are more than 254 hosts in the LAN, another
class C network address is necessary since one class C network is not enough. Therefore, the
device should be connected to two networks and multiple IP addresses should be configured.
Many older networks are layer 2-based bridge networks that have not been divided into different
subnets. Use of secondary IP addresses will make it very easy to upgrade this network to an IP
layer-based routing network. The equipment configures an IP address for each subnet.
Two subnets of a network are separated by another network. You can create a subnet for the
separated network, and connect the separated subnet by configuring a secondary IP address. One
subnet cannot appear on two or more interfaces of a device.
Configuration
The following example configures the primary IP address and the network mask as 10.10.10.1 and
Examples
255.255.255.0 respectively .
Ruijie(config)# interface gigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address 10.10.10.1 255.255.255.0
Related
Command
Description
Commands
show interface
Displays detailed information of the interface.
Platform
N/A
Description
1.3 ip address negotiate
Use this command to configure an IP address for the interface through PPP negotiation. Use the no
form of this command to restore the setting.
ip address negotiate
no ip address negotiate
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is disabled by default.
Command
Interface configuration mode
Mode
Usage Guide
Only the PPP interface of the router supports IP address configuration through PPP negotiation.
After the interface is configured with the ip address negotiate command, the peer end should be
configured with the peer default ip address command.
Configuration
The following example obtains an IP address for the interface through PPP negotiation.
Command Reference
Examples
IP Address/Service Commands
Ruijie(config)# interface dialer 1
Ruijie(onfig-if-dialer 1)# ip address negotiate
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.4 ip address-pool local
Use this command to enable the IP address pool function. Use the no form of this command to
disable this function.
ip address-pool local
no ip address-pool local
Parameter
Parameter
Description
Description
N/A
Defaults
This function is enabled by default.
Command
Global configuration mode
N/A
Mode
Usage Guide
This function is enabled by default. PPP users can allocate an IP address to the peer end from the
IP address pool configured. If you can use the no ip address-pool local command to disable this
function and clear all configured IP address pools.
Configuration
The following example enables the IP address pool function.
Examples
Ruijie(config)# ip address-pool local
Related
Command
Commands
N/A
Platform
N/A
Description
N/A
Description
1.5 ip broadcast-addresss
Use this command to define a broadcast address for an interface in the interface configuration
mode. Use the no form of this command to restore the default setting.
ip broadcast-addresss ip-address
no ip broadcast-addresss
Command Reference
Parameter
Parameter
IP Address/Service Commands
Description
Description
ip-address
Defaults
The default IP broadcast address is 255.255.255.255.
Command
Interface configuration mode.
Broadcast address of IP network
Mode
Usage Guide
At present, the destination address of IP broadcast packet is all “1”, represented as
255.255.255.255. The RGOS software can generate broadcast packets with other IP addresses
through definition, and can receive both all “1” and the broadcast packets defined by itself.
Configuration
The following example sets he destination address of IP broadcast packets generated by this
Examples
interface to 0.0.0.0.
Ruijie(config-if)# ip broadcast-address 0.0.0.0
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.6 ip icmp error-interval
Use this command to set the rate to send the ICMP destination unreachable packets triggered by
DF in the IP header. Use the no form of this command to restore the default setting.
ip icmp error-interval DF milliseconds [ bucket-size ]
no ip icmp error-interval DF milliseconds [ bucket-size ]
Use this command to set the rate to send other ICMP error packets. Use the no form of this
command to restore the default setting.
ip icmp error-interval milliseconds [bucket-size]
no ip icmp error-interval milliseconds [ bucket-siz ]
Parameter
Parameter
Description
Description
The refresh period of the token bucket, in the range from 0 to
milliseconds
2147483647 in the unit of milliseconds. 0 indicates no limit on
the rate to send ICMP error packets.
The default is 100.
bucket-size
Defaults
The number of tokens in the bucket, in the range is from 1 to
200. The default is 10.
The default rate is 10 packets per 100 millisecond.
Command Reference
IP Address/Service Commands
Command Mode
Global configuration mode.
Usage Guide
To prevent DoS attack, the token bucket algorithm is adopted to limit the rate to send ICMP error
packets.
If IP packets need to be fragmented while the DF is set to 1, the device sends ICMP destination
unreachable packets numbered 4 to the source IP address for path MTU discovery. Rate limits on
ICMP destination unreachable packets and other error packets are needed to prevent path MTU
discovery failure.
It is recommended to set the refresh period to an integral multiple of 10 milliseconds. If the refresh
period is not an integral multiple of 10 milliseconds, it is adjusted automatically. For example, 1
per 5 milliseconds is adjusted to 2 per 10 milliseconds; 3 per 15 milliseconds is adjusted to 2 per
10 milliseconds.
Configuration
The following example sets the rate to send the ICMP destination unreachable packets triggered
Examples
by DF in the IP header to 100 per second.
Ruijie(config)# ip icmp error-interval DF 1000 100
The following example sets the rate to send other ICMP error packets to 10 per second.
Ruijie(config)# ip icmp error-interval 1000 10
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.7 ip directed-broadcast
Use this command to enable the conversion from IP directed broadcast to physical broadcast
in the interface configuration mode. Use the no form of this command to restore the default
setting.
ip directed-broadcast [ access-list-number ]
no ip directed-broadcast
Parameter
Parameter
Description
Description
access-list-number
(Optional) Access list number, in the range from 1 to 199 and from
1300 to 2699. After an access list number has been defined, only
the IP directed broadcast packets that match this access list are
converted.
Defaults
This function is disabled by default.
Command Mode
Interface configuration mode.
Command Reference
IP Address/Service Commands
IP directed broadcast packet is an IP packet whose destination address is an IP subnet
Usage Guide
broadcast address. For example, the packet with the destination address 172.16.16.255 is
called a directed broadcast packet. However, the node that generates this packet is not a
member of the destination subnet.
The device that is not directly connected to the destination subnet receives an IP directed
broadcast packet and handles this packet in the same way as forwarding a unicast packet.
After the directed broadcast packet reaches a device that is directly connected to this subnet,
the device converts the directed broadcast packet into a flooding broadcast packet (typically
the broadcast packet whose destination IP address is all “1”), and then sends the packet to all
the hosts in the destination subnet in the manner of link layer broadcast.
You can enable conversion from directed broadcast into physical broadcast on a specified
interface, so that this interface can forward a direct broadcast packet to a directly connected
network. This command affects only the final transmission of directed broadcast packets that
have reached the destination subnet instead of normal forwarding of other directed broadcast
packets.
You can also define an access list on an interface to control which directed broadcast packets
to forward. After an access list is defined, only the packets that conform to the conditions
defined in the access list undergo conversion from directed broadcast into physical broadcast.
If the no ip directed-broadcast command is configured on an interface, RGOS will discard the
directed broadcast packets received from the directly connected network.
Configuration
The following example enables forwarding of directed broadcast packet on the fastEthernet 0/1
Examples
port of a device.
Ruijie(config)# interface fastEthernet 0/1
Ruijie(config-if)# ip directed-broadcast
Related Commands
Platform
Command
Description
N/A
N/A
N/A
Description
1.8 ip local pool
Use this command to create an IP address pool. Use the no form of this command to remove the
setting.
ip local pool pool-name low-ip-address [ high-ip-address ]
no ip local pool pool-name [ low-ip-address [ high-ip-address ] ]
Parameter
Parameter
Description
Description
pool-name
Specifies the address pool name. The default name is default.
low-ip-address
The start IP address in the address pool.
Command Reference
IP Address/Service Commands
high-ip-address
(Optional) The end IP address in the address pool.
Defaults
No IP address pool is configured by default.
Command
Global configuration mode
Mode
Usage Guide
This command is used to create one or multiple IP address pools for PPP to allocate addresses to
users.
Configuration
The following example creates an IP address pool named quark ranging from 172.16.23.0 to
Examples
172.16.23.255.
Ruijie(config)#ip local pool quark 172.16.23.0 172.16.23.255
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.9 ip mask-reply
Use this command to configure the RGOS software to respond the ICMP mask request and
send an ICMP response message in the interface configuration mode. Use the no form of this
command to restore the default setting.
ip mask-reply
no ip mask-reply
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is disabled by default.
Command mode
Interface configuration mode.
Usage Guide
Sometimes, a network device needs the subnet mask of a subnet on the Internet. To obtain
such information, the network device can send an ICMP mask request message, and the
network device that receives this message will send a mask response message.
Configuration
The following example sets the FastEthernet 0/1 interface of a device to respond the ICMP
Examples
mask request message.
Ruijie(config)# interface fastEthernet 0/1
Ruijie(config-if)# ip mask-reply
Command Reference
IP Address/Service Commands
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.10 ip mtu
Use this command to set the Maximum Transmission Unit (MTU) for an IP packet in the
interface configuration mode. Use the no form of this command is restore the default setting.
ip mtu bytes
no ip mtu
Parameter
Parameter
Description
Description
bytes
Maximum transmission unit of IP packet , in the range from 68 to
1500 bytes
Defaults
It is the same as the value configured in the interface command mtu by default.
Command Mode
Interface configuration mode.
Usage Guide
If an IP packet is larger than the IP MTU, the RGOS software will split this packet. All the
devices in the same physical network segment must have the same IP MTU for the
interconnected interface.
If the interface configuration command mtu is used to set the maximum transmission unit value
of the interface, IP MTU will automatically match with the MTU value of the interface. However, if
the IP MTU value is changed, the MTU value of the interface will remain unchanged.
Configuration
The following iexample sets the IP MTU value of the fastEthernet 0/1 interface to 512 bytes.
Examples
Ruijie(config)# interface fastEthernet 0/1
Ruijie(config-if)# ip mtu 512
Related
Command
Description
Commands
mtu
Sets the MTU value of an interface.
Platform
N/A
Description
1.11 ip redirects
Use this command to allow the RGOS software to send an ICMP redirection message in the interface
configuration mode. Use the no form of this command to disable this function.
Command Reference
IP Address/Service Commands
ip redirects
no ip redirects
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is enabled by default.
Command
Interface configuration mode.
Mode
Usage Guide
When the route is not optimum, it may make the device to receive packets through one interface and
send it though the same interface. If the device sends the packet through the interface through which
this packet is received, the device will send an ICMP redirection message to the data source, telling
the data source that the gateway for the destination address is another device in the subnet. In this
way the data source will send subsequent packets along the optimum path.
Configuration
The following example disables ICMP redirection for the fastEthernet 0/1 interface.
Examples
Ruijie(config)# interface fastEthernet 0/1
Ruijie(config-if)# no ip redirects
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.12 ip source-route
Use this command to allow the RGOS software to process an IP packet with source route information
in global configuration mode. Use the no form of this command to disable this function.
ip source-route
no ip source-route
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is enabled by default.
Command
Global configuration mode.
Mode
Usage Guide
RGOS supports IP source route. When the device receives an IP packet, it will check the options of
Command Reference
IP Address/Service Commands
the IP packet, such as strict source route, loose source route and record route. Details about these
options can be found in RFC 791. If an option is found to be enabled in this packet, a response will be
made. If an invalid option is detected, an ICMP parameter problem message will be sent to the data
source, and then this packet is discarded.
Configuration
The following example disables the IP source route.
Examples
Ruijie(config)# no ip source-route
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.13 ip ttl
Use this command to set the TTL value of the unicast packet. Use the no form of this command to
restore the default setting.
ip ttl value
no ip ttl
Parameter
Parameter
Description
Description
value
Sets the TTL value of the unicast packet, in the range from
0 to 255.
Defaults
The default is 64.
Command
Global configuration mode
Mode
Usage Guide
N/A
Configuration
The following example sets the TTL value of the unicast packet to 100.
Examples
Ruijie(config)# ip ttl 100
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
Command Reference
IP Address/Service Commands
1.14 ip unnumbered
This command is used to configure unnumbered interfaces. After an interface is set to an
unnumbered interface, IP can be run on the interface and packets can be sent or received on the
interface. Use the no form of this command to restore the default setting.
ip unnumbered interface-type interface-number
no ip unnumbered
Parameter
Parameter
Description
Description
interface-type
Type of the associated interface
interface-number
No. of the associated interface
Defaults
No unnumbered interface is configured by default.
Command mode
Interface configuration mode
Usage Guide
An unnumbered interface indicates that IP is enabled on the interface but no IP address is
allocated for the interface. An unnumbered interface must associate with an interface with an IP
address. The source IP address of the IP packets generated on an unnumbered interface is the IP
address of the associated interface. In addition, the routing protocol process determines whether
to send route update packets to the unnumbered interface according to the IP address of the
associated interface. Pay attention to the following when using an unnumbered interface:
An Ethernet interface cannot be set to an unnumbered interface.
When SLIP, HDLC, PPP, LAPB, and Frame-relay are encapsulated on a serial port, the port can
be set to an unnumbered interface. When a frame relay is encapsulated, only a point-to-point
subinterface can be set to an unnumbered interface. In the case of X.25 encapsulation,
unnumbered interface is not allowed.
The ping command cannot be used to check whether an unnumbered interface is working
properly because the interface does not have an IP address. The status of an unnumbered
interface can be remotely monitored over SNMP.
The network cannot be enabled using an unnumbered interface.
Configuration
to the following example configures the local interface as an unnumbered interface and sets the
Examples
associated interfacet to FastEthernet 0/1 (an IP address is configured for the interface).
Ruijie(config-if)# ip unnumbered fastEthernet 0/1
Related
Command
Description
Commands
show interface
Displays the detailed information about the interface.
Platform
N/A
Description
Command Reference
IP Address/Service Commands
1.15 ip unreachables
Use this command to allow the RGOS software to generate ICMP destination unreachable
messages. Use the no form of this command to disable this function.
ip unreachables
no ip unreachables
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is enabled by default.
Command
Interface configuration mode.
Mode
Usage Guide
RGOS software will send a ICMP destination unreachable message if it receives unicast message
with self-destination-address and can not process the upper protocol of this message.
RGOS software will send ICMP host unreachable message to source data if it can not forward a
message due to no routing.
This command influences all ICMP destination unreachable messages.
Configuration
The following example disables sending ICMP destination unreachable message on FastEthernet
Examples
0/1.
Ruijie(config)# interface fastEthernet 0/1
Ruijie(config-if)# no ip unreachables
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.16 peer default ip address
Use this command to allocate an IP address to the peer end through PPP negotiation. Use the no
form of this command to restore the default setting.
peer default ip address { ip-address | pool [pool-name] }
no peer default ip address
Parameter
Parameter
Description
Description
ip-address
Allocates an IP address to the peer end.
pool-name
(Optional) Specifies the address pool name. If not specified, the
default address pool is used.
Command Reference
IP Address/Service Commands
Defaults
No IP address is allocated to the peer end through PPP negotiaon by default.
Command
Interface configuration mode.
Mode
Usage Guide
If the local end is configured with an IP address while the peer end not, you can enable the local end
to allocate an IP address to the peer end by configuring the ip address negotiate command on the
peer end and the peer default ip address on the local end.
This command is configured on PPP interface supporting encapsulation PPP or SLIP.
The peer default ip address pool command is used to allocate an IP address to the peer end from
the address pool, configured by using the ip local pool command.
The peer default ip address ip-address command is used to specify an IP address for the peer
end. This command cannot be configured on virtual template interfaces and asyn interfaces.
Configuration
The following example enables interface dialer 1 to allocate IP address 10.0.0.1 to the peer end.
Examples
Ruijie(config)# interface dialer 1
Ruijie(config-if-dialer 1)# peer default ip address 10.0.0.1
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.17 show ip interface
Use this command to display the IP status information of an interface.
show ip interface [ interface-type interface-number | brief ]
Parameter
Parameter
Description
Description
interface-type
Specifies interface type.
interface-number
Specifies interface number.
brief
Displays the brief configurations about the IP of the layer-3 interface
(including the interface primary ip, secondary ip and interface status)
Defaults
N/A.
Command
Privileged EXEC mode.
Mode
Usage Guide
When an interface is available, RGOS will create a direct route in the routing table. The interface is
available in that the RGOS software can receive and send packets through this interface. If the
Command Reference
IP Address/Service Commands
interface changes from available status to unavailable status, the RGOS software removes the
appropriate direct route from the routing table.
If the interface is unavailable, for example, two-way communication is allowed, the line protocol
status will be shown as “UP”. If only the physical line is available, the interface status will be shown as
“UP”.
The results shown may vary with the interface type, because some contents are the interface-specific
options
Configuration
The following exmaple displays the output of the show ip interface brirf command.
Examples
Ruijie#show ip interface brief
Interface IP-Address(Pri) IP-Address(Sec) Status Protocol
GigabitEthernet 0/10 2.2.2.2/24 3.3.3.3/24 down down
GigabitEthernet 0/11 no address no address down down
VLAN 1 1.1.1.1/24 no address down down
Description of fields:
Field
Description
Status
Link status of an interface. The value can be up, down, or administratively down.
Protocol
IPv4 protocol status of an interface.
The following example displays the output of the show ip interface vlan command.
SwitchA#show ip interface vlan 1
VLAN 1
IP interface state is: DOWN
IP interface type is: BROADCAST
IP interface MTU is: 1500
IP address is:
1.1.1.1/24 (primary)
IP address negotiate is: OFF
Forward direct-broadcast is: OFF
ICMP mask reply is: ON
Send ICMP redirect is: ON
Send ICMP unreachabled is: ON
DHCP relay is: OFF
Fast switch is: ON
Help address is:
Proxy ARP is: OFF
ARP packet input number: 0
Request packet:
Reply packet:
0
0
Unknown packet: 0
TTL invalid packet number: 0
ICMP packet input number: 0
Echo request:
Echo reply: 0
0
Command Reference
Unreachable:
IP Address/Service Commands
0
Source quench:
0
Routing redirect:
0
Description of fields in the results:
Field
IP interface state is:
IP interface type is:
Description
The network interface is available, and both its interface
hardware status and line protocol status are “UP”.
Show the interface type, such as broadcast, point-to-point,
etc.
IP interface MTU is:
Show the MTU value of the interface.
IP address is:
Show the IP address and mask of the interface.
IP address negotiate is:
Show whether the IP address is obtained through
negotiation.
Forward direct-broadcast is:
Show whether the directed broadcast is forwarded.
ICMP mask reply is:
Show whether an ICMP mask response message is sent.
Send ICMP redirect is:
Show whether an ICMP redirection message is sent.
Send ICMP unreachabled is:
Show whether an ICMP unreachable message is sent.
DHCP relay is:
Show whether the DHCP relay is enabled.
Fast switch is:
Show whether the IP fash switching function is enabled.
Route horizontal-split is:
Show whether horizontal split is enabled, which will affect
the route update behavior of the distance vector protocol.
Help address is:
Show the helper IP address.
Proxy ARP is:
Show whether the agent ARP is enabled.
ARP packet input number:
Request packet:
Reply packet:
Unknown packet:
TTL invalid packet number:
ICMP packet input number:
Echo request:
Echo reply:
Unreachable:
Source quench:
Routing redirect:
Outgoing access list is
Inbound access list is
Show the total number of ARP packets received on the
interface, including:
ARP request packet
ARP reply packet
Unknown packet
Show the TTL invalid packet number
Show the total number of ICMP packets received on the
interface, including:
Echo request packet
Echo reply packet
Unreachable packet
Source quench packet
Routing redirection packet
Show whether an outgoing access list has been configured
for an interface.
Show whether an incoming access list has been configured
Command Reference
IP Address/Service Commands
for an interface.
Related
Command
Description
Commands
N/A.
N/A.
Platform
N/A.
Description
1.18 show ip packet statistics
Use this command to display the statistics of IP packets.
show ip packet statistics [ total | interface-name ]
Parameter
Parameter
Description
Description
interface-name
Interface name
total
Displays the total statistics of all interfaces.
Defaults
N/A.
Command Mode
Privileged EXEC mode.
Usage Guide
N/A.
Configuration
The following example displays the output of this command.
Examples
Ruijie# show ip packet statistics
Total
Received 1000 packets, 1000000 bytes
Unicast:1000,Multicast:0,Broadcast:0
Discards:0
HdrErrors:0(BadChecksum:0,TTLExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 100 packets, 6000 bytes
Unicast:50,Multicast:50,Broadcast:0
VLAN 1
Received 1000 packets, 1000000 bytes
Unicast:1000,Multicast:0,Broadcast:0
Discards:0
HdrErrors:0(BadChecksum:0,TTLExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 100 packets, 6000 bytes
Command Reference
IP Address/Service Commands
Unicast:50,Multicast:50,Broadcast:0
Related
Command
Description
Commands
ip default-gateway
Configures the default gateway, which is only supported on
the Layer 2 switch.
Platform
N/A
Description
1.19 show ip pool
Use this command to display the IP address pool.
show ip pool [ pool-name ]
Parameter
Parameter
Description
Description
pool-name
Specifies the IP address pool.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays all IP address ranges.
Examples
Ruijie# show ip pool
Ruijie(config)#show ip pool
Pool
Begin
End
default
1.1.1.1
1.1.1.1
pool1
2.2.2.2
2.2.2.254
pool2
3.1.1.1
3.2.1.1
pool3
192.168.1.1
Free
In use
1
0
253
0
65537
0
192.168.1.254
Field
Description
Pool
Address pool name
Begin
The start IP address of the address pool
Free
The number of free IP addresses in the address pool
In use
The number of IP addresses in use in the address pool
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Command Reference
IP Address/Service Commands
Description
1.20 show ip raw-socket
Use this command to display IPv4 raw sockets.
show ip raw-socket [ num ]
Parameter
Parameter
Description
Description
num
Protocol.
Defaults
N/A.
Command Mode
Priviledged EXEC mode.
Usage Guide
N/A.
Configuration
The following example displays all IPv4 raw sockets.
Examples
Ruijie# show ip raw-socket
Number Protocol Process name
1
ICMP
dhcp.elf
2
ICMP
vrrp.elf
3
IGMP
igmp.elf
4
VRRP
vrrp.elf
Total: 4
Field Description
Field
Description
Number
Number
Protocol
Protocol
Process name
Process name
Total
Total number
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.21 show ip sockets
Use this command to display all IPv4 sockets.
show ip sockets
Command Reference
IP Address/Service Commands
Parameter
Parameter
Description
Description
N/A.
N/A.
Defaults
N/A.
Command Mode
Privileged EXEC mode.
Usage Guide
N/A.
Configuration
The following displays all IPv4 sockets.
Examples
Ruijie# show ip sockets
Number Process name
Type
Protocol LocalIP:Port ForeignIP:Port
State
1
dhcp.elf
RAW
ICMP
0.0.0.0:1
0.0.0.0:0
vrrp.elf
RAW
ICMP
0.0.0.0:1
0.0.0.0:0
igmp.elf
RAW
IGMP
0.0.0.0:2
0.0.0.0:0
vrrp.elf
RAW
VRRP
0.0.0.0:112
0.0.0.0:0
dhcpc.elf
DGRAM
UDP
0.0.0.0:68
0.0.0.0:0
rg-snmpd
DGRAM
UDP
0.0.0.0:161
0.0.0.0:0
*
2
*
3
*
4
*
5
*
6
*
7
wbav2
DGRAM
UDP
0.0.0.0:2000 0.0.0.0:0
*
8
vrrp_plus.elf
DGRAM
UDP
0.0.0.0:3333 0.0.0.0:0
*
9
mpls.elf
DGRAM
UDP
0.0.0.0:3503 0.0.0.0:0
*
10
rds_other_th
DGRAM
UDP
0.0.0.0:3799 0.0.0.0:0
*
11
rg-snmpd
DGRAM
UDP
0.0.0.0:14800 0.0.0.0:0
rg-sshd
STREAM
TCP
0.0.0.0:22
0.0.0.0:0
STREAM
TCP
0.0.0.0:23
0.0.0.0:0
*
12
LISTEN
13
rg-telnetd
LISTEN
14
wbard
STREAM
TCP
0.0.0.0:4389 0.0.0.0:0
wbard
STREAM
TCP
0.0.0.0:7165 0.0.0.0:0
LISTEN
15
LISTEN
Command Reference
IP Address/Service Commands
Total: 15
Field Description
Field
Description
Number
Serial number.
Process name
Process name.
Socket type, including the following types:
RAW: raw sockets
Type
DGRAM: datagram type
STREAM: stream type.
Protocol
Protocol.
LocalIP:Port
Local IP address and port.
ForeignIP:Port
Peer IP address and port.
State
State. This field is for only TCP sockets.
Total
The total number of sockets.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
1.22 show ip udp
Use this command to display IPv4 UDP sockets.
show ip udp [ local-port num ]
Use this command to display IPv4 UDP socket statistics.
show ip udp statistics
Parameter
Parameter
Description
Description
local-port num
Local port number
Defaults
N/A.
Command Mode
Privileged EXEC mode.
Usage Guide
N/A.
Configuration
The following example displays all IPv4 UDP sockets.
Examples
Ruijie# show ip udp
Number Local Address
1
0.0.0.0:68
Peer Address
0.0.0.0:0
Process name
dhcpc.elf
Command Reference
IP Address/Service Commands
2
0.0.0.0:161
0.0.0.0:0
rg-snmpd
3
0.0.0.0:2000
0.0.0.0:0
wbav2
4
0.0.0.0:3333
0.0.0.0:0
vrrp_plus.elf
5
0.0.0.0:3503
0.0.0.0:0
mpls.elf
6
0.0.0.0:3799
0.0.0.0:0
rds_other_th
7
0.0.0.0:14800
0.0.0.0:0
rg-snmpd
Field Description
Field
Description
Number
Number.
Local Address
Local IP address and port.
Peer Address
Peer IP address and port.
Process name
Process name.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
Command Reference
ARP Commands
2 ARP Commands
2.1 arp
Use this command to add a permanent IP address and MAC address mapping to the ARP cache
table. Use the no form of this command to restore the default setting.
arp ip-address MAC-address type
no arp ip-address
Parameter
Parameter
Description
Description
ip-address
The IP address that corresponds to the MAC address. It includes four parts
of numeric values in decimal format separated by dots.
MAC-address
48-bit data link layer address
type
ARP encapsulation type. The keyword is arpa for the Ethernet interface.
Defaults
There is no static mapping record in the ARP cache table by default.
Command
Global configuration mode.
Mode
Usage Guide
RGOS finds the 48-bit MAC address according to the 32-bit IP address using the ARP cache table.
Since most hosts support dynamic ARP resolution, usually static ARP mapping is not necessary.
The clear arp-cache command can be used to delete the ARP mapping that is learned
dynamically.
Configuration
The following example sets an ARP static mapping record for a host in the Ethernet.
Examples
Ruijie(config)# arp 1.1.1.1 4e54.3800.0002 arpa
Related
Command
Description
Commands
clear arp-cache
Clears the ARP cache table
Platform
N/A
Description
2.2 arp-learning
Use this command to enable ARP learning. Use the no form of this command to disable this
function.
arp-learning enable
no arp-learning enable
Command Reference
ARP Commands
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is enabled by default
Command
Interface configuration mode
Mode
Usage Guide
After the device learns the dynamic ARP and turns it to the static ARP through Web, it is
recommended to enable ARP learning. Otherwise, it is not recommended to enable this function. If
this function is disabled with dynamic ARP existing, you can turn dynamic ARP to static ARP
through Web. You can also clear the dynamic ARP using the clear arp command to deny the
specified user’s access to Internet. Otherwise, the dynamic ARP will be aged and then cleared.
After this function is disabled, the AnyIP function and trust ARP detection are disabled.
Configuration
The following example enables ARP learning.
Examples
Ruijie(config)# interface gi 0/0
Ruijie(config-if-GigabitEthernet 0/0)# arp-learning enable
The following example disbales ARP learning.
Ruijie(config)# interface gi 0/0
Ruijie(config-if-GigabitEthernet 0/0)# no arp-learning enable
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
2.3 arp cache interface-limit
Use this command to set the maximum number of ARP learned on the interface.
Use the no form of this command to restore the default setting.
arp cache interface-limit limit
no arp cache interface-limit
Parameter
Parameter
Description
Description
limit
Sets the maximum number of ARP learned on the interface,
including static and dynamic ARPs, in the range from 0 to the
number supported on the interface. 0 indicates that the number is
not limited.
Defaults
The default is 0.
Command Reference
Command
ARP Commands
Interface configuration mode
Mode
Usage Guide
This function can prevent ARP attacks from generating ARP entries to consume memory. limit must
be no smaller than the number of ARPs learned on the interface. Otherwise, the configuration does
not take effect.
Configuration
The following example sets the maximum number of ARP learned on the interface to 300.
Examples
Ruijie(config)# interface gi 0/0
Ruijie(config-if-GigabitEthernet 0/0)# arp cache interface-limit 300
The following example restores the default setting.
Ruijie(config)# interface gi 0/0
Ruijie(config-if-GigabitEthernet 0/0)# no arp any-ip
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
2.4 arp gratuitous-send interval
Use this command to set the interval of sending the free ARP request message on the
interface. Use theno form of this command to restore the default setting.
arp gratuitous-send interval seconds [ number ]
no arp gratuitous-send
Parameter
Parameter
Description
Description
seconds
The time interval to send the free ARP request message in
the range from 1 to 3600 in the unit of seconds.
number
The number of free ARP request messages to be sent in
the range from 1 to 100 in the unit of seconds. The default
value is 1.
Defaults
This function is disabled by default.
Command Mode
Interface configuration mode.
Usage Guide
If an interface of the switch is used as the gateway of its downlink devices and counterfeit
gateway behavior occurs in the downlink devices, you can configure to send the free ARP
request message regularly on this interface to notify that the switch is the real gateway.
Configuration
The following example sets to send one free ARP request to SVI 1 per second.
Command Reference
ARP Commands
Ruijie(config)# interface vlan 1
Examples
Ruijie(config-if)# arp gratuitous-send interval 1
The following example stops sending the free ARP request to SVI 1.
Ruijie(config)# interface vlan 1
Ruijie(config-if)# no arp gratuitous-send
Related Commands
Command
Description
N/A
N/A
N/A
Platform
Description
2.5 arp retry interval
Use this command to set the frequency for sending the arp request message locally, namely, the
time interval between two continuous ARP requests sent for resolving one IP address. Use the no
form of this command
to restore the default setting.
arp retry interval seconds
no arp retry interval
Parameter
Parameter
Description
Description
seconds
Time for retransmitting the ARP request message in the range from
1 to 3600 in the unit of seconds.
Defaults
The default is 1.
Command
Global configuration mode.
Mode
Usage Guide
The switch sends the ARP request message frequently, and thus causing problems like network
busy. In this case, you can set the retry interval of the ARP request message longer. In general, it
should not exceed the aging time of the dynamic ARP entry.
Configuration
The following example sets the retry interval of the ARP request as 30 seconds.
Examples
Ruijie(config)# arp retry interval 30
Related
Command
Description
Commands
arp retry times
Number of times for retransmitting an ARP request message.
Platform
N/A
Description
Command Reference
ARP Commands
2.6 arp retry times
Use this command to set the local retry times of the ARP request message, namely, the times of
sending the ARP request message to resolve one IP address. Use the no form of this command to
restore the default setting.
arp retry times number
no arp retry times
Parameter
Parameter
Description
Description
number
The times of sending the same ARP request in the range from 1
to100.When it is set as 1, it indicates that the ARP request is not
retransmitted, only 1 ARP request message is sent.
Defaults
The default is 5.
Command
Global configuration mode.
Mode
Usage Guide
The switch sends the ARP request message frequently, and thus causing problems like network
busy. In this case, you can set the retry times of the ARP request smaller. In general, the retry times
should not be set too large.
Configuration
The following example sets the local ARP request not to be retried.
Examples
Ruijie(config)# arp retry times 1
The following example sets the local ARP request to be retried for one time.
Ruijie(config)# arp retry times 2
Related
Command
Description
Commands
arp retry interval
Interval for retransmitting an ARP request message
Platform
N/A
Description
2.7 arp timeout
Use this command to configure the timeout for the ARP static mapping record in the ARP cache.
Use the no form of this command to restore the default setting.
arp timeout seconds
no arp timeout
Parameter
Parameter
Description
Description
secondsv
The timeout is in the range from 0 to 2147483 in the unit of seconds.
Command Reference
Defaults
The default is 3600.
Command
Interface configuration mode
ARP Commands
Mode
Usage Guide
The ARP timeout setting is only applicable to the IP address and the MAC address mapping that
are learned dynamically. The shorter the timeout, the truer the mapping table saved in the ARP
cache, but the more network bandwidth occupied by the ARP. Hence the advantages and
disadvantages should be weighted. Generally it is not necessary to configure the ARP timeout
unless there is a special requirement.
Configuration
The following example sets the timeout for the dynamic ARP mapping record that is learned
Examples
dynamically from FastEthernet port 0/1 to 120 seconds.
Ruijie(config)# interface fastEthernet 0/1
Ruijie(config-if)# arp timeout 120
Related
Command
Description
Commands
clear arp-cache
Clears the ARP cache list.
show interface
Displays the interface information.
Platform
N/A
Description
2.8 arp trusted
Use this command to set the maximum number of trusted ARP entries. Use the no form of this
command to restore the default setting.
arp trusted number
no arp trusted
Parameter
Parameter
Description
Description
number
Maximum number of trusted ARP entries. This value ranges from
10 to ARP table capacity minus 1,024.
Defaults
The default value is half of the ARP table capacity.
Command
Global configuration mode.
Mode
Usage Guide
To make this command valid, enable the trusted ARP function firstly. The trusted ARP entries and
other entries share the memory. Too much trusted ARP entries may lead to insufficient ARP entry
space. In general, you should set the maximum number of trusted ARP entries according to your
Command Reference
ARP Commands
real requirements.
Configuration
The following example sets 1000 trusted ARPs.
Examples
Ruijie(config)# arp trusted 1000
Related
Command
Description
Commands
service trustedarp
Enables the trusted ARP function.
Platform
N/A
Description
2.9 arp trust-monitor enable
Use this command to enable egress gateway trusted ARP. Use the no form of this command to
restore the default setting.
arp trust-monitor enable
no arp trust-monitor enable
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is disabled by default.
Command
Interface configuration mode
Mode
Usage Guide
The egress gateway trusted ARP is different from GSN trusted ARP. With this function enabled, the
device sends a unicast request for confirmation when learning an ARP table entry. The device learns
the ARP table entry after receiving the response. When the device receives the ARP packet, only if
the ARP table entry is aged or incomplete and the ARP packet is a response packet will the packet
be handled. After egress gateway trusted ARP is enabled, the aging time of the ARP table entry
turns to 60 seconds. After this function is disabled, the aging time restores to 3600 seconds.
Configuration
The following example enables egress gateway trusted ARP.
Examples
Ruijie(config)# interface gi 0/0
Ruijie(config-if-GigabitEthernet 0/0)# arp trust-monitor enable
The following example disables engress gateway trusted ARP.
Ruijie(config)# interface gi 0/0
Ruijie(config-if-GigabitEthernet 0/0)# no arp trust-monitor enable
Related
Command
Description
Commands
N/A
N/A
Command Reference
Platform
ARP Commands
N/A
Description
2.10 arp trusted aging
Use this command to set trusted ARP aging. Use the no form of this command to restore the
default setting.
arp trusted aging
no arp trusted aging
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is disabled by default.
Command
Global configuration mode.
Mode
Usage Guide
Use this command to set trusted ARP aging. Aging time is the same as dynamic ARP aging time.
Use the arp timeout command to set aging time in interface mode.
Configuration
N/A
Examples
Related
Command
Description
Commands
service trustedarp
Enables trusted ARP function.
Platform
N/A
Description
2.11 arp trusted user-vlan
Use this command to execute the VLAN transformation while setting the trusted ARP entries. Use the
no form of this command to restore the default setting.
arp trusted user-vlan vid1 translated-vlan vid2
no arp trusted user-vlan vid1 translated-vlan vid2
Parameter
Parameter
Description
Description
vid1
VID set by the server.
vid2
VID after the transformation.
Defaults
This function is disabled by default.
Command Reference
Command
ARP Commands
Global configuration mode.
Mode
Usage Guide
In order to validate this command, enable the trusted ARP function first. This command is needed
only when the VLAN sent by the server is different from the VLAN which takes effect in the trusted
ARP entry.
Configuration
The following example sets the VLAN sent by the server to 3, but the VLAN which takes effect in the
Examples
trusted ARP entry to 5.
Ruijie(config)# arp trusted user-vlan 3 translated-vlan 5
Related
Command
Description
Commands
service trustedarp
Enables the trusted ARP function.
Platform
N/A
Description
2.12 arp unresolve
Use this command to set the maximum number of the unresolved ARP entries. Use no form of this
command to restore the default setting.
arp unresolve number
no arp unresolve
Parameter
Parameter
Description
Description
number
The maximum number of the unresolved ARP entries in the range
from 1 to the ARP table size supported by the device.
Defaults
The default is the ARP table size supported by the device.
Command
Global configuration mode.
Mode
Usage Guide
If there are a large number of unresolved entries in the ARP cache table and they do not disappear
after a period of time, this command can be used to limit the quantity of the unresolved entries.
Configuration
The following example sets the maximum number of the unresolved items to 500.
Examples
Ruijie(config)# arp unresolve 500
Related
Command
Description
Commands
N/A
N/A
Command Reference
Platform
ARP Commands
N/A
Description
2.13 clear arp-cache
Use this command to remove a dynamic ARP mapping record from the ARP cache table and clear
an IP route cache table.
clear arp-cache [trusted ] [ ip [mask ] ] | interface interface-name ]
Parameter
Parameter
Description
Description
trusted
Deletes trusted ARP entries. Dynamic ARP entries are deleted by
default.
ip
Deletes ARP entries of the specified IP address. If trusted value is
specified, trusted ARP entries are deleted; otherwise, all dynamic
ARP entries are deleted which is the default.
mask
Deletes ARP entries in a subnet mask. If trusted value is specified,
trusted ARP entries in the subnet mask are deleted; otherwise, all
dynamic ARP entries are deleted. The dynamic ARP entry
specified by the IP address is deleted by default.
interface interface-name
Deletes dynamic ARP entries on the specified interface. Dynamic
ARP entries are deleted on all interfaces by default.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example deletes all dynamic ARP mapping records.
Examples
Ruijie# clear arp-cache
The following deletes the dynamic ARP entry 1.1.1.1.
Ruijie# clear arp-cache 1.1.1.1
The following example deletes the dynamic ARP entry on interface SVI1.
Ruijie# clear arp-cache interface Vlan 1
Related
Command
Description
Commands
arp
Adds a static mapping record to the ARP cache table.
Platform
N/A
Description
Command Reference
ARP Commands
2.14 ip proxy-arp
Use this command to enable ARP proxy function on the interface. Use the no form of this
command to restore the default setting.
ip proxy-arp
no ip proxy-arp
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command Mode
Interface configuration mode.
Usage Guide
Proxy ARP helps those hosts without routing message obtain MAC address of other networks or
subnet IP address. For example, a device receives an ARP request. The IP addresses of request
sender and receiver are in different networks. However, the device that knows the routing of IP
address of request receiver sends ARP response, which is Ethernet MAC address of the device
itself.
Configuration
The following example enables ARP on FastEthernet port 0/1.
Examples
Ruijie(config)# interface fastEthernet 0/1
Ruijie(config-if)# ip proxy-arp
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
2.15 local-proxy-arp
Use this command to enable local proxy ARP on the SVI interface. Use the no form of this command
to restore the default setting.
local-proxy-arp
no local-proxy-arp
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Interface configuration mode
Command Reference
ARP Commands
Mode
Usage Guide
With local proxy ARP enabled, the device helps a host to obtain MAC addresses of other hosts on
the subnet. If the device enables switchport protected, users on different ports are segregated on
layer 2. After local proxy ARP is enabled, the device serves as a proxy to send a response after
receiving an ARP request. The ARP response contains a MAC address which is the device’s
Ethernet MAC address, realizing communication between different hosts through L3 routes.
Configuration
The following example enables local proxy ARP on VLAN1.
Examples
Ruijie(config)# interface vlan 1
Ruijie(config-if-VLAN 1)# local-proxy-arp
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
2.16 show arp
Use this command to display the Address Resolution Protocol (ARP) cache table
show arp [ interface-type interface-number | trusted [ip [mask]] | [ip [mask] | mac-address | static |
complete | incomplete ]
Parameter
Description
Parameter
Description
interface-type
Displays the ARP entry of a specified Layer-2 or Layer-3 port.
interface-number
Displays the ARP entry of the specified IP address. If trusted is
ip
configured, only trusted ARP entries are displayed. Otherwise, untrusted
ARP entries are displayed.
Displays the ARP entries of the network segment included within the
mask
mask. If trusted is configured, only trusted ARP entries are displayed.
Otherwise, untrusted ARP entries are displayed.
static
Displays all the static ARP entries.
complete
Displays all the resolved dynamic ARP entries.
incomplete
Displays all the unresolved dynamic ARP entries.
mac-address
Displays the ARP entry with the specified mac address.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Command Reference
ARP Commands
Usage Guide
N/A
Configuration
The following example displays the output result of the show arp command:
Examples
Ruijie# show arp
Total Numbers of Arp: 7
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.68 0 0013.20a5.7a5f arpa VLAN 1
Internet 192.168.195.67 0 001a.a0b5.378d arpa VLAN 1
Internet 192.168.195.65 0 0018.8b7b.713e arpa VLAN 1
Internet 192.168.195.64 0 0018.8b7b.9106 arpa VLAN 1
Internet 192.168.195.63 0 001a.a0b5.3990 arpa VLAN 1
Internet 192.168.195.62 0 001a.a0b5.0b25 arpa VLAN 1
Internet 192.168.195.5 -- 00d0.f822.33b1 arpa VLAN 1
The following example displays the output result of show arp 192.168.195.68
Ruijie# show arp 192.168.195.68
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.68 1 0013.20a5.7a5f arpa VLAN 1
The following example displays the output result of show arp 192.168.195.0 255.255.255.0
Ruijie# show arp 192.168.195.0 255.255.255.0
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.64 0 0018.8b7b.9106 arpa VLAN 1
Internet 192.168.195.2 1 00d0.f8ff.f00e arpa VLAN 1
Internet 192.168.195.5 -- 00d0.f822.33b1 arpa VLAN 1
Internet 192.168.195.1 0 00d0.f8a6.5af7 arpa VLAN 1
Internet 192.168.195.51 1 0018.8b82.8691 arpa VLAN 1
The following example displays the output result of show arp 001a.a0b5.378d
Ruijie# show arp 001a.a0b5.378d
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.67 4 001a.a0b5.378d arpa VLAN 1
The following example displyas the output result of show arp static
Ruijie# show arp static
Protocol Address Age(min) Hardware Type
Internet 192.168.23.55
Interface
Origin
<static> 0000.0000.0010 arpa
VLAN 100
<static> 0000.0000.0020 arpa
VLAN 100
Configure
Internet 192.168.23.56
Authentication
2 static arp entries exist.
The meaning of each field in the ARP cache table is described as below:
Command Reference
ARP Commands
Table 1 Fields in the ARP cache table
Field
Description
Protocol
Protocol of the network address, always to be Internet
Address
IP address corresponding to the hardware address
Age (min)
Age of the ARP cache record, in minutes; If it is not locally or statically
configured, the value of the field is represented with “-”.
Hardware
Hardware address corresponding to the IP address
Type
Hardware address type, ARPA for all Ethernet addresses
Interface
Interface associated with the IP addresses
Origin
Origin of ARP entries.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
2.17 show arp counter
Use this command to display the number of ARP entries in the ARP cache table.
show arp counter
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays the output result of the show arp counter command:
Examples
Ruijie# show arp counter
The Arp Entry counter:0
The Unresolve Arp Entry:0
The meaning of each field in the ARP cache table is described in the following Table.
Parameter
Description
overlay
Indicates the number of VxLAN-related ARP
entries.
underlayer
Indicates the number of VxLAN-irrelated ARP
Command Reference
ARP Commands
entries.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
2.18 show arp packet statistics
Use this command to display the statistics of ARP packets.
show arp packet statistics [ interface-name ]
Parameter
Parameter
Description
Description
interface-name
Displays the statistics of ARP packets on the specified interface.
Defaults
N/A.
Command
Privileged EXEC mode.
Mode
Usage Guide
N/A.
Configuration
The following example displays the output information of the command.
Examples
Ruijie# show arp packet statistics
Interface Received Received Received Sent Sent
Name Requests Replies Others Requests Replies
--------- -------- -------- -------- -------- ------VLAN 1 10 20 1 50 10
VLAN 2 5 8 0 10 10
VLAN 3 20 5 0 15 12
VLAN 4 5 8 0 10 10
VLAN 5 20 5 0 15 12
VLAN 6 20 5 0 15 12
VLAN 7 20 5 0 15 12
VLAN 8 5 8 0 10 10
VLAN 9 20 5 0 15 12
VLAN 10 20 5 0 15 12
VLAN 11 20 5 0 15 12
VLAN 12 20 5 0 15 12
Description of fields:
Field
description
Received Requests
Number of received ARP requests
Command Reference
ARP Commands
Received Replies
Number of received ARP response messages
Received Others
Number of other received ARP packets
Sent Requests
Number of sent ARP requests
Sent Replies
Number of sent ARP requests
Related
Command
Description
Commands
N/A.
N/A.
Platform
N/A
Description
2.19 show arp timeout
Use this command to display the aging time of a dynamic ARP entry on the interface.
show arp timeout
Parameter
Parameter
Description
Description
N/A.
N/A.
Defaults
N/A.
Command
Privileged EXEC mode
Mode
Usage Guide
N/A.
Configuration
The following example displays the output of the show arp timeout command:
Examples
Ruijie# show arp timeout
Interface arp timeout(sec)
---------------------- ---------------VLAN 1 3600
The meaning of each field in the ARP cache table is described in Table 1.
Related
Command
Description
Commands
N/A.
N/A.
Platform
N/A
Description
2.20 show ip arp
Use this command to display the Address Resolution Protocol (ARP) cache table.
show ip arp
Command Reference
ARP Commands
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A.
Command
Privileged EXEC mode.
Mode
Usage Guide
N/A.
Configuration
The following example displays the output of show ip arp:
Examples
Ruijie# show ip arp
Protocol Address Age(min)Hardware Type Interface
Internet 192.168.7.233 23 0007.e9d9.0488 ARPA FastEthernet 0/0
Internet 192.168.7.112 10 0050.eb08.6617 ARPA FastEthernet 0/0
Internet 192.168.7.79 12 00d0.f808.3d5c ARPA FastEthernet 0/0
Internet 192.168.7.1 50 00d0.f84e.1c7f ARPA FastEthernet 0/0
Internet 192.168.7.215 36 00d0.f80d.1090 ARPA FastEthernet 0/0
Internet 192.168.7.127 0 0060.97bd.ebee ARPA FastEthernet 0/0
Internet 192.168.7.195 57 0060.97bd.ef2d ARPA FastEthernet 0/0
Internet 192.168.7.183 -- 00d0.f8fb.108b ARPA FastEthernet 0/0
Each field in the ARP cache table has the following meanings:
Field
Description
Protocol
Network address protocol, always Internet.
Address
The IP address corresponding to the hardware address.
Age (min)
Hardware
Type
Interface
Age of the ARP cache record, in minutes; If it is not locally or statically
configured, the value of the field is represented with “-”.
Hardware address corresponding to the IP address
The type of hardware address. The value is ARPA for all Ethernet
addresses.
Interface associated with the IP address.
Related
Command
Description
Commands
N/A.
N/A.
Platform
N/A
Description
Command Reference
IPv6 Commands
3 IPv6 Commands
3.1 clear ipv6 neighbors
Use this command to clear the dynamic IPv6 neighbors.
clear ipv6 neighbors [interface-id]
Parameter
Description
Parameter
interface-id
Defaults
N/A
Command
Privileged EXEC mode.
Description
Interface name. Clear the dynamically learned IPv6
neighbors on the specified interface.
Mode
Usage Guide
This command does not clear all the dynamic neighbors on authentication VLAN.
Note that the static neighbors will not be cleared.
Configuration
The following example clears the dynamic IPv6 neighbors.
Examples
Ruijie# clear ipv6 neighbors
The following example clears all dynamic IPv6 neighbors learned on the interface, gigabitEthernet
0/1.
Ruijie# clear ipv6 neighbors gigabitEthernet 0/1
Related
Command
Description
Commands
ipv6 neighbor
Configures the neighbor.
show ipv6 neighbors
Displays the neighbor information.
Platform
N/A
Description
3.2 ipv6 address
Use this command to configure an IPv6 address for a network interface. Use the no form of this
command to restore the default setting.
ipv6 address ipv6-address/prefix-length
ipv6 address ipv6-prefix/prefix-length eui-64
ipv6 address prefix-name sub-bits/prefix-length [ eui-64 ]
Command Reference
IPv6 Commands
no ipv6 address
no ipv6 address ipv6-address/prefix-length
no ipv6 address ipv6-prefix/prefix-length eui-64
no ipv6 address prefix-name sub-bits/prefix-length [ eui-64 ]
Parameter
Parameter
Description
Description
iipv6-prefix
IPv6 address prefix in the format defined in RFC4291. The address
shall be in hex; the fields in the address shall be separated by comma,
and each field shall contain 16 bits.
ipv6-address
IPv6 address in the format defined in RFC4291. The address shall be
in hex; the fields in the address shall be separated by comma, and
each field shall contain 16 bits.
prefix-length
Length of the IPv6 prefix, the network address of the IPv6 address.
Note: The prefix length range of the IPv6 address of the interface of
S86 is 0 to 64 or 128 to 128.
prefix-name
The general prefix name. Use the specified general prefix to generate
the interface address.
sub-bits
The value of the sub-prefix bit and the host bit generates the interface
address combining with the general prefix. The value shall be in the
format defined in the RFC4291.
eui-64
The generated IPV6 address consists of the address prefix and the 64
bit interface ID
Defaults
N/A
Command
Interface configuration mode
Mode
Usage Guide
When an IPv6 interface is created and the link status is UP, the system will automatically generate a
local IP address for the interface.
The IPv6 address could also be generated using the general prefix. That is, the IPv6 address consists
of the general prefix and the sub-prefix and the host bit. The general prefix could be configured using
the ipv6 general-prefix command or may be learned through the DHCPv6 agent PD (Prefix
Discovery) function (please refer to the DHCPv6 Configuration). Use the sub-bits/prefix-length
parameter of this command to configure the sub-prefix and the host bit.
If no deleted address is specified when using no ipv6 address, all the manually configured
addresses will be deleted.
no ipv6 address ipv6-prefix/prefix-length eui-64 can be used to delete the addresses configured with
ipv6 address ipv6-prefix/prefix-length eui-64.
Configuration
The following example configures an IPv6 address for the interface, GigabitEthernet 0/1.
Examples
Ruijie(config-if)# ipv6 address 2001:1::1/64
Ruijie(config-if)# no ipv6 address 2001:1::1/64
Ruijie(config-if)# ipv6 address 2002:1::1/64 eui-64
Command Reference
IPv6 Commands
Ruijie(config-if)# no ipv6 address 2002:1::1/64 eui-64
The following example configures an IPv6 address for the interface, GigabitEthernet 0/1, by using the
general prefix.
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 address my-prefix
0:0:0:7272::72/64
If my-prefix is set as 2001:1111:2222::/48, then the IPv6 address generated for an interface is
2001:1111:2222:7272::72/64.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.3 ipv6 address autoconfig
Use this command to automatically configure an IPv6 stateless address for a network interface. Use
the no form of this command to restore the default setting.
ipv6 address autoconfig [ default ]
no ipv6 address autoconfig
Parameter
Parameter
Description
Description
default
(Optional) If this keyword is configured, a default routing is generated. Note that only
one layer3 interface on the entire device is allowed to use the default keyword
Defaults
N/A
Command
Interface configuration mode
Mode
Usage Guide
The stateless automatic address configuration is that when receiving the RA (Route Advertisement)
message, the device could use the prefix information of the RA message to automatically generate
the EUI-64 interface address.
If the RA message contains the flag of the “other configurations”, the interface will obtain these “other
configurations” through the DHCPv6. The “other configurations” usually means the IPv6 address of
the DNS server, the IPv6 address of the NTP server, etc.
Configuration
The following example automatically configures an IPv6 stateless address for a network interface.
Examples
Ruijie(config-if)# ipv6 address autoconfig default
The following example restores the default setting.
Ruijie(config-if)# no ipv6 address autoconfig
Command Reference
IPv6 Commands
Related
Command
Description
Commands
ipv6 address ipv6-prefix/prefix-length [ eui-64 ]
Configures the IPv6 address for the interface
manually.
Platform
N/A
Description
3.4 ipv6 icmp error-interval
Use this command to set the frequency with which ICMPv6-oversize error packets are sent. Use the
no form of this command to restore the default setting.
ipv6 icmp error-interval too-big milliseconds [ bucket-size ]
no ipv6 icmp error-interval too-big milliseconds [ bucket-size ]
Use this command to set the frequency with which other ICMPv6 error packets are sent. Use the no
form of this command to restore the default setting.
ipv6 icmp error-interval milliseconds [ bucket-size ]
no ipv6 icmp error-interval milliseconds [ bucket-size ]
Parameter
Parameter
Description
Description
Sets the refresh interval of the token bucket, in the
milliseconds
range from 0 to 2147483647 in the unit of seconds.
Setting the value to 0 indicates that the frequency with
which ICMPv6 error packets are sent is not fixed.
bucket-size
Sets the number of tokens in the token bucket, in the
range from 1 to 200.
Defaults
The default milliseconds is 100 and bucket-size is 10.
Command
Global configuration mode
Mode
Usage Guide
The token bucket algorithm is adopted to set the frequency with which ICMPv6 error packets are sent
so as to prevent Denial of Service (DoS) attack,
If the forwarded IPv6 packet is greater than the egress IPv6 MTU in size, the router discards the IPv6
packet and sends the ICMPv6-oversize error packet to the source IPv6 address. This kind of ICMPv6
error packet is used for IPv6 path MTU discovery. If there are too many ICMPv6 error packets, the
ICMPv6-oversize error packet may not be sent, causing IPv6 path MTU discovery failure. Therefore,
it is recommended to set the frequency of ICMPv6-oversize error packet and other ICMPv6 error
packet respectively. Note that ICMPv6 redirect packet is not an ICMPv6 error packet and Ruijie sets
the frequency of the ICMPv6 redirect packet the same as that of other ICMPv6 error packet.
For the timer is accurate to 10 milliseconds, it is recommended to set the refresh interval of the token
bucket to an integer multiple of 10 milliseconds. If the refresh interval is not an integer multiple of 10
milliseconds, it is converted automatically. For example, the frequency of 1 per five milliseconds turns
Command Reference
IPv6 Commands
out to be 2 per 10 milliseconds; the frequency of 3 per 15 milliseconds is converted to 2 per 10
milliseconds.
Configuration
The following example sets the frequency with which ICMPv6-oversize error packets are sent to 100
Examples
per second.
Ruijie(config)# ipv6 icmp error-interval too-big 1000 100
The following example sets the frequency with which other ICMPv6 error packets are sent to 10 per
second.
Ruijie(config)# ipv6 icmp error-interval 1000 10
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.5 ipv6 enable
Use this command to enable the IPv6 function on an interface. Use the no form of this command to
restore the default setting.
ipv6 enable
no ipv6 enable
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is disabled by default.
Command
Interface configuration mode
Mode
Usage Guide
The IPv6 function of an interface can be enabled by configuring ipv6 enable or by configuring IPv6
address for the interface.
If an IPv6 address is configured for the interface, the IPv6 function will be enabled automatically on
the interface and cannot be disabled with no ipv6 enable.
Configuration
The following example enables IPv6 function on the interface, GigabitEthernet 0/1.
Examples
Ruijie(config-if)# ipv6 enable
Related
Command
Description
Commands
show ipv6 interface
Displays the related information of an interface.
Platform
N/A
Command Reference
IPv6 Commands
Description
3.6 Ipv6 gateway
Use this command to configure the default gateway IPv6 address on the management port.
ipv6 gateway ipv6-address
Parameter
Parameter
Description
Description
ipv6-address
Configures the default gateway IPv6 address.
Defaults
N/A
Command
Interface configuration mode
Mode
Usage Guide
The management port is MGMT in type and 0 in ID.
Configuration
The following example configures the default gateway IPv6 address on the management port.
Examples
Ruijie(config)# interface mgmt 0
Ruijie(config-int)# ipv6 gateway 2001:1::1
Ruijie(config-int)# exit
Ruijie(config)#
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.7 ipv6 general-prefix
Use this command to configure the IPv6 general prefix in the global configuration mode.
ipv6 general-prefix prefix-name ipv6-prefix/prefix-length
no ipv6 general-prefix prefix-name ipv6-prefix/prefix-length
Parameter
Parameter
Description
Description
prefix-name
The general prefix name.
pv6-prefix
The network prefix value of the general-prefix following the
format defined in RFC4291.
prefix-length
Defaults
N/A
The length of the general prefix.
Command Reference
Command
IPv6 Commands
Global configuration mode.
Mode
Usage Guide
It is convenient to number the network by using the general prefix, which defines a prefix so that many
longer specified prefixes could refer to it. These specified prefixes are updated whenever the general
prefix changes. If the network number changes, just modify the general prefix.
A general prefix could contain multiple prefixes.
These longer specified prefixes are usually used for the Ipv6 address configuration on the interface.
Configuration
The following example configures manually a general prefix as my-prefix.
Examples
Ruijie(config)# ipv6 general-prefix my-prefix 2001:1111:2222::/48
Related
Command
Description
Commands
ipv6 address prefix-name
Configures the interface address using the general prefix.
sub-bits/prefix-length
show ipv6 general-prefix
Platform
Displays the general prefix.
N/A
Description
3.8 ipv6 hop-limit
Use this command to configure the default hopcount to send unicast messages in the global
configuration mode.
ipv6 hop-limit value
no ipv6 hop-limit
Parameter
Parameter
Description
Description
vlaue
Hopcount ranging from 1 to 255.
Defaults
The default is 64.
Command
Global configuration mode.
Mode
Usage Guide
This command takes effect for the unicast messages only, not for multicast messages.
Configuration
The following example sets the hopcount to 100.
Examples
Ruijie(config)# ipv6 hop-limit 100
Related
Command
Description
Commands
N/A
N/A
Command Reference
Platform
IPv6 Commands
N/A
Description
3.9 ipv6 mtu
Use this command to configure the MTU of IPv6 packets. Use the no form of this command to restore
the default setting.
ipv6 mtu bytes
no ipv6 mtu
Parameter
Description
Parameter
Description
bytes
MTU of IPv6 packets, in bytes. The value ranges from 1280 to 1500.
Defaults
The default configuration is the same as the configuration of the mtu command.
Command
Interface configuration mode
Mode
Usage Guide
If the size of an IPv6 packet exceeds the IPv6 MTU, the RGOS software segments the packet. For all
devices in the same physical network segment, the IPv6 MTU of the interconnected interface must be
the same.
Configuration
The following example sets the IPv6 MTU of the FastEthernet 0/1 interface to 1400 bytes.
Examples
Ruijie(config)# interface fastEthernet 0/1
Ruijie(config-if)# ipv6 mtu 1400
Related
Command
Description
Commands
mtu
Sets the MTU of an interface.
Platform
Description
3.10 ipv6 nd cache interface-limit
Use this command to set the maximum number of neighbors learned on the interface. Use the no
form of this command to restore the default setting.
ipv6 nd cache interface-limit value
no ipv6 nd cache interface-limit
Parameter
Description
Parameter
value
Description
Sets the maximum number of neighbors learned on
the interface, including the static and dynamic
Command Reference
IPv6 Commands
neighbors, in the range from 0 to the number
supported by the device. 0 indicates the number is not
limited.
Defaults
The default is 0.
Command
Interface configuration mode
Mode
Usage Guide
This function can prevent neighbor entries generated by malicious neighbor attacks from consuming
memory. limit must be no smaller than the number of neighbors learned on the interface. Otherwise,
the configuration does not take effect.
Configuration
The following example sets the number of neighbors learned on the interface to 100.
Examples
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 nd cache interface-limit 100
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.11 ipv6 nd dad attempts
Use this command to set the number of the NS packets to be continuously sent for IPv6 address
collision check on the interface. Use the no form of this command to restore it to the default setting.
ipv6 nd dad attempts value
no ipv6 nd dad attempts value
Parameter
Description
Parameter
value
Description
Number of the NS packets. If it is set to 0, it indicates that the IPv6
address collision check is disabled on the interface. The range is 0 to 600.
Defaults
The default is 1.
Command
Interface configuration mode.
Mode
Usage Guide
When the interface is configured with a new IPv6 address, the address collision shall be checked
before the address is assigned to the interface, and the address shall be in the ”tentative” status. After
the address collision check is completed, if no collision is detected, the address can be used
normally; if collision is detected and the interface ID of the address is an EUI-64 ID, it indicates that
Command Reference
IPv6 Commands
the link-layer address is repeated, and the system will automatically shut down the interface (that is,
to prohibit IPv6 operations on the interface). In this case, you shall modify and configure a new
address manually, and restart address collision check for the down/up interface. Whenever the state
of an interface changes from down to up, the address collision check function of the interface will be
enabled.
Configuration
The following example continuously sends 3 NS packets for IPv6 address collision check on the
Examples
interface, GigabitEthernet 0/1.
Ruijie(config-if)# ipv6 nd dad attempts 3
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
Platform
N/A
Description
3.12 Ipv6 nd dad retry
Use this command to set the interval for address conflict detection. Use the no form of this command
to restore the default setting.
ipv6 nd dad retry value
no ipv6 nd dad retry
Parameter
Parameter
Description
Description
Sets the interval for address conflict detection, 60
value
seconds by default. Setting value to 0 indicates that
the function is disabled.
Defaults
The default value is 1.
Command
Global configuration mode
Mode
Usage Guide
Before configuring a new IPv6 address for an interface, enable address conflict detection on the
interface. If a conflict address is detected, the device does not receive the IPv6 packet destined to the
conflict address. This command is used to perform conflict detection again when the interval expires.
If there is no conflict, the address can be used.
Configuration
The following example sets the interval for address conflict detection to 10s.
Examples
Ruijie(config)# ipv6 nd dad retry 10
Related
Command
Description
Commands
N/A
N/A
Command Reference
Platform
IPv6 Commands
N/A
Description
3.13 ipv6 nd managed-config-flag
Use this command to set the “managed address configuration” flag bit of the RA message. Use the
no form of this command to restore the default setting.
ipv6 nd managed-config-flag
no ipv6 nd managed-config-flag
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Mode
Interface configuration mode.
Usage Guide
This flag determines whether the host that receives the RA message obtains an IP address through
stateful auto configuration. If the flag is set, the host obtains an IP address through stateful auto
configuration, otherwise it does not be used.
Configuration
The following example sets the “managed address configuration” flag bit of the RA message.
Examples
Ruijie(config-if)# ipv6 nd managed-config-flag
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
ipv6 nd other-config-flag
Sets the flag for obtaining all information except IP
address through stateful auto configuration.
Platform
N/A
Description
3.14 ipv6 nd ns-interval
Use this command to set the interval for the interface to retransmitting NS (Neighbor Solicitation). Use
the no form of this command to restore the default setting.
ipv6 nd ns-interval milliseconds
no ipv6 nd ns-interval
Parameter
Parameter
Description
Description
milliseconds
Interval for retransmitting NS in the range of 1,000 to 429,467,295
Command Reference
IPv6 Commands
milliseconds
Defaults
The default value in RA is 0 (unspecified); the interval for retransmitting NS is 1000 milliseconds (1
second).
Command
Interface configuration mode.
mode
Usage Guide
The configured value will be advertised through RA and will be used by the device itself. It is not
recommended to set a too short interval.
Configuration
The following example sets the interval for the interface to retransmitting NS to 2 seconds.
Examples
Ruijie(conifig-if)# ipv6 nd ns-interval 2000
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
Platform
N/A
Description
3.15 ipv6 nd other-config-flag
Use this command to set “other stateful configuration” flag bit of the RA message. Use the no form of
this command to delete the flag bit.
ipv6 nd other-config-flag
no ipv6 nd other-config-flag
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The flag bit is not set by default.
Command
Interface configuration mode.
mode
Usage Guide
With this flag bit set, the flag bit of the RA message sent by the device is set. After receiving this flag
bit, the host uses the dhcpv6 to acquire the information excluding the IPv6 address for the purpose of
automatic configuration. When the managed address configuration is set, the default other
stateful configuration is also set
Configuration
The following example sets “other stateful configuration” flag bit of the RA message.
Examples
Ruijie(config-if)# ipv6 nd other-config-flag
Command Reference
IPv6 Commands
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
Platform
N/A
Description
3.16 ipv6 nd prefix
Use this command to configure the address prefix included in the RA. Use the no form of this
command to delete the set prefix or restore the default setting.
ipv6 nd prefix { ipv6-prefix/prefix-length | default } [ [ valid-lifetime preferred-lifetime ] | [ at valid-date
preferred-date ] | [ infinite | preferred-lifetime ] ] [ no-advertise] | [ [ off-link ] [ no-autoconfig ] ]
no ipv6 nd prefix { ipv6-prefix/prefix-length | default }
Parameter
Parameter
Description
Description
ipv6-prefix
IPv6 network ID following the format defined in RFC4291
prefix-length
Length of the IPv6 prefix. “/” shall be added in front of the prefix
valid-lifetime
Valid lifetime of the RA prefix received by the host
preferred-lifetime
Preferred lifetime of the RA prefix received by the host
at valid-date preferred-date
Sets the dead line for the valid lifetime and that of the preferred
lifetime, in day, month, year, hour, minute.
infinite
Indicates that the prefix is always valid.
default
Sets the default prefix.
no-advertise
The prefix will not be advertised by the device.
When the host sends an IPv6 packet, if the prefix of the destination
off-link
address matches the set prefix, it is considered that the destination is
on-link and is directly reachable. If this option is set, it indicates that
the prefix is not used for on-link judgment.
no-autoconfig
Defaults
Indicates that the RA prefix received by the host cannot be used for
auto address configuration.
By default, the advertised prefix is the one set with ipv6 address on the interface. The default
parameters of the prefix configured in the RA are as follows:
valid-lifetime: 2592000s (30 days)
preferred-lifetime: 604800s (7 days),
The prefix is advertised and is used for on-link judgment and auto address configuration.
Command
Interface configuration mode.
Mode
Usage Guide
This command can be used to configure the parameters of each prefix, including whether to advertise
the prefix. By default, the prefix advertised in RA is the one set with ipv6 address on the interface. To
add other prefixes, use this command.
Command Reference
IPv6 Commands
ipv6 nd prefix default
Set the default parameters to be used by the interface. If no parameter is specified for an added
prefix, the parameters set with ipv6 nd prefix default will be used. Note that after a parameter is
specified for the prefix, the default configuration will not be used. That is to say, the configuration of
the prefix cannot be modified with ipv6 nd prefix default; only the prefix that uses all the default
configurations can be modified with this command.
at valid-date preferred-date
The valid lifetime of a prefix can be specified in two ways. One way is to specify a fixed time for each
prefix in the RA; the other way is to specify the end time (in this mode, the valid lifetime of the prefix
sent in RA will be gradually reduced until the end time is 0).
Configuration
The following example adds a prefix for SVI 1.
Examples
Ruijie(config)# interface vlan 1
Ruijie(conifig-if)# ipv6 nd prefix 2001::/64 infinite 2592000
The following example sets the default prefix parameters for SVI 1 (they cannot be used for auto
address configuration):
Ruijie(config)# interface vlan 1
Ruijie(config-if)# ipv6 prefix default no-autoconfig
If no parameter is specified, the default parameters will be used, and the prefix cannot be used for
auto address configuration.
Related
Command
Description
Commands
show ipv6 interface
Displays the RA information of an interface.
Platform
N/A
Description
3.17 ipv6 nd ra-hoplimit
Use this command to set the hopcount of the RA message. Use the no form of this command to
restore the default setting.
ipv6 nd ra-hoplimit value
no ipv6 nd ra-hoplimit
Parameter
Parameter
Description
Description
value
Hopcount
Defaults
The default is 64.
Command
Interface configuration mode.
Command Reference
IPv6 Commands
Mode
Usage Guide
Configuration
The following example sets the hopcount of the RA message to 110 on the interface, GigabitEthernet
Examples
0/1.
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 nd ra-hoplimit 110
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
ipv6 nd ra-lifetime
Sets the lifetime of the device.
ipv6 nd ra-interval
Sets the interval of sending the RA message.
ipv6 nd ra-mtu
Sets the MTU of the RA message.
Platform
N/A
Description
3.18 ipv6 nd ra-interval
Use this command to set the interval of sending the RA. Use the no form of this command to restore
the default setting.
ipv6 nd ra-interval { seconds | min-max min_value max_value }
no ipv6 nd ra-interva l
Parameter
Parameter
Description
Description
seconds
Interval of sending the RA message in seconds, 3-1800s.
min-max
Maximum and minimum interval sending the RA message in seconds
min_value
Minimum interval sending the RA message in seconds
max_value
Maximum interval sending the RA message in seconds
Defaults
200s. The actual interval of sending the RA message will be fluctuated 20% based on 200s.
Command
Interface configuration mode.
Mode
Usage Guide
If the device serves as the default device, the set interval shall not be longer than the lifetime of the
device. Besides, to ensure other devices along the link occupies network bandwidth while sending the
RA message, the actual interval for sending the RA message will be fluctuated 20% based on the set
value.
If the key word min-max is specified, the actual interval for sending the packet will be chosen
between the range of minimum value and maximum value.
Configuration
The following example sets the interval of sending the RA to 110 seconds.
Command Reference
Examples
IPv6 Commands
Ruijie(conifig-if)# ipv6 nd ra-interval 110
The following example sets the interval of sending the RA from 110 to 120 seconds.
Ruijie(config-if)# ipv6 nd ra-interval min-max 110 120
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
ipv6 nd ra-lifetime
Sets the lifetime of the device.
ipv6 nd ra-hoplimit
Sets the hopfcount of the RA message.
ipv6 nd ra-mtu
Sets the MTU of the RA message.
Platform
N/A
Description
3.19 ipv6 nd ra-lifetime
Use this command to set the device lifetime of the RA sent on the interface. Use the no form of this
command to restore the default setting.
ipv6 nd ra-lifetime seconds
no ipv6 nd ra-lifetime
Parameter
Description
Parameter
seconds
Defaults
The default is 1800.
Command
Interface configuration mode.
Description
Default life time of the device on the interface, in the range
from 0 to 9000 in the unit of seconds.
Mode
Usage Guide
The router lifetime field is available in each RA. It specifies the time during which the hosts along the
link of the interface can select the device as the default device. If the value is set to 0, the device will
not serve as the default device any longer. If it is not set to 0, it shall be larger than or equal to the
interval of sending the RA (ra-interval)
Configuration
The following example sets the device lifetime of the RA sent on the interface to 2,000 seconds.
Examples
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 nd ra-lifetime 2000
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
ipv6 nd ra-interval
Sets the interval of sending the RA.
ipv6 nd ra-hoplimit
Sets the hopcount of the RA.
ipv6 nd ra-mtu
Sets the MTU of the RA.
Command Reference
Platform
IPv6 Commands
N/A
Description
3.20 ipv6 nd ra-mtu
Use this command to set the MTU of the RA message. Use the no form of this command to restore
the default setting.
ipv6 nd ra-mtu value
no ipv6 nd ra-mtu
Parameter
Parameter
Description
Description
value
MTU value, in the range from 0 to 4294967295.
Defaults
IPv6 MTU value of the network interface.
Command
Interface configuration mode.
Mode
Usage Guide
If it is specified as 0, the RA will not have the MTU option
Configuration
The following example sets the MTU of the RA message to 1,400 bytes.
Examples
Ruijie(config -if)# ipv6 nd ra-mtu 1400
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
ipv6 nd ra-lifetime
Sets the lifetime of the device.
ipv6 nd ra-interval
Sets the interval of sending the RA message.
ipv6 nd ra-hoplimit
Sets the hopcount of the RA message.
Platform
N/A
Description
3.21 ipv6 nd reachable-time
Use this command to set the reachable time after the interface checks the reachability of the neighbor
dynamically learned through NDP. Use the no form of this command to restore the default setting.
ipv6 nd reachable-time milliseconds
no ipv6 nd reachable-time
Parameter
Description
Parameter
milliseconds
Description
Reachable time for the neighbor in the range from 0 to 3,600,000 in the unit of
milliseconds.
Command Reference
Defaults
IPv6 Commands
The default value in RA is 0 (unspecified); the reachable time for the neighbor is 30000 milliseconds
(30 seconds) when the device discovers the neighbor.
Command
Interface configuration mode.
Mode
Usage Guide
The device checks the unreachable neighbor through the set time. A shorter time means that the
device can check the neighbor failure more quickly, but more network bandwidth and device resource
will be occupied. Therefore, it is not recommended to set a too short reachable time.
The configured value will be advertised through RA and will be used by the device itself. If the value is
set to 0, it indicates that the time is not specified, that is, the default value is used.
According to RFC4861, the actual time to reach neighbor is not consistent with the configured value,
ranging from 0.5*configured value to 1.5*configured value.
Configuration
The following example sets the reachable time to 1,000 seconds.
Examples
Ruijie(config-if)# ipv6 nd reachable-time 1000000
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
Platform
N/A
Description
3.22 ipv6 nd state-time
Use this command to set the period for the neighbor to maintain the state. Use the no form of this
command to restore the default setting.
ipv6 nd stale-time seconds
no ipv6 nd stale-time
Parameter
Description
Parameter
Seconds
Defaults
The default is 3600.
Command
Global configuration mode
Description
Sets the period for the neighbor to maintain the state,
in the range from 0 to 86400 in the unit of seconds.
Mode
Usage Guide
This command is used to set the period for the neighbor to maintain the state. After the period
expires, neighbor unreachability detection is performed. The shorter the period, the faster the
neighbor is found unreachable. On the other hand, more network bandwidth and device resources
are consumed. Therefore, it is recommended to set a value not too small.
Command Reference
IPv6 Commands
Configuration
The following example sets the period to 600 seconds for the neighbor to maintain the state.
Examples
Ruijie(config)# ipv6 nd stale-time 600
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.23 ipv6 nd suppress-ra
Use this command to disable the interface from sending the RA message. Use the no form of this
command to enable the function.
ipv6 nd suppress-ra
no ipv6 nd suppress-ra
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The ipv6 nd suppress-ra command is enabled by default.
Command
Interface configuration mode.
Mode
Usage Guide
Configuration
The following example disables the interface from sending the RA message.
Examples
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 nd suppress-ra
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
Platform
N/A
Description
3.24 ipv6 nd unresolved
Use this command to set the maximum number of the unresolved neighbor table entries. Use the no
form of this command to restore the default setting.
ipv6 nd unresolved number
no ipv6 nd unresolved
Command Reference
Parameter
Description
Parameter
number
IPv6 Commands
Description
Sets the maximum number of the unresolved neighbor table entries, in the
range from 1 to the neighbor table size supported by the device.
Defaults
The default is 0. (The maximum number is the neighbor table size supported by the device)
Command
Global configuration mode
Mode
Usage Guide
This command is used to prevent unresolved ND table entries generated by malicious scan attacks
from consuming table entry resources,
Configuration
The following example sets the maximum number of the unresolved neighbor table entries to 200.
Examples
Ruijie(config)# ipv6 nd unresolved 200
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.25 ipv6 neighbor
Use this command to configure a static neighbor. Use the no form of this command to delete a static
neighbor.
ipv6 neighbor ipv6-address interface-id hardware-address
no ipv6 neighbor ipv6-address interface-id
Parameter
Description
Parameter
ipv6-address
interface-id
hardware-address
Defaults
No static neighbor is configured by default.
Command
Global configuration mode
Description
The neighbor IPv6 address, in the form as defined in
RFC4291.
Specifies the network interface where the neighbor is
(including Router Port, L3 AP port and SVI interface).
The 48-bit MAC address, a dotted triple of four-digit
hexadecimal numbers.
Mode
Usage Guide
This command can only be configured on the interface enabled with IPv6 protocol, similar to the ARP
command.
Command Reference
IPv6 Commands
If the neighbor to be configured has been learned through Neighbor Discovery Protocol (NDP) and
stored in the NDP neighbor table, the dynamic neighbor turns to be static. If the static neighbor is
valid, it is always reachable. An invalid static neighbor refers to the neighbor whose IPv6 address is
not valid (not in the IPv6 network segment configured for the interface or interface address conflict).
The packet is not forwarded to the MAC address as specified by the invalid static neighbor. The
invalid static neighbor is in inactive state. Use the show ipv6 neighbor static command to display the
state of the static neighbor.
Use the clear ipv6 neighbors command to clear all neighbors learned dynamically through NDP.
Configuration
The following example configures a static neighbor on SVI 1.
Examples
Ruijie(config)# ipv6 neighbor 2001::1 vlan 1 00d0.f811.1111
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.26 ipv6 ns-linklocal-src
Use this command to set the local address of the link as the source IP address to send neighbor
requests. Use the no form of this command to use the global IP address as the source address to
send neighbor requests.
ipv6 ns-linklocal-src
no ipv6 ns-linklocal-src
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The local address of the link is always used as the source address to send neighbor requests.
Command
Global configuration mode.
Mode
Usage Guide
N/A
Configuration
The following example uses the global IP address as the source address to send neighbor requests.
Examples
Ruijie(config)# no ipv6 ns-linklocal-src
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Command Reference
IPv6 Commands
Description
3.27 ipv6 redirects
Use this command to control whether to send ICMPv6 redirect message when the switch receives
and forwards an IPv6 packet through an interface. Use the no form of this command to restore the
default setting.
ipv6 redirects
no ipv6 redirects
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is enabled by default.
Command
Interface configuration mode.
Mode
Usage Guide
The transmission rate of any ICMPv6 error message is limited. By default, it is 10pps.
Configuration The following example enables ICMPv6 redirection on interface GigabitEthernet 0/1.
Examples
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 redirects
Related
Command
Description
Commands
show ipv6 interface
Displays the interface information.
Platform
N/A
Description
3.28 ipv6 source-route
Use this command to forward the IPv6 packet with route header. Use the no form of this command to
restore the default setting.
ipv6 source-route
no ipv6 source-route
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The ipv6 source-route command is disabled by default.
Command
Global configuration mode.
Mode
Command Reference
Usage Guide
IPv6 Commands
Because of the potential security of the header of type 0 route, it’s easy for the device to suffer from
the denial service attack. Therefore, forwarding the IPv6 packet with route header is disabled by
default. However, the IPv6 packet of route header with type 0 that destined to the local machine is
processed.
Configuration
The following example forwards the IPv6 packet with route header.
Examples
Ruijie(config)# no ipv6 source-route
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.29 show ipv6 address
Use this command to display the IPv6 addresses.
show ipv6 address [ interface-name ]
Parameter
Description
Parameter
Description
interface-name
Interface name
Defaults
N/A
Command
Privileged EXEC mode.
Mode
Usage Guide
N/A
Configuration
The following example displays all IPv6 address configured on the device.
Examples
Command Reference
IPv6 Commands
The following example displays the IPv6 address configured on the GigabitEthernet 0/1.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.30 show ipv6 general-prefix
Use this command to display the information of the general prefix.
show ipv6 general-prefix
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode.
Mode
Command Reference
Usage Guide
IPv6 Commands
Use this command to display the information of the general prefix including the manually configured
and learned from the DHCPv6 agent.
Configuration
The following example displays the information of the general prefix.Ruijie#
Examples
show ipv6 general-prefix
There is 1 general prefix.
IPv6 general prefix my-prefix, acquired via Manual configuration
2001:1111:2222::/48
2001:1111:3333::/48
Related
Command
Description
Commands
ipv6 general-prefix
Configures the general prefix.
Platform
N/A
Description
3.31 show ipv6 interface
Use this command to display the IPv6 interface information.
show ipv6 interface [ interface-id ] [ ra-info ] ] [ brief [ interface-id ] ]
Parameter
Parameter
Description
Description
interface-id
Interface (including Ethernet interface, aggregate port, or SVI)
ra-info
Displays the RA information of the interface.
brief
Defaults
Displays the brief information of the interface (interface status and
address information).
N/A
Command
Mode
Usage Guide
Use this command to display the address configuration, ND configuration and other information of an
IPv6 interface.
Configuration
The following example displays the information of the IPv6 interface.
Examples
Ruijie# show ipv6 interface vlan 1
Interface vlan 1 is Up, ifindex: 2001
address(es):
Mac Address: 00:00:00:00:00:01
INET6: fe80::200:ff:fe00:1 , subnet is fe80::/64
Joined group address(es):
Command Reference
IPv6 Commands
ff01:1::1
ff02:1::1
ff02:1::2
ff02:1::1:ff00:1
INET6: 2001::1 , subnet is 2001::/64 [TENTATIVE]
Joined group address(es):
ff01:1::1
ff02:1::1
ff02:1::2
ff02:1::1:ff00:1
MTU is 1500 bytes
ICMP error messages limited to one every 10 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND advertised reachable time is 0 milliseconds
ND retransmit interval is 1000 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 200 seconds<240--160>
ND device advertisements live for 1800 seconds
The following line is included in the above information: 2001::1, subnet is 2001::/64 [TENTATIVE].
The flag bit in the [ ] following the INET6 address is explained as follows:
Flag
Meaning
ANYCAST
Indicate that the address is an anycast address.
TENTATIVE
Indicate that the DAD is underway. The address is a tentative
before the DAD is completed.
DUPLICATED
Indicate that a duplicate address exists.
DEPRECATED
Indicate that the preferred lifetime of the address expires.
NODAD
Indicate that no DAD is implemented for the address.
AUTOIFID
Indicate that the interface ID of the address is automatically
generated by the system, which is usually an EUI-64 ID.
PRE
Indicates the address automatically generated.
GEN
Indicates the address using the general prefix.
The following example displays the RA information of the IPv6 interface.Ruijie#
show ipv6 interface vlan 1 ra-info
vlan 1: DOWN
RA timer is stopped
waits: 0, initcount: 3
statistics: RA(out/in/inconsistent): 4/0/0, RS(input): 0
Link-layer address: 00:00:00:00:00:01
Command Reference
IPv6 Commands
Physical MTU: 1500
ND device advertisements live for 1800 seconds
ND device advertisements are sent every 200 seconds<240--160>
Flags: !M!O, Adv MTU: 1500
ND advertised reachable time is 0 milliseconds
ND advertised retransmit time is 0 milliseconds
ND advertised CurHopLimit is 64
Prefixes: (total: 1)
fec0:1:1:1::/64(Def,Auto,vltime: 2592000, pltime: 604800, flags: LA)
Description of the fields in ra-info:
Field
Meaning
RA timer is stopped (on)
Indicate whether the RA timer is started.
waits
initcount
Indicate that the RS is received but the number of the responses is
not available.
Indicate the number of the RAs when the RA timer is restarted.
out: Indicate the number of the RAs that are sent.
In: Indicate the number of the RAs that are received.
RA(out/in/ inconsistent)
inconsistent: Indicate the number of the received RAs in which the
parameters are different from those contained in the RAs advertised
by the device.
RS(input)
Indicate the number of the RSs that are received.
Link-layer address
Link-layer address of the interface.
Physical MTU
Link MTU of the interface.
!M | M
!O | O
!M indicates the managed-config-flag bit in the RA is not set.
M: Conversely
!O indicates the other-config-flag bit in the RA is not set.
O: Conversely
Description of the fields of the prefix list in ra-info:
Field
Meaning
total
The number of the prefixes of the interface.
fec0:1:1:1::/64
A specific prefix.
Def
Indicate that the interfaces use the default prefix.
Auto: Indicate the prefix is automatically generated after the
Auto | CFG
interface is configured with the corresponding IPv6 address. CFG:
Indicate that the prefix is manually configured.
!Adv
Indicate that the prefix will not be advertised.
Command Reference
IPv6 Commands
vltime
Valid lifetime of the prefix, measured in seconds.
pltime
Preferred lifetime of the prefix, measured in seconds.
L: Indicate that the on-link in the prefix is set.
L | !L
!L: Indicate that the on-link in the prefix is not set.
A: Indicate that the auto-configure in the prefix is set. !A: It indicates
A | !A
that the auto-configure in the prefix is not set.
The following example displays the brief information of the IPv6 interface.
Ruijie#show ipv6 interface brief
GigabitEthernet 0/1
[down/down]
2222::2
FE80::1614:4BFF:FE5C:ED3A
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.32 show ipv6 neighbors
Use this command to display the IPv6 neighbors.
show ipv6 neighbors [ verbose ] [ interface-id ] [ ipv6-address ] [static]
show ipv6 neighbors static
Parameter
Parameter
Description
Description
verbose
Displays the neighbor details.
static
Displays the validity status of static neighbors.
interface-id
Displays the neighbors of the specified interface.
ipv6-addres
Displays the neighbors of the specified IPv6 address.
static
Displays reachability of static neighbors.
Defaults
N/A
Command
Privileged EXEC mode.
Mode
Usage Guide
Configuration
The following example displays the neighbors on the SVI 1 interface:
Examples
Ruijie# show ipv6 neighbors vlan 1
IPv6 Address Linklayer Addr Interface
fa::1 00d0.0000.0002 vlan 1
Command Reference
IPv6 Commands
fe80::200:ff:fe00:2 00d0.0000.0002 vlan 1
Show the neighbor details:
Ruijie# show ipv6 neighbors verbose
IPv6 Address Linklayer Addr Interface
2001::1 00d0.f800.0001 vlan 1
State: Reach/H Age: - asked: 0
fe80::200:ff:fe00:1 00d0.f800.0001 vlan 1
State: Reach/H Age: - asked: 0
Field
IPv6
Address
Linklayer
Addr
Interface
Meaning
IPv6 address of the Neighbor
Link address, namely, MAC address. If it is not available, incomplete is displayed.
Interface the neighbor locates.
State of the neighbor: state/H(R)
The values of STATE are as below:
INCMP (Incomplete): The address resolution of the neighbor is underway, the NS is
sent, but the NA is not received.
REACH (Reachable): The switch is connected with the neighbor. In this state, the
switch takes no additional action when sending packets to the neighbor.
STALE: The reachable time of the neighbor expires. In this state, the switch takes no
additional action; it only starts NUD (Neighbor Unreachability Detection) after a
packet is sent to the neighbor.
State
DELAY: A packet is sent to the neighbor in STALE state. If the STALE state changes
to DELAY, DELAY will be changed to PROBE if no neighbor reachability notification
is received within DELAY_FIRST_PROBE_TIME seconds (5s), the NS will be sent to
the neighbor to start NUD.
PROBE: The NUD is started to check the reachability of the neighbor. The NS
packets are sent to the neighbor at the interval of RetransTimer milliseconds until the
response from the neighbor is received or the number of the sent NSs hits
MAX_UNICAST_SOLICIT(3).
?: Unknown state.
/R—indicate the neighbor is considered as a device
/H: The neighbor is a host.
The reachable time of the neighbor. ’-‘ indicates that the neighbor is always
Age
reachable. Note that the reachability of a static neighbor depends on the actual
situation. ’expired’ indicates that the lifetime of the neighbor expires, and the
neighbor is waits for the triggering of NUD.
Asked
The number of the NSs that are sent to the neighbor for the resolution of the link
address of the neighbor.
Command Reference
IPv6 Commands
The following example displays status of static neighbors.
Ruijie# show ipv6 neighbors static
IPv6 Address
Linklayer Addr Interface
2001:1::1
00d0.f822.33ab
GigabitEthernet 0/14
ACTIVE
2001:2::2
00d0.f822.33ac
VLAN 1
INACTIVE
Field
IPv6
Address
Linklayer
Addr
Interface
State
Meaning
IPv6 addresses of the static neighbors
Link addresses, namely, MAC addresses.
Interfaces the neighbors locate.
States of the static neighbors:
State
The values of STATE are as below:
ACTIVE
INACTIVE
Related
Command
Description
Commands
ipv6 neighbor
Configures a neighbor.
Platform
N/A
Description
3.33 show ipv6 neighbors statistics
Use the following commands to display the statistics of one IPv6 neighbors.
show ipv6 neighbors statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode.
Mode
Usage Guide
N/A
Configuration
The following example displays the statistics of the global neighbors.
Examples
Ruijie#show ipv6 neighbor statistics
Memory: 0 bytes
Command Reference
IPv6 Commands
Entries: 0
Static: 0,Dynamic: 0,Local: 0
Incomplete:0, Reachable:0, Stale:0, Delay:0, Probe:0
Ruijie#
The following example displays the statistics of all neighbors.
Ruijie#show ipv6 neighbor statistics all
IPv6 neighbor table count: 1
Static neighbor count: 0(0 active, 0 inactive)
Total
Memory: 0 bytes
Entries: 0
Static: 0,Dynamic: 0,Local: 0
Incomplete:0, Reachable:0, Stale:0, Delay:0, Probe:0;
Global
Memory: 0 bytes
Entries: 0
Static: 0,Dynamic: 0,Local: 0
Incomplete:0, Reachable:0, Stale:0, Delay:0, Probe:0;
Ruijie#
Related
Command
Description
Commands
N/A
N/A
Platform
Description
3.34 show ipv6 packet statistics
Use this command to display the statistics of IPv6 packets.
show ipv6 packet statistics [ total | interface-name ]
Parameter
Parameter
Description
Description
total
Displays total statistics of all interfaces.
interface-name
Interface name
Defaults
N/A
Command
Privileged EXEC mode.
Mode
Command Reference
IPv6 Commands
Usage Guide
N/A
Configuration
The following example displays the total statistics of the Ipv6 packets and the statistics of each
Examples
inerface.
The following example displays the total statistics of the Ipv6 packets.
Related
Command
Description
Commands
N/A
N/A
Platform
Description
3.35 show ipv6 raw-socket
Use this command to display all IPv6 raw sockets.
show ipv6 raw-socket [ num ]
Parameter
Parameter
Description
Description
num
Protocol.
Command Reference
IPv6 Commands
Defaults
N/A
Command
Privileged EXEC mode.
Mode
Usage Guide
N/A
Configuration
The following example displays all IPv6 raw sockets.
Examples
Ruijie# show ipv6 raw-socket
Number Protocol Process name
1
ICMPv6
vrrp.elf
2
ICMPv6
tcpip.elf
3
VRRP
vrrp.elf
Total: 3
Field
Description
Number
Number.
Protocol
Protocol.
Process name
Process number.
Total
Total number of IPv6 raw sockets.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.36 show ipv6 sockets
Use this command to display all IPv6 sockets.
show ipv6 sockets
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode.
Mode
Usage Guide
N/A
Command Reference
IPv6 Commands
Configuration
The following example displays all IPv6 sockets.
Examples
Ruijie# show ipv6 sockets
Number Process name
Type
Protocol
LocalIP:Port ForeignIP:Port
State
1
vrrp.elf
RAW
ICMPv6
:::58
:::0
*
2
tcpip.elf
RAW
ICMPv6
:::58
:::0
*
3
vrrp.elf
RAW
VRRP
:::112
:::0
*
4
rg-snmpd
DGRAM UDP
:::161
:::0
*
5
rg-snmpd
DGRAM UDP
:::162
:::0
*
6
dhcp6.elf
DGRAM UDP
:::547
:::0
*
7
rg-sshd
STREAM TCP
:::22
:::0
LISTEN
8
rg-telnetd
STREAM TCP
:::23
:::0
LISTEN
Total: 8
Field
Description
Number
Number.
Process name
Process name.
Type
Socket type. RAW indicates the raw socket. DGRAM
indicates data packet type. STREAM indicates traffic type.
Protocol
Protocol number
LocalIP:Port
Local IPv6 address and port.
ForeignIP:Port
Peer IPv6 address and port.
State
State (for IPv6 TCP sockets).
Total
Total number of sockets.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
3.37 show ipv6 udp
Use this command to display all IPv6 UDP sockets.
show ipv6 udp [ local-port num ] [ peer-port num ]
Use this command to display IPv6 UDP socket statistics.
show ipv6 udp statistics
Parameter
Parameter
Description
Description
local-port num
Local port number.
peer-port num
Peer port number.
Defaults
N/A
Command Reference
Command
IPv6 Commands
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays all IPv6 UDP sockets.
Examples
Ruijie# show ipv6 udp
Number Local Address
Peer Address
Process name
1
:::161
:::0
rg-snmpd
2
:::162
:::0
rg-snmpd
3
:::547
:::0
dhcp6.elf
Filed
Description
Number
Number.
Local Address
Local IPv6 address and port.
Peer Address
Peer IPv6 address and port.
Process name
Process name.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
Command Reference
DHCP Commands
4 DHCP Commands
4.1 address range
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
Parameter
Parameter
Description
Description
low-ip-address
Start address in the network segment range.
high-ip-address
End address in the network segment range.
Defaults
By default, the associated CLASS is not configured with the network segment range. The default is
the address pool range.
Command
Address pool CLASS configuration mode.
Mode
Usage Guide
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
Related
Commands
Command
ip dhcp pool
class
Platform
Description
N/A
Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
Configures the CLASS associated with the DHCP address pool and
enters the address pool CLASS configuration mode.
Command Reference
DHCP Commands
4.2 address-manage
Use this command to enter the AM rule configuration mode.
address-manage
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Global configuration mode
Mode
Usage Guide
This command is configured on the DHCP server and used in combination with Super VLAN.
Configuration
The following example enters the AM rule configuration mode.
Examples
Ruijie(config)#address-manage
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.3 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
Parameter
Parameter
Description
Description
file-name
Startup file name.
Defaults
No startup file name is defined by default.
Command
DHCP address pool configuration mode
Mode
Usage Guide
Some DHCP clients need to download the operating system and configure the file during the startup.
The DHCP server should provide the mapping file name required for the startup, so that DHCP clients
Command Reference
DHCP Commands
can download the file from the corresponding server (such as TFTP). Other servers are defined by
the next-server command.
Configuration
The following example defines the device.conf as the startup file name.
Examples
bootfile device.conf
Related
Command
Commands
ip dhcp pool
next-server
Platform
Description
Defines the name of the DHCP address pool and enter the DHCP address pool
configuration mode.
Configures the next server IP address of the DHCP client startup process.
N/A
Description
4.4 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
Parameter
Parameter
Description
Description
class-name
Class name, which can be the character string or numeric such as myclass or 1.
Defaults
By default, no CLASS is associated with the address pool.
Command
DHCP address pool configuration mode
Mode
Usage Guide
Each DHCP address pool performs the address assignment according to the Option82 matching
information. We can divide this Option82 information into classes and specify the available network
segment range for these classes in the DHCP address pool. These classes are called CLASS. One
DHCP address pool can map to multiple CLASSes, and each CLASS can specify different network
segment range.
During the address assignment, firstly, ensure the assignable address pool through the network
segment where the client is, then according to the Option82 information further ensure the CLASS
and assign the IP address from the network segment range corresponding to the CLASS. If one
request packet matches multiple CLASSes in the address pool, perform the address assignment
according to the sequencing of configuring the CLASS in the address pool. If this CLASS’s assigned
addresses have been to the upper limit, then continue to assign the address from the next CLASS,
and so on. Each CLASS corresponds to one network segment range that must be from low
addresses to high addresses and the duplicated network ranges between multiple CLASSes are
allowed. If the CLASS corresponding to the address pool is specified and the network segment
corresponding to the CLASS is not configured, this CLASS’s default network segment range is same
Command Reference
DHCP Commands
as the range of address pool where the CLASS is.
Configuration
The following example configures the address mypool0 to associate with class1.
Examples
Ruijie(config)# ip dhcp pool mypool0
Ruijie(dhcp-config)# class class1
Related
Commands
Platform
Command
ip dhcp pool
Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
N/A
Description
4.5 clear ip dhcp binding
Use this command to clear the DHCP binding table in the privileged user mode.
clear ip dhcp binding { * | ip-address }
Parameter
Parameter
Description
Description
*
Deletes all DHCP bindings.
ip-address
Deletes the binding of the specified IP addresses.
Defaults
N/A.
Command
Privileged EXEC mode.
Mode
Usage Guide
This command can only clear the automatic DHCP binding, but the manual DHCP binding can be
deleted by the no ip dhcp pool command.
Configuration
The following example clears the DHCP binding with the IP address 192.168.12.100.
Examples
clear ip dhcp binding 192.168.12.100
Related
Command
Description
Commands
show ip dhcp binding
Displays the address binding of the DHCP server.
Platform
N/A
Description
4.6 clear ip dhcp conflict
Use this command to clear the DHCP address conflict record.
clear ip dhcp conflict { * | ip-address }
Command Reference
DHCP Commands
Parameter
Parameter
Description
Description
*
Deletes all DHCP address conflict records.
ip-address
Deletes the conflict record of the specified IP addresses.
Defaults
N/A.
Command
Privileged EXEC mode.
Mode
Usage Guide
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.
Configuration
The following example clears all address conflict records.
Examples
clear ip dhcp conflict *
Related
Command
Commands
Description
Defines the number of the data packets sent by the ping operation for
ip dhcp ping packets
the detection of the address conflict when the DHCP server assigns an
IP address.
show ip dhcp conflict
Platform
Displays the address conflict that the DHCP server detects when it
assigns an IP address.
N/A
Description
4.7 clear ip dhcp history
Use this command to clear the address assigned by the DHCP server.
clear ip dhcp history{ * | mac-address }
Parameter
Parameter
Description
Description
*
Clears all addresses assigned by the DHCP server.
mac-address
Defaults
N/A
Command
Privileged EXEC mode
Clears the address assigned by the DHCP server corresponding to
the specified MAC address.
Mode
Usage Guide
This command is configured on the DHCP server.
Command Reference
DHCP Commands
Configuration
The following example clears all addresses assigned by the DHCP server.
Examples
Ruijie# clear ip dhcp history *
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.8 clear ip dhcp server detect
Use this command to clear statistics about the fake DHCP server.
clear ip dhcp server detect { * | ip-address }
Parameter
Parameter
Description
Description
*
Clears statistics about all fake DHCP servers.
ip-address
Clears statistics about the specified fake DHCP server.
Defaults
Command
Mode
Usage Guide
N/A
Privileged EXEC mode
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 *
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.9 clear ip dhcp server rate
Use this command to clear statistics about the packet processing rate of every module.
clear ip dhcp server rate
Parameter
Parameter
Description
Description
N/A
N/A
Command Reference
Defaults
N/A
Command
Privileged EXEC mode
DHCP Commands
Mode
Usage Guide
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
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.10 clear ip dhcp server statistics
Use this command to reset the counter of the DHCP server in the privileged user mode.
clear ip dhcp server statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode.
Mode
Usage Guide
The DHCP server carries out the statistics counter, records the DHCP address pool, automatic
binding, manual binding and expired binding. Furthermore, it also carries out the statistics to the
number of sent and received DHCP messages. The clear ip dhcp server statistics command can
be used to delete the history counter record and carry out the statistics starting from scratch.
Configuration
The following example clears the statistics record of the DHCP server.
Examples
clear ip dhcp server statistics
Related
Command
Description
Commands
show ip dhcp server statistics
Displays the statistics record of the DHCP server.
Platform
N/A
Command Reference
DHCP Commands
Description
4.11 clear ip dhcp relay statistics
Use this command to clear the DHCP relay statistics.
clear ip dhcp relay statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
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.
Configuration
The following example clears the DHCP relay statistics.
Examples
Ruijie# clear ip dhcp relay statistics
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.12 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 or default form of this command to restore the
default setting.
client-identifier unique-identifier
no client-identifier
default client-identifier
Parameter
Description
Parameter
unique-identifier
Description
The DHCP client ID is indicated in hex and separated by dot, for instance,
0100.d0f8.2233.b467.6967.6162.6974.4574.6865.726e.6574.302f.31.
Defaults
N/A.
Command
DHCP address pool configuration mode.
Command Reference
DHCP Commands
Mode
Usage Guide
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
Examples
00d0.f822.33b4.
defines the client ID of the Ethernet DHCP client whose MAC address is
client-identifier
0100.d0f8.2233.b467.6967.6162.6974.4574.6865.726e.6574.302f.31
Related
Command
Description
Commands
hardware-address
Defines the hardware address of DHCP client.
host
ip dhcp pool
Platform
Defines the IP address and network mask, which is used to configure the
DHCP manual binding.
Defines the name of the DHCP address pool and enters the DHCP address
pool configuration mode.
N/A
Description
4.13 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
default client-name
Parameter
Parameter
Description
Description
Name of DHCP client, a set of standards-based ASCII
client-name
characters. The name should not include the suffix domain
name. For instance, you can define the name of the DHCP
client as river, not river.i-net.com.cn.
Defaults
No client name is defined by default.
Command Reference
Command
DHCP Commands
DHCP address pool configuration mode.
Mode
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(dhcp-config)# lease 0 1
The following example sets the DHCP lease to 1 minute.
Ruijie(dhcp-config)# lease 0 0 1
Related
Commands
Command
host
ip dhcp pool
Platform
Description
Defines the IP address and network mask, which is used to
configure the DHCP manual binding.
Defines the name of the DHCP address pool and enters the
DHCP address pool configuration mode.
N/A
Description
4.14 default-router
Use this command to define the default gateway 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.
default-router ip-address [ ip-address2…ip-address8 ]
no default-router
default default-route
Parameter
Description
Parameter
ip-address
ip-address2…ip-address8
Description
Defines the IP address of the equipment. It is required to
configure one IP address at least.
(Optional) Up to 8 gateways can be configured.
Defaults
No gateway is defined by default.
Command
DHCP address pool configuration mode.
Mode
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.
Command Reference
DHCP Commands
Configuration
The following example defines 192.168.12.1 as the default gateway.
Examples
default-router 192.168.12.1
Related
Command
Commands
Platform
Description
Defines the name of the DHCP address pool and enters the DHCP
ip dhcp pool
address pool configuration mode.
N/A
Description
4.15 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
Parameter
Description
Parameter
Description
Defines the IP address of the DNS server. At least one IP address
ip-address
should be configured.
ip-address2…ip-address8
(Optional) Up to 8 DNS servers can be configured.
Defaults
No DNS server is defined by default.
Command
DHCP address pool configuration mode.
Mode
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
dns-server 192.168.12.3
Related
Command
Description
Commands
domain-name
Defines the suffix domain name of the DHCP client.
ip address dhcp
Enables the DHCP client on the interface to obtain the IP address information.
ip dhcp pool
Platform
N/A
Defines the name of the DHCP address pool and enters the DHCP address
pool configuration mode.
Command Reference
DHCP Commands
Description
4.16 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
default domain-name
Parameter
Parameter
Description
Description
domain-name
Defines the suffix domain name string of the DHCP client.
Defaults
No suffix domain name by default.
Command
DHCP address pool configuration mode.
Mode
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(dhcp-config)#domain-name ruijie.com.cn
Related
Command
Description
Commands
dns-server
Defines the DNS server of the DHCP client.
ip dhcp pool
Platform
Defines the name of the DHCP address pool and enter the DHCP address
pool configuration mode.
N/A
Description
4.17 dynamic-pool
Use this command to enable the fit AP to calculate the network number and mask of the dynamic
DHCP address pool according to the MAC address. Use the no form of this command to remove the
setting.
dynamic-pool
no dynamic-pool
Parameter
Parameter
Description
Description
N/A
N/A
Command Reference
Defaults
N/A
Command
ap-config/ap-group mode
DHCP Commands
Mode
Usage Guide
This command is configured on the server of the AC.
Configuration
The following example enables the fit AP to calculate the network number and mask of the dynamic
Examples
DHCP address pool according to the MAC address
Ruijie(config-group) # dynamic-pool
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.18 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
Parameter
Parameter
Description
Description
hardware-address
Define the MAC address of the DHCP client.
To indicate the hardware platform protocol of the DHCP client, use
the string definition or digits definition.
String option:
type
Ethernet
ieee802
Digits option:
1 (10M Ethernet)
6 (IEEE 802)
Defaults
No hardware address is defined by default.
If there is no option when the hardware address is defined, it is the Ethernet by default.
Command
DHCP address pool configuration mode.
Mode
Usage Guide
This command can be used only when the DHCP is defined by manual binding.
Command Reference
DHCP Commands
Configuration
The following example defines the MAC address 00d0.f838.bf3d with the type ethernet.
Examples
hardware-address 00d0.f838.bf3d
Related
Command
Commands
client-identifier
host
ip dhcp pool
default-router
Platform
Description
Defines the unique ID of the DHCP client (Indicated by the
hexadecimal numeral, separated by dot).
Defines the IP address and network mask, which is used to configure
the DHCP manual binding.
Defines the name of the DHCP address pool and enter the DHCP
address pool configuration mode.
Defines the default route of the DHCP client.
N/A
Description
4.19 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
default host
Parameter
Parameter
Description
Description
ip-address
Defines the IP address of DHCP client.
netmask
Defines the network mask of DHCP client.
Defaults
No IP address or network mask of the host is defined.
Command
DHCP address pool configuration mode.
Mode
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.
host 192.168.12.91 255.255.255.240
Related
Command
Description
Command Reference
Commands
DHCP Commands
Defines the unique ID of the DHCP client (Indicated in hex and
client-identifier
separated by dot).
Defines the hardware address of DHCP client.
hardware-address
Defines the name of the DHCP address pool and enters the
ip dhcp pool
default-router
Platform
DHCP address pool configuration mode.
Define the default route of the
default-router
DHCP client.
N/A
Description
4.20 ip address dhcp
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
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The interface cannot obtain the ID address by the DHCP by default.
Command
Interface configuration mode.
Mode
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
Related
Command
Description
Commands
dns-server
Defines the DNS server of DHCP client.
ip dhcp pool
Defines the name of the DHCP address pool and enters the DHCP
Command Reference
DHCP Commands
address pool configuration mode.
Platform
N/A
Description
4.21 ip dhcp class
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.
ip dhcp class class-name
no ip dhcp class class-name
Parameter
Parameter
Description
Description
class-name
Class name, which can be character string or numeric such as myclass or 1.
Defaults
By default, the class is not configured.
Command
Global configuration mode.
Mode
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.
Configuration
The following example configures a global CLASS.
Examples
Ruijie(config)# ip dhcp class myclass
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.22 ip dhcp excluded-address
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 or default 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]
Parameter
Parameter
Description
Command Reference
Description
low-ip-address
high-ip-address
DHCP Commands
Excludes the IP address, or excludes the start IP address within the range
of the IP address.
Excludes the end IP address within the range of the IP address.
Defaults
The DHCP server assigns the IP addresses of the whole address pool by default.
Command
Global configuration mode.
Mode
Usage Guide
If the excluded IP address is not configured, the DHCP server attempts to assign all IP addresses in
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.
ip dhcp excluded-address 192.168.12.100 192.168.12.150
The following example restores the default setting.
Ruijie(config)#no ip dhcp excluded-address 192.168.12.100 192.168.12.150
Related
Commands
Command
ip dhcp pool
network (DHCP)
Platform
Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
Defines the network number and network mask of the DHCP address
pool.
N/A
Description
4.23 ip dhcp force-send-nak
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
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is disabled by default.
Command Reference
Command
DHCP Commands
Global configuration mode.
Mode
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
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.24 ip dhcp monitor-vrrp-state
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
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The ip dhcp monitor-vrrp-state command is disabled by default. .
Command
Layer-3 interface configuration mode.
Mode
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.
Command Reference
DHCP Commands
Configuration
The following example enables the DHCP Server to monitor the status of VRRP interfaces.
Examples
Ruijie(config-if)# ip dhcp monitor-vrrp-state
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.25 ip dhcp ping packets
Use this command to configure the times of pinging the IP address when the DHCP server detects
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
Parameter
Description
Parameter
number
Description
(Optional) Number of packets in the range of 0 to 10, where 0 indicates disabling
the ping operation. The Ping operation sends two packets by default.
Defaults
The Ping operation sends two packets by default.
Command
Global configuration mode.
Mode
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
ip dhcp ping packets 3
Related
Command
Description
Commands
clear ip dhcp conflict
Clears the DHCP history conflict record.
Configures the timeout time that the DHCP server waits for the Ping
ip dhcp ping packet
response. If all the ping packets are not responded within the
specified time, it indicates that this IP address can be assigned.
Otherwise, it will record the address conflict.
show ip dhcp conflict
Displays the DHCP server detects address conflict when it assigns
an IP address.
Command Reference
Platform
DHCP Commands
N/A
Description
4.26 ip dhcp ping timeout
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
Parameter
Description
Parameter
milli-seconds
Defaults
The default is 500 seconds.
Command
Global configuration mode.
Description
Time that the DHCP server waits for ping response in the range 100
to 10000 milliseconds.
Mode
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
ip dhcp ping timeout 600
Related
Command
Description
Commands
clear ip dhcp conflict
Clears the DHCP history conflict record.
Defines the number of the data packets sent by the ping operation for
ip dhcp ping packets
the detection of the address conflict when the DHCP server assigns
an IP address.
show ip dhcp conflict
Platform
Displays the address conflict the DHCP server detects when it
assigns an IP address.
N/A
Description
4.27 ip dhcp pool
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.
Command Reference
DHCP Commands
ip dhcp pool pool-name
no ip dhcp pool pool-name
default ip dhcp pool pool-name
Parameter
Parameter
Description
Description
pool-name
A string of characters and positive integers, for instance, mypool or 1.
Defaults
No DHCP address pool is defined by default.
Command
Global configuration mode.
Mode
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
ip dhcp pool mypool0
Related
Commands
Command
host
ip dhcp excluded-address
network (DHCP)
Platform
Description
Defines the IP address and network mask, which is used to configure
the DHCP manual binding.
Defines the IP addresses that the DHCP server cannot assign to the
clients.
Defines the network number and network mask of the DHCP address
pool.
N/A
Description
4.28 ip dhcp refresh arp
Use this command to refreshes the trusted ARP allocation.
ip dhcp refresh arp
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Global configuration mode
Mode
Command Reference
DHCP Commands
Usage Guide
This command is configured on the DHCP server.
Configuration
The following example refreshes the trusted ARP allocation.
Examples
Ruijie(config)#ip dhcp refresh arp
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.29 ip dhcp relay check server-id
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
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The ip dhcp relay check server-id command is disabled.
Command
Global configuration mode.
Mode
Usage Guide
Switch will select the server to be sent according to server-id option when forwarding DHCP
REQUEST via this command. Without this command configured, the switch forwards the DHCP
REQUEST to all configured DHCP servers.
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
The following example disables the ip dhcp relay check server-id function.
Ruijie(config)# no ip dhcp relay check server-id
Related
Command
Description
Commands
service dhcp
Enables the DHCP Relay.
Platform
N/A
Description
Command Reference
DHCP Commands
4.30 ip dhcp relay information option82
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
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The ip dhcp relay information option82 command is disabled.
Command
Global configuration mode.
Mode
Usage Guide
This command is exclusive with the option dot1x command.
Configuration
The following example enables the option82 function on the DHCP relay.
Examples
Ruijie# configure terminal
Ruijie(config)# Ip dhcp relay information option82
The following example disables the option82 function on the DHCP relay.
Ruijie(config)# no ip dhcp relay information option82
Related
Command
Description
Commands
service dhcp
Enables the DHCP Relay.
Platform
N/A
Description
4.31 ip dhcp relay suppression
Use this command to enable the DHCP binding globally. Use the no form of this command to disable
the DHCP binding globally and enable the DHCP relay suppression on the port.
ip dhcp relay suppression
no ip dhcp relay suppression
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The ip dhcp relay suppression command is disabled.
Command
Interface configuration mode.
Command Reference
DHCP Commands
Mode
Usage Guide
After executing this command, the system will not relay the DHCP request message on the interface.
Configuration
The following example enables the relay suppression function.
Examples
Ruijie(config-if)# ip dhcp relay suppression
The following example disables the relay suppression function.
Ruijie(config-if)# no ip dhcp relay suppression
Related
Command
Description
Commands
service dhcp
Enables the DHCP Relay.
Platform
N/A
Description
4.32 ip dhcp server detect
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
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is disabled by default.
Command
Global configuration mode
Mode
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
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
Command Reference
DHCP Commands
4.33 ip dhcp use class
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
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
Enabled
Command
Global configuration mode
Mode
Usage Guide
This command is configured on the DHCP server.
Configuration
The following example enables the CLASS to allocate addresses.
Examples
Ruijie(config)# ip dhcp use class
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.34 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 }
Parameter
Parameter
Description
Description
cycle-mode
Forwards DHCP request packets to all DHCP servers.
A.B.C.D
The IP address of the specified DHCP server.
Defaults
N/A
Command
Global configuration mode
Command Reference
DHCP Commands
Mode
Usage Guide
Up to 20 DHCP server IP addresses can be configured globally.
Configuration
The following example sets the IP address for the global server to 192.168.100.1
Examples
Ruijie# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)# ip helper-address 192.168.100.1
The following example deletes the set IP address for the global server, 192.168.100.1.
Ruijie(config)# no ip helper-address 192.168.100.1
The following example enables forwarding DHCP request packets to all DHCP servers.
Ruijie(config)# ip helper-address cycle-mode
The following example disables forwarding DHCP request packets to all DHCP servers.
Ruijie(config)# no ip helper-address cycle-mode
Related
Command
Description
Commands
service dhcp
Enables the DHCP relay.
Platform
N/A
Description
4.35 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 or default 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
default lease
Parameter
Parameter
Description
Description
days
Lease time in days
hours
minutes
infinite
Defaults
(Optional) Lease time in hours. It is necessary to define the days
before defining the hours.
(Optional) Lease time in minutes. It is necessary to define the days
and hours before defining the minutes.
Infinite lease time.
The lease time for a static address pool is infinite. The lease time for other address pools is 1 day.
Command Reference
Command
DHCP Commands
DHCP address pool configuration mode.
Mode
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.
Configuration
The following example sets the DHCP lease to 1 hour.
Examples
lease 0 1
The following example sets the DHCP lease to 1 minute.
lease 0 0 1
Related
Commands
Platform
Command
ip dhcp pool
Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
N/A
Description
4.36 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
defaut lease-threshold
no lease-threshold
Parameter
Parameter
Description
Description
percentage
Usage of the address pool, ranging from 60 to 100 in percentage.
Defaults
90
Command
DHCP address pool configuration mode.
Mode
Usage Guide
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.
Configuration
The following example sets the alarm threshold to 80%.
Examples
lease-threshold 80
The following example restores the default alarm threshold.
Command Reference
DHCP Commands
default lease-threshold
Related
Commands
Platform
Command
ip dhcp pool
Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
N/A
Description
4.37 match ip
Use this command to define an AM matching rule.
Use the no form of this command to remove the configuration.
Use the clear form of this command to clear all configurations.
match ip ip-address netmask [interface] [add/remove] vlan vlan-list
no match ip ip-address netmask [interface] [add/remove] vlan vlan-list
Parameter
Parameter
Description
Description
ip-address
IP address
netmask
Subnet mask
interface
Interface ID
add/remove
Adds or removes the specified VLAN.
vlan-list
VLAN ID
Defaults
N/A
Command
AM rule configuration mode
Mode
Usage Guide
With this function enabled, all DHCP clients with specified vlan-list and interface obtain addresses in
the rule.
If a DHCP client obtains a static address, it is not subject to AM matching rules in whichever Sub
VLAN unless the AM rule configuration is based on VLAN instead of Sub VLAN. This type of
matching rules applies to only static addresses.
Configuration
The following example defines an AM matching rule.
Examples
Ruijie(config-address-manage)#match ip 192.168.11.0 255.255.255.0
GigabitEthernet 0/10 vlan 10
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Command Reference
DHCP Commands
Description
4.38 match ip default
Use this command to define a default AM matching rule.
Use the no form of this command to remove the configuration,
match ip default ip-address netmask
no match ip default ip-address netmask
Parameter
Parameter
Description
Description
ip-address
IP address
netmask
Subnet mask
Defaults
N/A
Command
AM rule configuration mode
Mode
Usage Guide
With this function enabled, all DHCP clients with specified vlan-list and interface obtain addresses in
the default rule.
Configuration
The following example defines a default AM matching rule.
Examples
Ruijie(config-address-manage)#match ip default 192.168.12.0 255.255.255.0
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.39 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
Parameter
Description
Parameter
ip-address
ip-address2…ip-address8
Description
IP address of the WINS server. It is required to configure one IP
address at least.
(Optional) IP addresses of WINS servers. Up to 8 WINS servers can
Command Reference
DHCP Commands
be configured.
Defaults
No WINS server is defined by default.
Command
DHCP address pool configuration mode.
Mode
Usage Guide
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
netbios-name-server 192.168.12.3
Related
Command
Description
Commands
ip address dhcp
Enables the DHCP client on the interface to obtain the IP address.
ip dhcp pool
netbios-node-type
Platform
Defines the name of the DHCP address pool and enter the DHCP
address pool configuration mode.
Defines the netbios node type of the client host.
N/A
Description
4.40 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
no netbios-node-type
defaut netbios-node-type
Parameter
Parameter
Description
Description
Type of node in two modes:
Digit in hexadecimal form in the range of 0 to FF. Only the following
numerals are available:
1: b-node.
2: p-node.
type
4: m-node.
8: h-node.
String:
b-node: broadcast node
p-node: peer-to-peer node
m-node: mixed node
Command Reference
DHCP Commands
h-node: hybrid node
Defaults
No type of the NetBIOS node is defined by default.
Command
DHCP address pool configuration mode.
Mode
Usage Guide
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
netbios-node-type h-node
Related
Command
Commands
ip dhcp pool
netbios-name-server
Platform
Description
Defines the name of DHCP address pool and enters the DHCP
address pool configuration mode.
Configures the WINS name server of the Microsoft DHCP client
NETBIOS.
N/A
Description
4.41 network
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
Parameter
Parameter
Description
Description
net-number
Network number of the DHCP address pool
net-mask
Network mask of the DHCP address pool. If the network mask is not
defined, the natural network mask will be used by default.
Command Reference
DHCP Commands
low-ip-address
Start IP address.
high-ip-address
End IP address.
Defaults
No network number or network mask is defined by default.
Command
DHCP address pool configuration mode.
Mode
Usage Guide
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.
network 192.168.12.0 255.255.255.240
Related
Commands
Command
ip dhcp excluded-address
ip dhcp pool
Platform
Description
Defines the IP addresses that the DHCP server cannot assign to the
clients.
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
N/A
Description
4.42 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
defaut next-server
Parameter
Description
Parameter
ip-address
ip-address2…ip-address8
Description
Defines the IP address of the startup server, which is usually the
TFTP server. It is required to configure one IP address at least.
(Optional) Up to 8 startup servers can be configured.
Command Reference
DHCP Commands
Defaults
N/A
Command
DHCP address pool configuration mode.
Mode
Usage Guide
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
next-server 192.168.12.4
Related
Command
Description
Commands
bootfile
Defines the default startup mapping file name of the DHCP client.
ip dhcp pool
Platform
Defines the name of the DHCP address pool and enter the DHCP
address pool configuration mode.
ip help-address
Defines the Helper address on the interface.
option
Configures the option of the RGOS software DHCP server.
N/A
Description
4.43 option
Use this command to configure the option of the DHCP server in the DHCP address pool
configuration mode. Use the no or default form of this command to restore the default setting.
option code { ascii string | hex string | ip ip-address }
no option
defaut option
Parameter
Description
Parameter
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
Command
Global configuration mode
Mode
Usage Guide
The DHCP provides a mechanism to transmit the configuration information to the host in the TCP/IP
Command Reference
DHCP Commands
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 enable the IP packet forwarding on the
DHCP client.
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.
option 33 ip 172.16.12.0 192.168.12.12 172.16.16.0 192.168.12.16
Related
Commands
Platform
Command
ip dhcp pool
Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
N/A
Description
4.44 pool-status
Use this command to enable or disable the DHCP address pool.
pool-status { enable | disable }
Parameter
Parameter
Description
Description
enable
Enables the address pool.
disable
Disables the address pool.
Defaults
By default, the address pool is enabled after it is configured.
Command
DHCP address pool configuration mode
Mode
Usage Guide
This command is configured on the DHCP server.
Configuration
The following example disables the address pool.
Examples
Ruijie(dhcp-config)# pool-status disable
Command Reference
DHCP Commands
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.45 relay agent information
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
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Global CLASS configuration mode
Mode
Usage Guide
After executing this command, it enters the Option82 matching information configuration mode which
is shown as “Ruijie (config-dhcp-class-relayinfo)#”.
In this configuration mode, user can configure the class matching multiple Option82 information.
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)#
Related
Command
Description
Commands
ip dhcp class
Defines a CLASS and enters the global CLASS configuration mode.
Platform
N/A
Description
4.46 relay-information hex
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… [ * ]
Command Reference
DHCP Commands
no relay-information hex aabb.ccdd.eeff… [ * ]
Parameter
Parameter
Description
Hexadecimal Option82 matching information. The ‘*’ symbol means partial
Description
aabb.ccdd.eeff…[*]
matching which needs the front part matching only. Without the ‘*’ means
needing full matching.
Defaults
N/A
Command
Global CLASS configuration mode
Mode
Usage Guide
This command is configured on the DHCP server.
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
hex 060223*
Related
Command
Description
Commands
ip dhcp class
Defines a CLASS and enter the global CLASS configuration mode.
relay agent information
Enters the Option82 matching information configuration mode.
Platform
N/A
Description
4.47 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
Parameter
Description
Parameter
class-remark
Description
Information used to identify the CLASS, which can be the character
strings with space in them.
Command Reference
DHCP Commands
Defaults
N/A.
Command
Global CLASS configuration mode.
Mode
Usage Guide
This command is configured on the DHCP server.
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
Related
Command
Description
Commands
ip dhcp class
Defines a CLASS and enter the global CLASS configuration mode.
Platform
N/A
Description
4.48 service dhcp
Use this command to enable the DHCP server and the DHCP relay on the device in global
configuration mode. Use the no or default form of this command to restore the default setting.
service dhcp
no service dhcp
defaut service dhcp
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The service dhcp command is disabled.
Command
Global configuration mode, ap-config/ap-group mode
Mode
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
Related
Command
Description
Command Reference
Commands
Platform
DHCP Commands
show ip dhcp server statistics
Displays various statistics information of the DHCP server.
ip helper-address [ vrf ] A.B.C.D
Adds an IP address of the DHCP server.
N/A
Description
4.49 show dhcp lease
Use this command to display the lease information of the IP address obtained by the DHCP client.
show dhcp lease
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode.
Mode
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
DHCP transaction id: 168F
Lease: 600 secs, Renewal: 300 secs, Rebind: 525 secs
Temp default-gateway addr: 192.168.5.1
Next timer fires after: 00:04:29
Retry count: 0 Client-ID: redgaint-00d0.f8fb.5740-Fa0/0
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.50 show ip dhcp binding
Use this command to display the binding condition of the DHCP address.
show ip dhcp binding [ ip-address ]
Command Reference
DHCP Commands
Parameter
Parameter
Description
Description
ip-address
(Optional) Only displays the binding condition of the specified IP addresses.
Defaults
N/A
Command
Privileged EXEC mode.
Mode
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
Configuration
The following is the result of the show ip dhcp binding.
Examples
Ruijie# show ip dhcp binding
Total number of clients
: 4
Expired clients
: 3
Running clients
: 1
IP address
Hardware address
20.1.1.1
2000.0000.2011
Lease expiration
000 days 23 hours 59 mins
Type
Automatic
The meaning of various fields in the show result is described as follows.
Field
Description
IP address
The IP address to be assigned to the DHCP client.
Client-Identifier
/Hardware address
The client identifier or hardware address of the DHCP client.
The expiration date of the lease. The Infinite indicates it is not
Lease expiration
limited by the time. The IDLE indicates the address is in the free
status currently for it is not renewed or the DHCP client releases
it actively.
The type of the address binding. The Automatic indicates an IP
Type
address is assigned automatically, and the Manual indicates an
IP address is assigned by manual.
Related
Command
Description
Commands
clear ip dhcp binding
Clears the DHCP address binding table.
Platform
N/A
Description
Command Reference
DHCP Commands
4.51 show ip dhcp conflict
Use this command to show the conflict history record of the DHCP sever.
show ip dhcp conflict
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode.
Mode
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
The meaning of various fields in the show result is described as follows.
Field
Description
IP address
The IP addresses which cannot be assigned to the DHCP client.
Detection Method
The conflict detection method.
Related
Command
Description
Commands
clear ip dhcp conflict
Clears the DHCP conflict record.
Platform
N/A
Description
4.52 show ip dhcp pool
Use this command to display the address statistics of an address pool.
show ip dhcp pool [ poolname ]
Parameter
Parameter
Description
Description
poolname
(Optional) Address pool whose address statistics are to be displayed.
Defaults
Command Reference
Command
DHCP Commands
Privileged EXEC mode.
Mode
Usage Guide
This command is configured on the DHCP server. 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 poolname
Pool poolname:
Address range
192.168.0.1 – 192.168.0.254
Class range
192.168.0.1 – 192.168.0.254
Total address
Excluded
252
2
Distributed
30
Conflict
10
Remained
212
Usage percentage
Lease threshold
84.12698%
90%
The meaning of various fields in the show result is described as follows.
Field
Description
Address range
Address range of the address pool.
Class range
Commands
Platform
Description
address pool is not configured. Otherwise, the class range is displayed.
Total address
Total number of addresses that can be assigned in the address pool.
Excluded
Number of excluded addresses.
Distributed
Number of assigned addresses.
Conflict
Number of conflicting addresses in the address pool.
Remained
Related
Class address range. By default, the address range for the same
Number of remaining addresses that have not been assigned or can be
reused.
Usage percentage
Address pool usage.
Lease threshold
Lease threshold.
Command
ip dhcp pool
N/A
Description
Defines the name of the DHCP address pool and enters the DHCP
address pool configuration mode.
Command Reference
DHCP Commands
4.53 show ip dhcp relay-statistics
Use this command to display the statistics of the DHCP relay.
show ip dhcp relay-statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
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
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
Cycle mode
Description
Whether to allow packets to be sent to multiple DHCP
servers.
Command Reference
DHCP Commands
Discover
The number of Discover packets.
Offer
The number of Offer packets.
Request
The number of Request packets.
Ack
The number of Ack packets.
Nak
The number of Nak packets.
Decline
The number of Decline packets.
Release
The number of Release packets.
Info
The number of Info packets.
Bad
The number of error packets.
Rx client
The number of packets received from the client.
Rx client uni
The number of unicast packets received from the client.
Rx client bro
The number of broadcast packets received from the client.
Tx client
The number of packets transmitted to the client.
Tx client uni
The number of unicast packets transmitted to the client
Tx client bro
The number of multicast packets transmitted to the client
Rx server
The number of packets received from the server.
Tx server
The number of packets transmitted to the server.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.54 show ip dhcp server detect
Use this command to display the fake DHCP server detected.
show ip dhcp server detect
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
This command is configured on the DHCP server.
Command Reference
DHCP Commands
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
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.55 show ip dhcp server statistics
Use this command to display the statistics of the DHCP server.
show ip dhcp server statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
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
Command Reference
DHCP Commands
Message
Sent
BOOTREPLY
16
DHCPOFFER
9
DHCPACK
7
DHCPNAK
0
DHCPREQTIMES
0
DHCPREQSUCTIMES
0
DISCOVER-PROCESS-ERROR 0
LEASE-IN-PINGSTATE
NO-LEASE-RESOURCE
0
0
SERVERID-NO-MATCH
0
-------------------------------------------recv
0
send
0
The meaning of various fields in the show result is described as follows.
Field
Description
Address pools
Number of address pools.
Automatic bindings
Number of automatic address bindings.
Manual bindings
Number of manual address bindings.
Expired bindings
Number of expired address bindings.
Malformed
messages
Number of malformed messages received by the DHCP.
Message Received
Number of the messages received and sent by the DHCP server
or Sent
respectively.
Related
Command
Description
Commands
clear ip dhcp server statistics
Clears the DHCP server statistics.
Platform
N/A
Description
4.56 show ip dhcp socket
Use this command to display the socket used by the DHCP server.
show ip dhcp socket
Parameter
Parameter
Description
Description
N/A
N/A
Command Reference
Defaults
N/A
Command
Privileged EXEC mode
DHCP Commands
Mode
Usage Guide
N/A
Configuration
The following example displays the socket used by the DHCP server.
Examples
ruijie#show ip dhcp socket
dhcp socket = 47.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
4.57 update arp
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
defaut update arp
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
This function is disabled by default.
Command
DHCP address pool configuration mode
Mode
Usage Guide
This command is configured on the DHCP server. The trusted ARP has a higher priority than the
dynamic ARP and cannot be overwritten.
Configuration
The following example enables DHCP to add trusted ARP when allocating addresses.
Examples
Ruijie(dhcp-config)# update arp
Related
Command
Description
Commands
N/A
N/A
Command Reference
Platform
Description
N/A
DHCP Commands
Command Reference
DHCPv6 Commands
5 DHCPv6 Commands
5.1 clear ipv6 dhcp binding
Use this command to clear the DHCPv6 binding information.
clear ipv6 dhcp binding [ ipv6-address ]
Parameter
Parameter
Description
Description
ipv6-address
Sets the IPv6 address or the prefix.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
If the ipv6-address is not specified, all DHCPv6 binding information is cleared. If the ipv6-address is
specified, the binding information for the specified address is cleared.
Configuration
The following example clears the DHCPv6 binding information:
Examples
Ruijie(config)# clear ipv6 dhcp binding
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
5.2 clear ipv6 dhcp client
Use this command to reset the DHCPv6 client.
clear ipv6 dhcp clientinterface-type interface-number
Parameter
Parameter
Description
interface-type
interface-number
Defaults
N/A
Command
Privileged EXEC mode
Mode
Description
Sets the interface type and the interface number.
Command Reference
Usage Guide
DHCPv6 Commands
This command is used to reset the DHCPv6 client, which may lead the client to request for the
configurations from the server again.
Configuration
The following example resets DHCP client VLAN 1.
Examples
Ruijie# clear ipv6 dhcp client vlan 1
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
5.3 clear ipv6 dhcp conflict
Use this command to clear the DHCPv6 address conflicts.
clear ipv6 dhcp conflict { ipv6-address | *}
Parameter
Parameter
Description
Description
ipv6-address
Specifies IPv6 address or prefix.
*
All IPv6 addresses or prefixes
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
If the * parameter is not specified, all conflicts of IPv6 addresses or prefixes will be deleted.
If the ipv6-address parameter is specified, only the specified address conflict will be deleted.
Configuration
The following example clears a DHCPv6 address conflict.
Examples
Ruijie# clear ipv6 dhcp conflict 2008:50::2
Related
Command
Description
Commands
show ipv6 dhcp conflict
Displays address conflicts.
Platform
N/A
Description
5.4 clear ipv6 dhcp relay statistics
Use this command to clear the packet sending and receiving condition with the DHCPv6 Relay
function enabled.
Command Reference
DHCPv6 Commands
clear ipv6 dhcp relay statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
Configuration
Examples
N/A
The following example clears the packet sending and receiving condition with the DHCPv6 Relay
function enabled.
Ruijie# clear ipv6 dhcp relay statistics
Related
Command
Description
Commands
show ipv6 dhcp relay statistics
Displays the statistical information.
Platform
N/A
Description
5.5 clear ipv6 dhcp server statistics
Use this command to clear the DHCPv6 server statistics.
clear ipv6 dhcp server statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
This command is used to clear the DHCPv6 server statistics.
Configuration
The following example clears the DHCPv6 server statistics.
Examples
Ruijie(config)# clear ipv6 dhcp server statistics
Related
Command
Description
Commands
N/A
N/A
Command Reference
Platform
DHCPv6 Commands
N/A
Description
5.6 dns-server
Use this command to set the DNS Server list information for the DHCPv6 Server.
Use the no form of this command to restore the default setting.
dns-server ipv6-address
no dns-server ipv6-address
Parameter
Parameter
Description
Description
ipv6-address
Sets the IPv6 address or the DNS server.
Defaults
By default, no DNS server list is configured.
Command
DHCPv6 pool configuration mode
Mode
Usage Guide
To configure several DNS Server addresses, use the dns-server command for several times. The
newly-configured DNS Server address will not overwrite the former ones.
Configuration
The following example configures the DNS server address.
Examples
Ruijie(config-dhcp)# dns-server 2008:1::1
Related
Command
Description
Commands
domain-name
Sets the DHCPv6 domain name information.
ipv6 dhcp pool
Sets a DHCPv6 pool.
Platform
N/A
Description
5.7 domain-name
Use this command to set the domain name for the DHCPv6 server.
Use the no form of this command to restore thedefault setting.
domain-namedomain
no domain-name domain
Parameter
Parameter
Description
Description
domain
Sets the domain name.
Defaults
By default, no domain name is configured.
Command Reference
Command
DHCPv6 Commands
DHCPv6 pool configuration mode
Mode
Usage Guide
To configure several domain names, use the domain-name command for several times. The
newly-configured domain name will not overwrite the former ones.
Configuration
The following example sets the domain name for the DHCPv6 server to example.com.
Examples
Ruijie(config-dhcp)# domain-name example.com
Related
Command
Description
Commands
dns-server
Sets the DHCPv6 DNS server list.
ipv6 dhcp pool
Sets the DHCPv6 pool.
Platform
N/A
Description
5.8 iana-address prefix
Use this command to set the IA_NA address prefix for the DHCPv6 Server. Use the no form of this
command to restore thedefault setting.
iana-address prefix ipv6-prefix/prefix-length [ lifetime { valid-lifetime | preferred-lifetime } ]
no iana-address prefix
Parameter
Parameter
Description
Description
ipv6-prefix/prefix-length
Sets the IPv6 prefix and prefix length.
Sets the lifetime of the address allocated to the client.
lifetime
With the keyword lifetime configured, both parameters
valid-lifetimeandpreferred-lifetime shall be configured.
Defaults
valid-lifetime
Sets the valid lifetime of using the allocated address for the client.
preferred-lifetime
Sets the preferred lifetime of the address allocated to the client.
By default, no IA_NA address prefix is configured.
The default valid-lifetime is 3600s(1 hour).
The default preferred-lifetime is 3600s(1 hour).
Command
DHCPv6 pool configuration mode
Mode
Usage Guide
This command is used to set the IA_NA address prefix for the DHCPv6 Server, and allocate the
IA_NA address to the client.
The Server attempts to allocate a usable address within the IA_NA address prefix range to the client
upon receiving the IA_NA address request from the client. That address will be allocated to other
Command Reference
DHCPv6 Commands
clients if the client no longer uses that address again.
Configuration
The following example sets the IA_NA address prefix for the DHCPv6 Server.
Examples
Ruijie(config-dhcp)# iana-address prefix 2008:50::/64 lifetime 2000 1000
Related
Command
Description
Commands
ipv6 dhcp pool
Sets the DHCPv6 pool.
show ipv6 dhcp pool
Displays the DHCPv6 pool information.
Platform
N/A
Description
5.9 ipv6 dhcp client ia
Use this command to enable DHCPv6 client mode and request the IANA address from the DHCPv6
server. Use the no form of this command to restore the default setting.
ipv6 dhcp client ia [rapid-commit]
no ipv6 dhcp client ia
Parameter
Parameter
Description
Description
rapid-commit
Allows the two-message interaction process.
Defaults
This function is disabled by default.
Command
Interface configuration mode
Mode
Usage Guide
This command is used to enable DHCPv6 client mode and request the IANA address from the
DHCPv6 server,
The rapid-commitkey allows the two-message interaction process between the client and the server.
After the key is configured, the solicit message transmitted by the client contains the rapid-commit
option.
Configuration
The following example enables the request for the IANA address on the interface.
Examples
Ruijie(config)# interface fastethernet 0/1
Ruijie(config-if)# ipv6 dhcp client ia
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
Command Reference
DHCPv6 Commands
5.10 ipv6 dhcp client pd
Use this command to enable the DHCPv6 client and request for the prefix address information.
Use the no form of this command to restore the default setting.
ipv6 dhcp client pd prefix-name [ rapid-commit ]
no ipv6 dhcp client pd
Parameter
Parameter
Description
Description
prefix-name
Defines the IPv6 prefix name.
rapid-commit
Allows the two-message interaction process.
Defaults
This function is disabled by default.
Command
Interface configuration mode
Mode
Usage Guide
With the DHCPv6 client mode disabled, use this command to enable the DHCPv6 client mode on the
interface.
With the ipv6 dhcp client pd command enabled, the DHCPv6 client sends the prefix request to the
DHCPv6 server
The keyword rapid-commit allows the client and the server two-message interaction process. With
this keyword configured, the solicit message sent by the client includes the rapid-commit item.
Configuration
The following example enables the prefix information request on the interface.
Examples
Ruijie(config)# interface fastethernet 0/1
Ruijie(config-if)# ipv6 dhcp client pd pd_name
Related
Commands
Command
Description
Resets the DHCPv6 client function on the
clear ipv6 dhcp client
interface.
Displays the DHCPv6 interface configuration.
show ipv6 dhcp interface
Platform
N/A
Description
5.11 ipv6 dhcp pool
Use this command to set the DHCPv6 server pool.
Use the no form of this command to restore thedefault setting.
ipv6 dhcp pool poolname
no ipv6 dhcp pool poolname
Parameter
Parameter
Description
Command Reference
DHCPv6 Commands
Description
poolname
Defines the DHCPv6 pool name.
Defaults
By default, no DHCPv6 server pool is configured.
Command
Global configuration mode
Mode
Usage Guide
This command is used to create a DHCPv6 Server configuration pool. After configuring this
command, it enters the DHCPv6 pool configuration mode, in which the administrator can set the pool
parameters, such as the prefix and the DNS Server information, ect.
After creating the DHCPv6 Server configuration pool, use the ipv6 dhcp server command to
associate the pool and the DHCPv6 Server on one interface.
Configuration
The following example sets the DHCPv6 server pool.
Examples
Ruijie# configure terminal
Ruijie(config)# ipv6 dhcp pool pool1
Ruijie(config-dhcp)#
Related
Command
Description
Commands
Enables the DHCPv6 server function on the
ipv6 dhcp server
interface.
Displays the DHCPv6 pool information.
show ipv6 dhcp pool
Platform
N/A
Description
5.12 ipv6 dhcp relay destination
Use this command to enable the DHCPv6 relay service and configure the destination address to
which the messages are forwarded.
Use the no form of this command to restore the default setting.
ipv6 dhcp relay destinationipv6-address [ interface-type interface-number ]
no ipv6 dhcp relay destinationipv6-address [ interface-type interface-number ]
Parameter
Parameter
Description
Description
ipv6-address
Sets the DHCPv6 relay destination address.
interface-type
Specifies the forwarding output interface if the forwarding address is
interface-number
the local link address.
Defaults
By default, the relay and forward function is disabled, and the forwarding destination address and the
output interface are not configured.
Command
Interface configuration mode
Command Reference
DHCPv6 Commands
Mode
Usage Guide
With the DHCPv6 relay service enabled on the interface, the DHCPv6 message received on the
interface can be forwarded to all configured destination addresses. Those received DHCPv6
messages can be from the client, or from another DHCPv6 relay service.
The forwarding output interface configuration is mandatory if the forwarding address is the local link
address or the multicast address. And the forwarding output interface configuration is optional if the
forwarding address is global or station unicast or multicast address.
Without the forwarding output interface configured, the interface is selected according to the unicast
or multicast routing protocol.
The relay reply message can be forwarded without the relay function enabled on the interface.
Configuration
The following example sets the relay destination address on the interface.
Examples
Ruijie(config)# interface fastethernet 0/1
Ruijie(config-if)# ipv6 dhcp relay destination 2008:1::1
Related
Command
Description
Commands
show ipv6 dhcp interface
Displays the DHCPv6 interface information.
Platform
N/A
Description
5.13 ipv6 dhcp server
Use this command to enable the DHCPv6 server on the interface.
Use the no form of this command to restore the default setting.
ipv6 dhcp server poolname[ rapid-commit ][ preference value ]
no ipv6 dhcp server
Parameter
Parameter
Description
Description
poolname
Defines the DHCPv6 pool name.
rapid-commit
Allows the two-message interaction process.
preference value
Sets the preference level for the advertise message. The valid range
is from 1 to 100 and the default value is 0.
Defaults
This function is disabled by default.
Command
Interface configuration mode
Mode
Usage Guide
Use the ipv6 dhcp server command to enable the DHCPv6 service.
Configuring the keyword rapid-commit allows the two-message interaction for the server and the
client when allocating the address prefix and setting other configurations. With this keyword
Command Reference
DHCPv6 Commands
configured, if the client solicit message includes the rapid-commit item, the DHCPv6 Server will send
the Reply message immediately.
DHCPv6 Server carries with the preference value when sending the advertise message if the
preference level is not 0.
If the preference level is 0, the advertise message will not include this field. If the preference value is
255, the client sends the request message to the server to obtain the configurations.
DHCPv6 Client, Server and Relay functions are exclusive, and only one of the functions can be
configured on the interface.
Configuration
The following example enables the DHCPv6 server on the interface.
Examples
Ruijie(config)# interface fastethernet 0/1
Ruijie(config-if)# ipv6 dhcp server pool1
Related
Command
Description
Commands
ipv6 dhcp pool
Sets the DHCPv6 pool.
show ipv6 dhcp pool
Displays the DHCPv6 pool information.
Platform
N/A
Description
5.14 ipv6 local pool
Use this command to configure the local prefix pool of the DHCPv6 server prefix.
Use the no form of this command to restore the default setting.
ipv6 local pool poolname prefix/prefix-length assigned-length
no ipv6 local pool poolname
Parameter
Parameter
Description
Description
poolname
The local prefix pool name
prefix/prefix-length
The prefix and prefix length
assigned-length
The assigned prefix length
Defaults
By default, no local prefix pool of the DHCPv6 server prefix is configured.
Command
Global configuration mode
Mode
Usage Guide
The ipv6 local pool command is used to create the local prefix pool. If the DHCPv6 server requires
prefix delegation, you can use the prefix-delegation pool command to specify the local prefix pool
and then assign prefixes from the prefix pool.
Configuration
The following example configures the local prefix pool.
Examples
Ruijie(config)# ipv6 local pool client-prefix-pool 2001::db8::/64 80
Command Reference
DHCPv6 Commands
The following example specifies the local prefix pool.
Ruijie(config-dhcp)# prefix-delegation pool client-prefix-pool lifetime 2000
1000
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
5.15 option52
Use this command to configure the DHCPv6 Server to set the CAPWAP AC IPv6 address.
Use the no form of this command to restore the default setting.
option52 ipv6-address
no option52 ipv6-address
Parameter
Parameter
Description
Description
ipv6-address
Sets the CAPWAP AC IPv6 address.
Defaults
By default, no option52 is created after pool configuration on the DHCPv6 server is complete.
Command
DHCPv6 pool configuration mode
Mode
Usage Guide
This command can be used to set multiple CAPWAP AC IPv6 addresses. The newly added IPv6
address does not overwrite the old one.
Configuration
The following example configures thedomain-name address.
Examples
Ruijie(config-dhcp)# option52 2008:1::1
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
5.16 prefix-delegation
Use this command to set the static binding address prefix information for the DHCPv6 server.
Use the no form of this command to restore the default setting.
prefix-delegation ipv6-prefix/prefix-length client-DUID [ lifetime ]
no prefix-delegation ipv6-prefix/prefix-length client-DUID [ lifetime ]
Command Reference
DHCPv6 Commands
Parameter
Parameter
Description
Description
ipv6-prefix/prefix-length
Sets the IPv6 address prefix and the prefix length.
client-DUID
Sets the client DUID.
lifetime
Sets the interval of using the prefix by the client.
Defaults
By default, no address prefix information is configured.
The defaultlifetime is 3600 seconds (one hour).
Command
DHCPv6 pool configuration mode
Mode
Usage Guide
The administrator uses this command to manually set the address prefix information list for the client
IA_PD and set the valid lifetime for those prefixes.
The parameter client-DUID allocates the address prefix to the first IA_PD in the specified client.
Before receiving the request message for the address prefix from the client, DHCPv6 Server
searches for the corresponding static binding first. If it succeeds, the server returns to the static
binding; otherwise, the server will attempt to allocate the address prefix from other prefix information
sources.
Configuration
The following example sets the static binding address prefix information for the DHCPv6 server.
Examples
Ruijie(config-dhcp)# prefix-delegation 2008:2::/64 0003000100d0f82233ac
Related
Command
Description
Commands
ipv6 dhcp pool
Sets a DHCPv6 pool.
ipv6 local pool
Sets a local prefix pool.
prefix-delegation pool
Specifies the DHCPv6 local prefix pool.
show ipv6 dhcp pool
Displays the DHCPv6 pool information.
Platform
N/A
Description
5.17 prefix-delegation pool
Use this command to specify the local prefix pool for the DHCPv6 server.
Use the no form of this command to restore the default setting.
prefix-delegation pool poolname [ lifetime { valid-lifetime | preferred-lifetime } ]
no prefix-delegation pool poolname
Parameter
Parameter
Description
Description
poolname
Sets the local prefix pool name.
lifetime
Sets the lifetime of the address prefix allocated to the client.
With the keyword lifetime configured, both parameters valid-lifetime and
Command Reference
DHCPv6 Commands
preferred-lifetime shall be configured.
Defaults
valid-lifetime
Sets the valid lifetime of using the allocated address prefix for the client.
preferred-lifetime
Sets the preferred lifetime of the address prefix allocated to the client.
By default, no address prefix pool is specified.
The default valid-lifetime is 3600s(1 hour).
The default preferred-lifetime is 3600s(1 hour).
Command
DHCPv6 pool configuration mode
Mode
Usage Guide
Use the prefix-delegation pool command to set the prefix pool for the DHCPv6 Server and allocate
the prefix to the client. Use the ipv6 local pool command to set the prefix pool.
The Server attempts to allocate a usable prefix from the prefix pool to the client upon receiving the
prefix request from the client. That prefix will be allocated to other clients if the client no longer uses
that prefix again.
Configuration
The following example specifies the local prefix pool for the DHCPv6 server.
Examples
Ruijie(config-dhcp)# prefix-delegation pool client-prefix-pool lifetime 2000
1000
Related
Command
Description
Commands
ipv6 dhcp pool
Sets a DHCPv6 pool.
ipv6 local pool
Sets a local prefix pool.
Statically binds the client with the address
prefix-delegation
prefix.
Displays the DHCPv6 pool information.
show ipv6 dhcp pool
Platform
N/A
Description
5.18 show ipv6 dhcp
Use this command to display the device DUID.
show ipv6 dhcp
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode/Interface configuration mode/Global configuration mode
Mode
Command Reference
DHCPv6 Commands
Usage Guide
The server, client and relay on the same device share a DUID.
Configuration
The following example displays the device DUID.
Examples
Ruijie# show ipv6 dhcp
This device's DHCPv6 unique identifier(DUID): 00:03:00:01:00:d0:f8:22:33:b0
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
5.19 show ipv6 dhcp binding
Use this command to display the address binding information for the DHCPv6 server.
show ipv6 dhcp binding [ ipv6-address ]
Parameter
Parameter
Description
Description
ipv6-address
Sets the IPv6 address or the prefix.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
If the ipv6-address is not specified, all prefixes dynamically assigned to the client and IANA address
binding information are shown. If the ipv6-address is specified, the binding information for the
specified address is shown.
Configuration
The following example displays the address binding information for the DHCPv6 server.
Examples
Ruijie# show ipv6 dhcp binding
Client DUID: 00:03:00:01:00:d0:f8:22:33:ac
IAPD: iaid 0, T1 1800, T2 2880
Prefix: 2001:20::/72
preferred lifetime 3600, valid lifetime 3600
expires at Jan 1 2008 2:23 (3600 seconds)
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
Command Reference
DHCPv6 Commands
5.20 show ipv6 dhcp conflict
Use this command to display the DHCPv6 address conflicts.
show ipv6 dhcp conflict
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays the DHCPv6 address conflicts.
Examples
Ruijie# show ipv6 dhcp conflict
2008:50::2
declined
2108:50::2
declined
2008:50::3
declined
2008:50::4
declined
2108:50::4
declined
2008:50::5
declined
Related
Command
Description
Commands
clear ipv6 dhcp conflict
Clears address conflicts.
Platform
N/A
Description
5.21 show ipv6 dhcp interface
Use this command to display the DHCPv6 interface information.
show ipv6 dhcp interface [ interface-name ]
Parameter
Parameter
Description
Description
interface-name
Sets the interface name.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Command Reference
Usage Guide
DHCPv6 Commands
If the interface-name is not specified, all DHCPv6 interface information isdisplayed. If the
interface-name is specified, the specified interface information is displayed.
Configuration
The following example displays the server-based DHCPv6 interface information.
Examples
Ruijie# show ipv6 dhcp interface
VLAN 1 is in server mode
Server pool dhcp-pool
Rapid-Commit: disable
The following example displays the client-based DHCPv6 interface information.
Ruijie# show ipv6 dhcp interface
FastEthernet 0/1 is in client mode
Rapid-Commit: disable
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
5.22 show ipv6 dhcp pool
Use this command to display the DHCPv6 pool information.
show ipv6 dhcp pool [ poolname ]
Parameter
Parameter
Description
Description
poolname
Defines the DHCPv6 pool name.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
If the poolname is not specified, all DHCPv6 interface information isdisplayed. If the poolname is
specified, the specified interface information is displayed.
Configuration
The following example displays the DHCPv6 pool information.
Examples
Ruijie# show ipv6 dhcp pool
DHCPv6 pool: dhcp-pool
DNS server: 2011:1::1
DNS server: 2011:1::2
Domain name: example.com
Command Reference
DHCPv6 Commands
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
5.23 show ipv6 dhcp relay destination
Use this command to display the destination information about DHCPv6 Relay Agent.
show ipv6 dhcp relay destination { all | interface-type interface-number }
Parameter
description
Parameter
Description
Displays information about all configured destination addresses and
all
relay exits.
interfaceinterface-type
Displaysthe relay destination address and relay exit configured for a
interface-number
specified interface.
Defaults
N/A
Command
Privileged EXEC mode
mode
Usage
Use this command to show the relay destination address to which DHCPv6 packets sent from a client
guideline
are forwarded through a specified relay exit (optional) by an interface for which the relay function has
been enabled by Relay Agent.
Examples
The following example displays all the relay destination addresses.
Ruijie# show ipv6 dhcp relay destination all
Interface: Vlan1
//interface for which the relay function has been enabled
Destination address(es)
Output Interface
3001::2
FF02::1:2
//specified destination address
relay exit
Related
Command
Description
commands
N/A
N/A
Platform
description
N/A
Vlan2
//specified
Command Reference
DHCPv6 Commands
5.24 show ipv6 dhcp relay statistics
Use this command to display the packet sending and receiving condition with the DHCPv6 Relay
function enabled.
show ipv6 dhcp relay statistics
Parameter
Parameter
Description
Description
N/A.
N/A.
Defaults
N/A.
Command
Privileged EXEC mode
Mode
Usage Guide
N/A.
Configuration
The following example displays the packet sending and receiving condition with the DHCPv6 Relay
Examples
function enabled.
Ruijie# show ipv6 dhcp relay statistics
Packets dropped
Error
: 2
: 2
Excess of rate limit
Packets received
: 0
: 28
SOLICIT
: 0
REQUEST
: 0
CONFIRM
: 0
RENEW
: 0
REBIND
: 0
RELEASE
: 0
DECLINE
: 0
INFORMATION-REQUEST
: 14
RELAY-FORWARD
: 0
RELAY-REPLY
: 14
Packets sent
: 16
ADVERTISE
: 0
RECONFIGURE
: 0
REPLY
RELAY-FORWARD
RELAY-REPLY
: 8
: 8
: 0
Related
Command
Description
Commands
clear ipv6 dhcp relay statistics
Clears the statistical information.
Platform
N/A
Command Reference
DHCPv6 Commands
Description
5.25 show ipv6 dhcp server statistics
Use this command to display the DHCPv6 server statistics.
show ipv6 dhcp server statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
This command is used to display the DHCPv6 server statistics.
Command Reference
DHCPv6 Commands
Configuration
The following example displays the DHCPv6 server statistics.
Examples
Ruijie# show ipv6 dhcp server statistics
DHCPv6 server statistics:
Packet statistics:
DHCPv6 packets received:
7
Solicit received:
7
Request received:
0
Confirm received:
0
Renew received:
0
Rebind received:
0
Release received:
0
Decline received:
0
Relay-forward received:
0
Information-request received:
0
Unknown message type received:
0
Error message received:
0
DHCPv6 packet sent:
0
Advertise sent:
0
Reply sent:
0
Relay-reply sent:
0
Send reply error:
0
Send packet error:
0
Binding statistics:
Bindings generated:
0
IAPD assigned:
0
IANA assigned:
0
Configuration statistics:
DHCPv6 server interface:
1
DHCPv6 pool:
0
DHCPv6 iapd binding:
0
Related
Command
Description
Commands
ipv6 dhcp pool
Sets a DHCPv6 pool.
Platform
N/A
Description
5.26 show ipv6 local pool
Use this command to display the local prefix pool configuration and usage.
Command Reference
DHCPv6 Commands
show ipv6 local pool [poolname ]
Parameter
Parameter
Description
Description
poolname
The local prefix pool name
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
This command is used to display the local prefix pool configuration and usage.
Configuration
The following example displays all local prefix pool information.
Examples
Ruijie#show ipv6 local pool
Pool
Free
Prefix
In use
client-prefix-pool
65536
0
2001:db8::/64
Field
Description
Pool
The local address pool name.
Prefix
The prefix and prefix length.
Free
The available prefix.
In use
The prefix in use.
The following example displays the information about the specified local prefix pool.
Ruijie#show ipv6 local pool client-prefix-pool
Prefix is 2001:db8::/64 assign /80 prefix
1 entries in use, 65535 available
Prefix
Interface
2001:db8::/80
GigabitEthernet 0/0
Filed
Description
Prefix
The assigned prefix and prefix length.
Interface
The assigning interface.
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
Command Reference
DNS Commands
6 DNS Commands
6.1 clear host
Use this command to clear the dynamically learned host name.
clear host [ * | host-name ]
Parameter
Description
Parameter
Description
host-name
Deletes the specified dynamic domain name buffer.
*
Deletes all dynamic domain name buffer.
Defaults
N/A
Command
Privileged EXEC mode.
Mode
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(config)#clear host *
Related
Commands
Platform
Command
Description
show hosts
Displays the host name buffer table.
N/A
Description
6.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
Description
Parameter
Description
Command Reference
N/A
DNS Commands
N/A
Defaults
This function is enabled by default.
Command
Global configuration mode.
Mode
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
Commands
Command
Description
Displays the DNS related configuration
show hosts
Platform
information.
N/A
Description
6.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
Description
Parameter
Description
host-name
The host name of the equipment
ip-address
The IP address of the equipment
Defaults
N/A
Command
Global configuration mode.
Mode
Usage Guide
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
Command Reference
DNS Commands
Commands
Show the DNS related configuration
show hosts
Platform
information.
N/A
Description
6.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 { ip-address | ipv6-address }
no ip name-server
Parameter
Description
[ ip-address | ipv6-address ]
Parameter
Description
ip-address
The IP address of the domain name server.
ipv6-address
The IPv6 address of the domain name server.
Defaults
No domain name server is configured by default.
Command
Global configuration mode.
Mode
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
The following example configures the IPv4 domain name server and IPv6 domain name server.
Examples
Ruijie(config)# ip name-server 192.168.5.134
Ruijie(config)# ip name-server 2001:0DB8::250:8bff:fee8:f800
2001:0DB8:0:f004::1
Related
Commands
Command
show hosts
Platform
Description
N/A
Description
Displays the DNS related configuration
information.
Command Reference
DNS Commands
6.5 ipv6 host
Use this command to configure the mapping of the host name and the IPv6 address by manual. Use
the no form of the command to remove the host list.
ipv6 host host-name ipv6-address
no ipv6 host host-name ipv6-address
Parameter
Description
Parameter
Description
host-name
The host name of the equipment
ipv6-address
The IPv6 address of the equipment
Defaults
N/A
Command
Global configuration mode.
Mode
Usage Guide
Configuration
The following example configures the IPv6 address for the domain name.
Examples
Ruijie(config)# ipv6 host switch 2001:0DB8:700:20:1::12
Related
Commands
Command
Description
Displays the DNS related configuration
show hosts
Platform
information.
N/A
Description
6.6 show hosts
Use this command to display DNS configuration.
show hosts [ hostname ]
Parameter
Description
Parameter
Description
hostname
Displays the specified domain name information,
Defaults
N/A
Command
Global configuration mode
Mode
Command Reference
DNS Commands
Usage Guide
This command is used to display the DNS related configuration information.
Configuration
Ruijie# show hosts
Examples
Name servers are:
192.168.5.134 static
Host
type
Address
TTL(sec)
switch
static
192.168.5.243
---
www.ruijie.com
dynamic
192.168.5.123
126
Field
Description
Name servers
Domain name server
Host
Domain name
type
Resolution type:
Static resolution and dynamic resolution.
Address
IP address corresponding to the domain name
TTL
TTL of entries corresponding to the domain
name/IP address.
Related
Commands
Command
ip host
ipv6 host
ip name-server
Platform
Description
N/A
Description
Configures the host name and IP address
mapping by manual.
Configures the host name and IPv6 address
mapping by manual.
Configures the DNS server.
Command Reference
FTP Server Commands
7 FTP Server Commands
7.1 ftp-server enable
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
Description
Parameter
Description
N/A
N/A
Defaults
This function is disabled by default.
Command
Global configuration mode
Mode
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:
Ruijie(config)# ftp-server topdir /syslog
Ruijie(config)# ftp-server enable
The following example disables the FTP Server:
Ruijie(config)# no ftp-server enable
Related
Commands
Platform
Description
Command
Description
N/A
N/A
N/A
Command Reference
FTP Server Commands
7.2 ftp-server login timeout
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
Description
Parameter
Description
time
Sets the timeout interval for login to the FTP server, in the range from
1 to 30 in the unit of minutes.
Defaults
The default is 2 minutes.
Command
Global configuration mode
Mode
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
The following example restores the default setting.
Ruijie(config)# no ftp-server login timeout
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
7.3 ftp-server login times
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
Command Reference
Parameter
Description
FTP Server Commands
Parameter
Description
time
Sets the number of login attempts, in the range from 1 to 10.
Defaults
The default is 3.
Command
Global configuration mode
Mode
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.
Configuration
The following example sets the number of login attempts to 5.
Examples
Ruijie(config)# ftp-server login times 5
The following example restores the default setting.
Ruijie(config)# no ftp-server login times
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
7.4 ftp-server password
Use this command to set a password for server login. Use the no or default form of this command to
restore the default setting.
ftp-server password [type] password
no ftp-server password
default ftp-server password
Parameter
Description
Parameter
type
password
Description
0 indicates that the password is not encrypted (plaintext) and 7
indicates that the password is encrypted (cipher text).
Indicates a password.
Command Reference
Defaults
No password is configured by default.
Command
Global configuration mode.
FTP Server Commands
Mode
Usage Guide
Only one passwords can be configured.
A password consists of only letters or digits. Spaces at the beginning and end of the password are
ignored. Spaces inside the password are viewed as part of the password.
A plaintext password consists of 1 to 25 characters. A cipher text password consists of 4 to 52
characters.
User names and passwords must match. A maximum of 10 users can be configured.
Configuration
The following example sets the password for server login to “pass” in plaintext.
Examples
Ruijie(config)# ftp-server password pass
The following example sets the password for server login to “8001” in cipher text.
Ruijie(config)# ftp-server password 7 8001
The following example restores the default setting.
Ruijie(config)# no ftp-server password
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
7.5 ftp-server topdir
Use this command to set the directory range for the FTP client to access to the FTP server files. Use
the no or default form of this command to restore the default setting.
ftp-server topdir directory
no ftp-server topdir
default ftp-server topdir
Command Reference
Parameter
Description
FTP Server Commands
Parameter
Description
directory
Sets the top-directory.
Defaults
No top-directory is configured by default.
Command
Global configuration mode.
Mode
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.
Ruijie(config)# ftp-server topdir /syslog
Ruijie(config)# ftp-server enable
The following example restores the default setting.
Ruijie(config)# no ftp-server topdir
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
7.6 ftp-server timeout
Use this command to set the FTP session idle timeout. Use the no or default form of this command
to restore the default setting.
ftp-server timeout time
no ftp-server timeout
default ftp-server timeout
Parameter
Description
Parameter
time
Defaults
The default is 10 minutes.
Description
Sets the session idle timeout, in the range from 1 to 3600 in the unit of
minutes.
Command Reference
Command
FTP Server Commands
Global configuration mode.
Mode
Usage Guide
Use this command to set the FTP session idle timeout. If the session is idle, the FTP server deems
the session connection is invalid and disconnects with the user.
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 mimutes:
Examples
Ruijie(config)# ftp-server timeout 5
The following example restores the default setting.
Ruijie(config)# no ftp-server timeout
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
7.7 ftp-server username
Use this command to set the login username for the FTP server. Use the no form of this command to
restore the default setting.
ftp-server username username
no ftp-server username
default ftp-server username
Parameter
Description
Parameter
Description
username
Sets the login username.
Defaults
No username is set by default.
Command
Global configuration mode
Mode
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
Command Reference
FTP Server Commands
username can be configured for the FTP server at most.
The anonymous user login is not supported on the FTP server. The client fails to pass the identity
verification if the username is removed.
Configuration
The following example sets the username to user:
Examples
Ruijie(config)# ftp-server username user
The following example restores the default setting:
Ruijie(config)# no ftp-server username
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
7.8 show ftp-server
Use this command to show the status information of the FTP server.
show ftp-server
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
The FTP server status information includes:
Enabled/Disabled server
The FTP server top directory
Configuration
The following example displays the related status information of the FTP server:
Examples
Ruijie# show ftp-server
ftp-server information
=======================================
enable : Y
topdir : /
timeout: 20min
username config : Y
Command Reference
FTP Server Commands
password config : Y
type: BINARY
control connect : Y
ftp-server: ip=192.167.201.245 port=21
ftp-client: ip=192.167.201.82 port=4978
port data connect : Y
ftp-server: ip=192.167.201.245 port=22
ftp-client: ip=192.167.201.82 port=4982
passive data connect : N
Related
Commands
Platform
Description
Command
Description
N/A
N/A
N/A
Command Reference
FTP CLIENT Commands
8 FTP CLIENT Commands
8.1 default ftp-client
Use this command to resort the default FTP client setting.
default ftp-client
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Global configuration mode
Mode
Usage Guide
This command is used to restore the FTP client setting. Specifically, data connection is in PASV
mode and file transfer BINARY. The client source IP address is not bound.
Configuration
The following example restores the default FTP client setting.
Examples
Ruijie(config)# default ftp-client
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
8.2 ftp-client ascii
Use this command to use ASCII mode for FTP transfer.
Use the no form of this command to restore the default setting.
ftp-client ascii
no ftp-clientascii
Parameter
Description
Parameter
Description
N/A
N/A
Command Reference
FTP CLIENT Commands
Defaults
The default FTP transfer mode is binary.
Command
Global configuration mode
Mode
Usage Guide
N/A
Configuration
The following example configures ASCII FTP transfer.
Examples
Ruijie (config)# ftp-client ascii
The following example configures binary FTP transfer.
Ruijie(config)# no ftp-client ascii
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
8.3 ftp-client port
Use this command to configure PORT mode used for FTP data connection. Use the no form of this
command to restore the default setting.
ftp-client port
no ftp-client port
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
The default is PASV mode for FTP data connection.
Command
Global configuration mode.
Mode
Usage Guide
This command is used to configure the connection mode to PORT mode, in which the server will
actively connect with the client.
Configuration
The following example configures PORT mode used for FTP data connection
Examples
Ruijie (config)# ftp-client port
The following example configures PASV mode for FTP data connection.
Ruijie(config)# no ftp-client port
Command Reference
Related
Commands
Platform
FTP CLIENT Commands
Command
Description
N/A
N/A
N/A
Description
8.4 ftp-client source-address
Use this command to bind FTP Client with the source IP address of client and use this IP address to
communicate with server. Use the no form of this command to disable source IP address binding.
Use the default form of this command to restore the default setting.
ftp-client source-address {ip-address | ipv6-address}
no ftp-client source-address
Parameter
Description
Parameter
Description
ip-address
The IPv4 address of the local interface.
ipv6-address
The IPv6 address of the local interface.
Defaults
By default, the IP address is not bound with the client locally. Instead, it is selected by the route.
Command
Global configuration mode
Mode
Usage Guide
N/A
Configuration
The following example binds FTP Client with source IP address 192.168.23.236.
Examples
Ruijie(config)# ftp-client source-address 192.168.23.236
The following example binds FTP Client with source IP address 2003:0:0:0::2.
Ruijie(config)# ftp-client source-address 2003:0:0:0::2
The following example disables source IP address binding.
Ruijie(config)# no ftp-client source-address
Related
Commands
Platform
Description
Command
Description
N/A
N/A
N/A
Command Reference
FTP CLIENT Commands
8.5 copy ftp
Use this command to download the file from the server to the device through FTP Client.
copy ftp://username:password@dest-address [ /remote-directory ] / remote-file
flash:[ local-directory/ ] local-file]
Parameter
Description
Parameter
username
password
dest-address
Description
The username for logging into FTP Server. It is limited to 40 bytes
and must not contain ":", "@", "/" and space, neither can it be omitted.
The password for logging into FTP Server. It is limited to 32 bytes and
must not contain ":", "@", "/" and space, neither can it be omitted.
IP address of the target FTP Server.
File directory of FTP Server. It is optional and limited to 255 bytes. No
remote-directory
space or Chinese character is supported. If left blank, it implies the
current directory of FTP server.
remote-file
Filename on the remote server. It is limited to 255 bytes and doesn't
support space or Chinese character.
Directory of local folder (optional). If this directory is specified, this
directory must have been created beforehand. This command doesn't
local-directory
support automatic directory creation. If left blank, it implies the current
directory on the local device. It is limited to 255 bytes and doesn't
support space or Chinese characters.
local-file
Defaults
N/A
Command
Privileged EXEC mode
Filename on the local device. It is limited to 255 bytes and doesn't
support space or Chinese character.
Mode
Usage Guide
N/A
Configuration
The following example uses username of "user" and password of "pass" to download a file named
Examples
"remote-file" from the directory "root" on FTP Server with IP address 192.168.23.69 to directory
"home" on the local device, and changes the name to "local-file".
Ruijie# copy ftp://user:pass@192.168.23.69/root/remote-file
flash:home/local-file
The following example uploads a file named “local file” from the directory "home" on the local device
to the directory "root" on FTP Server, and changes the name to “remote-file”.
Ruijie# copy flash:home/local-file
ftp://user:pass@192.168.23.69/root/remote-file
Command Reference
Related
Commands
Platform
FTP CLIENT Commands
Command
Description
copy tftp
Uses the TFTP protocol to transfer files.
N/A
Description
8.6 copy flash
Use this command to upload the file from the server to the device through FTP Client.
copy flash:[ local-directory/ ] local-file ftp://username:password@dest-address [ /remote-directory ] /
remote-file
Parameter
Description
Parameter
username
password
dest-address
Description
The username for logging into FTP Server. It is limited to 40 bytes
and must not contain ":", "@", "/" and space, neither can it be omitted.
The password for logging into FTP Server. It is limited to 32 bytes and
must not contain ":", "@", "/" and space, neither can it be omitted.
IP address of the target FTP Server.
File directory of FTP Server. It is optional and limited to 255 bytes. No
remote-directory
space or Chinese character is supported. If left blank, it implies the
current directory of FTP server.
remote-file
Filename on the remote server. It is limited to 255 bytes and doesn't
support space or Chinese character.
Directory of local folder (optional). If this directory is specified, this
directory must have been created beforehand. This command doesn't
local-directory
support automatic directory creation. If left blank, it implies the current
directory on the local device. It is limited to 255 bytes and doesn't
support space or Chinese characters.
local-file
Defaults
N/A
Filename on the local device. It is limited to 255 bytes and doesn't
support space or Chinese character.
Command Reference
Command
FTP CLIENT Commands
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example uploads the file named "local-file" in directory "home" of local device to
Examples
directory "root" on the FTP Server whose user name is user, password is pass and IP address is
192.168.23.69, and changes the filename to "remote-file".
Ruijie# copy flash:home/local-file
ftp://user:pass@192.168.23.69/root/remote-file
Related
Commands
Platform
Description
Command
Description
N/A
N/A
N/A
Command Reference
Tunnel Commands
9 Tunnel Commands
9.1 keepalive
Use this command to enable the keepalive function and configure the keepalive packet sending
interval and retransmission times.
Use the no form of this command to restore the default setting.
keepalive[ seconds [ retries ] ]
nokeepalive
Parameter
Description
Parameter
seconds
retries
Description
Sets the interval at which keepalive packets are sent, in the range
from 1 to 32,767 in the unit of seconds. The default is 10 seconds.
Sets the keepalive packet transmission times, in the range from 1
to 255. The default is 3. If no response is received after the
specified times, the protocol is switched to down.
Defaults
This function is disabled by default.
Command
Interface configuration mode
Mode
Usage Guide
This command is used to detect the reachability of the tunnel interface in case that the tunnel packets
cannot be sent to the peer end while the physical interface is UP.
Configuration
The following example creates a tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if)# tunnel mode ipv6ip
The following example enables the keepalive function.
Ruijie(config-if)# keepalive
Related
Command
Description
Commands
N/A
N/A
Platform
Description
9.2 show interfaces tunnel
Use this command to display the tunnel configuration.
Command Reference
Tunnel Commands
show interfaces tunnel [ number ]
Parameter
Parameter
Description
number
Specifies the tunnel number.
Description
Defaults
N/A
Command
Mode
Privileged EXEC mode/Global configuration mode/Interface configuration mode
Usage Guide
N/A
Configuration
The following example displays tunnel 1 information.
Examples
Ruijie#showinterfaces tunnel 1
// Here is the public information about the interface
Tunnel source 1.1.1.2, destination 1.1.1.1, routeable
Tunnel TOS/Traffic Class not set, Tunnel TTL 254
Tunnel config nested limit is 0, current nested number is 0
Tunnel protocol/transport is ipv6ip
Tunnel transport VPN is no set
Field Description
Field
Description
Destination
The tunnel destination address. The address
0.0.0.0 indicates that the destination address is
not configured.
Tunnel source
The tunnel source address, which can be either
an IPv4 or an IPv6 address. If the tunnel
source interfacecommand is configured, the
tunnel source address is the interface address.
Tunnel TTL
The TTL or hop limit field of the transmission
protocol.
Tunnel TOS
The TOS or traffic class field of the
transmission protocol. Note that there is an
exception. If the field is 0, and the transmission
protocol is the same as the payload protocol,
the field of the payload protocol is copied to the
transmission protocol.
Tunnel nested-limit
The limit to the number of tunnel nested
encapsulation times. This filed is displayed by
all tunnels except the 6to4, 6rd and isatap
tunnels.
Tunnel protocol/transport
Tunnel encapsulation mode
Key
With the key setting, this field is displayed by
Command Reference
Tunnel Commands
only the GRE tunnel.
Checksuming
With the checksum setting, this filed is
displayed by only the GRE tunnel.
Tunnel VPN
Related
Commands
The destination VRF.
Command
Description
N/A
N/A
Platform
Description
N/A
9.3 show tunnel statistics
Use this command to display the number of configurable tunnel interfaces and configured tunnel
interfaces.
show tunnel statistics
Parameter
Parameter
Description
N/A
N/A
Description
Defaults
N/A
Command
Mode
Privileged EXEC mode/Global configuration mode/Interface configuration mode
Usage Guide
This command is used to display the number of configurable tunnel interfaces and configured tunnel
interfaces.
Configuration
The following example displays the number of configurable tunnel interfaces and configured tunnel
Examples
interfaces.
Ruijie#show tunnel statistics
used: 2, limit: 1000
Related
Commands
Command
Description
N/A
N/A
Platform
Description
N/A
Command Reference
Tunnel Commands
9.4 tunnel checksum
Use this command to enable data integrity check on the tunnel interface.
Use the no form of this command to restore the default setting.
tunnel checksum
no tunnel checksum
Parameter
Parameter
Description
N/A
N/A
Description
Defaults
This function is disabled by default.
Command
Mode
Interface configuration mode
Usage Guide
This command is applied on the Generic Route Encapsulation (GRE) interfaces. Some encapsulation
protocols add media-attached checksum to the end of packets. The data integrity check should be
performed on the tunnel interface as well and the damaged packets are discarded directly.
Configuration
The following example creates the tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if)# tunnel mode gre ip
The following example enables data integrity check.
Ruijie(config-if)# tunnel checksum
Related
Commands
Command
N/A
Description
N/A
Platform
Description
N/A
9.5 tunnel destination
Use this command to specify the destination IP address of a tunnel interface in interface configuration
mode.
Use the no form of this command to restore the default setting.
tunnel destinationip-address
no tunnel destination
Parameter
Parameter
Description
Command Reference
Tunnel Commands
Description
ip-address
Defaults
No destination IP address is set by default.
Command
Interface configuration mode
Sets the IP address of the specified tunnel destination.
Mode
Usage Guide
This command must be used to specify the peer address during tunnel setup. Tunnels cannot be set
up if this command is not executed.
Configuration
The following example creates a tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if)# tunnel mode gre ip
The following example sets the destination IP address of tunnel interface.
Ruijie(config-if)# tunnel destination61.154.101.3
Related
Commands
Command
Description
show interface tunnel
Displays tunnel interface information.
Platform
Description
N/A
9.6 tunnel key
Use this command to set the security key on a tunnel interface. The value of the tunnel keyword is an
integer. Use the no form of this command to restore the default setting.
tunnel key value
no tunnel key
Parameter
Description
Defaults
Parameter
Description
value
Tunnel key value, in the range from 0 to 2,147,483,647.
No key configuration is setby default.
Command
Mode
Interface configuration mode
Usage Guide
Without key protection, illegal intrusion or packet attack may occur during tunnel setup. This
Command Reference
Tunnel Commands
command takes effect only when the GRE is encapsulated.
Configuration
The following example creates a tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if)# tunnel mode gre ip
The following example sets the key of tunnel interface.
Ruijie(config-if)# tunnel key 1234
Related
Commands
Command
Description
show interface tunnel
Displays tunnel interface information.
Platform
Description
N/A
9.7 tunnel mode
Use this command to set the encapsulation mode on a tunnel interface.
Use the no or default form of this command to restore to the default setting.
tunnel mode { gre ip | ipv6ip [ 6to4 | isatap ] }
no tunnel mode
default tunnel mode
Parameter
Description
Parameter
Description
gre ip
The transmission network is IPv4 network, and GRE for the route is at
the IP layer.
ipv6ip
The transmission network is IPv4 network, and GRE for the route is
not at the IP layer.
The user network is manually configured IPv6 network. The IPv4
address of the peer end needs to be configured.
ipv6ip 6to4
The transmission network is IPv4 network, and GRE for the route is
not at the IP layer.
The user network is IPv6 network. The IPv4 address of the peer end
does not need to be configured. It is used for connection between IPv6
networks.
ipv6ip isatap
The transmission network is IPv4 network, and GRE for the route is
not at the IP layer.
The user network is IPv6 network. The IPv4 address of the peer end
does not need to be configured. It is used for quick deployment of IPv6
networks.
Command Reference
Defaults
ipv6ip.
Command
Interface configuration mode
Tunnel Commands
Mode
Usage Guide
The tunnel encapsulation format is the tunnel carrier protocol. The default encapsulation format of
tunnel interfaces is GRE. You can determine the encapsulation format of tunnel interfaces based on
the actual usage. By default, IP tunnel GRE can be implemented without any definition of the
encapsulation format.
Configuration
The following example creates a tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if-Tunnel 1)# tunnel mode ipv6ip
Related
Commands
Platform
Description
Command
Description
show interface tunnel
Displays tunnel interface information.
N/A
9.8 tunnel nested-limit
Use this command to set the maximum number of nested encapsulation layers on a tunnel
interface.Use the no form of this command to restore the default setting.
tunnel nested-limit num
no tunnel nested-limit
Parameter
Parameter
Description
num
Defaults
Description
Maximum number of nested encapsulation layers on a tunnel
interface, in the range from 0 to 10
The default is 4.
Command
Mode
Tunnel interface configuration mode
Usage Guide
Tunnel nested encapsulation indicates that packets are sent after multiple-layer tunnel encapsulation
on the local device. The route change on the local device may lead to unlimited tunnel nested
encapsulation, which causes continuous fragmentation and re-combination on routers and has
serious performance impact. RGOS can automatically prevent unlimited nested encapsulation. The
Command Reference
Tunnel Commands
maximum number of nested encapsulation layers is four by default. You can use this command to
change the default value at the inner layer of a tunnel interface.
Configuration
The following example creates a tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if-Tunnel 1)# tunnel mode ipv6ip
The following example sets the maximum number of GRE nested encapsulation layers to five.
Ruijie(config-if)# tunnel nested-limit 5
Related
Command
Description
show interface tunnel
Displays tunnel interface information.
Commands
Platform
Description
N/A
9.9 tunnel path-mtu-discovery
Use this command to enable the PMTUD function for the tunnel.
Use theno form of this command to restore the default setting.
tunnel path-mtu-discovery [age-timer{aging-mins | infinite } | min-mtumtu-bytes]
notunnel path-mtu-discovery
Parameter
Parameter
Description
Description
aging-mins
(Optional) Sets MTU aging time, in the range from 1 to 30 in the
unit of minutes. The default is 10. Infinite indicates no aging.
mtu-bytes
(Optional) Sets the minimum MTU size, in the range from 92
to65,535 in the unit of bytes. The default is 92.
Defaults
This function is disabled by default.
Command
Interface configuration mode
Mode
Usage Guide
This command is used to detect the Path MTU of the peer end automatically and modify the MTU of
the tunnel interface accordingly, avoiding packet fragmentation.
If you run the showinterfacetunnel command, one of the following three states is displayed:
PathMTUDiscoverystate:init
PathMTUDiscoverystate:keep
PathMTUDiscoverystate:learning
Command Reference
Tunnel Commands
When the command is just configured, the state is init.
When the probe packets are sent for learning, the state is learning and learning packets are sent.
When the MTU does not change after five probe packets are sent consecutively, the state turns to
keep and keep packets are sent.
Configuration
The following example creates the tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configured the tunnel mode.
Ruijie(config-if)# tunnel mode gre ip
The following example enables the PMTUD function.
Ruijie(config-if)# tunnel path-mtu-discovery
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
9.10 tunnel source
Use this command to configure the source IP address for the tunnel.
Use the no form of this command to restore the default setting.
tunnel source { ip-address | interface-type interface-number }
no tunnel source
Parameter
Description
Parameter
ip-address
Description
Source IP address of the tunnel used as the source IP address of the packets to
be transmitted through the tunnel.
interface-type
Interface referenced by the tunnel, which will be used as the source IP address
interface-number
of the packets to be transmitted through the tunnel.
Defaults
No tunnel source address is configured by default.
Command
Interface configuration mode.
Mode
Usage Guide
The source IP address of a tunnel can be a specified IP address or an IP address of an interface.
When you configure an auto tunnel (for example, 6to4 and isatap), it is recommended to specify the
source address.
A device shall not be configured multiple tunnels with the same encapsulation type, source address
and destination address.
If there are multiple auto tunnels, their source addresses shall be different.
Command Reference
Tunnel Commands
Configuration
The following example creates a tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if-Tunnel 1)# tunnel mode ipv6ip
The following example configures an IPv6 manual tunnel.
Ruijie(config-if)# tunnel source 1.1.1.1
Related
Command
Description
Commands
tunnel mode
Configures the mode of a tunnel.
tunnel destination
Configures the destination address of a tunnel.
Tunnel ttl
Configures the TTL of the tunnel.
Platform
N/A
Description
9.11 tunnel tos
Use this command to set the IPv4 ToS byte or IPv6 traffic class 8 bits fin tunnel intefface
configruation mode. Use the no form of this command to restore the default setting.
tunnel tos number
no tunnel tos
Parameter
Parameter
Description
Description
number
IPv4 ToS byte or IPv6 traffic class 8 bits, in the range from 0 to 255.
Defaults
By default, the inner-layer IPv4 ToS byte is copied to the outer-layer IPv4 header, if both the
inner-layer carrier and the outer-layer encapsulation on a tunnel interface use the IPv4 protocol. By
default, the inner-layer IPv6 traffic class 8 bits are copied to the outer-layer IPv6 header if both the
inner-layer carrier and the outer-layer encapsulation on a tunnel interface use the Ipv6 protocol.
In other circumstances, the outer-layer IPv4 ToS and IPv6 traffic class are 0.
Command
Mode
Interface configuration mode
Usage Guide
This command is used to set GRE tunnel packets to a higher priority.
Configuration
The following example sets the ToS byte for a GRE tunnel outer-layer encapsulation protocol to 20
Examples
on interface tunnel 1.
Ruijie(config)# interface tunnel 1
Ruijie(config-if)# tunnel mode ipv6ip
Ruijie(config-if)# tunnel tos 20
Command Reference
Tunnel Commands
Related
Command
Description
Commands
show interface tunnel
Displays tunnel interface information.
Platform
N/A
Description
9.12 tunnel ttl
Use this command to specify the TTL value of the IPv4 header in the encapsulated IPv6 messages.
Use theno form of this command to restore the default setting.
tunnel ttlhop-count
no tunnel ttl
Parameter
Parameter
Description
Description
hop-count
TTL value ranging from 1 to 255.
Defaults
The default is 255.
Command
Interface configuration mode
Mode
Usage Guide
This command is used to specify the TTL value of the IPv4 header in the encapsulated IPv6
messages.
Configuration
The following example creates a tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if-Tunnel 1)# tunnel mode ipv6ip
The following example sets the TTL value to 100.
Ruijie(config-if)# tunnel ttl 100
Related
Command
Description
Commands
tunnel mode
Configures the mode of a tunnel.
tunnel source
Configures the source IP address of the tunnel.
tunnel destination
Configures the destination IP address of a tunnel.
Platform
Description
N/A
Command Reference
Tunnel Commands
9.13 tunnel vrf
Use this command to configure the VRF to which the outer-layer addresses of a tunnel belong. The
VRF routing table is used to forward packets to the tunnel interface.
Use the no form of this command to restore the default setting.
tunnel vrf vrf-name
no tunnel vrf
Parameter
Parameter
Description
Description
vrf-name
Name of the tunnel out-layer VRF.
Defaults
The outer-layer source and destination addresses of a tunnel are global addresses.
Command
Interface configuration mode
Mode
Usage Guide
The outer-layer source and destination addresses of a tunnel must be in a VRF. If the specified VRF
does not include a route to the destination address, the tunnel interface is down.
Configuration
The following example creates a tunnel interface.
Examples
Ruijie(config)# interface tunnel 1
The following example configures the tunnel mode.
Ruijie(config-if-Tunnel 1)# tunnel mode ipv6ip
The following example sets the outer-layer VRF of a manually IPv6 over IPv4 tunnel.
Ruijie(config-if)# tunnel vrf VPN1
Related
Command
Description
Commands
tunnel mode
Configures the mode of a tunnel.
ip vrf
Configures an IPv4 VRF.
tunnel source
Configures the source IP address of the tunnel.
tunnel destination
Configures the destination IP address of a tunnel.
Platform
Description
N/A
Command Reference
Network Connectivity Test Tool Commands
10 Network Connectivity Test Tool Commands
10.1 clear rping table all
Use this command to clear Rping entries.
clear rping table [all | [ping-object owner test-name] | [trace-object owner test-name]]
Parameter
Description
Parameter
Description
owner
User index
test-name
Test index
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example clears all Rping entries.
Examples
Ruijie# clear rping table all
The following example clears the specified Rping entry.
Ruijie# clear rping table user ruijie
Related
Commands
Command
Description
N/A
N/A
N/A
Platform
Description
10.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 ] [address [ length length] [ ntimes times ] [ timeout seconds ] [ data data ] [ source source ]
[ df-bit ] [validate ] [ detail ] ]
Parameter
Descriptio
n
Parameter
Description
Command Reference
address
length
times
Network Connectivity Test Tool Commands
Specifies an IPv4 address.
Specifies the length of the packet to be sent (range:
36-18024, default: 100).
Specifies the number of packets to be sent (range:14294967295).
seconds
Specifies the timeout time (range: 1-10 seconds).
data
Specifies the data to fill in.
Specifies the source IPv4 address or the source interface.
source
The loopback interface address (for example: 127.0.0.1) is
not allowed to be the source address.
df-bit
validate
detail
Sets the DF bit for the IP address. DF bit=1 indicates not to
segment the datagrams. By default, the DF bit is 0.
Sets whether to validate the reply packets or not.
Sets whether to contain details in the echoed message. By
default, only “!” and “.” are displayed.
Defaults
Five packets with 100Byte in length are sent to the specified IP address within specified time (2s by default).
Command
Privileged EXEC mode: enables extended functions.
Mode
User EXEC mode: enables basic functions.
Usage
If the device can be pinged, the response information is displayed, and the statistics is listed at the end. For
Guide
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.
Configurat
The following example tests the connectivity of a network to locate the network connectivity problem.
ion
(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
The following example displays details.
Ruijie#ping 192.168.21.26 detail
Sending 5, 100-byte ICMP Echoes to 192.168.21.26, timeout is 2 seconds:
< press Ctrl+C to break >
Reply from 192.168.21.26: bytes=100 time=4ms TTL=64
Reply from 192.168.21.26: bytes=100 time=3ms TTL=64
Reply from 192.168.21.26: bytes=100 time=1ms TTL=64
Reply from 192.168.21.26: bytes=100 time=1ms TTL=64
Reply from 192.168.21.26: bytes=100 time=1ms TTL=64
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms.2
The following example tests the connectivity of a network to locate the network connectivity problem
Command Reference
Network Connectivity Test Tool Commands
(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
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=2ms 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
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
Reply from 192.168.21.26: bytes=1500 time=3ms 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
Success rate is 100 percent (20/20), round-trip min/avg/max = 1/1/3 ms
Related
Command
Command
Description
N/A
N/A
s
Platform
Descriptio
n
N/A
Command Reference
Network Connectivity Test Tool Commands
10.3 ping ipv6
Use this command to test the connectivity of a network to locate the network connectivity problem. The
command format is as follows:
ping [ipv6] [ip-address [length length] [ntimes times] [timeout seconds] [data data] [source source] [detail]
Parameter
Descriptio
Parameter
Description
Ip-address
Specifies an IPv6 address.
n
length
Specifies the length of the packet to be sent (range: 36-18024, default:
100).
times
Specifies the number of packets to be sent (range:1-4294967295).
seconds
Specifies the timeout time (range: 1-10 seconds).
data
Specifies the data to fill in.
Specifies the source IPv6 address or the source interface. The
source
loopback interface address (for example: 127.0.0.1) is not allowed to
be the source address.
detail
Defaults
Sets whether to contain details in the echoed message. By default,
only “!” and “.” are displayed.
Five packets with 100Byte in length are sent to the specified IP address within specified time 2 seconds by
default
Command
Privileged EXEC mode: enables extended functions.
Mode
User EXEC mode: enables basic functions.
Usage
If the device can be pinged, the response information is displayed, and the statistics is listed at the end. If the
Guide
response data does not match the request data, a ‘Request receive error.’ message is displayed and the
statistics is listed in the end. For the extension functions of ping ipv6, 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.
Configurat
The following example tests the connectivity of a network to locate the network connectivity problem.
ion
(regular ping) Ruijie# ping ipv6 2001::5
Examples
Sending 5, 100-byte ICMP Echoes to 2001::5, 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
The following example displays details.
Ruijie#ping 2001::1 detail
Command Reference
Network Connectivity Test Tool Commands
Sending 5, 100-byte ICMP Echoes to 2001::1, timeout is 2 seconds:
< press Ctrl+C to break >
Reply from 2001::1: bytes=100 time=1ms
Reply from 2001::1: bytes=100 time=1ms
Reply from 2001::1: bytes=100 time=1ms
Reply from 2001::1: bytes=100 time=1ms
Reply from 2001::1: bytes=100 time=1ms
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms.
The following example tests the connectivity of a network to locate the network connectivity problem
(extension ping).
Ruijie# ping ipv6 2001::5 length 1500 ntimes 100 data ffff source 2001::9 timeout
3
Sending 100, 1500-byte ICMP Echoes to 2000::1, 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.
Ruijie#ping 2001::5 length 1500 ntimes 10 data ffff source 2001::9 timeout 3
Sending 10, 1500-byte ICMP Echoes to 2001::5, timeout is 3 seconds:
< press Ctrl+C to break >
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Reply from 2001::5: bytes=1500 time=1ms
Success rate is 100 percent (10/10), round-trip min/avg/max = 1/1/1 ms.
Related
Command
Command
Description
N/A
N/A
s
Platform
Descriptio
n
N/A
Command Reference
Network Connectivity Test Tool Commands
10.4 show rping detail
Use this command to display Rping information.
show rping detail
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode/Global configuration mode/Interface configuration mode
Mode
Usage Guide
This command is used to display the Rping information such as numbers of test accounts and users.
Configuration
The following example displays Rping information.
Examples
Ruijie#show rping detail
Total owner number: 2
Total test number: 4
owner: user1
test name: taget_1
test name: taget_2
storage type: volatile
storage type: nonVolatile
owner: user2
test name: taget_1
test name: taget_2
Related
Commands
Platform
Description
storage type: permanent
storage type: readOnly
Field
Description
Total owner number
The number of users
Total test number
The number of Rping accounts
owner
Username
test name
Test name
storage type
Storage type
Command
Description
N/A
N/A
N/A
Command Reference
Network Connectivity Test Tool Commands
10.5 traceroute
Use this command to display all gateways passed by the test packets from the source address to the
destination address.
traceroute [ip] [adress [probe number ] [ source source ] [ timeout seconds ] [ ttl minimum
maximum ] ]
Parameter
Description
Parameter
Description
address
Specifies an IPv4 address.
number
Specifies the number of probe packets to be sent (range: 1-255).
Specifies the source IPv4 address or the source interface. The
source
loopback interface address (for example: 127.0.0.1) is not allowed to
be the source address.
seconds
Specifies the timeout time (range: 1-10 seconds).
minimum maximum
Specifies the minimum and maximum TTL values (range:1-255).
Defaults
By default, seconds is 3 seconds, number is 3, minimum and maximum are 1 and 255.
Command
Privileged EXEC mode: enables extended functions.
Mode
User EXEC mode: enables basic functions.
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
192.168.12.1
0 msec
0 msec
0 msec
2
192.168.9.2
4 msec
4 msec
4 msec
3
192.168.9.1
8 msec
8 msec
4 msec
4
192.168.0.10
4 msec
28 msec 12 msec
5
192.168.9.2
4 msec
4 msec
6
202.101.143.154
7
61.154.22.36
4 msec
12 msec 8 msec
12 msec 8 msec
24 msec
22 msec
From above result, it’s clear to know that the gateways passed by the packets sent to the host with an
IP address of 61.154.22.36 (gateways 1~6) and the spent time are displayed. Such information is
helpful for network analysis.
2. When some gateways in the network fail:
Command Reference
Network Connectivity Test Tool Commands
Ruijie# traceroute 202.108.37.42
< press Ctrl+C to break >
Tracing the route to 202.108.37.42
1
192.168.12.1
0 msec
0 msec
0 msec
2
192.168.9.2
0 msec
4 msec 4 msec
3
192.168.110.1
16 msec 12 msec 16 msec
4
* * *
5
61.154.8.129
12 msec
28 msec 12 msec
6
61.154.8.17
8 msec
12 msec 16 msec
7
61.154.8.250
12 msec
12 msec 12 msec
8
218.85.157.222
12 msec
12 msec 12 msec
9
218.85.157.130
16 msec
16 msec 16 msec
10
218.85.157.77
16 msec
48 msec 16 msec
11
202.97.40.65
76 msec
24 msec 24 msec
12
202.97.37.65
32 msec
24 msec 24 msec
13
202.97.38.162
52 msec
52 msec 224 msec
14
202.96.12.38
84 msec
52 msec 52 msec
15
202.106.192.226 88 msec
52 msec 52 msec
16
202.106.192.174
17
210.74.176.158
100 msec 52 msec 84 msec
18
202.108.37.42
48 msec
52 msec
52 msec 88 msec
48 msec 52 msec
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
1
192.168.217.1
0 msec 0 msec 0 msec
2
10.10.25.1
0 msec 0 msec 0 msec
3
10.10.24.1
0 msec 0 msec 0 msec
4
10.10.30.1
10 msec 0 msec 0 msec
5
218.5.3.254
0 msec 0 msec 0 msec
6
61.154.8.49
10 msec 0 msec 0 msec
7
202.109.204.210 0 msec 0 msec 0 msec
8
202.97.41.69
20 msec 10 msec 20 msec
9
202.97.34.65
40 msec 40 msec 50 msec
10
202.97.57.222
50 msec 40 msec 40 msec
11
219.141.130.122 40 msec 50 msec 40 msec
12
219.142.11.10
40 msec 50 msec 30 msec
13
211.157.37.14
50 msec 40 msec 50 msec
14
222.35.65.1
40 msec 50 msec 40 msec
Command Reference
Related
Commands
Platform
Network Connectivity Test Tool Commands
15
222.35.65.18
40 msec 40 msec 40 msec
16
222.35.15.109
50 msec 50 msec 50 msec
17
*
18
64.170.98.32
*
*
40 msec 40 msec 40 msec
Command
Description
N/A
N/A
N/A
Description
10.6 traceroute ipv6
Use this command to display all gateways passed by the test packets from the source address to the
destination address.
traceroute [ipv6 ] [ address [ probe number ] [ timeout seconds ] [ ttl minimum maximum ] ]
Parameter
Description
Parameter
Description
address
Specifies an IPv6 address.
number
Specifies the number of probe packets to be sent.
seconds
Specifies the timeout time.
minimum maximum
Specifies the minimum and maximum TTL values.
Defaults
By default, seconds is 3 seconds, number is 3, minimum and maximum are 1 and 255.
Command
Privileged EXEC mode: enables extended functions.
Mode
User EXEC mode: enables basic functions.
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 ipv6, the one is of the smooth
Examples
network, 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
3000::1
0 msec 0 msec 0 msec
2
3001::1
4 msec 4 msec 4 msec
3
3002::1
8 msec 8 msec 4 msec
Command Reference
4
Network Connectivity Test Tool Commands
3004::1
4 msec 28 msec 12 msec
From above result, it’s clear to know that the gateways passed by the packets sent to the host with an
IP address of 3004::1 (gateways 1~4) and the spent time are displayed. Such information is helpful
for network analysis.
2. When some gateways in the network fail:
Ruijie# traceroute ipv6 3004::1
< press Ctrl+C to break >
Tracing the route to 3004::1
1
3000::1
0 msec 0 msec 0 msec
2
3001::1
4 msec 4 msec 4 msec
3
3002::1
8 msec 8 msec 4 msec
4
* * *
5
3004::1
4 msec 28 msec 12 msec
The above result clearly shown that the gateways passed by the packets sent to the host with an IP
address of 3004::1 (gateways 1~5) and the spent time are displayed, and gateway 4 fails.
Related
Commands
Platform
Description
Command
Description
N/A
N/A
N/A
Command Reference
TCP Commands
11 TCP Commands
11.1 ip tcp adjust-mss
Use this command to change the Maximum Segment Size (MSS) option value of SYN packets sent
and received on an interface. Use the no form of this command to restore the default setting.
ip tcp adjust-mss max-segment-size
no ip tcp adjust-mss
Parameter
Description
Parameter
Description
max-segment-size
Maximum segment size in the range from 500 to 1460 bytes
Defaults
The MSS option value of SYN packets is not changed by default.
Command
Interface configuration mode
Mode
Usage Guide
MSS refers to the maximum size of the payload of a TCP packet.
The TCP Path MTU (PMTU) is implemented as per RFC1191. This feature can improve the network
bandwidth utilization ratio. When the user uses TCP to transmit mass data, this feature can
substantially enhance the transmission performance.
When the client initiates a TCP connection, it negotiates the maximum payload of TCP packets
through the MSS option field of the TCP SYN packet. The MSS value of the client's SYN packet
implies the maximum payload of TCP packets sent by the server, and vice versa.
Configuring this command on the interface will change the MSS option of SYN packets received or
sent by the interface to the MSS value configured on the interface. If the MSS is configured on both
the inbound interface and the outbound interface of the SYN packet, the smaller of the two applies. It
is recommended that you configure the same value on the inbound interface and outbound interface.
This command actually changes the SYN packet exchanged during TCP connection establishment.
For some versions, this command may also change the SYN+ACK packet.
This command takes effect on the subsequent TCP connections to be established instead of
established TCP connections.
Configuration
The following example changes the MSS option value of the TCPv4 SYN packet to 1000 bytes on
Examples
port GigabitEthernet 0/0.
Ruijie(config-if-GigabitEthernet 0/0)# ip tcp adjust-mss 1000
Related
Commands
Command
Description
N/A
N/A
Command Reference
Platform
TCP Commands
N/A
Description
11.2 ip tcp keepalive
Use this command to enable the TCP keepalive function.
ip tcp keepalive [ interval num1 ] [ times num2 ] [ idle-period num3 ]
Parameter
Description
Parameter
interval num1
times num2
Description
The interval of sending the keepalive packet, in the range from1 to
120 in the unit of seconds, The default is 75.
Keepalive packet sending times, in the range from 1 to 10. The
default is 6.
Idle time, the time period during which the peer end does not send
idle-period num3
any packet to the local end, in the range from 60 to 1800 in the unit of
seconds. The default is 900.
Defaults
The function is disabled by default.
Command
Global configuration mode
Mode
Usage Guide
The keepalive function enables TCP to detect whether the peer end is operating properly.
Suppose the keepalive function is enabled together with default interval, times and idle-period
settings. TCP begins to send the keepalive packet at an interval of 75 seconds if it does not receive
any packet from the peer end in 900 seconds. The TCP connection is considered invalid and then
disconnected automatically if the device sends the keepalive packet for six consecutive times without
receiving any TCP packet from the peer end. This command applies to both IPv4 and IPv6 TCP.
Configuration
The following example enables the TCP keepalive function on the device and sets the idle-period
Examples
and interval to180 and 60 respectively. If the device sends the keepalive packet for four consecutive
times without receiving any TCP packet from the peer end, the TCP connection is considered invalid.
Ruijie(config)# ip tcp keepalive interval 60 times 4 idle-period 180
Related
Commands
Command
Description
N/A
N/A
Platform
When you run the RGOS 10.x command service tcp-keepalives-in or service tcp-keepalives-out,
Description
it is converted to this command automatically in RGOS 11.0.
Command Reference
TCP Commands
11.3 ip tcp mss
Use this command to set the upper limit of the MSS value. Use the no form of this command to
restore the default setting.
ip tcp mss max-segment-size
no ip tcp mss
Parameter
Description
Parameter
Description
max-segment-size
Upper limit of the MSS value in the range from 68 to 10000 bytes
Defaults
N/A
Command
Global configuration mode
Mode
Usage Guide
This command is used to limit the maximum value of MSS for the TCP connection to be created. The
negotiated MSS cannot exceed the configured value. You can use this command to reduce the
maximum value of MSS. However, this configuration is not needed in general.
Configuration
The following example sets the upper limit of the MSS value to 1300 bytes.
Examples
Ruijie(config)# ip tcp mss 1300
Related
Commands
Command
Description
N/A
N/A
Platform
In versions 10.X, this command only applies to IPv4 TCP. In version 11.0 or later, this command
Description
applies to both IPv4 and IPv6 TCP.
11.4 ip tcp path-mtu-discovery
Use this command to enable Path Maximum Transmission Unit (PMTU) discovery function for TCP in
global configuration mode. Use the no form of this command to restore the default setting.
ip tcp path-mtu-discovery [ age-timer minutes | age-timer infinite ]
no ip tcp path-mtu-discovery
Parameter
Description
Parameter
age-timer minutes
age-timer infinite
Description
The time interval for further discovery after discovering PMTU. Its
value ranges from 10 to 30 minutes. The default value is 10.
No further discovery after discovering PMTU
Command Reference
TCP Commands
Defaults
This function is disabled by default.
Command
Global configuration mode
Mode
Usage Guide
Based on RFC1191, the TCP path MTU function improves the network bandwidth utilization and data
transmission when the user uses TCP to transmit the data in batch.
Enabling or disabling this function takes no effect for existent TCP connections and is only effective
for TCP connections to be created. This command applies to only IPv4 TCP. This function is enabled
for IPv6 TCP constantly and cannot be disabled.
According to RFC1191, after discovering the PMTU, the TCP uses a greater MSS to detect the new
PMTU at a certain interval, which is specified by the parameter age-timer. If the PMTU discovered is
smaller than the MSS negotiated between two ends of the TCP connection, the device will be trying to
discover the greater PMTU at the specified interval untill the PMTU value reaches the MSS or the
user stops this timer. Use the parameter age-timer infinite to stop this timer.
Configuration
The following example enables PMTU discovery.
Examples
Ruijie(config)# ip tcp path-mtu-discovery
Related
Commands
Command
Description
Shows the PMTU value for the TCP
show tcp pmtu
connection.
Platform
In versions 10.X, this command applies to both IPv4 and IPv6 TCP. In version 11.0 or later, this
Description
command only applies to IPv4 TCP, and PMTU discovery function is always enabled and cannot be
disabled.
11.5 ip tcp send-reset
Use this command to enable the device to send the reset packet when receiving the TCP port
unreachable packet. Use the no form of this command to disable this function,
ip tcp send-reset
no ip tcp send-reset
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
This function is enabled by default.
Command
Global configuration mode
Mode
Command Reference
Usage Guide
TCP Commands
In general, when dispatching the TCP packet, the TCP module replies a reset packet automatically to
disconnect the TCP connection with the peer end if the TCP connection that this packet belongs to is
not found, However, flooding TCP port unreachable packets pose an attack threat to the device, This
command can be used to disable the device from sending the reset packet when receiving the TCP
port unreachable packet. This command applies to both IPv4 and IPv6 TCP.
Configuration
The following example disables the device from sending the reset packet when receiving the TCP
Examples
port unreachable packet.
Ruijie(config)# no ip tcp send-reset
Related
Commands
Command
Description
N/A
N/A
Platform
The ip tcp not-send-rst command in RGOS 10.x is compatible in RGOS 11.0. When you run this
Description
command, it is converted to the no ip tcp send-reset command automatically.
11.6 ip tcp synwait-time
Use this command to set the timeout value for SYN packets (the maximum time from SYN
transmission to successful three-way handshake). Use the no form of this command to restore the
default setting.
ip tcp synwait-time seconds
no ip tcp synwait-time seconds
Parameter
Description
Parameter
seconds
Defaults
The default is 20.
Command
Global configuration mode
Description
Timeout value for SYN packets in the range from 5 to 300 in the unit
of seconds.
Mode
Usage Guide
If there is an SYN attack in the network, reducing the SYN timeout value can prevent resource
consumption, but it takes no effect for successive SYN attacks. When the device actively requests a
connection with an external device, reducing the SYN timeout value can shorten the time for the user
to wait, such as telnet login. For poor network conditions, the timeout value can be increased
properly. This command applies to both IPv4 and IPv6 TCP.
Configuration
The following example set the timeout value for SYN packets to 10 seconds.
Examples
Ruijie(config)# ip tcp syntime-out 10
Command Reference
Related
Commands
TCP Commands
Command
Description
N/A
N/A
Platform
In versions 10.X, this command only applies to IPv4 TCP. In version 11.0 or later, this command
Description
applies to both IPv4 and IPv6 TCP.
11.7 ip tcp window-size
Use this command to change the size of receiving buffer and sending buffer for TCP connections.
Use the no form of this command to restore the default setting.
ip tcp window-size size
no ip tcp window-size
Parameter
Description
Parameter
size
Defaults
The default is 65535.
Command
Global configuration mode
Description
Size of receiving buffer and sending buffer for TCP connections in the
range from 128 to 65535 << 14 bytes.
Mode
Usage Guide
The TCP receiving buffer is used to buffer the data received from the peer end. These data will be
subsequently read by application programs. Generally, the window size of TCP packets implies the
size of free space in the receiving buffer. For connections involving a large bandwidth and mass data,
increasing the size of receiving buffer will remarkably improve TCP transmission performance.
When the window size exceeds 65,535 bytes, the size of receiving buffer is increased automatically.
Configuration
The following example sets the TCP window size to 16,386 bytes.
Examples
Ruijie(config)# ip tcp window-size 16386
Related
Commands
Command
Description
N/A
N/A
Platform
In versions 10.X, this command only applies to IPv4 TCP. In version 11.0 or later, this command
Description
applies to both IPv4 and IPv6 TCP.
Command Reference
TCP Commands
11.8 ipv6 tcp adjust-mss
Use this command to set the MSS option value of the TCPv6 SYN packet. Use the no form of this
command to restore the default setting.
ipv6 tcp adjust-mss max-segment-size
no ipv6 tcp adjust-mss
Parameter
Description
Parameter
Description
max-segment-size
The maximum segment size (MSS), in the range from 1220 to 1440 in
the unit of bytes.
Defaults
The MSS option value of the TCPv6 SYN packet is not changed by default.
Command
Interface configuration mode
Mode
Usage Guide
TCP negotiates MSS at 3-way handshake. If the IPv6 MTU of one link for TCPv6 packet transmission
is too small and packet segmentation is not allowed during forwarding, the router changes the MSS
option value of the TCPv6 SYN packet to prevent transmitting the TCPv6 packet surpassing MTU.
This configuration is not applicable to established TCPv6 connections.
Configuration
The following example sets the MSS option value of the TCPv6 SYN packet to 1300 bytes on port
Examples
GigabitEthernet 0/0.
Ruijie(config-if-GigabitEthernet 0/0)# ipv6 tcp adjust-mss 1300
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
11.9 service tcp-keepalives-in
Use this command to enable the keepalive function for the TCP server. Use the no form of this
command to restore the default setting.
service tcp-keepalives-in [ interval ] [ garbage ]
no service tcp-keepalives-in
Parameter
Description
Parameter
Description
interval
The interval of sending keepalive packets, in the range from 1 to
Command Reference
TCP Commands
65535 in the unit of seconds. The default is 60.
garbage
The keepalive packet contains one-byte invalid data. The invalid data
is not contained by default.
Defaults
This function is disabled by default.
Command
Global configuration mode
Mode
Usage Guide
The keepalive function enables the TCP server to detect whether the client is operating properly.
If the TCP server sends the keepalive packet for four consecutive times without receiving any TCP
packet from the client, the TCP connection is considered invalid and then is disconnected
automatically.
Configuration
The following example enables the keepalive function for the TCP server and sets the interval of
Examples
sending the keepalive packet to 10 seconds. The keepalive packet contains one-byte invalid data.
Ruijie(config)# service tcp-keepalives-in 10 garbage
Related
Commands
Command
Description
N/A
N/A
Platform
When you run this RGOS 10.x command, it is converted to the ip tcp keepalive command
Description
automatically in RGOS 11.0.
11.10 service tcp-keepalives-out
Use this command to enable the keepalive function for the TCP client.
service tcp-keepalives-out [ interval ] [ garbage ]
Parameter
Description
Parameter
interval
garbage
Description
The interval of sending keepalive packets, in the range from 1 to
65535 in the unit of seconds. The default is 60.
The keepalive packet contains one-byte invalid data. The invalid data
is not contained by default.
Defaults
This function is disabled by default.
Command
Global configuration mode
Mode
Usage Guide
The keepalive function enables the TCP client to detect whether the server is operating properly.
Command Reference
TCP Commands
If the TCP client sends the keepalive packet for four consecutive times without receiving any TCP
packet from the server, the TCP connection is considered invalid and then is disconnected
automatically.
Configuration
The following example enables the keepalive function for the TCP client and sets the interval of
Examples
sending the keepalive packet to 10 seconds. The keepalive packet contains one-byte invalid data
Ruijie(config)# service tcp-keepalives-out 10 garbage
Related
Commands
Command
Description
N/A
N/A
Platform
When you run this RGOS 10.x command, it is converted to the ip tcp keepalive command
Description
automatically in RGOS 11.0.
11.11 show ipv6 tcp connect
Use this command to display the current IPv6 TCP connection information.
show ipv6 tcp connect [ local-ipv6 X:X:X:X::X ] [ local-port num ] [ peer-ipv6 X:X:X:X::X ]
[ peer-port num ]
Use this command to display the current IPv6 TCP connection statistics.
show ipv6 tcp connect statistics
Parameter
Description
Parameter
Description
local-ipv6 X:X:X:X::X
Local IPv6 address
local-port num
Local port
peer-ipv6 X:X:X:X::X
Peer IPv6 address
peer-port num
Peer port
statistics
Displays IPv6 TCP connection statistics
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays the current IPv6 TCP connection information.
Examples
Ruijie#show ipv6 tcp connect
Number Local Address
1
:::22
Foreign Address
:::0
State
LISTEN
Process name
rg-sshd
Command Reference
TCP Commands
2
:::23
:::0
3
1000::1:23
LISTEN
1000::2:64201
rg-telnetd
ESTABLISHED
rg-telnetd
The following example displays the current IPv6 TCP connection statistics.
Ruijie#show ipv6 tcp connect statistics
State
-----
Count
-----
ESTABLISHED 1
SYN_SENT
0
SYN_RECV
0
FIN_WAIT1
0
FIN_WAIT2
0
TIME_WAIT
0
CLOSED
0
CLOSE_WAIT
0
LAST_ACK
0
LISTEN
1
CLOSING
0
Total: 2
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
11.12 show ipv6 tcp pmtu
Use this command to display information about IPv6 TCP PMTU.
show ipv6 tcp pmtu [ local-ipv6 X:X:X:X::X ] [ local-port num ] [ peer-ipv6 X:X:X:X::X ] [ peer-port
num ]
Parameter
Description
Parameter
Description
local-ipv6 X:X:X:X::X
Local IPv6 address
local-port num
Local port
peer-ipv6 X:X:X:X::X
Peer IPv6 address
peer-port num
Peer port
Defaults
N/A
Command
Privileged EXEC mode
Mode
Command Reference
TCP Commands
Usage Guide
N/A
Configuration
The following example information about IPv6 TCP PMTU.
Examples
Ruijie# show ipv6 tcp pmtu
Number Local Address
1
Foreign Address
1000::1:23
PMTU
1000::2.13560
Field
Description
Number
Number
Local Address
Local address and port number. The number after the last colon is
the port number.
Foreign Address
Remote address and port number. The number after the last colon is
the port number.
PMTU
Related
Commands
Platform
Path MTU.
Command
Description
N/A
N/A
N/A
Description
11.13 show ipv6 tcp port
Use this command to display the current IPv6 TCP port status.
show ipv6 tcp port [ num ]
Parameter
Description
Parameter
Description
num
Port number
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays the current IPv6 TCP port status.
Examples
Ruijie#show ipv6 tcp port
TCP connections on port 23:
Number Local Address Foreign Address
State
Command Reference
1
TCP Commands
1000::1:23
1000::2:64571
ESTABLISHED
Total: 1
TCP connections on port 2650:
Number Local Address Foreign Address
State
Total: 0
Field
Description
Number
Number
Local Address
Local address and port number.
Foreign Address
Remote address and port number.
State
Current status of the TCP connection. There are eleven possible states:
CLOSED: The connection has been closed.
LISTEN: Listening state
SYNSENT: In the three-way handshake phase when the SYN packet
has been sent out.
SYNRCVD: In the three-way handshake phase when the SYN packet
has been received.
ESTABLISHED: The connection has been established.
FINWAIT1: The local end has sent the FIN packet.
FINWAIT2: The FIN packet sent by the local end has been
acknowledged.
CLOSEWAIT: The local end has received the FIN packet from the peer
end.
LASTACK: The local end has received the FIN packet from the peer
end, and then sent its own FIN packet.
CLOSING: The local end has sent the FIN packet from the peer end,
and received the FIN packet from the peer end before the ACK packet
for the peer end to respond with this FIN packet is received.
TIMEWAIT: The FIN packet sent by the local end has been
acknowledged, and the local end has also acknowledged the FIN
packet.
Process Name
Related
Commands
Platform
Description
Process name
Command
Description
N/A
N/A
N/A
Command Reference
TCP Commands
11.14 show tcp connect
Use this command to display basic information about the current TCP connections.
show tcp connect [ local-ip a.b.c.d ] [ local-port num ] [ peer-ip a.b.c.d ] [ peer-port num ]
Use this command to display the current IPv4 TCP connection statistics.
show tcp connect statistics
Parameter
Description
Parameter
Description
local-ip a.b.c.d
Local IP address.
local-port num
Local port.
peer-ip a.b.c.d
Peer IP address.
peer-port num
Peer port.
statistics
Displays IPv4 TCP connection statistics.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays the current IPv4 TCP connection information.
Examples
Ruijie#show tcp connect
Number Local Address
Foreign Address
State
Process name
1
0.0.0.0:22
0.0.0.0:0
LISTEN
rg-sshd
2
0.0.0.0:23
0.0.0.0:0
LISTEN
rg-telnetd
3
1.1.1.1:23
1.1.1.2:64201
ESTABLISHED rg-telnetd
Field
Description
Number
Sequence number.
Local Address
The Local address and port number. The number after the last
“.” is the port number. For example, in “2002::2.23” and
“192.168.195.212.23” , “23” is the port number.
Foreign Address
The remote address and port number. The number after the
last “.” is the port number. For example, in “2002::2.23” and
“192.168.195.212.23” , “23” is the port number.
State
Current status of the TCP connection. There are eleven
possible states:
CLOSED: The connection has been closed.
LISTEN: Listening state
SYNSENT: In the three-way handshake phase when the SYN
packet has been sent out.
SYNRCVD: In the three-way handshake phase when the SYN
Command Reference
TCP Commands
packet has been received.
ESTABLISHED: The connection has been established.
FINWAIT1: The local end has sent the FIN packet.
FINWAIT2: The FIN packet sent by the local end has been
acknowledged.
CLOSEWAIT: The local end has received the FIN packet from
the peer end.
LASTACK: The local end has received the FIN packet from the
peer end, and then sent its own FIN packet.
CLOSING: The local end has sent the FIN packet from the peer
end, and received the FIN packet from the peer end before the
ACK packet for the peer end to respond with this FIN packet is
received.
TIMEWAIT: The FIN packet sent by the local end has been
acknowledged, and the local end has also acknowledged the
FIN packet.
Process name
Process name.
The following example displays the current IPv4 TCP connection statistics.
Ruijie#show tcp connect statistics
State
-----
Count
-----
ESTABLISHED 1
SYN_SENT
0
SYN_RECV
0
FIN_WAIT1
0
FIN_WAIT2
0
TIME_WAIT
0
CLOSED
0
CLOSE_WAIT
0
LAST_ACK
0
LISTEN
1
CLOSING
0
Total: 2
Related
Commands
Platform
Description
Command
Description
N/A
N/A
N/A
Command Reference
TCP Commands
11.15 show tcp pmtu
Use this command to display information about TCP PMTU.
show tcp pmtu [ local-ip a.b.c.d ] [ local-port num ] [ peer-ip a.b.c.d ] [ peer-port num ]
Parameter
Description
Parameter
Description
local-ip a.b.c.d
Local IP address.
local-port num
Local port.
peer-ip a.b.c.d
Peer IP address.
peer-port num
Peer port.
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays PMTU of IPv4 TCP connection.
Examples
Ruijie# show tcp pmtu
Number Local Address
Foreign Address
1
192.168.195.112.13560 1440
192.168.195.212.23
PMTU
Field
Description
Number
Sequence number.
Local Address
The local address and the port number. The number after the last
“.” is the port number. For example, in “2002::2.23” and
“192.168.195.212.23” , “23” is the port number.
Foreign Address
The remote address and the port number. The number after the
last "." is the port number. For example, in “2002::2.23” and
“192.168.195.212.23” , “23” is the port number.
PMTU
Related
Commands
Platform
Description
PMTU value.
Command
Description
ip tcp path-mtu-discovery
Enables the TCP PMTU discovery function.
N/A
Command Reference
TCP Commands
11.16 show tcp port
Use this command to display information about the current TCP port.
show tcp port [ num ]
Parameter
Description
Parameter
Description
num
Port number
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays the current IPv4 TCP port status.
Examples
Ruijie#show tcp port
TCP connections on port 23:
Number Local Address Foreign Address
1
1.1.1.1:23
1.1.1.2:64571
State
ESTABLISHED
Total: 1
TCP connections on port 2650:
Number Local Address Foreign Address
State
Total: 0
Tcpv6 listen on 23 have total 1 connections.
Field
Description
Number
Port number
Local Address
Local address
Foreign Address
Remote address
State
Status of the current TCP connection. There are eleven possible
states:
CLOSED: The connection has been closed.
LISTEN: Listening state
SYNSENT: In the three-way handshake phase when the SYN
packet has been sent.
SYNRCVD: In the three-way handshake phase when the SYN
packet has been received.
ESTABLISHED: The connection has been established.
FINWAIT1: The local end has sent the FIN packet.
FINWAIT2: The FIN packet sent by the local end has been
Command Reference
TCP Commands
acknowledged.
CLOSEWAIT: The local end has received the FIN packet from
the peer end.
LASTACK: The local end has received the FIN packet from the
peer end, and then sent its own FIN packet.
CLOSING: The local end has sent the FIN packet from the peer
end, and received the FIN packet from the peer end before the
ACK packet for the peer end to respond with this FIN packet is
received.
TIMEWAIT: The FIN packet sent by the local end has been
acknowledged, and the local end has also acknowledged the FIN
packet.
Related
Commands
Platform
Description
Command
Description
N/A
N/A
N/A
Command Reference
IPv4/IPv6 REF Commands
12 IPv4/IPv6 REF Commands
12.1 clear ip ref packet statistics
Use this command to clear IPv4 Ruijie Express Forwarding (REF) packet statistics.
clear ip ref packet statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example clears IPv4 REF packet statistics.
Examples
Ruijie #clear ip ref packet statistics
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
12.2 clear ipv6 ref packet statistics
Use this command to clear IPv6 REF packet statistics.
clear ipv6 ref packet statistics
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Command Reference
IPv4/IPv6 REF Commands
Configuration
The following example clears IPv6 REF packet statistics.
Examples
Ruijie #clear ipv6 ref packet statistics
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
12.3 ip ref load-sharing original
Use this command to configure the algorithm that is used for load balancing during forwarding based
on the source and destination IPv4 addresses. Use the no form of this command to restore the
default setting.
ip ref load-sharing original
no ip ref load-sharing original
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The default algorithm is based on the destination IPv4 address.
Command
Global configuration mode
Mode
Usage Guide
The REF is responsible for data forwarding and supports two load balancing algorithms. One is based
on destination IP addresses and the other is based on the source and destination IP addresses.
When IP packets are forwarded on multiple paths, for example, when load balancing based on
destination IP addresses is configured, the REF forwards packets based on a path matching the
destination IP address of packets. By default, load balancing based on destination IP addresses is
used.
Configuration
The following example configures the load balancing algorithm based on source and destination IP
Examples
addresses.
Ruijie(config)# ip ref load-sharing original
The following example configures the load balancing algorithm based on destination IP addresses of
packets.
Ruijie(config)# no ip ref load-sharing original
Related
Command
Description
Commands
N/A
N/A
Command Reference
Platform
IPv4/IPv6 REF Commands
N/A
Description
12.4 ipv6 ref load-sharing original
Use this command to configure the algorithm that is used for load balancing during forwarding based
on the source and destination IPv6 addresses. Use the no form of this command to restore the
default setting.
ipv6 ref load-sharing original
no ipv6 ref load-sharing original
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
The default algorithm is based on the destination IPv6 address.
Command
Global configuration mode
Mode
Usage Guide
N/A
Configuration
The following example restores the algorithm that is used for load balancing during forwarding to the
Examples
default setting.
Ruijie(config)#no ipv6 ref load-sharing original
Related
Command
Description
Commands
N/A
N/A
Platform
N/A.
Description
12.5 show ip ref adjacency
Use this command to display the information about the specified adjacent node or all adjacent nodes.
show ip ref adjacency [ glean | local | ip-address | interface interface_type interface_number |
discard | statistics ]
Parameter
Parameter
Description
Description
glean
Aggregate adjacent node, which is used for a direct route
local
Local adjacent node, which is used by the local host
ip
Next-hop IP address
interface_type
Interface type
interface_number
Interface number
Command Reference
IPv4/IPv6 REF Commands
discard
Displays discarded adjacent nodes.
statistics
Statistics
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
This command can be used to display the information about the adjacent node table in the current
REF module. By specifying parameters, the information about the aggregate adjacent node, local
adjacent node, adjacent node of the specified IP address, adjacent node associated with the
specified interface, and all adjacent nodes can be displayed.
Configuration
The following example displays the information about all adjacent nodes in the adjacent node table.
Examples
Ruijie#show ip ref adjacency
id state
type
rfct chg ip
interface
linklayer(header
data)
1 unresolved mcast
9 resolved
1
0
224.0.0.0
forward 1
0
192.168.50.78
GigabitEthernet 0/0
00 25 64 C5
9D 6A 00 D0 F8 98 76 54 08 00
7 resolved
forward 1
0
192.168.50.200
GigabitEthernet 0/0 00 04 5F 87
69 66 00 D0 F8 98 76 54 08 00
6 unresolved
glean 1
0
0.0.0.0
GigabitEthernet 0/0
4 unresolved
local 3
0
0.0.0.0
Local 1
Description of fields:
Field
Description
id
Adjacent node ID
Adjacent node state:
state
Unresolved
Resolved
Adjacent node type
Local: local adjacency
type
Forward: forward adjacency
Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency
rfct
Reference count of the adjacent node
chg
Whether the adjacent node is on the changing link.
ip
IP address of the adjacent node
interface
Interface
linklayer
Layer 2 head
Command Reference
IPv4/IPv6 REF Commands
Related
Command
Description
Commands
show ip ref route
Displays all route information in the current REF module.
Platform
N/A
Description
12.6 show ip ref exact-route
This command is used to display the IPv4 REF exact route.
show ip ref exact-rout source_ipaddress dest_ipaddress
Parameter
Parameter
Description
Description
source_ipaddress
Source IP address of the packet
dest_ipaddress
Destination IP address of the packet
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
This command is used to specify the source and the destination IP address of the IP packets, and to
display the path of forwarding the current packet with REF
Configuration
The following example displays the IPv4 REF exact route from 192.168.217.74 to 192.168.13.1.
Examples
Ruijie# show ip ref exact-route 192.168.217.74 192.168.13.1
192.168.217.74 --> 192.168.13.1 (vrf index:0):
id state
type
rfct chg ip
interface
linklayer(header
data)
9 resolved forward 1
0
192.168.17.1
GigabitEthernet 0/0 00 25 64 C5 9D
6A 00 D0 F8 98 76 54 08 00
Description of fields:
Field
Description
id
Adjacency ID
Adjacency state:
state
Unresolved
Resolved
Command Reference
IPv4/IPv6 REF Commands
Adjacency type
Local: local adjacency
Forward: forward adjacency
type
Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency
rfct
Reference count of the adjacency
chg
Whether the adjacency is on the changing link.
ip
Adjacency IP address
interface
Interface
linklayer
Layer 2 head
Related
Command
Description
Commands
show ip ref route
Displays all routing information in the current REF module.
Platform
N/A
Description
12.7 show ip ref packet statistics
Use this command to display IPv4 REF packet statistics.
show ip ref packet statistics
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays IPv4 REF packet statistics.
Examples
Ruijie #show ip ref pkt-statistic
ref packet statistic:
bad head
: 0
lookup fib fail : 0
local adj
: 0
glean adj
: 0
forward
: 0
Command Reference
IPv4/IPv6 REF Commands
redirect
: 0
punt adj
: 0
outif not in ef : 0
ttl expiration : 0
no ip routing
Field
Description
total recved
Number of total packets received by REF
bad head
Number of the packets with false header
lookup fib fail
drop adj
local adj
glean adj
forward
no ip routing
Related
Commands
Platform
: 0
Number of the packets with failed REF
routing
Number of the packets matching the
dropped adjacency
Number of the packets matching the
local adjacency
Number of the packets matching the
gleaned adjacency
Number of the packets matching the
forwarded adjacency
Number of the packets not allowed to be
forwarded and sent to local.
Command
Description
N/A
N/A
N/A
Description
12.8 show ip ref resolve-list
Use this command to display the IPv4 REF resolution information.
show ip ref resolve-list
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Command Reference
IPv4/IPv6 REF Commands
Configuration
The following example displays IPv4 REF resolution information.
Examples
Ruijie#show ip ref resolve-list
IP
res_state flags interface
1.1.1.1
unres
1
GigabitEthernet 0/0
Field
Description
IP
IP address
unres: unresolved
res_state
res: resolved
0: related to adjacency
flags
1: unrelated to adjacency
interface
Interface
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
12.9 show ip ref route
Use this command to display all the routing information in the IPv4 REF table.
show ip ref route [ default | ip mask | statistics ]
Parameter
Description
Parameter
Description
default
Specifies the default route.
ip
Specifies the destination IP address of the route
mask
Specifies the mask of the route.
statistics
Statistics
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
This command is used to display the related routing information on the current REF table, and specify
the default route and all the routing information matching IP/MASK.
Configuration
The following example displays all the routing information in the IPv4 REF table.
Examples
Ruijie#show ip ref route
Codes: * - default route
# - zero route
Command Reference
ip
IPv4/IPv6 REF Commands
mask
weight
path-id
next-hop
255.255.255.255 255.255.255.255 1 4
0.0.0.0
224.0.0.0
240.0.0.0
224.0.0.0
224.0.0.0
255.255.255.0
1 4
192.168.50.0
255.255.255.0
1
192.168.50.255
1
1
0.0.0.0
6
interface
Local 0
Local 0
0.0.0.0 FastEthernet 0/0
255.255.255.255 1 2
0.0.0.0
192.168.50.200 255.255.255.255 1 7 192.168.50.200 FastEthernet 0/0
192.168.50.122
192.168.50.78
Related
Commands
255.255.255.255 1 4 0.0.0.0
255.255.255.255 1 9 192.168.50.78 FastEthernet 0/0
Field
Description
ip
Destination IP address
mask
Mask
path-id
Adjacent identity
next-hop
Address of next hop
weight
Routing weight
interface
Egress
Command
Description
Displays the accurate REF forwarding path of
show ip ref exact-route
Platform
Local 0
an IP packet.
N/A
Description
12.10 show ipv6 ref adjacency
Use this command to display the information about the IPv6 adjacent node.
show ipv6 ref adjacency [glean | local | ipv6-address | interface interface_type interface_number |
discard | statistics ]
Parameter
Parameter
Description
Description
glean
Aggregate adjacent node, which is used for a direct route
local
Local adjacent node, which is used by the local host
ipv6-address
Next-hop IP address
interface_type
Interface type
interface_number
Interface number
discard
Displays discarded adjacent nodes.
statistics
Statistics
Defaults
N/A
Command Reference
Command
IPv4/IPv6 REF Commands
Privileged EXEC mode
Mode
Usage Guide
This command can be used to display the information about the adjacent node table in the privileged
EXEC mode and global configuration mode.
Configuration
The following example displays the information about the IPv6 adjacent node..
Examples
Ruijie#show ipv6 ref adjacency
id
state
type
rfct chg ip
interface
linklayer(header
data)
1
unresolved glean
1
0
::
GigabitEthernet 0/0
2
unresolved local
2
0
::1
Local 1
Description of fields:
Field
Description
id
Adjacent node ID
Adjacent node state:
state
Unresolved
Resolved
Adjacent node type
Local: local adjacency
type
Forward: forward adjacency
Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency
rfct
Reference count of the adjacent node
chg
Whether the adjacent node is on the changing link.
ip
IP address of the adjacent node
interface
Interface
linklayer
Layer 2 head
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Description
12.11 show ipv6 ref exact-route
This command is used to display the IPv6 REF exact route.
show ipv6 ref exact-route source-ipv6-address destination-ipv6-address
Command Reference
IPv4/IPv6 REF Commands
Parameter
Parameter
Description
Description
source-ipv6-address
Source IP address of the packet
destination-ipv6-address
Destination IP address of the packet
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays the IPv4 REF exact route from 2001:db8:1::1 to 3001:db8:2::2.
Examples
Ruijie#show ipv6 exact-route 2001:db8:1::1 3001:db8:2::2
2001:db8:1::1 --> 3001:db8:2::2 (vrf index:0):
ID state
type
3
glean
unresolve
rfct chg ip interface
1
0
linklayer(header data)
:: GigabitEthernet 0/0
Description of fields:
Field
Description
id
Adjacent node ID
Adjacent node state:
state
Unresolved
Resolved
Adjacent node type
Local: local adjacency
Forward: forward adjacency
type
Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency
rfct
Reference count of the adjacent node
chg
Whether the adjacent node is on the changing link.
ip
IP address of the adjacent node
interface
Interface
linklayer
Layer 2 head
Related
Command
Description
Commands
N/A
N/A
Platform
N/A
Command Reference
IPv4/IPv6 REF Commands
Description
12.12 show ipv6 ref packet statistics
Use this command to display IPv6 REF packet statistics.
show ipv6 ref packet statistics
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays IPv6 REF packet statistics.
Examples
Ruijie#show ipv6 ref packet statistics
ref packet statistic:
bad head
: 0
lookup fib fail : 0
local adj
: 0
glean adj
: 0
forward
: 0
redirect
: 0
hop-limit expiration : 0
no ipv6 unicast-routing
: 0
Field
Description
total recved
Number of total packets received by REF
bad head
Number of the packets with false header
lookup fib fail
drop adj
local adj
glean adj
forward
Number of the packets with failed REF
routing
Number of the packets matching the
dropped adjacency
Number of the packets matching the
local adjacency
Number of the packets matching the
gleaned adjacency
Number of the packets matching the
forwarded adjacency
Command Reference
no ip routing
Related
Commands
Platform
IPv4/IPv6 REF Commands
Number of the packets not allowed to be
forwarded and sent to local.
Command
Description
N/A
N/A
N/A
Description
12.13 show ipv6 ref resolve-list
This command is used to display the IPv6 REF resolution information.
show ipv6 ref resolve-list
Parameter
Parameter
Description
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays IPv6 REF resolution information.
Examples
Ruijie#show ipv6 ref resolve-list
IP
1000::1
res_state flags interface
unres
1
GigabitEthernet 0/0
Field
Description
IP
IPv6 address
unres: unresolved
res_state
res: resolved
0: related to adjacency
flags
1: unrelated to adjacency
interface
Interface
Related
Command
Description
Commands
N/A
N/A
Command Reference
Platform
IPv4/IPv6 REF Commands
N/A
Description
12.14 show ipv6 ref route
Use this command to display all the routing information in the IPv6 REF table.
show ipv6 ref route [ default | statistics | prefix/len ]
Parameter
Description
Parameter
Description
default
Specifies the default route.
statistics
Statistics
prefix/len
Displays the route with the specified prefix (X:X:X:X::X/<0-128>).
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
This command is used to display all routing information in the IPv6 REF table. The command can also
be used to display information about the default route, the route with the specified prefix, and
statistics of all types of routes.
Configuration
The following example displays all the routing information in the REF IPv6 table.
Examples
Ruijie#show ipv6 ref route
Codes: * - default route
prefix/len
weight path_id
next_hop interface
2001:da8:ffe:2::/64
1
3
::
GigabitEthernet 0/0
2001:da8:ffe:2::3/128
1
2
::1
Local 1
fe80::/10
1
fe80::21a:a9ff:fe3b:fa41/128
6
1
::
2
Null 0
::1
Field
Description
prefix/len
IPv6 prefix and prefix length.
path-id
Adjacent identity
next-hop
Address of next hop
weight
Routing weight
Local 1
Command Reference
interface
Related
Commands
Command
N/A
Platform
Description
N/A
IPv4/IPv6 REF Commands
Interface
Description
N/A
Command Reference
TFTP Server Commands
13 TFTP Server Commands
13.1 tftp-server enable
Use this command to enable the TFTP server.
Use the no form of this command to disable the TFTP server.
tftp-server enable
no tftp-server enable
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
The TFTP server is disabled by default.
Command
Global configuration mode
Modes
Usage Guide
Only with the TFTP server enabled and the top directory configured meanwhile, TFTP clients are able to
upload or download files.
Configuration
The following example enables the TFTP server and sets the top directory of the TFTP server to /syslog.
Examples
Ruijie(config)# tftp-server topdir /syslog
Ruijie(config)# tftp-server enable
The following example disables the TFTP server.
Ruijie(config)# no tftp-server enable
Platform
Description
N/A
13.2 tftp-server topdir
Use this command to configure the top directory for TFTP clients.
Use the no or default form of this command to restore the default setting.
tftp-server topdir directory
no tftp-server topdir
default tftp-server topdir
Parameter
Description
Parameter
Description
Command Reference
TFTP Server Commands
The top directory for TFTP clients to access. “/” means the root directory.
directory
Defaults
No top directory is configured by default (no read-write permission).
Command
Global configuration mode
Modes
Usage Guide
The top directory on the TFTP server defines what files and folders the client is able to access. And the client
cannot access the TFTP server before a top directory is correctly configured for the server.
Configuration
The following example enables the TFTP servicer and sets the top directory for TFTP clients to /syslog.
Examples
Ruijie(config)# tftp-server topdir /syslog
Ruijie(config)# tftp-server enable
The following example removes the top directory.
Ruijie(config)# no tftp-server topdir
Platform
Description
N/A
13.3 show tftp-server updating-list
Use this command to display the progress of downloading the TFTP client.
show tftp-server updating-list
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Global configuration mode/Privileged configuration mode/Interface configuration mode
Modes
Usage Guide
This command is supported only on AM5528 products.
Configuration
The following example displays the progress of downloading the TFTP client.
Examples
Ruijie# show tftp-server updating-list
IP Address
Interface
File Name
TX
Elapsed
---------------------- ---------------------- --------------------------------- -------171.208.208.2
GigabitEthernet 0/7
main_map552.bin
Command Reference
Platform
Description
N/A
TFTP Server Commands
Command Reference
NAT Commands
14 NAT Commands
14.1 address
Use this command to configure the address range of an empty NAT address pool.
Use the no form of this command to delete the address range of an address pool.
address start-ip end-ip [ match interface interface ]
no address start-ip end-ip [ match interface interface]
address interface interface [ match interface interface ]
no address interface interface [ match interface interface]
Parameter
Parameter
Description
Description
start-ip
Start IP address of an address block
end-ip
End IP address of an address block
Sets the interface used when NAT has multiple outside
interfaces. The addresses defined in a pool use interface
addresses and are used when the interface addresses
interface interface
are unknown and will be negotiated.
Note that this parameter must be used with the match
interface interface parameter, and the two interfaces
must be consistent. Otherwise, NAT may fail.
Sets the interface used when NAT has multiple outside
match interface interface
interfaces. When the router determines the egress of
packets, NAT uses this egress to select an address that
matches it from the pool.
Defaults
Command
Mode
Usage Guide
No address range is defined by default.
NAT address pool configuration mode
If you need to define multiple address ranges for an address pool, first enter NAT address pool
configuration mode, and then define the NAT address ranges. These commands are not supported
on aggregate ports.
Configuration
The following example creates a mulnets address pool and defines two address blocks.
Examples
Ruijie(config)# ip nat pool mulnets netmask 255.255.255.0
Ruijie(config-nat)# address 172.16.10.1 172.16.10.254
Ruijie(config-nat)# address 192.168.100.1 192.168.100.50
Related
Command
Description
Command Reference
Commands
Platform
Description
ip nat pool
NAT Commands
Defines the IP NAT address pool.
N/A
14.2 ip nat
Use this command to perform NAT on an interface.
Use the no form of this command to disable NAT on an interface.
ip nat { inside | outside }
no ip nat { inside | outside }
Parameter
Description
Defaults
Command
Mode
Usage Guide
Parameter
Description
inside
Perfoms NAT on incoming packets.
outside
Performs NAT on outgoing packets.
NAT is not enabledby default.
Interface configuration mode
NAT is performed only when packets are routed between outside and inside interfaces and meet a
certain rule. Therefore, at least an inside interface and an outside interface must be configured.
Configuration
The following example dynamically translates the internal host 192.168.12.0/24 to the network
Examples
segment with the global address 200.168.12.0/28. NAT is not allowed for the hosts in other network
segments of the internal network.
Ruijie#configure terminal
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ip address 192.168.12.6 255.255.255.0
Ruijie(config-if-GigabitEthernet 0/0)# ip nat inside
Ruijie(config-if-GigabitEthernet 0/0)# exit
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address 200.168.12.17
255.255.255.0
Ruijie(config-if-GigabitEthernet 0/1)# ip nat outside
Ruijie(config-if-GigabitEthernet 0/1)# exit
Ruijie(config)# ip nat pool net200 200.168.12.1 200.168.12.15 netmask
255.255.255.0
Ruijie(config)# ip nat inside source list 1 pool net200
Ruijie(config)# access-list 1 permit 192.168.12.0 0.0.0.255
Command Reference
NAT Commands
Related
Command
Description
Commands
clear ip nat translation
Clears the NAT entry table.
ip nat inside destination
Enables NAT for the internal destination address.
ip nat inside source
Enables NAT for internal source addresses.
ip nat outside source
Enables NAT for external source addresses.
ip nat pool
Defines the IP NAT address pool.
show ip nat translations
Displays IP NAT entries.
Platform
Description
N/A
14.3 ip nat application
Use this command to implement special application of NAT.
Use the no form of this command to cancel this special application.
ip nat application source list list-num destination dest-ip
{ dest-change | src-change } ip-addr
ip nat application source list list-num destination
{ tcp | udp
dest-ip port-num} { dest-change ip-addr port-num | src-change
ip-addr }
no ip nat application source list list-num destination dest-ip
{ dest-change | src-change } ip-addr
no ip nat application source list list-num destination
{ tcp | udp
dest-ip port-num} { dest-change ip-addr port-num | src-change
ip-addr }
Parameter
Parameter
Description
list-num
Description
Access list of internal local addresses, that is, match
criteria of the source addresses of packets
Internal global address match, that is, match criteria of the
destination addresses of packets. NAT entries are created
dest-ip
only when the destination IP address matches this
address and the source IP address matches the
previously defined access list.
Matches the internal global address and the destination
port. NAT entries are created only when the destination
tcp dest-ip port-num
address and port of the TCP packet match the criteria
defined here and the source address matches the
previously defined access list.
Matches the internal global address and the destination
udp dest-ip port-num
port. NAT entries are created only when the destination
address and port of the UDP packet match the criteria
Command Reference
NAT Commands
defined here and the source address matches the
previously defined access list.
dest-change ip-addr
Changes the destination address and port of the packet
port-num
that meets criteria.
src-change ip-addr
Defaults
Changes the source address of the packet that meets
criteria.
This rule is not defined by default.
Command
Mode
Global configuration mode
Usage Guide
In some advanced applications of NAT, it is necessary to change the source or destination
addresses of some particular IP packets. This command can be used to perform this operation. The
following example uses this command to implement the domain name resolution relay service (DNS
relay).
Configuration
The following example allows the host in the network segment 192.168.1.0 in the internal network to
Examples
point the DNS server to the IP address 192.168.1.1 of the NAT inside interface. The NAT function of
the router forwards the DNS request from the host in the internal network to the true DNS server
202.101.98.55, and forwards the DNS response packet to the host in the internal network.
Implement this function with the ip nat application command. The semantics is: If there is a UDP
packet whose source address meets the criteria of access-list 1, destination address is 192.168.1.1,
and destination port is 53, and then change the destination address of this IP packet to
202.101.98.55 and the destination port to 53.
Ruijie#configure terminal
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ip address 192.168.1.1 255.255.255.0
Ruijie(config-if-GigabitEthernet 0/0)# ip nat inside
Ruijie(config-if-GigabitEthernet 0/0)# exit
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address 200.168.12.1 255.255.255.0
Ruijie(config-if-GigabitEthernet 0/1)# ip nat outside
Ruijie(config-if-GigabitEthernet 0/1.)# exit
Ruijie(config)# ip nat pool net200 200.168.12.2 200.168.12.10 netmask
255.255.255.0
Ruijie(config)# ip nat inside source list 1 pool net200
Ruijie(config)# access-list 1 permit 192.168.12.0 0.0.0.255
Ruijie(config)# ip nat application source list 1 destination udp 192.168.1.1
53 dest-change 202.101.98.55 53
Ruijie(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Related
Command
Description
Command Reference
Commands
NAT Commands
address
Defines the address block range of an address pool.
clear ip nat translation
Clears the NAT entry table.
ip nat
Specifies that NAT should be performed on the traffic that
passes this interface.
ip nat inside destination
Enables NAT for the internal destination address.
ip nat inside source
Enables NAT for internal source addresses.
ip nat outside source
Enables NAT for external source addresses.
show ip nat translations
Displays IP NAT entries.
Platform
Description
N/A
14.4 ip nat inside destination
Use this command to enable NAT for the internal destination address.
Use the no form of this command to disable NAT for the internal destination address.
ip nat inside destination list access-list-number pool pool-name
no ip nat inside destination list access-list-number
Parameter
Parameter
Description
Description
Internal global addresses are defined in the access list. If
the external network accesses the address in the access
list, the internal global address will be translated into the
list access-list-number
internal local address defined in the pool. Note that here
you should use the extended ACL in the range from 100
to 199 whose destination IP address is a virtual IP
address.
A space in the address pool that defines the internal local
pool pool-name
address. An internal local address will be assigned from
this space during destination address translation.
Defaults
NAT for the internal source address is disabled by default.
Command
Mode
Global configuration mode
Usage Guide
Translation of internal destination addresses can be performed to realize load balance of TCP traffic.
When a host in the internal network is overloaded with TCP traffic, multiple hosts may be required to
balance the load of TCP traffic. In this case, you can use NAT to realize load balance of TCP traffic.
NAT will create a virtual host to provide the TCP service. This virtual host corresponds to multiple
real internal hosts. Then, NAT polls and replaces the destination address, so as to distribute the load.
However, no change is made to other IP traffic, unless NAT is configured otherwise.
Command Reference
NAT Commands
When NAT is configured to realize TCP load balance, the address of the internal network can be
either a valid global address or a private network address. However, the address of the virtual host
must be a valid global address.
Configuration
The following example configures the internal network to provide a virtual host address 10.10.10.100
Examples
externally. The external network uses this address to access the WWW service. The hosts that
provide services in the internal LAN are actually two hosts with the addresses 10.10.10.1 and
10.10.10.2. During NAT, load balance is realized in polling mode.
Ruijie#configure terminal
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ip address 10.10.10.254 255.255.255.0
Ruijie(config-if-GigabitEthernet 0/0)# ip nat inside
Ruijie(config-if-GigabitEthernet 0/0)# exit
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address 200.168.12.17
255.255.255.0
Ruijie(config-if-GigabitEthernet 0/1)# ip nat outside
Ruijie(config-if-GigabitEthernet 0/1)# exit
Ruijie(config)# ip nat pool net10 10.10.10.1 10.10.10.2 prefix-length 24 type
rotary
Ruijie(config)# ip nat inside destination list 100 pool net10
Ruijie(config)# access-list 100 permit ip any host 10.10.10.100
Related
Commands
Command
Description
clear ip nat translation
Clears the NAT entry table.
ip nat
Specifies that NAT should be performed on the traffic that
passes this interface.
ip nat inside source
Enables NAT for internal source addresses.
ip nat outside source
Enable NAT for external source addresses.
ip nat pool
Defines the IP NAT address pool
show ip nat translations
Displays IP NAT entries.
Platform
Description
N/A
14.5 ip nat inside source
Use this command to enable NAT for internal source addresses in interface configuration mode.
Use the no form of this command to disable static or dynamic NAT.
ip nat inside source list access-list-number { interface interface-type interface-number | pool
Command Reference
NAT Commands
pool-name } [ overload ]
ip nat inside source static local-ip global-ip [ match interface-type interface-number | netmask
mask ][ permit-inside ]
ip nat inside source static local-ip interface interface-type interface-number [permit-inside]
ip nat inside source static { tcp local-ip local-port | udp local-ip local-port } global-ip global-port
[ match interface-type interface-number | netmask mask ] [ permit-inside ]
ip nat inside source static { tcp local-ip local-port | udp local-ip local-port } interface interface-type
interface-number global-port [ permit-inside ]
no ip nat inside source list access-list-number
no ip nat inside source static local-ip global-ip
no ip nat inside source static local-ip interface interface-type interface-number
no ip nat inside source static { tcp local-ip local-port | udp local-ip local-port } global-ip global-port
no ip nat inside source static { tcp local-ip local-port | udp local-ip local-port } interface
interface-type interface-number global-port
Parameter
Parameter
Description
Description
Specifies the access list of local addresses. NAT
list access-list-number
entries will be created only for the traffic with the
source address that matches this access list.
Uses the global address of the outside interface to
interface interface-type interface-number
perform Network Address Port Translation (NAPT),
also called extended NAT.
pool pool-name
Uses a global address in the address pool to
perform NAT.
(Optional) Every global address in the pool can be
reused for translation, namely, NAPT. Currently,
overload
this parameter is not set, and global addresses are
reusable. This parameter is added in order to be
compatible with the command of Cisco.
Defines the simple static NAT. local-ip is a local
static local-ip global-ip
address, and global-ip is a global address.
The no form of this command does not check the
validity of global-ip.
static protocol
Defines the extended static NAT. protocol can be
either TCP or UDP.
Service port number (TCP or UDP) of the local
local-port
address. Each service typically corresponds to a
service port.
Service port number of the global address. The
global-port
external network accesses the services of hosts in
the internal network through this port. This port
number can be different from local-port.
permit-inside
Allows users in the internal network to access the
Command Reference
NAT Commands
host with the IP address indicated by local-ip
through global-ip. This keyword appears only in
the ip nat inside source static command is
applicable only on routers.
match interface-type interface-number
netmask mask
Defaults
Specifies the outside interface (used in smart
DNS).
Network mask
NAT for internal source addresses is disabled by default.
Command
Mode
Global configuration mode
Usage Guide
When the IP address of the internal network is a private address and the internal network needs to
communicate with the external network, NAT must be configured to translate the internal private IP
address into the globally unique IP address.
If organizations, such as net bars or enterprises, access the network only for obtaining resources in
the external network, such as browsing Web pages, receiving and sending emails, and downloading
files, but not for providing network services for the external network, the IP address of the outside
interface can be used directly as the global address and the address is translated in NAPT mode. If
NAT is not configured, the internal network with the private address, even if physically interconnected
with the external network, is unable to interwork with the external network, because the external
network does not provide network routing for the private address.
Static NAT or NAPT should be configured for the internal hosts that provide services. To ensure
continuous service provisioning, do not use the address of the outside interface to perform NAPT
because this address is interconnected with ISP and is very likely to be translated. Generally, users
in the internal network can access the services provided by these internal hosts simply by using the
IP address of the internal network. However, some special application services can only be accessed
by users in the internal network using the global IP address. In this case, you need to add the
keyword permit-inside when configuring static NAT or static NAPT for internal source addresses.
Moreover, it is advisable to run the no ip redirects command on the inside interface to prevent the
inside interface from sending redirection packets.
Configuration
The following example dynamically translates the internal host 192.168.12.0/24 to the network
Examples
segment with the global address 200.168.12.0/28. NAT is not allowed for the hosts in other network
segments of the internal network.
Ruijie#configure terminal
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ip address 192.168.12.6 255.255.255.0
Ruijie(config-if-GigabitEthernet 0/0)# ip nat inside
Ruijie(config-if-GigabitEthernet 0/0)# exit
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address 200.168.12.17
255.255.255.0
Command Reference
NAT Commands
Ruijie(config-if-GigabitEthernet 0/1)# ip nat outside
Ruijie(config-if-GigabitEthernet 0/1)# exit
Ruijie(config)# ip nat pool net200 200.168.12.1 200.168.12.15 prefix-length
28
Ruijie(config)# ip nat inside source list 1 pool net200
Ruijie(config)# access-list 1 permit 192.168.12.0 0.0.0.255
Related
Command
Description
Commands
clear ip nat translation
Clears the NAT entry table.
ip nat
Specifies that the NAT should be performed on the
traffic that passes this interface.
ip nat inside destination
Enables NAT for the inside destination address.
ip nat outside source
Enable NAT for external source addresses.
ip nat pool
Defines the IP NAT address pool.
show ip nat translations
Displays IP NAT entries.
Platform
Description
N/A
14.6 ip nat outside source
Use this command to enable NAT for the external source addresses.
Use the no form of this command is used to disable NAT for external source addresses.
ip nat outside source list access-list-number pool pool-name
no ip nat outside source list access-list-number
ip nat outside source static global-ip local-ip
no ip nat outside source static global-ip local-ip
ip nat outside source static protocol global-ip global-port local-ip local-port
no ip nat outside source static protocol global-ip global-port local-ip local-port
Parameter
Parameter
Description
Description
Global address access list. NAT entries will be
list access-list-number
created only for the traffic with the source address
that matches this access list.
pool pool-name
static global-ip local-ip
static protocol
local-port
Uses a local address in the address pool to perform
NAT.
Defines the simple static NAT. local-ip is a local
address, and global-ip is a global address.
Defines the extended static NAT. protocol can be
either TCP or UDP.
Service port number (TCP or UDP) of the local
address. Each service typically corresponds to a
Command Reference
NAT Commands
service port. This port number can be different from
global-port.
global-port
Defaults
Service port number of the global address
NAT for external source addresses is disabled by default.
Command
Mode
Global configuration mode
Usage Guide
NAT for external source addresses is mainly used for the overlapped address space. Two private
networks to be interconnected are assigned with the same IP address, or a private network and a
public network are assigned with the same global IP address, which is called address overlap. Two
network hosts with the overlapped address cannot communicate with each other because they both
determine that the remote host is located in the local network. Overlapped address NAT is configured
to resolve the problem of communication between networks with the overlapped address. With
overlapped address NAT configured, the external network host address behaves like another
network host address in the internal network, and vice versa.
Configuration of overlapped address NAT includes two steps: 1) Configure the internal source
address NAT; 2) Configure the external source address NAT. The external source address
translation can be configured only when the address of the external network is overlapped with that
of the internal network. The external source address translation can be configured as static NAT or
dynamic NAT.
Address overlap is inevitable when a non-registered global IP address is assigned to connect to the
Internet during internal network construction. Because the internal network generally uses the
domain name to access the external network host, routers must support NAT for DNS packets.
Configuration
In the following example, the address of the internal network 92.168.12.0/24 is overlapped with that
Examples
of the external network. After translation, the internal host can access the host in the network
segment 92.168.12.0/24 in the external network through the network address 192.168.12.0/24.
Ruijie#configure terminal
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ip address 192.168.12.55 255.255.255.0
Ruijie(config-if-GigabitEthernet 0/0)# ip nat inside
Ruijie(config-if-GigabitEthernet 0/0)# exit
Ruijie(config)# interface Serial 10/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address 192.168.10.1 255.255.255.0
Ruijie(config-if-GigabitEthernet 0/1)# ip nat outside
Ruijie(config-if-GigabitEthernet 0/1)# encapsulation ppp
Ruijie(config-if-GigabitEthernet 0/1)# exit
Ruijie(config)#ip nat pool net200 200.168.12.1 200.168.12.15 prefix-length 28
Ruijie(config)#ip nat pool net192 192.168.12.1 192.168.12.254 prefix-length 24
Ruijie(config)#ip nat inside source list 1 pool net200
Ruijie(config)#ip nat outside source list 1 pool net192
Command Reference
NAT Commands
Ruijie(config)#access-list 1 permit 92.168.12.0 0.0.0.255
Ruijie(config)#ip route 192.168.12.0 255.255.255.0 192.168.100.2
Related
Command
Description
Commands
clear ip nat translation
Clears the NAT entry table.
ip nat
Specifies that NAT should be performed for the traffic
that passes this interface.
ip nat inside destination
Enables NAT for internal destination address.
ip nat inside source
Enables NAT for internal source address.
ip nat pool
Defines the IP NAT address pool.
show ip nat translations
Displays IP NAT entries.
Platform
Description
N/A
14.7 ip nat pool
Use this command to define an address pool for NAT.
Use the no form of this command to delete the address pool.
ip nat pool pool-name start-ip end-ip { netmask netmask | prefix-length prefix-length } [ type
rotary ]
ip nat pool pool-name { netmask netmask | prefix-length prefix-length } [ type rotary ]
ip nat pool pool-name { netmask netmask | prefix-length prefix-length } [ type rotary ]
[ hardware ]
no ip nat pool pool-name
Parameter
Parameter
Description
Description
pool-name
Name of the NAT address pool
start-ip
Start IP address of the NAT address pool
end-ip
End IP address of the NAT address pool
netmask netmask
Net mask of an address in the NAT address pool
Type of the NAT address pool. rotary means round
robin. That is, each address has the same
type
probability of being assigned. The type is rotary no
matter whether rotary is set. The rotary parameter
is introduced in order to keep compatible with the
command of Cisco.
Defaults
No address pool is defined by default.
Command Reference
NAT Commands
Command
Mode
Global configuration mode
Usage Guide
If multiple address blocks must be defined for an address pool, first create an empty address pool,
and define the address range.
Configuration
The following example creates an address pool named net192, with the start address 192.168.12.1,
Examples
end address 192.168.12.254, and a 24-bit net mask.
Ruijie#configure terminal
Ruijie(config)# ip nat pool net192 192.168.12.1 192.168.12.254 prefix-length 24
Related
Command
Description
Commands
address
Defines the address block range of an address pool.
clear ip nat translation
Clears the NAT entry table.
ip nat
Specifies that NAT should be performed for the
traffic that passes this interface.
ip nat inside destination
Enables NAT for inside destination addresses.
ip nat inside source
Enables NAT for internal source addresses.
ip nat outside source
Enables NAT for external source addresses.
show ip nat statistics
Displays IP NAT statistics.
show ip nat translations
Displays IP NAT entries.
Platform
Description
N/A
14.8 ip nat keepalive
Use this command to configure the interval of sending gratuitous ARP (GARP) packets with the local
address.
ip nat keepalive [ keealive_out ]
no ip nat keepalive
default ip nat keepalive
Parameter
Parameter
Description
Description
keealive_out
Sending interval
Defaults
The interval of sending GARP packets with the local address is not configured by default.
Command
Mode
Global configuration mode
Usage Guide
Some addresses in NAT rules should be taken as the local address. Sending GARP packets at
Command Reference
NAT Commands
intervals avoids address conflicts.
The following example sets the interval of sending GARP packets with the local address to 10
Configuration
seconds.
Examples
Ruijie#configure terminal
Ruijie(config)# ip nat keepalive 10
Related
Command
Description
Commands
N/A
N/A
Platform
Description
N/A
14.9 ip nat translation
Use this command to configure the NAT Application Layer Gateway (ALG).
ip nat translation { dns [ ttl ttl_time ] | ftp [ port port_num ] | tftp | pptp | h323 | rtsp }
no ip nat translation { dns | ftp | tftp | pptp | h323 | rtsp }
Parameter
Description
Defaults
Parameter
Description
ttl_time
Defines the UDP TTL for DNS. The default is 0.
port_num
Defines the port for FTP. The default is 21.
All NAT ALGs are enabled by default.
Command
Mode
Global configuration mode
In NAT application, the IP addresses and ports of data packets are changed. However, the IP
Usage Guide
addresses and ports of certain special protocols are contained in the valid data of the application
layer. To successfully perform NAT for such special protocols, the specific protocol gateway needs
to be enabled.
The following example configures DNS TTL to 30 seconds.
Ruijie#configure terminal
Ruijie(config)# ip nat translation dns ttl 30
Configuration
Examples
The following example configures Port 25 for FTP.
Ruijie#configure terminal
Ruijie(config)# ip nat translation ftp port 25
Command Reference
NAT Commands
Related
Command
Description
Commands
N/A
N/A
Platform
Description
N/A
14.10 show ip nat translations
Use this command to display NAT translations.
show ip nat translations [dev_id] [slot_id] [ acl_num ] [ icmp | tcp | udp ] [ verbose ]
Parameter
Description
Parameter
Description
icmp
Displays NAT entries only for ICMP.
tcp
Displays NAT entries only for TCP.
udp
Displays NAT entries only for UDP.
gre
Displays NAT entries only for GRE.
acl_num
Defaults
ACL number, which supports only the extended ACL
to filter the displayed content.
verbose
Displays more detailed NAT entries.
dev_id
Device ID
slot_id
Slot ID of service card
N/A
Command
Mode
Privileged EXEC mode
Usage Guide
This command can be used to display the summary of IP NAT entries, such as protocols, internal
global addresses and port numbers, internal local addresses and port numbers, external local
addresses and port numbers, and external global addresses and port numbers. Used with the
verbose parameter, it displays more detailed information, including the timeout period configured
for each entry, remaining time for this entry, and flag of the entry.
Configuration
The following example displays NAT translations.
Examples
Ruijie# show ip nat translations verbose
timeout for NAT TCP flows: 86400
timeout for NAT TCP flows after a FIN or RST: 60
timeout for NAT TCP flows after a SYN : 60
timeout for NAT UDP flows: 300
timeout for NAT DNS flows: 60
timeout for NAT ICMP flows: 60
Command Reference
NAT Commands
Pro Inside global
Inside local
Outside local
Outside global timeout vrf
tcp 192.168.5.103:1987 192.168.211.21 :1987 211.67.71.7
:80
211.67.71.7:80
timeout=85139 1
udp 192.168.5.103:1041 192.168.211.183:1041 202.101.98.55 :53 202.101.98.55:53
timeout=38 1
Field Description
Field
Pro
Inside
global
Inside local
Outside
local
Outside
global
timeout
Description
Protocol type. udp indicates the UDP translation entry. tcp indicates the TCP
translation entry. icmp indicates the ICMP translation entry.
Internal global address and port number
Internal local address and port number
External local address and port number
External global address and port number
Time (in seconds) left before this NAT entry times out
Related
Command
Description
Commands
clear ip nat translation
Clears the NAT entry table.
ip nat
Performs NAT on the traffic that passes this interface.
ip nat inside destination
Enables NAT for internal destination addresses.
ip nat inside source
Enables NAT for internal source addresses.
ip nat outside source
Enables NAT for external source addresses.
ip nat pool
Defines the IP NAT address pool.
show ip nat translations
Displays IP NAT entries.
Platform
Description
N/A
Command Reference
Proxy ARP Commands
15 Proxy ARP Commands
15.1 clear proxy_arp
Use this command to clear a specified proxy ARP entry or all proxy ARP entries.
clear proxy-arp [ip-address vlan-id ]
Parameter
Description
Parameter
ip-address
vlan-id
Defaults
N/A
Command
Privileged EXEC mode
Description
Specifies the IP address of the proxy ARP entry. By default, all proxy
ARP entries are cleared.
VLAN ID. The range is from 1 to 4094.
Mode
Usage Guide
When the MAC address of the gateway is changed, you can clear the proxy ARP entry of the
gateway to enable the device to learn the correct proxy ARP entry of the gateway as quickly as
possible.
Configuration
The following example clears all proxy ARP entries.
Examples
Ruijie# clear proxy_arp
The following example clears a specified proxy ARP entry.
Ruijie# clear proxy_arp 1.1.1.1 1
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
15.2 proxy_arp enable
Use this command to enable Layer-2 ARP Proxy.
proxy_arp enable
Use the no form of this command to disable Layer-2 ARP Proxy.
Command Reference
Proxy ARP Commands
no proxy_arp enable
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
By default, Layer-2 ARP Proxy is enabled.
Command
Global configuration mode
Mode
Usage Guide
N/A
Configuration
The following example disables Layer-2 ARP Proxy.
Examples
Ruijie(config)# no proxy_arp enable
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
15.3 proxy_arp drop wlan-ip
Use this command to drop ARP packets from WLAN (namely, CTI ports) and the source IP address
of these packets is ip_address.
proxy_arp drop wlan-ip ip-address
Use the no form of this command to remove the configuration that drops ARP packets whose source
IP address is ip_address.
no proxy_arp drop wlan-ip ip-address
Parameter
Description
Parameter
Description
ip-address
Source IP address of ARP packets to be dropped.
Defaults
By default, no ARP packets from WLAN are dropped.
Command
Global configuration mode
Mode
Usage Guide
N/A
Command Reference
Proxy ARP Commands
Configuration
The following example drops ARP packets from WLAN with their source IP address being
Examples
192.168.1.1.
Ruijie(config)# proxy_arp drop wlan-ip 192.168.1.1
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
15.4 show proxy_arp
Use this command to display all proxy ARP entries.
show proxy_arp
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays all proxy ARP entries.
Examples
Ruijie# show proxy_arp
total entry:2
ip
Related
Commands
Platform
Description
vid
mac
interface
----------------
type
----------------
----
192.168.195.68
1
0013.20a5.7a5f
Gi0/1
-------------
DYNAMIC
192.168.195.69
2
0013.20a5.7a51
Gi0/2
DYNAMIC
Command
Description
N/A
N/A
N/A
----
Command Reference
Proxy ARP Commands
15.5 show proxy_arp dynamic
Use this command to display the dynamic proxy ARP entry.
show proxy_arp dynamic
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Mode
Usage Guide
N/A
Configuration
The following example displays the dynamic proxy ARP entry.
Examples
Ruijie# show proxy_arp dynamic
ip
mac
type
----------------
---------------- ----
192.168.195.68
0013.20a5.7a5f
DYNAMIC
192.168.195.69
0013.20a5.7a51
DYNAMIC
total entry: 2
Related
Commands
Platform
Command
Description
N/A
N/A
N/A
Description
15.6 show proxy_arp statistics
Use this command to display statistics about the proxy ARP entry.
show proxy_arp statistics
Parameter
Description
Parameter
Description
N/A
N/A
Defaults
N/A
Command
Privileged EXEC mode
Command Reference
Proxy ARP Commands
Mode
Usage Guide
You can use this command to display statistics about the proxy ARP entry, such as: total proxy ARP
entries, next aging time, dropped packet count.
Configuration
The following example displays statistics about the proxy ARP entry.
Examples
Ruijie# show proxy_arp statistics
total entry: 100
next aging time: 5 seconds
dropped packets: 0
Related
Commands
Platform
Description
Command
Description
N/A
N/A
N/A
Download PDF
Similar pages