03-IP Address & Application Commands
03-IP Address & Application Commands
1. IP Address/Service Commands
2. ARP Commands
4. TCP Commands
6. Tunnel Commands
7. FPM Commands
8. NAT Commands
9. MLLB Commands
1 IP Address/Service Commands
1.1 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
Parameter Description
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.
secondary Secondary IP address
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/slave IP 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 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:
1-1
Command Reference IP Address/Service Commands
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-if)# ip address 10.10.10.1 255.255.255.0
The following example configures the master and secondary IP addresses as 10.10.10.1/24 and
10.10.20.1/24 respectively.
Ruijie(config)# interface gigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address 10.10.10.1 255.255.255.0
Ruijie(config-if-GigabitEthernet 0/1)# ip address 10.10.20.1 255.255.255.0
secondary
Notification 1. If the configured mask is formed only by the digit 1 or 0 (32-bit masks can be used for loopback
interfaces), the following prompt occurs.
Invalid IP mask.
2. If a secondary IP address is configured instaed of configuring a primary first, the following prompt
occurs.
Cannot add IP address.
Common Error 1. Configure a secondary IP address when the primary IP address is not configured.
2. Secondary IP addresses are not deleted before deleting the primary IP address.
3. The network segment of the IP address on a interface overlaps with that of another IP address
on the interface.
Platform N/A
Description
1-2
Command Reference IP Address/Service Commands
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
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.
Examples Ruijie(config)# interface dialer 1
Ruijie(onfig-if-dialer 1)# ip address negotiate
Platform N/A
Description
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
1-3
Command Reference IP Address/Service Commands
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.
Platform N/A
Description
1.4 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
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 the destination address of IP broadcast packets generated by this
Examples interface to 0.0.0.0.
Ruijie(config)# interface gigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip broadcast-address 0.0.0.0
Notification If a broadcast address is configured for the interface without a primary IP address configured, the
following prompt appears.
1-4
Command Reference IP Address/Service Commands
Platform N/A
Description
1.5 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
Usage Guide IP directed broadcast packet is an IP packet whose destination address is an IP subnet
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.
1-5
Command Reference IP Address/Service Commands
Configuration The following example enables forwarding of directed broadcast packet on the GigabitEthernet
Examples 0/1 port of a device.
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip directed-broadcast
Platform N/A
Description
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 ]
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
1-6
Command Reference IP Address/Service Commands
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
Platform N/A
Description
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 ] ]
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.
1-7
Command Reference IP Address/Service Commands
Notification 1. Create an IP address pool when this function is disabled. In this case, the following prompt
occurs.
% IP local pool is disabled!
2. If the high-ip-address is smaller than the low-ip-address, or they don’t reside on the same
network segment, the following prompt occurs.
% Invalid address range!
Platform N/A
Description
1.8 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
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 GigabitEthernet 0/1 interface of a device to respond the ICMP
Examples mask request message.
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip mask-reply
Platform N/A
1-8
Command Reference IP Address/Service Commands
Description
1.9 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
Defaults It is the same as the value configured in the interface command mtu by default.
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 GigabitEthernet 0/1 interface to 512 bytes.
Examples Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip mtu 512
Platform N/A
Description
1.10 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.
ip redirects
no ip redirects
1-9
Command Reference IP Address/Service Commands
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 GigabitEthernet 0/1 interface.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# no ip redirects
Platform N/A
Description
1.11 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
Usage Guide RGOS supports IP source route. When the device receives an IP packet, it will check the options of
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.
1-10
Command Reference IP Address/Service Commands
Platform N/A
Description
1.12 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
Configuration The following example sets the TTL value of the unicast packet to 100.
Examples Ruijie(config)# ip ttl 100
Platform N/A
Description
Use the no form of this command to disable the function of sending TTL timeout message.
1-11
Command Reference IP Address/Service Commands
no ip ttl-expires enable
Usage Guide If the TTL of the IP packet forwarded by the device expires, the device needs to send an error packet to the
source end.
In order to prevent the device from being identified by other devices using Traceroute and suffering attacks,
you can disable this function. After the function is disabled, the device doesn’t send a TTL timeout error
packet to the source end when it receives the TTL timeout packets.
Configuratio The following example disables the function of sending TTL timeout message.
n Example Ruijie(config)# no ip ttl-expires enable
Verification N/A
Platform
N/A
Description
1.14 ip unnumbered
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
1-12
Command Reference IP Address/Service Commands
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:
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 The following example configures the local interface as an unnumbered interface and sets the
Examples associated interfacet to GigabitEthernet 0/1 (an IP address is configured for the interface).
Ruijie(config-if)# ip unnumbered gigabitethernet 0/1
Platform N/A
Description
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
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.
1-13
Command Reference IP Address/Service Commands
RGOS software will send ICMP host unreachable message to source data if it can not forward a
message due to no routing.
Configuration The following example disables sending ICMP destination unreachable message on
Examples GigabitEthernet 0/1.
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# no ip unreachables
Platform N/A
Description
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
Defaults No IP address is allocated to the peer end through PPP negotiaon by default.
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
1-14
Command Reference IP Address/Service Commands
Platform N/A
Description
Defaults N/A.
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
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/0 no address no address
down down
GigabitEthernet 0/1 no address no address
1-15
Command Reference IP Address/Service Commands
down down
GigabitEthernet 0/2 no address no address
down down
GigabitEthernet 0/3 10.51.209.203/24 no address
up up
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 interface-type interface-number
command.
Ruijie# show ip interface gigabitethernet 0/1
GigabitEthernet 0/1
IP interface state is: DOWN
IP interface type is: BROADCAST
IP interface MTU is: 1500
IP address is:
No address configured
IP address negotiate is: OFF
Forward direct-broadcast is: OFF
ICMP mask reply is: OFF
Send ICMP redirect is: OFF
Send ICMP unreachable is: OFF
DHCP relay is: OFF
Fast switch is: ON
Help address is: 0.0.0.0
Proxy ARP is: ON
ARP packet input number: 0
Request packet : 0
Reply packet : 0
Unknown packet : 0
TTL invalid packet number: 0
ICMP packet input number: 0
Echo request : 0
Echo reply : 0
Unreachable : 0
Source quench : 0
Routing redirect : 0
1-16
Command Reference IP Address/Service Commands
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.
Fast switch is: Show whether the IP fash switching function is enabled.
TTL invalid packet number: Show the TTL invalid packet number
Platform N/A.
Description
1-17
Command Reference IP Address/Service Commands
Defaults N/A
Field Description
Platform N/A
Description
1-18
Command Reference IP Address/Service Commands
Defaults N/A.
1-19
Command Reference IP Address/Service Commands
Tunnel 1
Received 0 packets, 0 bytes
Unicast:0,Multicast:0,Broadcast:0
Discards:0
HdrErrors:0(BadChecksum:0,TTLExceeded:0,Others:0)
NoRoutes:0
Others:0
Sent 21584 packets, 1122848 bytes
Unicast:21584,Multicast:0,Broadcast:0
Field Description
Field Description
Total Indicates displaying the statistics of all interfaces.
GigabitEthernet 0/1 Indicates displaying the statistic of the GigabitEthernet 0/1
Indicates the number and size of received packets (including
Received unicast/multicast/broadcast packets). Also, the number of packet
loss and the cause are displayed.
Indicates the number and size of packets sent (including
Sent
unicast/multicast/broadcast packets).
Platform N/A
Description
Defaults N/A
1-20
Command Reference IP Address/Service Commands
Field Description
Platform N/A
Description
Defaults N/A.
Field Description
Number Number
Protocol Protocol
1-21
Command Reference IP Address/Service Commands
Platform N/A
Description
Defaults N/A.
1-22
Command Reference IP Address/Service Commands
*
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
*
12 rg-sshd STREAM TCP 0.0.0.0:22 0.0.0.0:0
LISTEN
13 rg-telnetd STREAM TCP 0.0.0.0:23 0.0.0.0:0
LISTEN
14 wbard STREAM TCP 0.0.0.0:4389 0.0.0.0:0
LISTEN
15 wbard STREAM TCP 0.0.0.0:7165 0.0.0.0:0
LISTEN
Total: 15
Field Description
Field Description
Protocol Protocol.
Platform N/A
Description
1-23
Command Reference IP Address/Service Commands
Defaults N/A.
Field Description
Number Number.
Field Description
Number of IPv4 UDP sockets is x Displays the total number of IPv4 UDP sockets.
Platform N/A
Description
1-24
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 [ description string ]
no arp ip-address
Defaults There is no static mapping record in the ARP cache table by default.
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
Notification 1. Failed to delete the ARP entry because it does not exist.
Cannot remove ARP. ARP entry does not exist or reserved.
2. A static ARP entry cannot be added because the ARP cache is full or the corresponding IP
address is consistent with the local IP address.
2-1
Command Reference ARP Commands
Platform N/A
Description
Usage Guide You should modify the configuration to access the network in the following two cases:
The client IP address is in the network segment configured on an interface connected directly with
the device, but the gateway IP address is not the IP address configured for the directly connected
interface.
The client IP address is not in the network segment configured on the interface connected directly
with the device. Instead, it is in another network segment, causing an IP address conflict.
If the client IP address is not in the connected network segment, the dynamic ARP table entries and
directly connected routes are generated following ARP requests initiated by clients. In the following
two cases (but not limited to the following two cases), clients cannot access the network and your
client should re-learn the gateway IP address after clearing ARP table entries.
The device proxy responses the ARP request. After learning the device MAC address, dynamic ARP
table entries and directly connected routes are cleared, the response packet cannot reach the client.
The device proxy responses the ARP request. The client disables any IP ARPand then enables it on
the interface after the learning the devices MAC address.
Disabling any IP ARP will clear dynamic ARP table entries and directly connected routes, causing
the response packet unable to reach the client.
If there are corresponding static ARP tables entries or ARP table entries of the VRRP IP address,
dynamic ARP table entries generated by any IP ARP may be overwritten or not be added, causing
any IP ARP failure.
2-2
Command Reference ARP Commands
Platform N/A
Description
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
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
Platform N/A
2-3
Command Reference ARP Commands
Description
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
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 GigabitEthernet 0/1 per second.
Examples Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# arp gratuitous-send interval 1
The following example stops sending the free ARP request to GigabitEthernet 0/1.
Ruijie(config)# interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# no arp gratuitous-send
Platform N/A
Description
Use this command to configure the static ARP on the management interface. Use the no form of this
command to restore the default setting.
arp oob ip-address mac-address type
no arp oob ip-address
2-4
Command Reference ARP Commands
Usage Guide RGOS uses the ARP cache table to search for the 48-bit MAC address according to the 32-bit IP
address.
Most hosts support dynamic ARP analysis, so static ARP mapping does not need to be configured.
The clear arp-cache oob command is used to clear the ARP mapping learned by the management
port dynamically.
If no management interface is specified, the static ARP is configured on the first management
interface by default. If you specify the first management interface, the mgmt-name parameter is not
displayed by running the show run command.
Configuration The following example configures a static ARP mapping record for the Ethernet host
Examples Ruijie(config)# arp oob 1.1.1.1 4e54.3800.0002 arpa
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
Use this command to 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
2-5
Command Reference ARP Commands
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
Platform N/A
Description
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
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.
2-6
Command Reference ARP Commands
Platform N/A
Description
Use this command to enable ARP scanning. Use the no form of this command to restore the
default setting.
arp scan [ start-ip-address end-ip-address ]
no arp scan [ start-ip-address end-ip-address ]
Usage Guide This function is used together with the ARP turning function (from dynamic to static).
The IP address with neighboring ARP entries existing is not scanned.
If you know the allocated IP range with LAN, you can specify the ARP scan range. The number of
the specified IP addresses cannot be greater than 1024.
The start/end IP address of the ARP scan range must be in the same subnet as the interface IP
address.
If you do not specify the IP address range, only the primary IP subnet on the interface is scanned.
The subnet mask cannot be smaller than 22 bits.
ARP scanning takes effect once configured. It cannot be saved for the next time use.
ARP scanning takes effect on only an UP L3 interface (The link is UP and the port is configured
with an IP address).
Configuration The following example enables ARP scanning with the IP address range unspecified.
Examples Ruijie(config)# interface gi 0/0
Ruijie(config-if-GigabitEthernet 0/0)# arp scan
The following example enables ARP scanning with the IP address range specified.
Ruijie(config)# interface gi 0/0
Ruijie(config-if-GigabitEthernet 0/0)# arp scan 1.1.1.1 1.1.1.10
2-7
Command Reference ARP Commands
Platform N/A
Description
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
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.
The ARP aging time can be configured on global configuration mode and interface configuration
2-8
Command Reference ARP Commands
mode. But the ARP aging time configured on the interface has the higher prioprity than the aging
time configured globally. Therefore, if the ARP aging time on the interface 1 is set to 1,000 seconds,
the ARP aging time on the interface 1 is 1,800 seconds even when the ARP aging time is globally
set to 3,000 seconds, and the ARP aging time on other interfaces is 3,000 seconds.
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 GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# arp timeout 120
The following example globally configures the ARP aging time as 3,000 seconds. If another aging
time is not set on the interface, the ARP aging time of all L3 interfaces is 3,000 seconds.
Ruijie(config)# arp timeout 3000
Platform N/A
Description
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
Defaults N/A
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
real requirements.
2-9
Command Reference ARP Commands
Platform N/A
Description
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
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.
Platform N/A
Description
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
2-10
Command Reference ARP Commands
Usage Guide This command is used to prevent source consuming caused by ARP spoofing. When the trusted
ARP monitoring is enabled on a L3 interface, the ARP request packet is received by this interface:
If the corresponding entry does not exist, the system creates a dynamic ARP entry and performs the
NUD (neighbor unreachability detection) within 1 to 5 seconds. That is, the newly learned ARP entry
is set to aging state and the unicast ARP request is sent. If the peer ARP is updated within the aging
time, the entry is saved. Otherwise, the entry is deleted.
If the ARP entry already exists and the MAC address doesn’t be updated, the NUD is not performed.
If the MAC address of existing ARP entry has been updated, the NUD is also performed.
Enabling this function may affect the learning ability of ARP due to the strict confirmation added to
the ARP learning process.
When this function is disabled, the NUD is not required in ARP entry learning and ARP update.
Platform N/A
Description
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
Defaults The default is the ARP table size supported by the device.
2-11
Command Reference ARP Commands
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
Platform N/A
Description
2.14 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
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.
2-12
Command Reference ARP Commands
Platform N/A
Description
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]
Defaults N/A
Usage Guide This command can be used to refresh an ARP cache table.
On a NFPP-based (Network Foundation Protection Policy) device, it receives one ARP packet for
every mac/ip address per second by default. If the interval of two clear arp times is within 1s, the
second response packet will be filtered and the ARP packet will not be resolved for a short time.
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 GigabitEthernet 0/1.
2-13
Command Reference ARP Commands
Platform N/A
Description
Defaults N/A
Usage Guide On a device supporting Network Foundation Protection Policy (NFPP), every MAC / IP address
receives an ARP packet per second by default. If the clear arp oob command is run twice within one
second, the second response packet may be filtered, causing ARP uanalysis for a short time.
Configuration The following example clears the cache table of dynamic ARP mapping records.
Examples Ruijie# clear arp-cache oob
The following example clears dynamic ARP table entry 1.1.1.1.
Ruijie# clear arp-cache oob 1.1.1.1
The following example clears the dynamic ARP table entry within the specified subnet.
Ruijie# clear arp-cache oob 1.0.0.0 255.0.0.0
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
2-14
Command Reference ARP Commands
2.17 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
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.
Platform N/A
Description
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 ] ]
2-15
Command Reference ARP Commands
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
The meaning of each field in the ARP cache table is described as below:
Table 1 Fields in the ARP cache table
Field Description
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 “-”.
The following example displays the ARP entries of the address 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 GigabitEthernet 0/7
The following example displays the ARP entries of the subnet 192.168.195.0/24
2-16
Command Reference ARP Commands
The following example displays the ARP entries of the MAC address 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 GigabitEthernet 0/7
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 “-”.
origin Origin of the static ARP enteries. “Configure” means configuring maually;
“Authentication” means generating via authentication.
Platform N/A
Description
Use this command to display the number of ARP entries in the ARP cache table.
2-17
Command Reference ARP Commands
Defaults N/A
Configuration The following example displays the output result of the show arp counter command:
Examples Ruijie# show arp counter
ARP Limit: 75000
Count of static entries: 0
Count of dynamic entries: 1 (complete: 1 incomplete: 0)
Total: 1
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
entries.
Platform N/A
Description
Use this command to display the details of the Address Resolution Protocol (ARP) cache table.
show arp detail [ interface-type interface-number | trusted [ ip [ mask ] ] | [ ip [ mask ] | mac-address
| static | complete | incomplete ]
Parameter
Parameter Description
Description
interface-type interface-number Displays the ARP of the layer 2 port or the layer 3 interface.
trusted Displays the trusted ARP entries.
ip Displays the ARP entry of the specified IP address.
ip mask Displays the ARP entries of the network segment included
2-18
Command Reference ARP Commands
Defaults N/A
Usage Guide Use this command to display the ARP details, such as the ARP type (Dynamic, Static, Local, Trust),
the information on the layer2 port.
If you enter a min_value greater than max_value, no error message is prompted. Instead, ARP
entries corresponding to the subvlan are displayed.
Configuration The following example displays arp details including InnerVLAN on products supporting QinQ
Examples termination:
Ruijie# show arp detail
IP Address MAC Address Type Age(min) Interface Port
SubVlan InnerVlan
20.1.1.2 0020.0101.0002 Static -- Te2/5 -- --
20.1.1.1 00d0.f822.33bb Local -- Te2/5 -- --
1.1.1.2 00d0.1111.1112 Dynamic 1 Vl2 Te2/1 4
300
1.1.1.1 00d0.f822.33bb Local -- Vl2 -- --
The meaning of each field in the ARP cache table is described as below:
Table 1 Fields in the ARP cache table
Field Description
2-19
Command Reference ARP Commands
Platform N/A
Description
Defaults N/A
Usage Guide This command is used to display the ARP cache table. The complete / incomplete key word
represents analyzed / unanalyzed ARP table entries.
Configuration The following example displays the outcome of the running the show arp oob command.
Examples Ruijie# show arp oob
Total Numbers of Arp: 7
Protocol Address Age(min) Hardware Type Interface
Internet 192.168.195.68 0 0013.20a5.7a5f arpa mgmt 0
Internet 192.168.195.67 0 001a.a0b5.378d arpa mgmt 0
Internet 192.168.195.65 0 0018.8b7b.713e arpa mgmt 0
Internet 192.168.195.64 0 0018.8b7b.9106 arpa mgmt 0
Internet 192.168.195.63 0 001a.a0b5.3990 arpa mgmt 0
Internet 192.168.195.62 0 001a.a0b5.0b25 arpa mgmt 0
2-20
Command Reference ARP Commands
Field Description
The age of the table entry. For the local IP address, the
field is displayed as ’-’. For the static table entry, the field
Age(min) is displayed as <static>. For the dynamic table entry, the
field indicates the time for which the table entry has been
learned, in the unit of minutes.
48-bit MAC address, written as a dotted triple of four-digit
Hardware
hexadecimal numbers.
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
2-21
Command Reference ARP Commands
Defaults 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
-------------------- -------- -------- -------- -------- -------
GigabitEthernet 0/0 0 0 0 0 0
GigabitEthernet 0/1 0 0 0 0 0
GigabitEthernet 0/2 0 0 0 0 0
GigabitEthernet 0/3 0 0 0 0 0
GigabitEthernet 0/4 0 0 0 0 0
GigabitEthernet 0/5 0 0 0 0 0
GigabitEthernet 0/6 0 0 0 0 0
GigabitEthernet 0/7 59068 100 0 103 84
GigabitEthernet 0/9 0 0 0 0 0
Description of fields:
Field description
Received Requests Number of received ARP requests
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
Platform N/A
Description
2-22
Command Reference ARP Commands
Use this command to display the aging time of a dynamic ARP entry on the interface.
show arp timeout
Defaults N/A.
Configuration The following example displays the output of the show arp timeout command:
Examples Ruijie# show arp timeout
Interface arp timeout(sec)
---------------------- ----------------
GigabitEthernet 0/0 3600
GigabitEthernet 0/1 3600
GigabitEthernet 0/2 3600
GigabitEthernet 0/3 3600
GigabitEthernet 0/4 3600
GigabitEthernet 0/5 3600
GigabitEthernet 0/6 3600
Description of fields:
Field description
Platform N/A
Description
Use this command to display the Address Resolution Protocol (ARP) cache table.
show ip arp
2-23
Command Reference ARP Commands
Defaults N/A.
Each field in the ARP cache table has the following meanings:
Field Description
The type of hardware address. The value is ARPA for all Ethernet
Type
addresses.
Platform N/A
Description
2-24
Command Reference IP Event Dampening Commands
3.1 dampening
Use this command to enable the IP event dampening function on the interface. Use the no or default
form of this command to disable this function.
dampening [ half-life-period [ reuse-threshold suppress-threshold max-suppress [ restart
[ restart-penalty ] ] ] ]
no dampening
default dampening
Parameter
Parameter Description
Description
half-life-period Configures the half-life period of suppression penalty. The range is
from 1 to 30. The unit is seconds. The default value is 5 seconds.
reuse-threshold Configures the penalty threshold to unsuppress the interface. The
range is from 1 to 20,000. The default value is 1,000.
suppress-threshold Configures the penalty threshold to suppress the interface. The range
is from 1 to 20,000. The default value is 2,000.
max-suppress Configures the maximum suppress time. The range is from 1 to 255.
The default value is 4 times of the half-life-period.
restart Activates the restart penalty.
restart-penalty Configures the initial penalty value on the interface. The range is from
1 to 20,000. The default value is 2,000.
Usage Guide This function will influence the modules of the directly-connected/host route, static route, dynamic
route and VRRP. If one interface meets the configuration condition of this command, which is in the
suppression status, the above influenced modules consider the status of this interface as DOWN, so
as to delete the corresponding route and not transcieve the data packets on this interface.
Re-configuring the dampening command on the interface that has been configured this command
makes all dampening information on this interface cleared. However, the interface flapping times will
be remained unless use the clear counters command to clear the statistical information of the
interface.
Too small max-suppress configured may cause the maximum penalty value obtained from the
calculation smaller than the suppression threshold to make this interface will not be suppressed
forever. Therefore, it belongs to the erroneous configuration. In this case, the following message will
3-1
Command Reference IP Event Dampening Commands
Related
Command Description
Commands
clear counters Clears the interface counters.
Displays the statistics of the dampening
show dampening interface
interface.
show interface dampening Displays details of the dampening interface.
Platform When a Layer-3 port is converted to a Layer-2 port, the IP Event Dampening configuration on the port
Description will be deleted.
Parameter
Parameter Description
Description
N/A N/A
Defaults N/A
Command Privileged EXEC mode/ global configuration mode/ interface configuration mode
mode
Configuration The following example displays the statistics of the dampening interface.
Examples Ruijie# show dampening interface
3 interfaces are configured with dampening.
3-2
Command Reference IP Event Dampening Commands
Related
Command Description
Commands
Enables the IP event dampening function on
dampening
the interface.
clear counters Clears the interface counters.
Displays details of IP event dampening
show interface dampening
configuration.
Platform N/A
Description
Parameter
Parameter Description
Description
interface-id Interface name
Defaults N/A
Command Privileged EXEC mode/ global configuration mode/ interface configuration mode
mode
Usage Guide If the interface-id is specified, only the dampening information of this specified interface is displayed.
Configuration The following example shows the details of IP event dampening configuration.
Examples Ruijie# show interface GigabitEthernet 0/1 dampening
Flaps Penalty Supp ReuseTm HalfL ReuseV SuppV MaxSTm MaxP Restart
0 0 FALSE 0 5 1000 2000 20 16000 0
Domain Description
Flaps Interface flapping times.
Penalty The current penalty value on the interface.
Supp Suppressed or not.
ReuseTm Time to unsuppress the interface, in seconds.
HalfL Half-life period, in seconds.
ReuseV Unsuppressed threshold.
SuppV Start suppression threshold.
3-3
Command Reference IP Event Dampening Commands
Related
Command Description
Commands
dampening Enables the IP event dampening function.
clear counters Clears the interface counters.
show dampening interface Displays statistics of the dampening interface.
Platform N/A
Description
3-4
Command Reference TCP Commands
4 TCP Commands
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
Parameter Description
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.
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
Command Description
Commands
N/A N/A
4-1
Command Reference TCP Commands
Platform N/A
Description
Use this command to enable the TCP keepalive function. Use the no form of this command to restore
the default setting,
ip tcp keepalive [ interval num1 ] [ times num2 ] [ idle-period num3 ]
no ip tcp keepalive
Parameter
Parameter Description
Description
The interval of sending the keepalive packet, in the range from1 to
interval num1
120 in the unit of seconds, The default is 75.
Keepalive packet sending times, in the range from 1 to 10. The
times num2
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.
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
Command Description
Commands
N/A N/A
Platform N/A
Description
4-2
Command Reference TCP Commands
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
Parameter Description
Description
max-segment-size Upper limit of the MSS value in the range from 68 to 10000 bytes
Defaults The default MSS = Outgoing IPv4/v6 MTU- IPv4/v6 header-TCP header.
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. This command applies
to both IPv4 and IPv6 TCP.
IPv4 TCP: MSS = Outgoing interface MTU –IP header size (20-byte)–TCP header size (20-byte).
If a connection supports certain options, the option length (with data offset taken into
consideration) should be deducted from an MSS value. For example, 20 bytes for MD5 digest
(with data offset taken into consideration) should be subtracted from the MSS.
The effective MSS is the smaller one between the calculated MSS and the configured MSS.
Configuration The following example sets the upper limit of the MSS value to 1300 bytes.
Examples Ruijie(config)# ip tcp mss 1300
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
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 ]
4-3
Command Reference TCP Commands
no ip tcp path-mtu-discovery
Parameter
Parameter Description
Description
The time interval for further discovery after discovering PMTU. Its
age-timer minutes
value ranges from 10 to 30 minutes. The default value is 10.
age-timer infinite No further discovery after discovering PMTU
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.
Related
Command Description
Commands
Shows the PMTU value for the TCP
show tcp pmtu
connection.
Platform N/A
Description
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
4-4
Command Reference TCP Commands
Description
N/A N/A
Usage Guide 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
Command Description
Commands
N/A N/A
Platform N/A
Description
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
Parameter Description
Description
Timeout value for SYN packets in the range from 5 to 300 in the unit
seconds
of seconds.
4-5
Command Reference TCP Commands
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
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
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
Parameter Description
Description
Size of receiving buffer and sending buffer for TCP connections in the
size
range from 128 to 65535 << 14 bytes.
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.
If the size of TCP window is larger than 65535 bytes, this function is enabled automatically.
Configuration The following example sets the TCP window size to 16386 bytes.
Examples Ruijie(config)# ip tcp window-size 16386
4-6
Command Reference TCP Commands
Commands
N/A N/A
Platform N/A
Description
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
Parameter Description
Description
The interval of sending keepalive packets, in the range from 1 to
interval
65535 in the unit of seconds. The default is 60.
The keepalive packet contains one-byte invalid data. The invalid data
garbage
is not contained by default.
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
Command Description
Commands
N/A N/A
Platform N/A
Description
4-7
Command Reference TCP Commands
Use this command to enable the keepalive function for the TCP client. Use the no form of this
command to restore the default setting,
service tcp-keepalives-out [ interval ] [ garbage ]
no service tcp-keepalives-out [ interval ] [ garbage ]
Parameter
Parameter Description
Description
The interval of sending keepalive packets, in the range from 1 to
interval
65535 in the unit of seconds. The default is 60.
The keepalive packet contains one-byte invalid data. The invalid data
garbage
is not contained by default.
Usage Guide The keepalive function enables the TCP client to detect whether the server is operating properly.
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
Command Description
Commands
N/A N/A
Platform N/A
Description
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
4-8
Command Reference TCP Commands
Parameter
Parameter Description
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
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
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
4-9
Command Reference TCP Commands
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Parameter
Parameter Description
Description
N/A N/A
4-10
Command Reference TCP Commands
Defaults N/A
Field Description
4-11
Command Reference TCP Commands
Field Description
Orphan socket information Information about the TCP connections associated with specific
applications.
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
Parameter
Parameter Description
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
4-12
Command Reference TCP Commands
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 PMTU value.
Related
Command Description
Commands
ip tcp path-mtu-discovery Enables the TCP PMTU discovery function.
Platform N/A
Description
Use this command to display information about the current TCP port.
show tcp port [ num ]
Parameter
Parameter Description
Description
num Port number
Defaults 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 State
1 10.51.209.203:23 10.52.0.77:54366 ESTABLISHED
Total: 1
4-13
Command Reference TCP Commands
Total: 0
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
4-14
Command Reference TCP Commands
Use this command to show TCP statistics on received packets, three way handshake and time-wait.
show tcp parameter
Parameter
Parameter Description
Description
N/A N/A
Defaults N/A
Field Description
Three way handshake Three way handshake information, including session request count,
server-client connection count, three way handshake failure count
caused by Web authentication limit, TCP socket failure count caused by
memory shortage, sub-session failure count, packet retransmission
count and session failure count caused by retransmission timeout.
Time-wait Session in TIMEWAIT state
Related
Command Description
Commands
4-15
Command Reference TCP Commands
N/A N/A
Platform N/A
Description
4-16
Command Reference IPv4/IPv6 REF Commands
Use this command to clear IPv4 Ruijie Express Forwarding (REF) packet statistics.
clear ip ref packet statistics
Defaults N/A
Platform N/A
Description
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
5-1
Command Reference IPv4/IPv6 REF Commands
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
Platform N/A
Description
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 ]
Defaults N/A
Usage Guide This command can be used to display the information about the adjacent node table in the current
5-2
Command Reference IPv4/IPv6 REF Commands
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 1 0 224.0.0.0
9 resolved 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
interface Interface
Platform N/A
Description
5-3
Command Reference IPv4/IPv6 REF Commands
Defaults N/A
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:
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
Adjacency type
Local: local adjacency
Forward: forward adjacency
type
Discard: discard adjacency
Glean: glean adjacency
Mcast: multicast adjacency
rfct Reference count of the adjacency
5-4
Command Reference IPv4/IPv6 REF Commands
ip Adjacency IP address
interface Interface
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
Parameter
Parameter Description
Description
N/A N/A
Defaults N/A
5-5
Command Reference IPv4/IPv6 REF Commands
Punt adj : 0
Cached reserve : 0
Cached drop : 0
Cached lost : 0
Null interface : 0
Total packets : 0
Field Description
Cached drop Number of packets that are dropped after being cached.
Total packets Total number of packets sent to the express forwarding module.
Related
Command Description
Commands
N/A N/A
Platform N/A
Description
5-6
Command Reference IPv4/IPv6 REF Commands
Defaults N/A
Platform N/A
Description
Use this command to display all the routing information in the IPv4 REF table.
show ip ref route [ oob ] [ default | ip mask | statistics ]
Parameter
Parameter Description
Description
Out of band, namely, the network that the management interface
oob belongs to, supported only by the device supporting the management
interface.
5-7
Command Reference IPv4/IPv6 REF Commands
Defaults N/A
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
ip mask weight path-id next-hop interface
255.255.255.255 255.255.255.255 1 4 0.0.0.0 Local 0
224.0.0.0 240.0.0.0 1 1 224.0.0.0
224.0.0.0 255.255.255.0 1 4 0.0.0.0 Local 0
192.168.50.0 255.255.255.0 1 6 0.0.0.0 FastEthernet 0/0
192.168.50.255 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 255.255.255.255 1 4 0.0.0.0 Local 0
192.168.50.78 255.255.255.255 1 9 192.168.50.78 FastEthernet 0/0
Field Description
ip Destination IP address
mask Mask
interface Egress
Related
Command Description
Commands
Displays the accurate REF forwarding path of
show ip ref exact-route
an IP packet.
Platform MGMT ports are supported on NBR6205-E, NBR6205-E V2, NBR6210-E, NBR6210-E V2 and
Description NBR6215-E but not on NBR6120-E.
5-8
Command Reference Tunnel Commands
6 Tunnel Commands
Defaults N/A
Command
Privileged EXEC mode/Global configuration mode/Interface configuration mode
Mode
6-1
Command Reference Tunnel Commands
Platform
Description N/A
Use this command to display the number of configurable tunnel interfaces and configured tunnel
interfaces.
show tunnel statistics
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. Note that the actual forwarding capacity is restricted by the number of chipentries. It is
possible that the tunnel interface has been created while the chip entry list is full. In that case, the
syslog is generated.
Configuration The following example displays the number of configurable tunnel interfaces and configured tunnel
Examples interfaces.
Ruijie# show tunnel statistics
used: 2, limit: 1000
6-2
Command Reference Tunnel Commands
Platform
Description N/A
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
Command
Mode Interface configuration 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 sets the destination IP address of tunnel interface 0 to 61.154.101.3.
Examples Ruijie(config)# interface tunnel 0
Ruijie(config-if-Tunnel 0)# tunnel destination 61.154.101.3
Platform
Description N/A
6-3
Command Reference Tunnel Commands
Defaults For switches and wireless products, the default encapsulation mode is ipv6ip.
For gateways and routers, the default encapsulation mode is gre ip.
Command
Mode Interface configuration 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.
Platform
N/A
Description
6-4
Command Reference Tunnel Commands
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.
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.
Platform N/A
Description
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
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
6-5
Command Reference Tunnel Commands
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 1)# tunnel mode ipv6ip
Ruijie(config-if-Tunnel 1)# tunnel tos 20
Platform N/A
Description
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 ttl hop-count
no tunnel ttl
Usage Guide This command is used to specify the TTL value of the IPv4 header in the encapsulated IPv6
messages.
6-6
Command Reference Tunnel Commands
Platform N/A
Description
Use this command to configure the IPv4 address for 6rd br.
Use the no form of this command to remove the configuration.
tunnel 6rd bripv4-address
no tunnel 6rd br
Defaults N/A
Command
Mode Interface configuration mode
Usage Guide This command is used to configure the IPv4 address for the 6rd relay router.
Configuration The following example configures the IPv4 address for tunnel 6rd br .
Examples Ruijie# configure terminal
Ruijie(config)# interface tunnel 100
Ruijie(config-if-Tunnel 100)# ipv6 enable
Ruijie(config-if-Tunnel 100)# tunnel 6rd br 10.1.2.1
Platform
Description N/A
Use this command toconfigure the common IPv4 prefix and suffix length for the 6rd domain.
Use the no form of this command to remove the configuration.
6-7
Command Reference Tunnel Commands
Defaults N/A
Command
Interface configuration mode
Mode
Usage Guide This command is used to configure the common IPv4 prefix and suffix length for the 6rd domain. The
valid range is from 0 to 31. The sum of the prefix and suffix lengths is no greater than 31. If this
command is not configured, the prefix and suffix lengths are 0 by default.
Configuration The following example configuresthe IPv4 prefix and suffix length for the 6rd domain of tunnel 100.
Examples Ruijie# configure terminal
Ruijie(config)# interface tunnel 100
Ruijie(config-if-Tunnel 100)# ipv6 enable
Ruijie(config-if-Tunnel 100)# tunnel 6rd ipv4 prefix-length 8 suffix-length
8
Platform
Description N/A
Use this command to configure IPv6 prefix for the 6rd domain.
Use the no form of this command to restore the default setting.
tunnel 6rd prefixipv6-prefix prefix-length
no tunnel 6rd prefix
6-8
Command Reference Tunnel Commands
Defaults N/A
Command
Mode Interface configuration mode
Usage Guide This command is used to configure the IPv6 prefix for the 6rd domain. This command is mandatory
for the 6rd configuration. Without the 6rd prefix, the 6rd tunnel cannot be up. If the prefix length is set
to 0, it indicates that the 6rd prefix is removed.
Configuration The following example configuresthe IPv6 prefix for tunnel 100.
Examples Ruijie# configure terminal
Ruijie(config)# interface tunnel 100
Ruijie(config-if-Tunnel 100)# tunnel 6rd prefix 2001:da8::/32
Platform
Description N/A
6-9
Command Reference FPM Commands
7 FPM Commands
Parameter
Parameter Description
Description
N/A N/A
Configuration The following example clears counters about the IPv4 packets.
Examples Ruijie# clear ip fpm 1 2 counters
Platform
N/A
Description
Use this command to disable the function to transparently transmit packets when the flow table is full.
ip session direct-trans-disable
Parameter
Parameter Description
Description
N/A N/A
Defaults This configuration takes effect only on ACs and APs. With this feature, packets are transparently
transmitted instead of establishing any flow on wireless products when the flow table is full, and service
processing is not accelerated, thereby ensuring that service flows are not interrupted.
7-1
Command Reference FPM Commands
Configuration The following example disables the function to transparently transmit packets when the flow table is full.
Examples Ruijie(config)# ip session direct-trans-disable
Platform
N/A
Description
Use this command to enable the loose TCP status transition check function.
ip session tcp-loose
Parameter
Parameter Description
Description
N/A N/A.
Configuration
Examples
Platform
N/A
Description
Parameter
Parameter Description
Description
7-2
Command Reference FPM Commands
N/A N/A
Configuration The following example enables the TCP status tracing function.
Examples Ruijie(config)# ip session tcp-state-inspection-enable
Platform
N/A
Description
Use this command to configure the number of packets that can be received for each flow in a certain
status.
ip session threshold {icmp-closed | icmp-started | rawip-closed | tcp-syn-sent | tcp-syn-receive |
tcp-closed | udp-closed} { num }
Parameter
Parameter Description
Description
Sets the number of packets permitted to pass in each ICMP flow in closed status,
icmp-closed
which is 10 by default and ranges from 1 to 2,000,000,000.
Sets the number of packets permitted to pass in each ICMP flow in started status,
icmp-started
which is 300 by default and ranges from 5 to 2,000,000,000.
Sets the number of packets permitted to pass in each RAWIP flow in closed status,
rawip-closed
which is 10 by default and ranges from 1 to 2,000,000,000.
Sets the number of packets permitted to pass in each TCP flow in syn-send status,
tcp-syn-sent
which is 10 by default and ranges from 5 to 2,000,000,000.
Sets the number of packets permitted to pass in each TCP flow in syn-receive status,
tcp-syn-receive
which is 20 by default and ranges from 5 to 2,000,000,000.
Sets the number of packets permitted to pass in each TCP flow in closed status,
tcp-closed
which is 20 by default and ranges from 5 to 2,000,000,000.
Sets the number of packets permitted to pass in each UDP flow in closed status,
udp-closed
which is 10 by default and ranges from 1 to 2,000,000,000.
num Sets the number of packets permitted to pass.
7-3
Command Reference FPM Commands
Usage Guide To activate this configuration, run the ip session track-state-strictly command.
Configuratio The following example configures the number of packets that can be received for each flow in a certain
n Examples status to 100.
Ruijie(config)# ip session 1 2 threshold tcp-closed 100
Platform
N/A
Description
Parameter
Parameter Description
Description
Sets the aging time of ICMP flows in closed status, which is 10 seconds by default
icmp-closed
and ranges from 5 to 60.
Sets the aging time of ICMP flows in connected status, which is 10 seconds by
icmp-connected
default and ranges from 5 to 120.
Sets the aging time of ICMP flows in started status, which is 10 seconds by default
icmp-started
and ranges from 5 to 120.
Sets the aging time of RAWIP flows in closed status, which is 10 seconds by default
rawip-closed
and ranges from 5 to 60.
7-4
Command Reference FPM Commands
Sets the aging time of RAWIP flows in connected status, which is 300 seconds by
rawip-connected
default and ranges from 10 to 300.
rawip-establishe Sets the aging time of RAWIP flows in established status, which is 300 seconds by
d default and ranges from 10 to 600.
Sets the aging time of TCP flows in started status, which is 300 seconds by default
rawip-started
and ranges from 10 to 300.
Sets the aging time of TCP flows in tcp-close-wait status, which is 60 seconds by
tcp-close-wait
default and ranges from 10 to 120.
Sets the aging time of TCP flows in tcp-closed status, which is 10 seconds by default
tcp-closed
and ranges from 5 to 20.
Sets the aging time of TCP flows in tcp-established status, which is 1,800 seconds by
tcp-established
default and ranges from 300 to 604,800.
Sets the aging time of TCP flows in tcp-fin-wait1 status, which is 60 seconds by
tcp-fin-wait1
default and ranges from 10 to 120.
Sets the aging time of TCP flows in tcp-fin-wait2 status, which is 60 seconds by
tcp-fin-wait2
default and ranges from 10 to 120.
Sets the aging time of TCP flows in tcp-syn-receive status, which is 10 seconds by
tcp-syn-receive
default and ranges from 5 to 30.
Sets the aging time of TCP flows in tcp-syn-sent status, which is 10 seconds by
tcp-syn-sent
default and ranges from 5 to 30.
Sets the aging time of TCP flows in tcp-syn_sent2 status, which is 10 seconds by
tcp-syn_sent2
default and ranges from 5 to 30.
Sets the aging time of TCP flows in tcp-time-wait status, which is 10 seconds by
tcp-time-wait
default and ranges from 5 to 60.
Sets the aging time of UDP flows in closed status, which is 10 seconds by default
udp-closed
and ranges from 5 to 60.
Sets the aging time of UDP flows in connected status, which is 30 seconds by default
udp-connected
and ranges from 10 to 300.
Sets the aging time of UDP flows in established status, which is 600 seconds by
udp-established
default and ranges from 120 to 600.
Sets the aging time of UDP flows in started status, which is 10 seconds by default
udp-started
and ranges from 10 to 300.
num Sets the aging time.
7-5
Command Reference FPM Commands
tcp-fin-wait1: 60 seconds;
tcp-fin-wait2: 60 seconds;
tcp-syn-receive: 10 seconds;
tcp-syn-sent: 10 seconds;
tcp-syn_sent2: 10 seconds;
tcp-time-wait: 10 seconds;
udp-closed: 10 seconds;
udp-connected: 30 seconds;
udp-established: 600 seconds;
udp-started: 10 seconds
Configuratio The following example sets the aging time of TCP flows in tcp-established status to 600 seconds.
n Examples Ruijie(config)# ip session 1 2 timeout tcp-established 600
Platform
N/A
Description
Use this command to configure packet threshold check for flows in various states.
ip session track-state-strictly
Parameter
Parameter Description
Description
N/A N/A
Configuration
The following example sets the packet threshold check for flows in various states.
Examples
Ruijie(config)# ip session track-state-strictly
7-6
Command Reference FPM Commands
Platform
N/A
Description
Use this command to displays the counters about the IPv4 packets.
show ip fpm counters
Parameter
Parameter Description
Description
N/A N/A
Usage Guide Use this command to display the counters about the IPv4 packets, including information about packet loss
and flows.
Configuration The following example displays counters about the IPv4 packets loss
Examples Ruijie# show ip fpm counters
Dropped packet counters:
Count Reason
0 Non-IPv4 packet
0 Bad IPv4 header length
0 Bad IPv4 total length
0 Fragment pkt
0 change flow state notify FW refuse
0 Bad IPv4 checksum
0 Invalid IPv4 address
0 Invalid TCP flags
0 Invalid ICMP message type
0 Invalid icmp initial message type
10 Invalid tcp init flags
0 Invalid tcp connection state
0 Connect over config threshold
0 Pkt drop by flow pre check
0 Connect has been terminated
0 Invalid egress fid
0 Out of capability
<end>
Rejected or terminated connection counters:
Count Reason
42938 Out of life time
7-7
Command Reference FPM Commands
0 Flow Terminated
0 Exceptional TCP connection
0 Exceptional UDP connection
0 Exceptional ICMP connection
0 Exceptional RawIP connection
0 Rejected by policy
0 Die by exist flow
0 Die gre data flow
<end>
Field Description
Field Description
Platform
N/A
Description
Parameter
Parameter Description
Description
N/A N/A
7-8
Command Reference FPM Commands
Field Description
Field Description
Pr Protocol
SrcAddr Source address
DstAddr Destination address
SrcPort Source port
DstPort Destination port
SendBytes Size of packets received from the request
direction.
RecvBytes Size of packets received from the response
direction.
St Current status of flow
srcif Source interface number
dstif Destination interface number
ctrl_flag Flow control field.
Platform
N/A
Description
Use this command to display the specific IPv4 packet flow information.
show ip fpm flows filter protocol saddr smask daddr dmask
Parameter
Parameter Description
Description
protocol IP protocol in the range from 0 to 255.
saddr Source IP addresses.
smask Source IP mask in the range from 1 to 32.
daddr Destination IP addresses.
dmask Destination IP mask in the range from 1 to 32.
7-9
Command Reference FPM Commands
Platform
N/A
Description
Parameter
Parameter Description
Description
N/A N/A
7-10
Command Reference FPM Commands
Configuration The following example displays IPv4 flow statistics on the device.
Examples Ruijie#show ip fpm statistics
The capacity of the flow table:150016.
Active flows num:109.
event count:65,
Fpm state inspection disable.
Field Description
Field Description
The capacity of the flow table The number of total flow tables.
Active flows num The number of active flow tables.
event count:65, The counter for current events.
Fpm state inspection disable The fpm state inspection is disabled.
Platform
N/A
Description
7-11
Command Reference NAT Commands
8 NAT Commands
8.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]
Command
NAT address pool configuration mode
Mode
Usage Guide 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
8-1
Command Reference NAT Commands
Notification 1. If the end IP address is smaller than the start address, the configuration fails and the following
prompt appears.
% End address less than start address
2. If the end IP address and the start IP address are not on the same network segment, the
configuration fails and the following prompt appears.
% Start and end addresses on different subnets
3: If the start IP address and the end IP address are both set to 0.0.0.0, the configuration fails and the
following prompt appears.
% Ip address 0.0.0.0 ~ 0.0.0.0 are invalid.
4. If the number of address range of an address pool exceeds 100, the configuration fails and the
following prompt appears.
% Reach max pool addr range
5. If the memory is insufficient, the configuration fails and the following prompt appears.
% Create address range fail
6. If the configured address range is consistent with the interface address, the configuration fails and
the following prompt appears.
% already use this interface's ip address,please delete and recreate
7. If the configured address range already exists, the configuration fails and the following prompt
appears.
% Already exist this range,please delete and recreate
8. If the configured address range is consistent with that of an interface and overlaps with that of an
existing address range, the configuration fails and the following prompt appears.
% Use interface's ip address overlap with existing range
9. If the configured address range conflicts with an existing address, the configuration fails and the
following prompt appears.
%Start and end addresses overlap with existing range
10. If the deleted address range contains an interface address range and is not available, the
configuration fails and the following prompt appears.
% address range with interface not exist
11. If the address range to be deleted is not available, the configuration fails and the following prompt
appears.
% Address range x.x.x.x-x.x.x.x not exist
Platform
N/A
Description
8.2 ip nat
8-2
Command Reference NAT Commands
Command
Interface configuration mode
Mode
Usage Guide 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
Related Command Description
Commands 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
N/A
Description
8-3
Command Reference NAT Commands
ip nat application source list list-num destination { tcp dest-ip port-num | udp dest-ip port-num}
{ dest-change ip-addr port-num | src-change ip-addr port-num }
no ip nat application source list list-num destination dest-ip { dest-change ip-addr | src-change
ip-addr }
no ip nat application source list list-num destination { tcp dest-ip port-num | udp dest-ip port-num }
{ dest-change ip-addr port-num | src-change ip-addr port-num }
Command
Mode Global configuration mode
8-4
Command Reference NAT Commands
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
Platform
Description N/A
8-5
Command Reference NAT Commands
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 [ description description-text ]
no ip nat inside destination list access-list-number
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.
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
8-6
Command Reference NAT Commands
Notification 1. If the configured rule already exists, the following prompt appears.
Translation with list xxx exist,please delete and recreate
2. If the memory is insufficient, the following prompt appears.
% create nat rule fail
3. If the unconfigured command is deleted, the following prompt appears.
% Translation not found
4. If the length of the description exceeds 60 characters, the following prompt appears.
Description is more than 60 characters
Platform
Description N/A
1. 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
pool-name } [ overload ] [ description description-text ]
no ip nat inside source list access-list-number
2. Use this command to enable static NAT for internal source addresses. Use the no form of this
command to disable static NAT for interface source addresses.
ip nat inside source static local-ip global-ip [ match interface-type interface-number | netmask
8-7
Command Reference NAT Commands
ip nat inside source static { tcp local-ip port-range local-port1 local-port2 | udp local-ip port-range
local-port1 local-port2} global-ip port-range global-port1 global-port2 [ match interface-type
interface-number | netmask mask ] [ permit-inside ] [ description description-text ]
ip nat inside source static { tcp ip-range local-ip1 local-ip2 local-port | udp ip-range local-ip1
local-ip2 local-port} ip-range global-ip1 global-ip2 global-port [ match interface-type interface-number
| netmask mask ] [ permit-inside ] [ description description-text ]
ip nat inside source static { tcp ip-range local-ip1 local-ip2 port-range local-port1 local-port2 | udp
ip-range local-ip1 local-ip2 port-range local-port1 local-port2} ip-range global-ip1 global-ip2
port-range global-port1 global-port2 [ match interface-type interface-number | netmask mask ]
[ permit-inside ] [ description description-text ]
ip nat inside source static { tcp local-ip port-range local-port1 local-port2 | udp local-ip port-range
local-port1 local-port2} interface interface-type interface-number port-range global-port1 global-port2
[ permit-inside ] [ description description-text ]
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
no ip nat inside source static { tcp local-ip port-range local-port1 local-port2 | udp local-ip
port-range local-port1 local-port2} global-ip port-range global-port1 global-port2 [ match
interface-type interface-number | netmask mask ] [ permit-inside ]
no ip nat inside source static { tcp ip-range local-ip1 local-ip2 local-port | udp ip-range local-ip1
local-ip2 local-port} ip-range global-ip1 global-ip2 global-port [ match interface-type interface-number
| netmask mask ] [ permit-inside ]
no ip nat inside source static { tcp ip-range local-ip1 local-ip2 port-range local-port1 local-port2 |
8-8
Command Reference NAT Commands
udp ip-range local-ip1 local-ip2 port-range local-port1 local-port2} ip-range global-ip1 global-ip2
port-range global-port1 global-port2 [ match interface-type interface-number | netmask mask ]
[ permit-inside ]
no ip nat inside source static { tcp local-ip port-range local-port1 local-port2 | udp local-ip
port-range local-port1 local-port2} interface interface-type interface-number port-range global-port1
global-port2 [ permit-inside ]
8-9
Command Reference NAT Commands
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
8-10
Command Reference NAT Commands
Notification 1. If the IP address to be matched has been mapped, the configuration fails and the following prompt
appears.
x.x.x.x already mapped (x.x.x.x -> y.y.y.y)
2. If the IP address to be matched has been mapped to the interface address, and the corresponding
interface does not exist, the configuration fails and the following prompt appears.
x.x.x.x already mapped
3. When the destination IP address to be converted has been mapped, the configuration fails and the
following prompt appears.
x.x.x.x.x already mapped (y.y.y.y -> x.x.x.x)
4. If the destination interface to be converted has been mapped, the configuration fails and the
following prompt appears.
Interface xxx already mapped
5. If the configured ACL has been mapped, the configuration fails and the following prompt appears.
Translation with list xxx exist,please delete and recreate
6. If the memory is insufficient, the configuration fails and the following prompt appears.
% create nat rule fail
7. If the memory is insufficient during the generation of attached rules, the configuration fails and the
following information is displayed.
% create attach rule fail
8. If the memory is insufficient when the permit-inside command is used to generate attached rules,
the configuration fails and the following information is displayed.
% create permit_inside attach rule fail
9. If the unconfigured command is deleted, the following prompt appears.
% Translation not found
Platform
Description N/A
8-11
Command Reference NAT Commands
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
Defaults The interval of sending GARP packets with the local address is not configured by default.
Command
Mode Global configuration mode
Some addresses in NAT rules should be taken as the local address. Sending GARP packets at intervals
Usage Guide
avoids address conflicts.
The following example sets the interval of sending GARP packets with the local address to 10 seconds.
Configuration
Ruijie#configure terminal
Examples
Ruijie(config)# ip nat keepalive 10
Platform
N/A
Description
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
ip nat outside source static global-ip local-ip
ip nat outside source static { tcp global-ip global-port | udp global-ip global-port } local-ip local-port
no ip nat outside source list access-list-number
no ip nat outside source static global-ip local-ip
no ip nat outside source static { tcp global-ip global-port | udp global-ip global-port } local-ip local-port
8-12
Command Reference NAT Commands
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 of
Examples 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
8-13
Command Reference NAT Commands
Platform
Description N/A
8-14
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
Notification 1. If the mask of address pool is set to 0.0.0.0, the configuration fails and the following prompt appears.
% netmask can not be 0
2. If the end address is smaller than the start address, the configuration fails and the following prompt
appears.
% End address less than start address
3. If the end IP address and the start IP address are not on the same network segment, the
configuration fails and the following prompt appears.
% Start and end addresses on different subnets
4. If the start IP address and the end IP address are both set to 0.0.0.0, the configuration fails and the
following prompt appears.
% Ip address 0.0.0.0 ~ 0.0.0.0 are invalid.
5. The pool type is different with the configured pool type, the configuration fails and the following
prompt appears.
%Cannot redefine pool type, please delete and recreate.
6. If the number of address range of an address pool exceeds 100, the configuration fails and the
following prompt appears.
% Exceed the max pool count
7. If the length of the address pool exceeds 32, the configuration fails and the following prompt appears.
% Length of pool name must be no more than 32 characters
8. If the memory is insufficient, the configuration fails and the following prompt appears.
%create pool fail
9. If the address pool to be deleted is not available, the following prompt appears.
% pool xxx not exist
8-15
Command Reference NAT Commands
Platform
Description N/A
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 | sip }
no ip nat translation { dns | ftp | tftp | pptp | h323 | rtsp | sip }
Parameter
Parameter Description
Description
ttl_time Defines the UDP TTL for DNS. The default is 0.
port_num Defines the port for FTP. The default is 21.
Command
Mode Global configuration mode
In NAT application, the IP addresses and ports of data packets are changed. However, the IP
addresses and ports of certain special protocols are contained in the valid data of the application layer.
Usage Guide
To successfully perform NAT for such special protocols, the specific protocol gateway needs to be
enabled.
8-16
Command Reference NAT Commands
Platform
N/A
Description
Defaults 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.
8-17
Command Reference NAT Commands
Field Description
Protocol type. udp indicates the UDP translation entry. tcp indicates the TCP
Pro
translation entry. icmp indicates the ICMP translation entry.
timeout Time (in seconds) left before this NAT entry times out
Platform
N/A
Description
8-18
Command Reference MLLB Commands
9 MLLB Commands
Use the no form of this command to cancel uplink load monitoring of MLLB.
no load-monitor
Parameter
Parameter Description
Description
N/A N/A
Usage Guide Generally, the downlink traffic of an egress interface is greater than the uplink traffic. In some scenarios,
for example, a scenario with a LAN server, the uplink traffic may be greater than the downlink traffic. In
this case, the uplink traffic can be monitored to calculate the bandwidth utilization rate and threshold.
Verification Run the show mllb configure command to display the configuration information of MLLB.
Notification 1. When the uplink load monitoring of MLLB is configured, the following prompt appears.
Ruijie(config)#load-monitor uplink
multi-link load balance monitor to uplink.
2. When the uplink load monitoring of MLLB is restored, the following prompt appears.
Ruijie(config)#no load-monitor
multi-link load balance monitor to default.
9-1
Command Reference MLLB Commands
Use the no form of this command to delete all domain names detected by MLLB.
no mllb detect domain add
Use the no form of this command to delete specified domain names detected by MLLB.
no mllb detect domain add domain-name
Parameter
Parameter Description
Description
Indicates a domain name. A domain name contains no more than 63
domain-name
characters.
Notification 1. If a domain name to be detected by MLLB is added, the following prompt appears.
Ruijie(config)# mllb detect domain add www.baidu.com
Success to add mllb detect domain name: www.baidu.com.
9-2
Command Reference MLLB Commands
3. The number of added domain names has reached the limit set.
Fail to add domain name:www.baidu.com, since overflow capacity.
Use this command to add DNS servers and interfaces to be detected by MLLB.
mllb detect domain dns-server dns-ip interface [source-ip src-ip]
Use the no form of this command to delete all DNS servers and interfaces detected by MLLB.
no mllb detect domain dns-server
Use the no form of this command to delete specified DNS servers and interface detected by MLLB.
no mllb detect domain dns-server dns-ip interface
Parameter
Parameter Description
Description
Indicates the IP address of a DNS server and the type of the IP
dns-ip
address.
interface Indicates the name of an interface.
src-ip Specifies the source IP address of a detection packet.
Use this command to enable domain name detection and detect the accessibility of domain names by
polling according to the set period.
9-3
Command Reference MLLB Commands
Parameter
Parameter Description
Description
N/A N/A
Verification Run the show mllb detect configure command to display the status of domain name detection.
Use the no form of this command to cancel the domain name detection interval.
no mllb detect domain interval
9-4
Command Reference MLLB Commands
Parameter
Parameter Description
Description
Indicates a domain name detection interval in minutes. The value range
interval-time
is from 1 to 1,440.
Usage Guide The domain name detection function is performed on a regular basis according to the configured domain
name, DNS server, and egress interface. Use this command to change the detection interval.
The detection interval is subject to the detection duration and is not an absolute value. Though the
default detection interval is five minutes, the second detection will be performed at a time later than
the five-minute interval, instead of at the exact time point of the five-minute interval.
Verification Run the show mllb detect configure command to display the configuration information of domain name
detection.
Use this command to enable network detection, detect networks by polling according to the set period,
and record detected networks into the database.
mllb detect network enable
Parameter
Parameter Description
Description
N/A N/A
9-5
Command Reference MLLB Commands
Usage Guide Use this command to enable network detection and record detected networks into databases.
After the function is enabled, network delay, including TCP and UDP packet delays, will be detected
regularly, and the number of half-open connections (response packets are not received) and traffic
values of different routing modules are measured.
Use the no form of this command to cancel the network detection interval.
no mllb detect network interval
Parameter
Parameter Description
Description
interval-time Indicates a network detection interval in minutes. The value range is from 1 to 1,440.
Usage Guide The network detection function is performed at an interval of five minutes. Use this command to change
the detection interval.
9-6
Command Reference MLLB Commands
Verification Run the show mllb detect configure command to display the configuration information of network
detection.
Parameter
Parameter Description
Description
N/A N/A
Usage Guide To enable the gateway to support load balancing, enable MLLB.
The load balancing function of MLLB is applicable to ECMP egress interfaces only.
#Disable MLLB.
Ruijie(config)# no mllb enable
Verification Run the show mllb configure command to display the status of MLLB.
Use the no form of this command to cancel the preferred egress interface of MLLB.
9-7
Command Reference MLLB Commands
no mllb first-choice
Parameter
Parameter Description
Description
interface-type
Indicates the name of an interface.
interface-number
Usage Guide If the load of any one egress interface exceeds the threshold, no interface can balance load based on the
predefined policy. In this case, use this command to configure a preferred egress interface.
Verification Run the show mllb configure command to display the configuration information of MLLB.
Use the no form of this command to delete the weights of an MLLB interface.
no mllb interface inteface weight
Parameter
Parameter Description
Description
Interface Indicates the name of an interface.
Specifies a weight value in kbps. The value range is from 1 to
weight-num
40,000,000.
9-8
Command Reference MLLB Commands
Usage Guide The weight value of an interface is the downlink bandwidth by default. Use this command to specify the
weight value of a specified interface in order to change the bandwidth utilization of the interface. For
example, the downlink bandwidth of the GE0/4 interface is 100 Mbps and the default weight value is
100,000 kbps. To increase the bandwidth utilization of the interface, change the weight value to 150,000
kbps; to decrease the bandwidth utilization of the interface, change the weight value to 50,000 kbps.
Configuration #Set the weight value of the GE0/4 interface to 100 Mbps.
Example Ruijie(config)# mllb interface GigabitEthernet 0/4 weight 100000
#Restore the weight value to the default downlink bandwidth of the interface.
Ruijie(config)# no mllb interface GigabitEthernet 0/4 weight
Verification Run the show run | include mllb command to display the weight value of the specified MLLB interface.
Notification 1. If the weight value of the GE0/4 interface is 100 Mbps, the following message is displayed:
Ruijie(config)# mllb interface GigabitEthernet 0/4 weight 100000
mllb interface GigabitEthernet 0/4 weight set to 100000.
2. If the weight value of the GE0/4 interface is restored, the following message is displayed:
Ruijie(config)# no mllb interface GigabitEthernet 0/4 weight 100000
clear mllb interface GigabitEthernet 0/4 weight!
Use the no form of this command to cancel the load update period of MLLB.
no mllb load- interval
Parameter
Parameter Description
Description
refresh-time Indicates an update period in seconds. The value range is from 3 to 30.
9-9
Command Reference MLLB Commands
Mode
Usage Guide By default, MLLB calculates interface load at an interval of five seconds, and determines whether the
load exceeds a threshold. Use this command to change the default value.
Verification Run the show mllb configure command to display the configuration information of MLLB.
Use this command to balance load based on the source IP address. This command applies to
bandwidth-based policies only. Packets with the same source IP address are transmitted through the
same egress interface.
mllb load-sharing original
Parameter
Parameter Description
Description
N/A N/A
Defaults Packets are sent based on the source and destination IP addresses by default.
Usage Guide Packets of some applications may be distributed to multiple egress interfaces according to the source
and destination IP addresses, which causes reconnection and intermittent interruption. These problems
can be resolved if packets are distributed according to the source IP address only.
9-10
Command Reference MLLB Commands
Verification Run the show mllb configure command to display the configuration information of MLLB.
Use the no form of this command to cancel the load balancing policy of MLLB.
no mllb policy
Parameter
Parameter Description
Description
N/A N/A
Usage Guide
If the bandwidth-based policy is enabled, the bandwidth of the egress interface must be configured.
Verification Run the show mllb configure command to display the configuration information of MLLB.
Use the no form of this command to restore the load thresholds of MLLB.
no mllb threshold
9-11
Command Reference MLLB Commands
Parameter
Parameter Description
Description
Indicates an upper threshold in percentage. The value range is from 1 to
threshold percent-upper
100.
Indicates a lower threshold in percentage. The value range is from 1 to
lower percent-lower
100.
Defaults The upper and lower thresholds of egress interfaces are 100, respectively.
Usage Guide Use load thresholds as references for adding a link to balance load or removing a link from balancing
load. If the load of a link exceeds an upper threshold, the link will not be selected for load balancing. If the
load of the link becomes smaller than a lower threshold, the link is selected to balance load. Load
thresholds are indicated by percentage, and the value range is from 1 to 100. The lower threshold is
smaller than or equal to the upper threshold.
Configuration #Set the upper threshold to 95% and lower threshold to 85%.
Example Ruijie(config)# mllb threshold 95 lower 85
Verification Run the show mllb configure command to display the configuration information of MLLB.
Parameter
Parameter Description
Description
N/A N/A
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
9-12
Command Reference MLLB Commands
Parameter
Parameter Description
Description
N/A N/A
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display MLLB detection configuration information.
9-13
Command Reference MLLB Commands
Field description:
Field Description
state Indicates the states of network detection and
domain name detection.
interval Indicates the intervals of network detection and
domain name detection.
name Indicates a domain name to be detected.
dns server Indicates the DNS server and interface to be
detected.
domain number Indicates the number of configured domain
names.
interface number Indicates the number of configured DNS servers
(interfaces).
storage Indicates a storage device. If no storage device
exists, the detection result will not be recorded
into the database.
Use this command to display information about the domain name database detected by MLLB.
show mllb detect domain database from begin-year begin-month begin-day begin-hour [to end-year
end-month end-day end-hour]
Parameter
Parameter Description
Description
begin-year Indicates the start year of a period.
begin-month Indicates the start month of a period.
begin-day Indicates the start day of a period.
begin-hour Indicates the start time of a period.
end-year Indicates the end year of a period.
end-month Indicates the end month of a period.
end-day Indicates the end day of a period.
9-14
Command Reference MLLB Commands
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display information about the domain name database detected by MLLB.
Configuration #Display information about the domain name database detected by the MLLB.
Example Ruijie# show mllb detect domain database from 2016 1 21 0:0:0
Date & Time Domain Dns-server
Ifindex Parse-ip Dns-time Tcp-connect Http_get
2016-01-21 00:00:07 www.cqu.edu.cn 192.168.58.110
5 222.178.10.35 1 65 59/1
2016-01-21 00:00:07 www.baidu.com 192.168.58.110 5
115.239.211.112 1 23 25/1
2016-01-21 00:00:07 www.gov.cn 192.168.58.110 5
117.26.144.16 0 18 197/1
Field description:
Field Description
Date & Time Indicates the date and time of domain name detection.
Domain Indicates a domain name to be detected.
Dns-server Indicates the IP address of a configured DNS server.
Ifindex Specifies the index of an egress interface.
Parse-ip Indicates the IP address parsed out from the domain name.
Dns-time Indicates DNS parsing duration in milliseconds.
Tcp-connect Indicates TCP connection duration in milliseconds.
Http_get Indicates HTTP Get request duration in milliseconds. The value 1
indicates request success, and the value 0 indicates a request
exception.
Use this command to display specified information about the domain name database detected by MLLB.
show mllb detect domain database select { dns-server dns-ip | domain domain-name | error |
interface interface } { error from | from} begin-year begin-month begin-day begin-hour [to end-year
end-month end-day end-hour]
Parameter
Parameter Description
Description
dns-ip Indicates the IP address of a DNS server.
domain-name Indicates a domain name.
interface Indicates the name of an interface.
9-15
Command Reference MLLB Commands
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display specified information about the domain name database detected by MLLB.
Configuration #Display information about failures in detecting domain name databases by MLLB.
Example Ruijie# show mllb detect domain database select error from 2016 1 21 0:0:0
Date & Time Domain Dns-server
Ifindex Parse-ip Dns-time Tcp-connect Http_get
2016-01-21 00:00:39 www.baidu.com 114.114.114.114 5
115.239.210.27 33 0 0/0
2016-01-21 00:01:44 www.baidu.com 114.114.114.114 5
115.239.210.27 22 0 0/0
2016-01-21 00:03:20 www.baidu.com 192.168.58.110 5
115.239.210.27 0 0 0/0
Field description:
Field Description
Date & Time Indicates the date and time of domain name detection.
Domain Indicates a domain name to be detected.
Dns-server Indicates the IP address of a configured DNS server.
Ifindex Specifies the index of an egress interface.
Parse-ip Indicates the IP address parsed out from the domain name. The
value 0.0.0.0 indicates a parsing failure.
Dns-time Indicates DNS parsing duration in milliseconds.
Tcp-connect Indicates TCP connection duration in milliseconds. The value 0
indicates a connection failure.
Http_get Indicates HTTP Get request duration in milliseconds. The value 1
indicates request success, and the value 0 indicates a request
exception.
Use this command to display information about a specified domain name to be detected by MLLB.
9-16
Command Reference MLLB Commands
show mllb detect domain name domain-name dns-ip [interface [source-ip src-ip]]
Parameter
Parameter Description
Description
domain-name Indicates a domain name to be detected.
dns-ip Parses the domain name from this DNS server.
interface Detects the interface for performing domain name detection.
src-ip Specifies the source IP address of a detection packet.
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display information about a specified domain name to be detected by MLLB.
Field description:
Field Description
dns parse ok Indicates whether a domain name is successfully parsed.
tcp connect ok Indicates whether a TCP connection is successfully
established.
http get ok Indicates whether an HTTP Get request is responded to.
dns parse ip Indicates the first IP address parsed out from the domain name
by the DNS server.
delay Indicates delays in milliseconds, which successively include the
DNS parsing delay, TCP connection delay, and HTTP Get
request delay.
9-17
Command Reference MLLB Commands
Parameter
Parameter Description
Description
interface-name Specifies the name of an interface of a detected network.
source-ip Specifies the source IP address of a detected network.
source-ip-mask Specifies the source IP mask of a detected network.
destination-ip Specifies the destination IP address of a detected network.
destination-ip-mask Specifies the destination IP mask of a detected network.
Displays information about a specified interface of the database of a
select-interface-name
detected network.
begin-year Indicates the start year of a period.
begin-month Indicates the start month of a period.
begin-day Indicates the start day of a period.
begin-hour Indicates the start time of a period.
end-year Indicates the end year of a period.
end-month Indicates the end month of a period.
end-day Indicates the end day of a period.
end-hour Indicates the end time of a period.
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display information about a network detected by MLLB.
9-18
Command Reference MLLB Commands
0/0/0/0 0/0/0/0
Field description:
Field Description
Interface Indicates the name of a detected interface.
Half(ALL total) Indicates the number of half-open connections and total number of
connections of all protocols.
Half(TCP total) Indicates the number of half-open TCP connections and total
number of TCP connections.
Half(UDP total) Indicates the number of half-open UDP connections and total
number of UDP connections.
Half(DNS total) Indicates the number of half-open connections and total number of
DNS connections of DNS applications.
Total delay Indicates delays of all protocols in milliseconds, including the
minimum delay, average delay, maximum delay, and delay count.
TCP delay Indicates TCP delays in milliseconds, including the minimum delay,
average delay, maximum delay, and delay count.
UDP delay Indicates UDP delays in milliseconds, including the minimum delay,
average delay, maximum delay, and delay count.
DNS delay Indicates delays of DNS applications in milliseconds, including the
minimum delay, average delay, maximum delay, and delay count.
Route type Indicates the name of a routing module.
Total(Output/Input)Mbit Indicates traffic information of all protocols in Mbps, including the
uplink traffic and downlink traffic.
TCP(Output/Input) Indicates TCP traffic information in Mbps, including the uplink traffic
and downlink traffic successively.
UDP(Output/Input) Indicates UDP traffic information in Mbps, including the uplink traffic
and downlink traffic successively.
DNS(Output/Input) Indicates traffic information of DNS applications in Mbps, including
the uplink traffic and downlink traffic successively.
9-19
Command Reference MLLB Commands
Field description:
Field Description
Date & Time Indicates the time of network detection.
Interface Indicates the interface of a detected network.
Type Indicates data types, including the number of half-open
connections, delay, and routing traffic information.
Total Indicates information about all protocols.
TCP Indicates TCP information.
UDP Indicates information of UDP.
DNS Indicates UDP information.
Parameter
Parameter Description
Description
N/A N/A
Command Privileged EXEC mode, global configuration mode, and interface configuration mode
Mode
Usage Guide Use this command to display statistical information of MLLB egress interfaces.
9-20
Command Reference MLLB Commands
9-21