0% found this document useful (0 votes)
23 views292 pages

PBR Command Reference Guide

Uploaded by

OI IO
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views292 pages

PBR Command Reference Guide

Uploaded by

OI IO
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Routing Commands

1. PBR Commands

2. Route-DB Commands

3. RIP Commands

4. RIPNG Commands

5. OSPFv2 Commands

6. OSPFv3 Commands

7. Protocol-independent Commands

8. NSM Commands
Command Reference PBR Commands

1 PBR Commands

1.1 clear ip pbr statistics

Use this command to clear the IPv4 PBR forwarded packet count.
clear ip pbr statistics [ interface if-name | local ]

Parameter
Parameter Description
Description
Specifies the interface name. If the interface name is specified, the
device clears the IPv4 PBR forwarded packet count on that interface.
interface if-name
Otherwise, the device clears the IPv4 PBR forwarded packet count
on every interface where IPv4 PBR is enabled.
local Clears the IPv4 PBR forwarded packet count on the local interface.

Defaults N/A

Command Privileged EXEC mode.


Mode

Usage Guide Use this command to clear the IPv4 PBR forwarded packet count.

Configuration The following example clears the IPv4 PBR forwarded packet count.
Examples Ruijie#clear ip pbr statistics

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1.2 clear ipv6 pbr statistics

Use this command to clear the IPv6 PBR forwarded packet count.
clear ipv6 pbr statistics [ interface if-name | local ]

Parameter
Parameter Description
Description
Specifies the interface name. If the interface name is specified, the
interface if-name
device clears the IPv6 PBR forwarded packet count on that interface.

1-1
Command Reference PBR Commands

Otherwise, the device clears the IPv6 PBR forwarded packet count
on every interface where IPv6 PBR is enabled.
local Clears the IPv6 PBR forwarded packet count on the local interface.

Defaults N/A

Command Privileged EXEC mode.


Mode

Usage Guide Use this command to clear the IPv6 PBR forwarded packet count.

Configuration The following example clears the IPv6 PBR forwarded packet count.
Examples Ruijie#clear ipv6 pbr statistics

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1.3 ip local policy route-map

Use this command to apply the policy-based routing ( PBR ) on the packets sent locally. Use the no
form of this command to restore the default setting.
ip local policy route-map route-map-name
no ip local policy route-map
Parameter
Parameter Description
Description
route-map-name Name of the route map

Defaults This function is disabled by default.

Command Global configuration mode


Mode

Usage Guide This command is valid for the IP packets sent locally, but not the IP packets received locally. The IP
packets received by the local are free from this command.
To use the policy-based routing, you must specify the route map for it and create the route map. A
route map contains multiple policies, and each policy defines one or more match rules and the
corresponding operations. After policy-based routing is applied to an interface, the packets received
by the interface will be checked. The packets that do not match any policy in the route map will be
forwarded to the usual route. The packets that match a policy in the route map will be processed
according to the operation defined in the policy.

1-2
Command Reference PBR Commands

The set interface command for the policy-based routing does not support the load-balancing and
only supports the redundancy backup.

Configuration The following examples send the packets with the source address [Link] from the serial 2/0.
Examples The following example defines an ACL that match the IP packet.
Ruijie(config)#access-list 1 permit [Link]
The following example defines the route map.
Ruijie(config)#route-map lab1 permit 10
Ruijie(config-route-map)#match ip address 1
Ruijie(config-route-map)#set interface serial 2/0
Ruijie(config-route-map)#exit
The following example applies PBR on the local interface.
Ruijie(config)#ip local policy route-map lab1

Related
Command Description
Commands
access-list Defines the access list rule.
route-map Defines the route map.
Defines the next hop of the policy-based
set ip next-hop
routing.
Defines the default next hop of the policy-based
set ip default next-hop
routing.
Defines the output port of the policy-based
set interface
routing.
Defines the default policy-based routing output
set default interface
port.
set ip tos Sets the TOS in the head of the IP packet.
set ip dscp Sets the DSCP of the IP packet.
Sets the priority level in the head of the IP
set ip precedence
packet.
match ip address Sets the filtering rule.
match length Matches the packet length.

Platform N/A
Description

1.4 ip policy

Use this command to set the policy: redundant backup or load balancing used between multiple next
hops of the PBR applied for the set ip [ default ] nexthop command in global configuration mode.
Use the no form of this command to restore the default setting.
ip policy { load-balance | redundance }

1-3
Command Reference PBR Commands

no ip policy

Parameter
Parameter Description
Description
load-balance | redundance Specifies the policy: load balancing or redundant backup.

Defaults Redundant backup is adopted by default.

Command Global configuration mode


Mode

Usage Guide When you configure the set ip next-hop command in sub-route map, it is possible to configure
multiple next hops. However, when you set redundant backup, only the first resolved next hop of the
policy-based routing takes effect. When the load balancing is set, multiple resolved next hops of the
policy-based routing take effect. The WCMP can be set up to 8 next hops, and the ECMP can be set
up to 32 next hops. The resolved next hop refers to the ARP message learned by the next hop and
the MAC address corresponding to this ARP exists in the MAC address table.

NPE80 does not support this command.

Configuration In the example below, there are multiple next hops configured in the route map. After the redundant
Examples backup is set in global configuration mode, only the first next hop among the sub-route map of the
policy-based routing applied on the interface GigabitEthernet 0/0 takes effect.
The following example sets the ACL that match the IP packet.
Ruijie(config)#access-list 1 permit [Link]
Ruijie(config)#access-list 2 permit [Link]
The following example defines the route map.
Ruijie(config)#route-map lab1 permit 10
Ruijie(config-route-map)#match ip address 1
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config-route-map)#exit
Ruijie(config)#route-map lab1 permit 20
Ruijie(config-route-map)#match ip address 2
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config-route-map)#exit
The following example applies the policy-based routing on the interface.
Ruijie(config)#interface GigabitEthernet 0/0
Ruijie(config-if)#ip policy route-map lab1
Ruijie(config-if)#exit

1-4
Command Reference PBR Commands

Ruijie(config)#ip policy redundance

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1.5 ip policy route-map

Use this command to apply the policy-based routing on an interface. Use the no form of this
command to restore the default setting.
ip policy route-map route-map
no ip policy route-map
Parameter
Parameter Description
Description
route-map Name of the route map

Defaults This function is disabled by default.

Command Interface configuration mode


Mode

Usage Guide The policy-based routing must be applied on the specified interface. That interface performs the
policy-based routing only on the received packets.
To use the policy-based routing, you must specify the route map for it and create the route map. A
route map contains multiple policies, and each policy defines one or more match rules and the
corresponding operations. After policy-based routing is applied to an interface, the packets received
by the interface will be checked. The packets that do not match any policy in the route map will be
forwarded to the usual route. The packets that match a policy in the route map will be processed
according to the operation defined in the policy.

Up to one route map can be configured on an interface. When you configure a route map on the
interface for many times, the latter will overwrite the former.

Configuration In the example below, when the interface GigabitEthernet0/0 receives a datagram, if the source
Examples address of the datagram is [Link], it sets the next-hop as [Link]; if the source address is
[Link], it sets the next-hop as [Link];, otherwise, the general forwarding will be performed.
The following example sets the ACL matched with the IP packets.
Ruijie(config)#access-list 1 permit [Link]
Ruijie(config)#access-list 2 permit [Link]

1-5
Command Reference PBR Commands

The following example defines the route map.


Ruijie(config)#route-map lab1 permit 10
Ruijie(config-route-map)#match ip address 1
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config-route-map)#exit
Ruijie(config)#route-map lab1 permit 20
Ruijie(config-route-map)#match ip address 2
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config-route-map)#exit
The following example applies the route map on the interface.
Ruijie(config)#interface GigabitEthernet 0/0
Ruijie(config-if)#ip policy route-map lab1
Ruijie(config-if)#exit

Related
Command Description
Commands
access-list Defines the access list rule.
route-map Defines the route map.
Defines the next hop of the policy-based
set ip next-hop
routing.
Defines the default next hop of the policy-based
set ip default next-hop
routing.
set interface Defines the policy-based routing output port.
Defines the default policy-based routing output
set default interface
port.
set ip tos Sets the TOS in the head of the IP packet.
set ip dscp Sets the DSCP of the IP packet.
Sets the priority level in the head of the IP
set ip precedence
packet.
match ip address Sets the filtering rule.
match length Matches the packet length.

Platform N/A
Description

1.6 ipv6 local policy route-map

Use this command to enable the policy-based routing on the packets sent locally. Use the no form of
this command to restore the default setting.
ipv6 local policy route-map route-map-name
no ipv6 local policy route-map
Parameter Parameter Description

1-6
Command Reference PBR Commands

Description
Name of the router map applied locally, which is configured by the
route-map-name
router-map command.

Defaults This function is disabled by default.

Command Global Configuration mode


Mode

Usage Guide  This command is valid only for the IPv6 packets in accordance with the policy (for example, ping
packets used for management) sent locally, but not the packets received locally.
 To use the policy-based routing, you must specify the route map for it and create the route map.
A route map contains multiple policies, and each policy defines one or more match rules and the
corresponding operations. After policy-based routing is applied to an interface, the packets
received by the interface will be checked. The packets that do not match any policy in the route
map will be forwarded to the usual route. The packets that match a policy in the route map will
be processed according to the operation defined in the policy.

Configuration The following examples display the PBR application process: The device sends the packets from the
Examples source address 2003:1000::10/80 to the 2001:100::/64, the packets will match ACL6 of aaa and be
sent to the device 2003:1001::2.
 The following example defines the ACL matched with the IPv6 packet:
Ruijie(config)#ipv6 access-list aaa
Ruijie(config)#permit ipv6 2003:1000::10/80 2001:100::/64
 The following example defines the router map.
Ruijie(config)#route-map pbr-aaa permit 10
Ruijie(config-route-map)#match ipv6 address aaa
Ruijie(config-route-map)#set ipv6 next-hop 2003::1001::2
 The following example applies the PBR on the device.
Ruijie(config)#ipv6 local policy route-map pbr-aaa

Related
Command Description
Commands
match ipv6 address Sets the ACL6 used to match the IPv6 packets
in the IPv6 PBR.
match length Defines the length of matched packets.
route-map Defines the route map for PBR.
set default interface Defines the default next hop output port.
set interface Defines the next hop output port.
set ipv6 default next-hop Sets the default next hop of packet forwarding.

set ipv6 next-hop Sets the next hop of packet forwarding.


set ipv6 precedence Sets the priority field in the head of IPv6

1-7
Command Reference PBR Commands

packets.
show ipv6 policy Displays the current PBR application.
show route-map Displays the current router map configuration.

Platform N/A
Description

1.7 ipv6 policy

Use this command to set the policy: redundant backup or load balancing, applied for the set ip
nexthop command in global configuration mode. Use the no form of this command to restore the
default setting.
ipv6 policy { load-balance | redundance }
no ipv6 policy
Parameter
Parameter Description
Description
load-balance Sets the policy as load balancing.
redundance Sets the policy as redundant backup.

Defaults Redundant backup is adopted by default.

Command Global configuration mode


Mode

Usage Guide This function is valid for the multiple next-hops.


When you configure the set ip next-hop command in sub-route map, it is possible to configure
multiple next hops. However, when you set redundant backup, only the first resolved next hop takes
effect. The second configured next hop will take effect only when the first one fails and the first next
hop will take effect again if it recovers.
When the load balancing is set, multiple next hops of the policy-based routing take effect.
The WCMP can be set up to 8 next hops, and the ECMP can be set up to 32 next hops.

The resolved next hop refers to the learned MAC address for the next-hop.

Configuration The following example sets load-balancing mode for multiple nexthops.
Examples Step 1: configures an ACL matching with IP packets.
Ruijie(config)# ipv6 access-list 1
Ruijie(config-ipv6-acl )# permit ipv6 1000::1 any
Ruijie(config)# ipv6 access-list 2
Ruijie(config-ipv6-acl )# permit ipv6 2000::1 any
Step 2: defines a route map.
Ruijie(config)# route-map lab1 permit 10
Ruijie(config-route-map)# match ipv6 address 1
Ruijie(config-route-map)# set ipv6 next-hop 2002::1

1-8
Command Reference PBR Commands

Ruijie(config-route-map)# set ipv6 next-hop 2002::2


Ruijie(config-route-map)# set ipv6 next-hop 2002::3
Ruijie(config-route-map)# exit
Ruijie(config)# route-map lab1 permit 20
Ruijie(config-route-map)# match ipv6 address 2
Ruijie(config-route-map)# set ipv6 next-hop 2002::5
Ruijie(config-route-map)# set ipv6 next-hop 2002::6
Ruijie(config-route-map)# set ipv6 next-hop 2002::7
Ruijie(config-route-map)# exit
Step 3: applies policy-based routing on the interface.
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if)# ipv6 policy route-map lab1
Ruijie(config-if)# exit
Ruijie(config)# ipv6 policy load-balance

Related
Command Description
Commands
set ipv6 default next-hop Defines the default next hop for forwarding the
packets.
set ipv6 next-hop Defines the next hop for forwarding the
packets.
Displays the current policy-based routing
show ipv6 policy
application.

Platform N/A
Description

1.8 ipv6 policy route-map

Use this command to apply the policy-based routing on an interface in interface configuration mode.
Use the no form of this command to restore the default setting.
ipv6 policy route-map route-map-name
no ip policy route-map
Parameter
Parameter Description
Description
Name of the PBR router map applied locally, which is configured by
route-map-name
the router-map command.

Defaults This function is disabled by default.

Command Interface configuration mode


Mode

Usage Guide The policy-based routing must be applied on the specified interface. That interface performs the

1-9
Command Reference PBR Commands

policy-based routing only on the received packets.


To use the policy-based routing, you must specify the route map for it and create the route map. A
route map contains multiple policies, and each policy defines one or more match rules and the
corresponding operations. After policy-based routing is applied to an interface, the packets received
by the interface will be checked. The packets that do not match any policy in the route map will be
forwarded to the usual route. The packets that match a policy in the route map will be processed
according to the operation defined in the policy.

Up to one route map can be configured on an interface. When you configure a route map on the
interface for many times, the latter will overwrite the former.

Configuration An IPv6 packet is received on the GigabitEthernet 0/0. If the packet is sent from 10::/64 network
Examples segment, it is forwarded to the next hop of 2000:1; if the packet is sent from 20::/64 network segment,
it is forwarded to the next hop of 2000:2 or forwarded as usual.
Step 1: configures an ACL matched with the IP packet.
Ruijie(config)# ipv6 access-list acl_for_pbr1
Ruijie(config-ipv6-acl)# permit ipv6 10::/64 any
Ruijie(config)# ipv6 access-list acl_for_pbr2
Ruijie(config-ipv6-acl)# permit ipv6 20::/64 any
Step 2: defines a route map.
Ruijie(config)# route-map rm_pbr permit 10
Ruijie(config-route-map)# match ipv6 address acl_for_pbr1
Ruijie(config-route-map)# set ipv6 next-hop 2000::1
Ruijie(config-route-map)# exit
Ruijie(config)# route-map rm_pbr permit 20
Ruijie(config-route-map)# match ipv6 address acl_for_pbr2
Ruijie(config-route-map)# set ipv6 next-hop 2000::2
Ruijie(config-route-map)# exit
Step 3: applies the route map to the interface.
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if)# no switchport
Ruijie(config-if)# ipv6 policy route-map rm_pbr
Ruijie(config-if)# exit

Related
Command Description
Commands
route-map Defines the route map.
Sets the IPv6 ACL used to match the IPv6
match ipv6 address
packets in the IPv6 PBR.
Defines the default next hop of the packet
set ipv6 default next-hop
forwarding.
set ipv6 next-hop Defines the next hop of the packet forwarding.
Displays the current policy-based routing
show ipv6 policy
application.

1-10
Command Reference PBR Commands

show route-map Displays the current route map configurations.

Platform N/A
Description

1.9 show ip pbr route

Use this command to display the IPv4 PBR information on the interface.
show ip pbr route [ interface if-name | local ]

Parameter
Parameter Description
Description
Specifies the interface name. If the interface name is specified, the
IPv4 BPR information of this interface is displayed. Otherwise, the
interface if-name
IPv4 BPR information of all interfaces where the IPv4 PBR is enabled
is displayed.
local Displays the IPv4 PBR information on the local interface

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide Use this command to display the IPv4 PBR information.

Configuration The following example displays the IPv4 PBR information on the interfaces.
Examples Ruijie#show ip pbr route
PBR IPv4 Route Summay : 1
Interface : GigabitEthernet 0/1
Sequence : 10
ACL[0] : 2900
ACL_CLS[0] : 0
Min Length : None
Max Length : None
Route Flags :
Route Type : PBR
Direct : Permit
Priority : High
Tos_Dscp : None
Precedence : None
Tos_Dscp : 0
Precedence : 0
Mode : redundance
Nexthop Count : 1

1-11
Command Reference PBR Commands

Nexthop[0] : [Link]
Weight[0] : 1
Ifindex[0] : 2

Parameter Description
PBR IPv4 Route Summay IPv4 PBR route count.
Interface Interface where IPv4 PBR is enabled.
Sequence The PBR serial number.
ACL The ACL ID used in the match rule.
ACL_CLS The ACL type used in the match rule, such as
the IP standard ACL.
Min Length The minimum match length.
Max Length The maximum match length.
Route Flags PBR flag bit:
Route Type: “PBR” indicates PBR routes.
“Normal” indicates common
routes.
Direct: PBR matching action, permit or deny
Priority: PBR priority, High or Low
Tos_Dscp: Displays whether the tos rule or the
dscp rule is configured.
Precedence: Displays whether the set ip
precedence rule is configured.
Mode Specifies the redundancy mode or the next hop
load balancing mode.
Nexthop Count Specifies the next hop number. ECMP supports
up to 32 next hops.
Nexthop Specifies the next hop IP address.
Weight Specifies the next hop weight.
Ifindex Specifies the outbound interface index
corresponding to the next hop.

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1.10 show ip pbr route-map

Use this command to display the IPv4 PBR route-map information.


show ip pbr route-map route-map-name

1-12
Command Reference PBR Commands

Parameter
Parameter Description
Description
route-map-name The route-map name.

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following example displays the IPv4 PBR route-map information.
Examples Ruijie#show ip pbr route-map rm
Pbr VRF: GLOBAL, ID: 0
Forward Mode: redundance
Forwarding: On

route-map rm
route-map index: sequence 10, permit
Match rule:
ACL ID : 0, ACL CLS: 0, Name: acl1
Set rule:
IPv4 Nexthop: [Link], (VRF Name: , ID: 0), Weight: 0
PBR state info ifx: GigabitEthernet 0/1, Connected: True, Track State: Up
Field Description
Forward Mode Sets the load balance mode or the redundancy
mode for the next hop.
Forwarding Displays whether the IP route forwarding is
enabled.
Route-map index The serial number and the type of the sub-map.
Match rule Match rule.
Set rule Set rule.
PBR state info PBR private data information, such as outbound
interface and the link state of the next hop.

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1-13
Command Reference PBR Commands

1.11 show ip pbr statistics

Use this command to display the IPv4 PBR forwarded packet count.
show ip pbr statistics [ interface if-name | local ]

Parameter
Parameter Description
Description
Specifies the interface name. If the interface name is specified, the
IPv4 PBR forwarded packet count of this interface is displayed.
interface if-name
Otherwise, the IPv4 PBR forwarded packet count of all interfaces
where the IPv4 PBR is enabled is displayed.
local Displays the IPv4 PBR forwarded packet count on the local interface.

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following example displays the IPv4 PBR forwarded packet count.
Examples Ruijie#show ip pbr statistics
IPv4 Policy-based route statistic
gigabitEthernet 0/1
statistics : 10

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1.12 show ip policy

Use this command to display the interface configured with the policy-based routing and the name of
route map applied on the interface.
show ip policy [ route-map-name ]
Parameter
Parameter Description
Description
route-map-name Indicates the name of a route map.

Defaults N/A

1-14
Command Reference PBR Commands

Command Privileged EXEC mode


Mode

Usage Guide You can use this command to verify the current PBR configured in the system.

Configuration The following example displays the current PBR configured in the system.
Examples Ruijie#show ip policy
Banlance Mode: redundance
Interface Route map
local test
GigabitEthernet 0/0 test

Related
Command Description
Commands
Applies the policy-based routing on the
ip policy route-map
interface.
Applies the policy-based routing on the local
ip local policy route-map
interface.

Platform N/A
Description

1.13 show ipv6 pbr route

Use this command to display the IPv6 PBR information on the interface.
show ipv6 pbr route [ interface if-name | local ]

Parameter
Parameter Description
Description
Specifies the interface name. If the interface name is specified, the
IPv6 BPR information of this interface is displayed. Otherwise, the
interface if-name
IPv6 BPR information of all interfaces where the IPv6 PBR is enabled
is displayed.
local Displays the IPv6 PBR information on the local interface.

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following example displays the IPv6 PBR information on the interfaces.

1-15
Command Reference PBR Commands

Examples Ruijie#show ipv6 pbr route


PBR IPv6 Route Summary : 1
Interface : GigabitEthernet 0/2
Sequence : 10
ACL[0] : 2901
ACL_CLS[0] : 0
Min Length : None
Max Length : None
VRF ID : 0
Route Flags :
Route Type : PBR
Direct : Permit
Priority : High
Tos_Dscp : None
Precedence : None
Tos_Dscp : 0
Precedence : 0
Mode : redundance
Nexthop Count : 1
Nexthop[0] : 10::1
Weight[0] : 1
Ifindex[0] : 3

Parameter Description
PBR IPv4 Route Summay IPv4 PBR route count.
Interface Interface where IPv4 PBR is enabled.
Sequence The PBR serial number.
ACL The ACL ID used in the match rule.
ACL_CLS The ACL type used in the match rule, such as
the IP standard ACL.
Min Length The minimum match length.
Max Length The maximum match length.
VRF ID Port associated VRF ID.
Route Flags PBR flag bit:
Route Type: “PBR” indicates PBR routes.
“Normal” indicates common
routes.
Direct: PBR matching action, permit or deny
Priority: PBR priority, High or Low
Tos_Dscp: Displays whether the tos rule or the
dscp rule is configured.
Precedence: Displays whether the set ip
precedence rule is configured.
Mode Specifies the redundancy mode or the load

1-16
Command Reference PBR Commands

balance mode for the next hop.


Nexthop Count Specifies the next hop number. ECMP supports
up to 32 next hops.
Nexthop Specifies the next hop IP address.
Weight Specifies the next hop weight.
Ifindex Specifies the outbound interface index
corresponding to the next hop

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1.14 show ipv6 pbr route-map

Use this command to display the IPv6 PBR route-map information.


show ipv6 pbr route-map route-map-name

Parameter
Parameter Description
Description
route-map-name The route-map name.

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following example displays the IPv6 PBR route-map information.
Examples Ruijie#show ipv6 pbr route-map rm6
Pbr VRF: GLOBAL, ID: 0
Forward Mode: redundance
Forwarding: On

route-map rm6
route-map index: sequence 10, permit
Match rule:
ACL ID : 0, ACL CLS: 0, Name: acl6
Set rule:
IPv6 Nexthop: 10::1, (VRF Name: , ID: 0), Weight: 0, Flags: 0

1-17
Command Reference PBR Commands

PBR state info ifx: GigabitEthernet 0/0, Connected: true, Track State:
valid, Flags: 0

Field Description
Pbr VRF VRF name and VRF ID.
Forward Mode Sets the load balancing mode or to the
redundancy mode for the next hop.
Forwarding Displays whether the IP route forwarding is
enabled.
Route-map index The serial number and the type of the sub-map.
Match rule Match rule
Set rule Set rule.
PBR state info PBR private data information, such as outbound
interface and the link state of the next hop.

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1.15 show ipv6 pbr statistics

Use this command to display the IPv6 PBR forwarded packet count.
show ip pbr statistics [ interface if-name | local ]

Parameter
Parameter Description
Description
Specifies the interface name. If the interface name is specified, the
IPv6 PBR forwarded packet count of this interface is displayed.
interface if-name
Otherwise, the IPv6 PBR forwarded packet count of all interfaces
where the IPv6 PBR is enabled is displayed.
local Displays the IPv6 PBR forwarded packet count on the local interface.

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following example displays the IPv6 PBR forwarded packet count.

1-18
Command Reference PBR Commands

Examples Ruijie#show ipv6 pbr statistics


IPv6 Policy-based route statistic
gigabitEthernet 0/1
statistics : 20

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

1.16 show ipv6 policy

Use this command to display which interfaces are configured with IPv6 PBR.
show ipv6 policy [ route-map-name ]
Parameter
Parameter Description
Description
route-map-name Name of the PBR router map.

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following example displays the current PBR applied in the system.
Examples Ruijie#show ipv6 policy
Banlance Mode: redundance
Interface Route map
VLAN 1 RM_for_Vlan_1
VLAN 2 RM_for_Vlan_2

Field Description
Balance Mode The current PBR running mode.
Interface The name of interface with PBR applied.
The name of route map applied on the
Route map
interface.

Related
Command Description
Commands
show route-map Displays the current configured route map.

1-19
Command Reference PBR Commands

Platform N/A
Description

1-20
Command Reference ROUTE-DB Commands

2 ROUTE-DB Commands

2.1 route-auto-choose

Use this command to configure a route database.


route-auto-choose { cnc | cnii | cernet | cmcc | other word } interface next-hop [ tag num ]
[ distance ]

Use the no form of this command to delete a route database.


no route-auto-choose { cnc | cnii | cernet | cmcc | other word } interface next-hop [ tag num ]
[ distance ]

Use this command to restore the default configuration.


default route-auto-choose { cnc | cnii | cernet | cmcc | other word } interface next-hop [ tag num ]
[ distance ]

Parameter
Parameter Description
Description
cnc Configure the China Unicom route database.
cnii Configure the China Telecom route database.
cernet Configure the route database of the education network.
cmcc Configure the China Mobile route database.
word Configure a route database of another operator type.
interface Indicate the outbound routing interface corresponding to the route
database.
next-hop Indicate the next-hop IP address of the route corresponding to the route
database.
tag num Indicate the tag of the route corresponding to the route database.
distance Indicate the metric value for a route of the route database.

Defaults No route database is configured by default.

Command Global configuration mode


Mode

Usage Guide Use this command to associate a route database with a specified interface.

Configuration #Configure a route database command to enable the China Telecom route database. The interface is
Example gigabitEthernet 0/1 and the next-hop IP address is [Link].
Ruijie# config
Ruijie(config)# route-auto-choose cnii gigabitEthernet 0/1 [Link]

2-21
Command Reference ROUTE-DB Commands

Verification
1. Run the show route-db-info cnii command to display information about the corresponding China
Telecom route database.

2. Verify that corresponding information is prompted when the next-hop IP address of the route
database is the local IP address.

Ruijie(config)#route-auto-choose cmcc gi 0/5 [Link]


%Invalid next hop address (it's this router)

2.2 route-auto-choose update

Use this command to update the route database file, and then update the currently running route
database based on the updated route database file.
route-auto-choose update

Parameter
Parameter Description
Description
N/A N/A

Command Global configuration mode


Mode

Usage Guide Use this command to update the route database.

Configuration #Update the route database file.


Example Ruijie# config
Ruijie(config)# route-auto-choose update

2.3 route-auto-choose user-defined

Use this command to configure a user-defined route database.


route-auto-choose user-defined name string [ ip_address ip_mask ]

Use the no form of this command to delete a user-defined route database.


no route-auto-choose user-defined name string [ ip_address ip_mask ]

Parameter
Parameter Description
Description
string Name of the user-defined route database.
ip-address IP address of the user-defined route database.
ip_mask Mask of the user-defined route database.
file-path Import path

2-22
Command Reference ROUTE-DB Commands

Default
There is no user-defined route database by default.
Settings

Command Global configuration mode


Mode

Default Level 14

Usage Guide Use this command to associate a route database with a specified interface.

Configuration 1: Configure a user-defined route database. Its name is “Hello”, the IP address is [Link], and the mask
Example is [Link].

Ruijie# config

Ruijie(config)# route-auto-choose user-defined Hello [Link] [Link]

Verification Run the command show route-db-info user-defined to display information of the user-defined route
database.

Prompt 1: If the name of the user-defined route database is the same as the name of the default route database,
the configuration fails and the system shows the corresponding prompt.

Ruijie(config)# route-auto-choose user-defined name cmcc

"cmcc" exists in default types, please rename!

2.4 show route-db-info

Use this command to display the route database information.


show route-db-info { cnc | cnii | cernet | cmcc | word | db-type | ip_address | user-defined }

Parameter
Parameter Description
Description
cnc Check information about the China Unicom route database.
cnii Check information about the China Telecom route database.
cernet Check information about the route database of the education network.
cmcc Check information about the China Mobile route database.
word Check information about the route database of another operator type.
db-type Check the number of operator types in the current route database file.
ip_address Check the operator type of a certain IP address.
user-defined Check the information about the user-defined route database.

Command All modes


Mode

2-23
Command Reference ROUTE-DB Commands

Usage Guide Use this command to query information about a route database.

Configuration #Query all operator types in the route database


Example Ruijie# show route-db-info db-type
cnii China Telecom 2018.06.10.00
cnc China Unicom 2018.06.10.00
cernet Education 2018.06.10.00
cmcc China Mobile 2018.06.10.00
beijingteletron Beijing Teletron 2018.06.10.00
1 (User-defined)

Field Description

The first column English abbreviation of operator

The second column Chinese name of operator

The third column Version of operator’s route database

User-defined Indicate this operator is a user-defined one

2-24
Command Reference RIP Commands

3 RIP Commands

3.1 auto-summary

Use this command to enable automatic summary of RIP routes. Use the no form of this command to
disable this function
auto-summary
no auto-summary

Parameter
Parameter Description
Description
N/A N/A

Defaults Automatic summary of RIP routes is enabled by default

Command
Routing progress configuration mode
Mode

Usage Guide Automatic RIP route summary means the subnet routes will be automatically summarized into the
routes of the classified network when they traverse through the subnet. Automatic route summary is
enabled by default for RIPv1 and RIPv2.
Automatic RIP route summary improves the flexibility and effectiveness of the network. If the
summarized route exists, the sub-routes contained in the summarized route cannot be seen in the
routing table, reducing the size of the routing table significantly.
Advertising the summarized route is more efficient than advertising individual routes in light of the
following factors:

 The summarized route is always processed preferentially when you query the RIP database.

 Any sub-route is ignored when you query the RIP database, reducing the processing time.

 If you want to learn the specific sub-routes instead of the summarized route, disable the
automatic route summary function. Only when RIPv2 is configured, the automatic route
summary function can be disabled. For the RIPv1, the automatic route summary function is
always enabled.

The range of the supernet route is wider than that of the classful network. Therefore, this
command takes no effect on the supernet route.

Configuration The following example disables automatic route summary of RIPv2.


Examples Ruijie(config)# router rip
Ruijie(config-router)# version 2
Ruijie(config-router)# no auto-summary

3-25
Command Reference RIP Commands

Related
Command Description
Commands
Defines the RIP software versions: v1 or v2.
version
Both v1 and v2 are supported by default.

Platform N/A
Description

3.2 default-information originate

Use this command to generate a default route in the RIP progress. Use the no form of this command
to delete the generated default route.
default-information originate [ always ] [ metric metric-value ] [ route-map map-name ]
no default-information originate [ always ] [ metric ] [ route-map map-name]

Parameter
Parameter Description
Description
(Optional) Enables RIP to generate the default route, no matter
always
whether the default route exists or not.
(Optional) The original metric value of the default route with the value
metric metric-value
range 115 of metric-value.
(Optional) Name of the associated route-map. Route-map is not
route-map map-name
associated by default.

Defaults No default route is generated by default.


The default metric value is 1.

Command
Routing process configuration mode
Mode

Usage Guide By default, RIP will not advertise the default route if the default route exists in the routing table of the
router. In this case, use the default-information originate command to notify the neighbor of the
default route.
With the parameter always configured, no matter whether the default route exists in the RIP routing
process or not, the default route will be advertised to the neighbor but is not shown in the local routing
table. You can use the show ip rip database command to view the RIP routing information database
to confirm whether the default route is generated.
Use the parameter route-map to control more about the default route advertised to RIP. For
example, use the set metric command to set the metric value of the default route.
The route-map set metric rule takes precedence over the parameter metric value configuration of the
default route. If the parameter metric is not configured, the default metric value is used by the default
route.

3-26
Command Reference RIP Commands

If the default route can be generated in the RIP process by using this command, RIP will not
learn the default route advertised from the neighbor.

For the default route generated by using the ip default-network command, the
default-information originate command is required to add the default route to RIP.

Configuration The following example generates a default route to the RIP routing table.
Examples Ruijie(config)# router rip
Ruijie(config-router)# default-information originate always

Related
Command Description
Commands
ip rip default-information Notifies the default route through an interface.
Redistributes the routes from other protocols to
redistribute
RIP.

Platform N/A
Description

3.3 default-metric

Use this command to define the default RIP metric value. Use the no form of this command to restore
the default setting.
default-metric metric-value
no default-metric

Parameter
Parameter Description
Description
Indicates the default metric value with the range from 1 to 16. If the
metric-value metric value is greater than or equal to 16, the system regards the
route unreachable.

Defaults The default is 1.

Command
Routing process configuration mode
Mode

Usage Guide This command needs to work with the command redistribute. When the routes are redistributed to
the RIP routing process from a routing protocol process, the route metric value cannot be converted
due to the incompatibility of the metric calculation mechanisms for different protocols. During the
conversion, therefore, it is required to redefine the metric values of redistributed routes in the RIP
routing domain. If there is no clear definition of the metric value in redistributing a routing protocol
process, the RIP uses the metric value defined with default-metric. If the metric value is defined, this
value overwrites the metric value defined with default-metric. If this command is not configured, the

3-27
Command Reference RIP Commands

default value of default-metric is 1.

Configuration The following example enables the RIP routing protocol to redistribute the routes learned by the
Examples OSPF routing protocol, whose initial RIP metric value is set to 3.
Ruijie(config)# router rip
Ruijie(config-router)# default-metric 3
Ruijie(config-router)# redistribute ospf 100

Related
Command Description
Commands
Redistributes the routes from one routing
redistribute
domain to another routing domain.

Platform N/A
Description

3.4 distance

Use this command to set the management distance of the RIP route. Use the no form of this
command to restore the default setting.
distance distance [ ip-address wildcard ]
no distance [ distance ip-address wildcard ]

Parameter
Parameter Description
Description
Sets the management distance of a RIP route, an integer in the range
distance
from 1 to 255.
ip-address Indicates the prefix of the source IP address of the route.
Defines the comparison bit of the IP address, where 0 means
wildcard
accurate matching and 1 means no comparison.

Defaults The default is 120.

Command
Routing process configuration mode
Mode

Usage Guide Use this command to set the management distance of the RIP route.
You can use this command to create several management distances with source address prefixes.
When the source address of the RIP route is within the range specified by the prefixes, the
corresponding management distance is applied; otherwise, the route uses the management distance
configured by the RIP.

Configuration The following example sets the management distance of the RIP route to 160, and specifies the
Examples management distance of the route learned from [Link] as 123.

3-28
Command Reference RIP Commands

Ruijie(config)# router rip


Ruijie(config-router)# distance 160
Ruijie(config-router)# distance 123 [Link] [Link]

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

3.5 distribute-list in

Use this command to control route update for route filtering. Use the no form of this command to
restore the default setting.
distribute-list { [ access-list-number | name ] | prefix prefix-list-name [ gateway prefix-list-name ] |
[ gateway prefix-list-name ] } in [ interface-type interface-number ]
no distribute-list { [ access-list-number | name ] | prefix prefix-list-name [ gateway prefix-list-name ]
| [ gateway prefix-list-name ] } in [ interface-type interface-number ]

Parameter
Parameter Description
Description
Specifies the ACL. Only the routes that are allowed by the ACL can
access-list-number | name
be accepted.
prefix prefix-list-name Uses the prefix list to filter the routes.
gateway prefix-list-name Uses the prefix list to filter the source of the routes.
interface-type
(Optional) Applies the distribution list only to a specified interface.
interface-number

Defaults The distribution list is not defined by default.

Command
Routing process configuration mode
Mode

Usage Guide To deny receiving some specified routes, you can process all the received route update packets by
configuring the route distribute control list.
Without any interface specified, the system will process the route update packets received on all the
interfaces.

Configuration The following example enables RIP to control the routes received from the GigabitEthernet 0/0, only
Examples permitting the routes starting with 172.16.
Ruijie(config)# router rip
Ruijie(config-router)# network [Link]
Ruijie(config-router)# distribute-list 10 in gigabitethernet 0/0

3-29
Command Reference RIP Commands

Ruijie(config-router)# no auto-summary
Ruijie(config-router)# access-list 10 permit [Link] [Link]

Related
Command Description
Commands
access-list Defines the ACL rule.
prefix-list Defines the prefix list.

Platform N/A
Description

3.6 distribute-list out

Use this command to control route update advertisement for filtering routes. Use the no form of this
command to restore the default setting.
distribute-list { [ access-list-number | name ] | prefix prefix-list-name } out [ interface | [ connected |
ospf process-id | rip | static ] ]
no distribute-list { [ access-list-number | name ] | prefix prefix-list-name } out [ interface |
[ connected | ospf process-id | rip | static ] ]

Parameter
Parameter Description
Description
access-list-number | name Specifies the ACL.
prefix prefix-list-name Uses the prefix list to filter routes.
(Optional) Applies route update advertisement control to a specified
interface
interface in the distribution list.
(Optional) Applies route update advertisement control to only
connected
connected routes in this distribution list.
(Optional) Applies route update advertisement control to only routes
ospf process-id introduced from OSPF in this distribution list. process-id specifies an
OSPF instance.
(Optional) Applies route update advertisement control to only RIP
rip
routes in this distribution list.
(Optional) Applies route update advertisement control to only static
static
routes in this distribution list.

Defaults No route update advertisement is configured by default.

Command
Routing process configuration mode
Mode

Usage Guide If this command relates to none of optional parameters, route update advertisement control applies to
all interfaces. If this command relates to interface options, route update advertisement control applies

3-30
Command Reference RIP Commands

to only the specified interface. If this command relates to other route process parameters, route
update advertisement control applies to only the specific route process.

Configuration The following example advertises only the [Link]/24 route.


Examples Ruijie(config)# router rip
Ruijie(config-router)# network [Link]
Ruijie(config-router)# network [Link]
Ruijie(config-router)# distribute-list 10 out
Ruijie(config-router)# version 2
Ruijie(config-router)#access-list 10 permit [Link] [Link]

Related
Command Description
Commands
access-list Defines the ACL rule.
prefix-list Defines the prefix list.
redistribute Configures route redistribution.

Platform N/A
Description

3.7 graceful-restart

Use this command to configure the RIP graceful restart (GR) function for a device. Use the no form of
this command to restore the default configuration.
graceful-restart [ grace-period grace-period ]
no graceful-restart [ grace-period ]

Parameter
Parameter Description
Description
graceful-restart Enables the GR function.
grace-period (Optional) Configures the grace period.
(Optional) Indicates the user-defined GR period.
The default value is the smaller value between twice the update time
grace-period
and 60 seconds.
The range is from 1 to 1,800. The unit is second.

Defaults This function is enabled by default.

Command
Routing process configuration mode
Mode

Usage Guide The GR function is configured on the RIP instances. Different parameters can be configured for
different RIP instances.
The GR period refers to the time from the startup to the end of RIP GR. During this period, the

3-31
Command Reference RIP Commands

forwarding table remains unchanged and the RIP route is restored to the state before protocol restart.
When the GR period expires, RIP exits the GR state and performs normal RIP operation.
The graceful-restart grace-period command enables users to modify GR period. Note: Make sure
that GR is completed before the RIP route is validate and after an RIP route update cycle elapses. If
an improper value is configured, non-stop data forwarding cannot be ensured during the GR process.
For example, if the GR period is longer than the time when the neighbor’s route is unavailable and GR
is not completed before the route is validated, then the neighbor is not re-informed of the route and
forwarding of the neighbor’s route is terminated when it is validated, which results in data forwarding
interruption. Therefore, unless otherwise specified, it is not recommended to adjust the GR period. If
the period needs to changed, determine that the grace period is longer than the route update cycle
and shorter than the time when the route is unavailable in combination with the configuration of the
timers basic command.

During the RIP GR period, the network must be stable.

Configuration The following example enables the RIP GR function and configures the GR period parameters of the
Examples GR function.
Ruijie(config)# router rip
Ruijie(config-router)# graceful-restart grace-period 90

Related
Command Description
Commands
timers basic Configures RIP timers.

Platform N/A
Description

3.8 ip rip authentication key-chain

Use this command to enable RIP authentication and specify the keychain used for RIP authentication.
Use the no form of this command to restore the default setting.
ip rip authentication key-chain name-of-keychain
no ip rip authentication key-chain

Parameter
Parameter Description
Description
Indicates the name of the keychain, which specifies the keychain
name-of-keychain
used for RIP authentication.

Defaults The keychain is not associated by default.

Command
Interface configuration mode
Mode

3-32
Command Reference RIP Commands

Usage Guide If the keychain is specified in the interface configuration, use the key chain global configuration
command to define the keychain. Otherwise, RIP data packet authentication fails.
RIPv2 instead of RIPv1 supports authentication of the RIP data packet.

Configuration The following example enables RIP authentication on the GigabitEthernet 0/1 with the associated
Examples keychain ripchain.
Ruijie(config)#interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)#ip rip authentication key-chain
ripchain
Meanwhile, use the key chain command to define this keychain in global configuration mode.
Ruijie(config)#key chain ripchain
Ruijie(config-keychain)#key 1
Ruijie(config-keychain-key)#key-string Hello

Related
Command Description
Commands
ip rip authentication mode Defines the RIP authentication mode.
Enables RIP authentication, and sets the
password string of RIP plaintext authentication.
ip rip authentication text-password
RIP data packet authentication is supported
only by RIPv2.
Defines the version of RIP packets received on
ip rip receive version
the interface.
Defines the version of RIP packets sent on the
ip rip send version
interface.
Defines the keychain and enters keychain
key chain
configuration mode.

Platform N/A
Description

3.9 ip rip authentication mode

Use this command to define the RIP authentication mode. Use the no form of this command to
restore the default setting.
ip rip authentication mode { text | md5 }
no ip rip authentication mode

Parameter
Parameter Description
Description
text Configures RIP authentication as plaintext authentication.
md5 Configures RIP authentication as MD5 authentication.

3-33
Command Reference RIP Commands

Defaults It is plaintext authentication by default.

Command
Interface configuration mode
Mode

Usage Guide During the RIP authentication configuration process, the RIP authentication modes of all devices
requiring exchange of RIP routing information must be the same. Otherwise, RIP packet exchange
will fail.
If the plaintext authentication mode is adopted, but the password string of the plaintext authentication
or the associated keychain is not configured, no authentication occurs. In the same way, if the MD5
authentication mode is adopted, but the associated keychain is not configured, no authentication
occurs.
RIPv2 instead of RIPv1 supports authentication of the RIP data packet.

Configuration The following example configures the RIP authentication mode on the GigabitEthernet 0/1 as MD5.
Examples Ruijie(config)#interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip rip authentication mode md5

Related
Command Description
Commands
Enables the RIP authentication mode and
specifies the keychain used for RIP
ip rip authentication key-chain
authentication. Only RIPv2 supports
authentication of the RIP data packet.
Enables the RIP authentication mode, and sets
the password string of RIP plaintext
ip rip authentication text-password
authentication. Only RIPv2 supports
authentication of the RIP data packet.
Defines the keychain and enters the keychain
key chain
configuration mode

Platform N/A
Description

3.10 ip rip authentication text-password

Use this command to enable RIP authentication and set the password string of RIP plaintext
authentication. Use the no form of this command to restore the default setting.
ip rip authentication text-password [ 0 | 7 ] password-string
no ip rip authentication text-password

Parameter
Parameter Description
Description
0 Specifies that the key is displayed as plaintext.

3-34
Command Reference RIP Commands

7 Specifies that the key is displayed as cipher text.


Indicates the password string of the plaintext authentication, in the
password-string
length of 1-16 bytes.

Defaults No password string of RIP plaintext authentication is configured by default.

Command
Interface configuration mode
Mode

Usage Guide This command works only in plaintext authentication mode.


To enable the RIP plaintext authentication function, use this command to configure the corresponding
password string, or use the associated key chain to obtain the password string. The latter takes the
precedence over the former one.
RIPv1 does not support RIP authentication but RIPv2 does.

Configuration The following example enables the RIP plaintext authentication on GigabitEthernet 0/1 and sets the
Examples password string to hello.
Ruijie(config)#interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip rip authentication text-password
hello

Related
Command Description
Commands
ip rip authentication mode Defines the RIP authentication mode.
Enables the RIP authentication mode and
specifies the keychain used for RIP
ip rip authentication key-chain
authentication. Only RIPv2 supports
authentication.

Platform N/A
Description

3.11 ip rip default-information

Use this command to advertise the default route through a RIP interface. Use the no form of this
command to restore the default setting.
ip rip default-information { only | originate } [metric metric-value ]
no ip rip default-information

Parameter
Parameter Description
Description
only Notifies the default route rather than other routes.
originate Notifies the default route and other routes.

3-35
Command Reference RIP Commands

Specifies the metric value of the default route, in the range from1 to
metric metric-value
15.

Defaults No default route is configured by default. The default metric value is 1.

Command
Interface configuration mode
Mode

Usage Guide After you configure this command on a specified interface, a default route is generated and notified
through the interface. If the ip rip default-information command of the interface and the
default-information originate command of the RIP process are configured at the same time, only
the default route of the interface is advertised.

RIP will no longer learn the default route notified by the neighbor if any interface is configured
with the ip rip default-information command.

Configuration The following example creates a default route which is notified on ethernet0/1 only.
Examples Ruijie(config)#interface ethernet 0/1
Ruijie(config-if-Ethernet 0/1)#ip rip default-information only

Related
Command Description
Commands
default-information originate Generates a default route in the RIP process.

Platform N/A
Description

3.12 ip rip receive enable

Use this command to enable RIP to receive the RIP data package on a specified interface. Use the
no form of this command to restore the default setting.
ip rip receive enable
no ip rip receive enable

Parameter
Parameter Description
Description
N/A N/A

Defaults RIP packages can be received through the interface by default.

Command
Interface configuration mode
Mode

3-36
Command Reference RIP Commands

Usage Guide To prevent an interface from receiving RIP packets, use the no form of this command in interface
configuration mode. This command works on interfaces configured with this command. You can use
the default form of this command to enable the interface to receive the RIP data package.

Configuration The following example prohibits receiving RIP data packages on GigabitEthernet 0/1.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# no ip rip receive enable

Related
Command Description
Commands
Enables or disables the interface to send RIP
ip rip send enable
data packages.
passive-interface Configures a passive RIP interface.

Platform N/A
Description

3.13 ip rip receive version

Use this command to define the version of RIP packets received on an interface. Use the no form of
this command to restore the default setting.
ip rip receive version [ 1 ] [ 2 ]
no ip rip receive version

Parameter
Parameter Description
Description
1 (Optional) Receives only RIPv1 packets.
2 (Optional) Receives only RIPv2 packets.

Defaults The default behavior depends on the configuration with the version command.

Command
Interface configuration mode
Mode

Usage Guide This command overwrites the default configuration of the version command. It affects only RIP
packet receiving through the interface and allows RIPv1 and RIPv2 packets to be received on the
interface at the same time. If the command is configured without parameters, data package receiving
depends on the configuration of the version.

Configuration The following example enables receiving both RIPv1 and RIPv2 data packages.
Examples Ruijie(config)#interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip rip receive version 1 2

Related Command Description

3-37
Command Reference RIP Commands

Commands
Defines the default version of the RIP packets
version
received/sent on the interface.

Platform N/A
Description

3.14 ip rip send enable

Use this command to enable RIP to send a RIP data package on a specified interface. Use the no
form of this command to restore the default setting.
ip rip send enable
no ip rip send enable

Parameter
Parameter Description
Description
N/A N/A

Defaults RIP packages can be sent through the interface by default.

Command
Interface configuration mode
Mode

Usage Guide To prevent an interface from sending RIP packets, use the no form of this command in interface
configuration mode. This command works on interfaces configured with this command. You can use
the default form of this command to enable the interface to send the RIP data package.

Configuration The following example prohibits sending RIP data packages on GigabitEthernet 0/1.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# no ip rip send enable

Related
Command Description
Commands
Enables or disables receiving RIP packets on
ip rip receive enable
the interface.
passive-interface Configures a passive RIP interface.

Platform N/A
Description

3.15 ip rip send supernet-routes

Use this command to enable RIP to send the supernet route on a specified interface. Use the no form

3-38
Command Reference RIP Commands

of this command to disable this function.


ip rip send supernet-routes
no ip rip send supernet-routes

Parameter
Parameter Description
Description
N/A N/A

Defaults This function is enabled by default.

Command
Interface configuration mode
Mode

Usage Guide When the RIPv1 router monitors a RIPv2 router response packet and if the supernet routing
information is monitored, incorrect route information is learned because the RIPv1 ignores the subnet
mask of the routing information. In this case, you are advised to use the no form of this command on
the RIPv2 router to disable advertising the supernet route on the corresponding interface. This
command works only on interfaces configured with this command.

This command is only valid upon sending the RIPv2 packets on the interface and it is used to
control sending the supernet route.

Configuration The following example disables sending RIP supernet routes on the GigabitEthernet 0/1 interface.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# no ip rip send supernet-routes

Related
Command Description
Commands
version Defines the RIP version
Enables or disables sending the RIP package
ip rip send enable
on the interface.

Platform N/A
Description

3.16 ip rip send version

Use this command to define the version of the RIP packets sent on the interface. Use the no form of
this command to restore the default setting.
ip rip send version [ 1 ] [ 2 ]
no ip rip send version

Parameter
Parameter Description
Description

3-39
Command Reference RIP Commands

1 (Optional) Receives only RIPv1 packets.


2 (Optional) Receives only RIPv2 packets.

Defaults The default behavior depends on the configuration with the version command.

Command
Interface configuration mode
Mode

Usage Guide This command overwrites the default configuration of the version command. It affects only RIP
packet sending through the interface and allows RIPv1 and RIPv2 packages sent on the interface at
the same time. If the command is configured without parameters, package receiving depends on the
configuration of the version.

Configuration The following example enables sending both RIPv1 and RIPv2 packages on the GigabitEthernet 0/1
Examples interface.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip rip send version 1 2

Related
Command Description
Commands
Defines the default version of the RIP packets
version
received/sent on the interfaces.

Platform N/A
Description

3.17 ip rip split-horizon

Use this command to enable split horizon. Use the no form of this command to disable this function.
ip rip split-horizon [ poisoned-reverse ]
no ip rip split-horizon [ poisoned-reverse ]

Parameter
Parameter Description
Description
poisoned-reverse (Optional) Enables split horizon with poisoned reverse.

Defaults This function is enabled by default.

Command
Interface configuration mode
Mode

Usage Guide When multiple devices are connected to the IP broadcast network and run a distance vector routing
protocol, the split horizon mechanism is required to prevent loop. The split horizon prevents the

3-40
Command Reference RIP Commands

device from advertising routing information from the interface that learns that information, which
optimizes routing information exchange between multiple devices.
For non-broadcast multi-path access networks (such as frame relay and X.25), split horizon may
cause some devices to be unable to learn all routing information. Split horizon may need to be
disabled in this case. If an interface is configured the secondary IP address, attentions shall be paid
also for split horizon.
If the poisoned-reverse parameter is configured, split horizon with poisoned reverse is enabled. In
this case, devices still advertise the route information through the interface from which the route
information is learned. However, the metric value of the route information is set to unreachable.
The RIP routing protocol is a distance vector routing protocol, and the split horizon issue shall be
cautioned in practical applications. If it is unsure whether split horizon is enabled on the interface, use
the show ip rip command to judge. This function makes no influence on the neighbor defined with the
neighbor command.

Configuration The following example disables the RIP split horizon function on the interface GigabitEthernet 0/0.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if)# no ip rip split-horizon

Related
Command Description
Commands
neighbor (RIP) Defines the IP address of the neighbor of RIP.
Enables the source address authentication of
validate-update-source
the RIP route update message.

Platform N/A
Description

3.18 ip rip summary-address

Use this command to configure port-level convergence through an interface. Use the no form of this
command to disable this function.
ip rip summary-address ip-address ip-network-mask
no ip rip summary-address ip-address ip-network-mask

Parameter
Parameter Description
Description
ip-address Indicates the IP addresses to be converged.
Indicates the subnet mask of the specified IP address for route
ip-network-mask
convergence.

Defaults The RIP routes are automatically converged to the classful network edge by default.

Command
Interface configuration mode
Mode

3-41
Command Reference RIP Commands

Usage Guide The ip rip summary-address command converges an IP address or a subnet on a specified port.
RIP routes are automatically converged to the classful network edge. The classful subnet can be
configured through only port convergence.

The summary range configured by this command cannot be a super class network, that is, the
configured mask length is greater than or equal to the natural mask length of the network.

Configuration The following example disables the automatic route convergence function of RIPv2. Interface
Examples convergence is configured so that GigabitEthernet 0/1 advertises the converged route [Link]/16.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip rip summary-address [Link]
[Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link] [Link]
Ruijie(config)# router rip
Ruijie(config-router)# network [Link]
Ruijie(config-router)# version 2
Ruijie(config-router)# no auto-summary

Related
Command Description
Commands
Enables the automatic convergence of RIP
auto-summary
routes.

Platform N/A
Description

3.19 ip rip triggered

Use this command to enable triggered RIP based on links. Use the no form of this command to
restore the default setting.
ip rip triggered
ip rip triggered retransmit-timer timer
ip rip triggered retransmit-count count
no ip rip triggered
no ip rip triggered retransmit-timer
no ip rip triggered retransmit-count

Parameter
Parameter Description
Description
Configures the interval at which the Update Request and Update
retransmit-timer timer Response packets are retransmitted. The range is from 1 to 3,600.
The unit is second. The default is five.
retransmit-count count Configures the maximum times that the Update Request and Update

3-42
Command Reference RIP Commands

Response packets are retransmitted. The range is from 1 to 3600.


The default is 36.

Defaults This function is disabled by default.

Command
Interface configuration mode
Mode

Usage Guide Triggered RIP (TRIP) is the extension of RIP on the wide area network (WAN), mainly used for
demand-based links.
With the TRIP function enabled, RIP no longer sends route updates periodically and sends route
updates to the WAN interface only if:
Update Request packets are received.
RIP routing information is changed.
Interface state is changed.
The router is started.
As periodical RIP update is disabled, the confirmation and retransmission mechanism is required to
ensure that update packets are sent and received successfully over the WAN. The retransmit-timer
and retransmit-count commands can be used to specify the retransmission interval and maximum
retransmission times for request and update packets.

The function can be enabled in the case of the following conditions: a) The interface has only
one neighbor. b) There are multiple neighbors but they interact information using unicast
packets. You are advised to enable the function for link layer protocols such as PPP, frame
relay, and X.25.

You are advised to enable split horizon with poison reverse on the interface enabled with the
function; otherwise invalid routing information might be left.

Make sure that the function is enabled on all routers on the same link; otherwise the function will
be invalid and the routing information cannot be exchanged correctly.

To enable the function, make sure that the RIP configuration is the same on both ends of the
link, such as RIP authentication and the RIP version supported by the interface.

If this function is enabled on this interface, the source address of packets on this interface will be
checked no matter whether the source IP address verification function (validate-update-source)
is enabled.

Configuration The following example enables TRIP and sets the retransmission interval and maximum
Examples retransmission time to 10 seconds and 18 respectively for Update Request and Update Response
packets.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip rip triggered
Ruijie(config-if-GigabitEthernet 0/1)# ip rip triggered retransmit-timer 10
Ruijie(config-if-GigabitEthernet 0/1)# ip rip triggered retransmit-count 18

3-43
Command Reference RIP Commands

Related
Command Description
Commands
Displays the summarized routing information of
show ip rip database
the RIP database.
show ip rip interface Displays the RIP interface information.
ip rip split-horizon Configures RIP split horizon.

Platform N/A
Description

3.20 ip rip v2-broadcast

Use this command to send RIPv2 packets in broadcast rather than multicast mode. Use the no form
of this command to restore the default setting.
ip rip v2-broadcast
no ip rip v2-broadcast

Parameter
Parameter Description
Description
N/A N/A

Defaults The default behavior depends on the configuration of the version command.

Command
Interface configuration mode
Mode

Usage Guide This command overwrites the default of the version command. This command affects only sending
RIP packets on the interface. This command allows RIPv1 and RIPv2 packages sent on the interface
simultaneously. If this command is configured without parameters, package receiving depends on the
version setting.

Configuration The following example sends RIPv2 packets in broadcast mode on the GigabitEthernet 0/1 interface.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# no ip rip split-horizon

Related
Command Description
Commands
Defines the default version of the RIP packets
version
received and sent on the interface.

Platform N/A
Description

3-44
Command Reference RIP Commands

3.21 neighbor

Use this command to define the IP address of a RIP neighbor. Use the no form of this command to
restore the default setting.
neighbor ip-address
no neighbor ip-address

Parameter
Parameter Description
Description
Indicates the IP address of the neighbor. The IP address must be that
ip-address
of the network connected to the local device.

Defaults The neighbor is not defined by default.

Command
Routing process configuration mode
Mode

Usage Guide By default, RIPv1 uses the IP broadcast address ([Link]) to advertise routing information,
and RIPv2 uses the multicast address [Link] to do so. If you do not want to allow all the devices
on the broadcast network or non-broadcast multi-path access network to receive routing information,
use the passive-interface command to configure related interfaces as passive interfaces and then
define only some neighbors who can receive the routing information. This command has no impact on
the receiving of RIP information. The passive interface is configured. No request packet is sent after
the interface is enabled.

Configuration The following example configures the IP address of a RIP neighbor as [Link], and the interface
Examples of RIP as passive interface.
Ruijie(config)# router rip
Ruijie(config-router)# passive-interface default
Ruijie(config-router)# neighbor [Link]

Related
Command Description
Commands
passive-interface Configures the interface as a passive interface.

Platform N/A
Description

3.22 network

Use this command to define the list of networks to be advertised in the RIP routing process. Use the
no form of this command to delete the defined network.
network network-number [ wildcard ]

3-45
Command Reference RIP Commands

no network network-number [ wildcard ]

Parameter
Parameter Description
Description
Indicates the network number of the directly-connected network. The
network-number network number is a natural one. All interfaces whose IP addresses
belong to that natural network can send/receive RIP packages.
Defines the IP address comparing bit: 0 refers to accurate matching,
wildcard
and 1 refers to no comparison.

Defaults N/A

Command
Routing process configuration mode
Mode

Usage Guide The network-number and wildcard parameters can be configured simultaneously to enable the IP
address of the interface within the IP address range to join RIP running.
Without the wildcard parameter, RGOS make the interface IP address within the classful address
range join the RIP running.
Only when the IP address of an interface is in the network list defined by RIP, RIP route update
packets can be received and sent on the interface.

Configuration The following example defines two network numbers associated with RIP and allows the interface IP
Examples address between [Link]/24 and [Link]/24 to join RIP running.
Ruijie(config)# router rip
Ruijie(config-router)# network [Link]
Ruijie(config-router)# network [Link] [Link]

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

3.23 offset-list

Use this command to increase the metric value of received or sent RIP routes. Use the no form of this
command to restore the default setting.
offset-list { access-list-number | name } { in | out } offset [ interface-type interface-number ]
no offset-list { access-list-number | name } { in | out } offset [ interface-type interface-number ]

Parameter
Parameter Description
Description

3-46
Command Reference RIP Commands

access-list-number | name Specifies the ACL.


in Modifies the metric of the received routes using the ACL.
out Modifies the metric of the sent routes using the ACL.
offset Indicates the offset of changed metric values. The value is in the
range from 0 to16.
interface-type Applies the ACL to a specified interface.
interface-number Specifies the interface number.

Defaults No offset is specified by default.

Command
Routing process configuration mode
Mode

Usage Guide If a RIP route matches against both the offset-list of the specified interface and the global offset-list, it
will increase the metric value of the offset-list of the specified interface.

Configuration The following example increases the metric of the RIP routes by 7 in the range specified by ACL 7.
Examples Ruijie(config-router)# offset-list 7 out 7
The following example increases the metric of the RIP routes by 7 in the range specified by ACL 7
and learned by GigabitEthernet 0/1.
Ruijie(config-router)# offset-list 8 in 7 GigabitEthernet 0/1

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

3.24 output-delay

Use this command to modify the delay to send RIP update packets. Use the no form of this command
to restore the default setting.
output-delay delay
no output-delay

Parameter
Parameter Description
Description
delay Sets the delay to send RIP update packets, in the range from 8 to 50
in the unit of milliseconds.

Defaults No sending delay is configured by default.

3-47
Command Reference RIP Commands

Command
Routing process configuration mode
Mode

Usage Guide In normal cases, the size of a RIP update packet is 512 bytes including 25 routes. If the number of
updated routes is greater than 25, update packets will be sent through multiple routes. Note that the
update packets should be sent as fast as possible.
However, when a high-speed device sends a large number of packets to a low-speed device, the
low-speed device may not process all the packets timely, resulting in packet loss. In this case, you
can use this command to increase the delay to send packets on the high-speed device so that the
low-speed device can process all the update packets.

Configuration The following example sets the delay to send RIP update packets to 30 milliseconds.
Examples Ruijie(config)# router rip
Ruijie(config-router)# output-delay 30

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

3.25 passive-interface

Use this command to disable the function of sending update packets on an interface. Use the no form
of this command to restore the default setting.
passive-interface { default | interface-type interface-num }
no passive-interface { default | interface-type interface-num }

Parameter
Parameter Description
Description
default Sets all interfaces to the passive interfaces.
interface-type interface-num Indicates the interface type and number.

Defaults Interfaces are set to the non passive interfaces by default.

Command
Routing process configuration mode
Mode

Usage Guide The passive-interface default command sets all interfaces to the passive interfaces. You can use
no passive-interface interface-type interface-num command to set specified interfaces as
non-passive interfaces.
After you set an interface to the passive interface, RIP route update packets will no longer be sent but

3-48
Command Reference RIP Commands

can be received through the interface. In this case, route update packets can be sent to a specified
neighbor through the interfaces by using the neighbor command. You can use the ip rip send
enable and ip rip receive enable commands to control whether route update packets can be sent or
received through the interface.

Configuration The following example sets all interfaces to the passive interfaces and then sets ethernet0/1 to the
Examples non-passive interface.
Ruijie(config-router)# passive-interface default
Ruijie(config-router)# no passive-interface gigabitEthernet 0/1

Related
Command Description
Commands
ip rip receive enable Enables or disables receiving RIP packets on
the interface.
ip rip send enable Enables or disables sending RIP packets on
the interface.

Platform N/A
Description

3.26 redistribute

Use this command to redistribute external routes in route configuration mode. Use the no form of this
command to restore the default setting.
redistribute { connected | ospf process-id [ match { external [ 1 | 2 ] | internal | nssa-external [ 1 |
2 ] } * ] | static } [ metric metric-value ] [ route-map route-map-name ]
no redistribute { connected | ospf process-id [ match { external [ 1 | 2 ] | internal | nssa-external
[ 1 | 2 ] } * ] | static } [ metric metric-value ] [ route-map route-map-name ]

Parameter
Parameter Description
Description
connected Is redistributed from a connected route.
Is redistributed from OSPF and specifies an OSPF instance through
ospf process-id
process-id. The value is in the range from 1 to 65535.
static Is redistributed from static routes.
Is used when OSPF route redistribution is configured and filters a
match
route with a specific level for redistribution.
Sets the metric value of the redistributed route and specifies the
metric metric-value metric value by using the metric-value parameter. The value is in the
range from 1 to 16.
route-map route-map-name Sets the redistribution filtering rule.

Defaults By default:

3-49
Command Reference RIP Commands

All the routes of the sub types of the instance are redistributed when you configure redistributing
OSPF.
All the routes of the protocol are redistributed for other routing protocols.
The metric of the redistributed routes is 1 by default.
The route-map is not associated.

Command
Routing process configuration mode
Mode

Usage Guide This command is executed to redistribute external routes to RIP.


It is unnecessary to convert the metric of one routing protocol into that of another routing protocol for
route redistribution, since different routing protocols use different metric measurement methods. For
RIP, the metric value is calculated based on hop counts; for OSPF, the metric value is calculated
based on bandwidths. Therefore, their metrics are not comparable. However, a symbolic metric value
must be set for route redistribution. Otherwise, route redistribution will fail.
When you configure redistribution of OSPF routes without the match parameter, the OSPF routes of
all sub types are redistributed by default. Then the first configured match parameter is used as the
original one. Only the routes matching the specific type can be redistributed. The no form of this
command restores the setting to the default value.
The rule of configuring the no form of the redistribute command is as follows:
1. If the no form of this command specifies certain parameters, the parameters must be restored to
the default configuration.
2. If the no form of this command does not specify any parameter, the command must be deleted.
Assume that the following configurations are available.

The redistribute command cannot redistribute the default route of other protocol to the RIP
process. To this end, use the default-information originate command.

Configuration The following example redistributes static routes to RIP.


Examples Ruijie(config-router)# redistribute static

Related
Command Description
Commands
default-metric metric Sets the default metric of the route to be
redistributed.
default-information originate Generates the default route in the RIP process.

Platform N/A
Description

3.27 router rip

Use this command to create the RIP routing process and enter the routing process configuration
mode. Use the no form of this command to restore the default setting.

3-50
Command Reference RIP Commands

router rip
no router rip

Parameter
Parameter Description
Description
N/A N/A

Defaults No RIP process is running by default.

Command
Global configuration mode
Mode

Usage Guide One RIP routing process must be defined with one network number. If a dynamic routing protocol
runs on asynchronous lines, configure the async default routing command on the asynchronous
interface.

Configuration The following example creates the RIP routing process and enters the routing process configuration
Examples mode.
Ruijie(config)# router rip
Ruijie(config-router)#

Related
Command Description
Commands
Defines the network number of the RIP
network (RIP)
process.

Platform N/A
Description

3.28 show ip rip

Use this command to display the RIP process information.


show ip rip

Parameter
Parameter Description
Description
N/A N/A

Defaults N/A

Command
Privileged EXEC mode/ Global configuration mode/ Routing process configuration mode
Mode

Usage Guide It is used to display the three timers, routing distribution status, routing re-distribution status, interface

3-51
Command Reference RIP Commands

RIP version, RIP interface and network range, metric, and distance of the RIP process quickly.

Configuration The following example displays the basic information of the RIP process such as the update time and
Examples management distance.
Ruijie#show ip rip
Routing Protocol is "rip"
Sending updates every 10 seconds, next due in 4 seconds
Invalid after 20 seconds, flushed after 10 seconds
Outgoing update filter list for all interface is: not set
Incoming update filter list for all interface is: not set
Default redistribution metric is 2
Redistributing: connected
Default version control: send version 2, receive version 2
Interface Send Recv
GigabitEthernet 0/1 2 2
GigabitEthernet 0/2 2 2
Routing for Networks:
[Link] [Link]
[Link] [Link]
Distance: 120 (default is 120)
Graceful-restart enabled
Restart grace period 60 secs
Current Restart remaining time 16 secs

Field Description
Sending updates Indicates the packet update time.
Invalid Indicates the failure time.
flushed Indicates the refreshing time.
Outgoing update filter list for
Filters all the output routes.
all interface
Incoming update filter list for
Filters all the received routes.
all interface
Indicates the default redistribution metric
Default redistribution metric
configured.
Redistributing Indicates the redistributing protocol.
Indicates the default RIP protocol version
Default version control
running for the instance.
Indicates the routing network segment
Routing for Networks:
externally advertised by RIP.
Indicates the management distance of an
Distance
instance.
Graceful-restart Indicates whether the GR function is enabled.
Restart grace period Indicates the GR time.
Current Restart remaining Indicates the remaining GR time.

3-52
Command Reference RIP Commands

time

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

3.29 show ip rip database

Use this command to display the route summary information in the RIP routing database.

show ip rip database [ network-number network-mask ] [ count ]

Parameter
Parameter Description
Description
( Optional ) Indicates the ID of the subnet on which route information
network-number
is to be displayed.
Indicates the subnet mask. It must be specified if the network number
network-mask
is specified.
( Optional ) Displays the abstract of the route statistics in the RIP
count
database.

Defaults N/A

Command
Privileged EXEC mode/ Global configuration mode/ Routing process configuration mode
Mode

Usage Guide Only when the related sub-routes are converged, the converged address entries appear in the RIP
routing database. When the last sub-route information in the converged address entries becomes
invalid, the converged address information will be deleted from the database.

Configuration The following example displays all converged address entries in the RIP routing database.
Examples Ruijie# show ip rip database
[Link]/24 auto-summary
[Link]/30 directly connected, Loopback 3
[Link]/30 directly connected, GigabitEthernet 0/1
[Link]/24 auto-summary
[Link]/24 redistributed
[1] via [Link], GigabitEthernet 0/2
[Link]/24 auto-summary
[Link]/24
[1] via [Link], Serial 0/1 00:28 permanent

3-53
Command Reference RIP Commands

The following example displays the converged address entries related with [Link]/24 in the
RIP routing database.
Ruijie# show ip rip database [Link] [Link]
[Link]/24 redistributed
[1] via [Link], GigabitEthernet 0/1
The following example displays the statistical information summary of various routes in the RIP
routing database.
Ruijie# show ip rip database count
All Valid Invalid
database 5 5 0
auto-summary 5 5 0

connected 1 1 0
rip 4 4 0

Field Description
auto-summary Indicates the summarized route.
directly connected Indicates the direct route.
redistributed Indicates the redistributed route.
database Indicates the route database of RIP.
All Indicates the count of all routes.
Valid Indicates the count of valid routes.
Invalid Indicates the count of invalid routes.

Related
Command Description
Commands
Displays the information of the
show ip rip
currently-running routing protocol process.

Platform N/A
Description

3.30 show ip rip external

Use this command to display the information of the external routes redistributed by the RIP protocol.
show ip rip external [ connected | ospf process-id | static]

Parameter
Parameter Description
Description
connected Displays redistributed directly connected routes.
Displays redistributed OSPF routes. The process-id parameter
ospf process-id
indicates OSPF process ID. The range is from 1 to 65535.
static Displays redistributed static routes.

3-54
Command Reference RIP Commands

Defaults N/A

Command
Privileged EXEC mode/ Global configuration mode/ Routing process configuration mode
Mode

Usage Guide N/A

Configuration The following example displays direct routes redistributed by the RIP process.
Examples Ruijie# show ip rip external
Protocol connected route:
[connected] [Link]/24 metric=0
nhop=[Link], if=2
[connected] [Link]/24 metric=0
nhop=[Link], if=3
Protocol static route:
[static] [Link]/32 metric=0
nhop=[Link], if=4096
[static] [Link]/32 metric=0
nhop=[Link], if=4096
Protocol ospf 1 route:
[ospf] [Link]/32 metric=2
nhop=[Link], if=2
[ospf] [Link]/32 metric=2
nhop=[Link], if=2

Field Description
Protocol connected route Indicates the type of the redistributed route.
connected Indicates the redistributed route.
metric Indicates the metric of the redistributed route.
Indicates the next hop of the redistributed
nhop
route.
Indicates the outbound interface of the
if
redistributed route.

Related
Command Description
Commands
Displays the information of the currently
show ip rip
running routing protocol process.
ip vrf Creates a VRF.

Platform N/A
Description

3-55
Command Reference RIP Commands

3.31 show ip rip interface

Use this command to display the RIP interface information.


show ip rip interface [ interface-type interface-number ]

Parameter
Parameter Description
Description
[ interface-type ( Optional ) Displays the specified interface type and interface
interface-number ] number.

Defaults N/A

Command
Privileged EXEC mode/ Global configuration mode/ Routing process configuration mode
Mode

Usage Guide This command is used to display the information about RIP interfaces. If no RIP interface exists, no
information is displayed.

Configuration The following example displays the RIP interface information.


Examples Ruijie# show ip rip interface
GigabitEthernet 0/1 is up, line protocol is up
Routing Protocol: RIP
Receive RIPv2 packets only
Send RIPv2 packets only
Recv RIP packet total: 0
Send RIP packet total: 3
Passive interface: Disabled
Split Horizon with Poisoned Reverse: Enabled
Triggered RIP Enabled:
Retransmit-timer: 5, Retransmit-count: 36
V2 Broadcast: Disabled
Multicast registe: Registed
Interface Summary Rip:
Not Configured
Authentication mode: Text
Authentication key-chain: ripk1
Authentication text-password: ruijie
Default-information: only, metric 5
IP interface address:
[Link]/24, next update due in 14 seconds
[Link]/24, next update due in 24 seconds
neighbor [Link], next update due in 3 seconds
neighbor [Link], next update due in 13 seconds
[Link]/24, next update due in 16 seconds

3-56
Command Reference RIP Commands

Field Description
Receive RIPv1 and RIPv2 Indicates the type of packets that can be
packets received by an interface.
Indicates the type of packets that can be sent
Send RIPv1 packets only
by an interface.
Indicates whether an interface is allowed to
Receive RIP packet
receive packets.
Indicates whether an interface is allowed to
Send RIP packet
send packets.
Indicates whether a passive interface is
Passive interface
enabled.
Indicates whether an interface is allowed to
Send RIP supernet routes
send supernetting routes.
Indicates the total of packets received by an
Recv RIP packet total
interface.
Indicates the total of packets sent by an
Send RIP packet total
interface.
Split Horizon with Poisoned Indicates whether split horizon with poison
Reverse reverse is enabled.
Indicates whether the Triggered function is
Triggered RIP
enabled.
Retransmit-timer Indicates the time of retransmission.
Retransmit-count Indicates the retransmission count.
V2 Broadcast Indicates the V2 broadcast packet.
Multicast register Indicates whether multicast is registered.
Indicates whether summarization is enabled
Interface Summary Rip
on an interface.
Authentication mode Indicates the authorization mode.
Indicates the key-chain used for
Authentication key-chain
authentication.
Authentication text-password Indicates the authentication character string.
Indicates the default metric, default route,
Default-information
and other information.
IP interface address Indicates the IP address of an interface.

Related
Command Description
Commands
Displays the information of the currently
show ip rip
running routing protocol process.

Platform N/A
Description

3-57
Command Reference RIP Commands

3.32 show ip rip peer

Use this command to show the RIP peer information. RIP records a summary for the RIP routing
information source learnt ( source addresses of RIP route update packets ) for the convenience of
user monitoring. This routing information source is called RIP neighbor information.
show ip rip peer [ ip-address ]

Parameter
Parameter Description
Description
ip-address ( Optional ) Displays the IP address of a specified RIP neighbor.

Defaults N/A

Command
Privileged EXEC mode/ Global configuration mode/ Routing process configuration mode
Mode

Usage Guide This command is used to display the RIP neighbor information. If no RIP neighbor exists, no
information will be displayed.

Configuration The following example displays the RIP neighbor information.


Examples Ruijie# show ip rip peer
Peer [Link]:
Local address: [Link]
Input interface: GigabitEthernet 0/2
Peer version: RIPv1
Received bad packets: 3
Received bad routes: 0
BFD session state up

Field Description
Peer Indicates the IP address of a neighbor.
Local address Indicates the local address.
Input interface Indicates the connected interface.
Peer version Indicates the RIP version No. of a neighbor.
Indicates the packets with errors received
Received bad packets
from a neighbor.
Received bad routes Indicates the received routes with errors.
BFD session state Indicates the BFD session state.

Related
Command Description
Commands
Displays the information of the routing protocol
show ip rip
process that is running.

3-58
Command Reference RIP Commands

Platform N/A
Description

3.33 timers basic

Use this command to adjust the RIP clock. Use the no form of this command to restore the default
setting.
timers basic update invalid flush [ holddown holddown ]
no timers basic

Parameter
Parameter Description
Description
Indicates the route update time in seconds. The update keyword
defines the period at which the device sends route update packets.
update Each time an update packet is received, the "Invalid" and "Flush"
clocks are reset. By default, a route update packet is sent every 30
seconds.
Indicates the route invalid time in seconds, starting from the last valid
update packet. The "invalid" defines the period when the route in the
routing table becomes invalid due to no update. The invalid period of
route shall be at least three times the route update period. If no
invalid
update packet is received within the route invalid period, the related
route becomes invalid and enters into the "invalid" state. If an update
packet is received within the period, the clock resets. By default, the
Invalid time is 180 seconds.
Indicates the route flushing time in seconds, starting when a RIP
route enters into the invalid status. When the flush time is due, the
flush
routes in the invalid status will be cleared out of the routing table. The
default Flush time is 120 seconds.
Indicates the holddown time for the RIP route. It ranges from 0 to
2147483647 seconds. Once starting the invalid state, the RIP route,
holddown holddown
during the holddown time, is upgraded only by routes from one same
peer and with metrics lower than 16.

Defaults By default, the update time is 30 seconds, the invalid time is 180 seconds, and the flushing time is
120 seconds, and no holddown time.

Command
Routing process configuration mode
Mode

Usage Guide Adjusting the above clocks may speed up routing protocol convergence and fault recovery. Devices
connected to the same network must have consistent RIP clock values. Adjustment of RIP clocks is
not recommended unless otherwise specified.

3-59
Command Reference RIP Commands

To check the current RIP clock parameters, use the show ip rip command.

If you set the clock to a small value on low-speed links, some risks will be caused because
numerous update packets may use up the bandwidth. In general, the clocks can be configured
with smaller values on Ethernet or the lines of above 2 Mbit/s to reduce the convergence time of
routes.

Configuration The following example enables the RIP update packets that are sent every 10 seconds. If no update
Examples packet is received within 30 seconds, related routes become invalid and enter the invalid status.
When another 90s elapses, they will be cleared.
Ruijie(config)# router rip
Ruijie(config-router)# timers basic 10 30 90

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

3.34 validate-update-source

Use this command to validate the source address of the received RIP route update packet. Use the
no form of the command to disable this function.
validate-update-source
no validate-update-source

Parameter
Parameter Description
Description
N/A N/A

Defaults This function is enabled by default.

Command
Routing process configuration mode
Mode

Usage Guide You can validate the source address of the RIP route update packet. The validation aims to ensure
that the RIP routing process receives only the route update packets from the same IP subnet
neighbor.
Disabling split horizon on the interface causes the RIP routing process to enable update message
source address validation, no matter whether it has been configured with the
validate-update-source command in routing process configuration mode.
In addition, for the ip unnumbered interface, the RIP routing process does not implement update
message source address validation, no matter whether it has been configured with the command

3-60
Command Reference RIP Commands

validate-update-source.

Configuration The following example disables verification of the source IP address of the update packet.
Examples Ruijie(config)# router rip
Ruijie(config-router)# no validate-update-source

Related
Command Description
Commands
ip split-horizon Enables split horizon.
ip unnumbered Defines the IP unnumbered interface.
neighbor (RIP) Defines the IP address of a RIP neighbor.

Platform N/A
Description

3.35 version

Use this command to define the RIP version of a device. Use the no form of this command to restore
the default setting.
version { 1 | 2 }
no version

Parameter
Parameter Description
Description
1 Defines the RIP version 1.
2 Defines the RIP version 2.

Defaults The route update packets of RIPv1 and are received by default, but only the RIPv1 route update
packets are sent.

Command
Routing process configuration mode
Mode

Usage Guide This command defines the RIP version running on the device. It is possible to redefine the messages
of which RIP version are processed on every interface by using the ip rip receive version and ip rip
send version commands.

Configuration The following example configures the RIP version as version 2.


Examples Ruijie(config)# router rip
Ruijie(config-router)# version 2

Related
Command Description
Commands

3-61
Command Reference RIP Commands

ip rip receive Defines the version of RIP packets received on


version the interface.
Defines the version of RIP packets sent on the
ip rip send version
interface.
show ip rip Displays RIP information.

Platform N/A
Description

3-62
Command Reference RIPng

4 RIPng

4.1 clear ipv6 rip

Use this command to clear the RIPng routes.


clear ipv6 rip

Parameter
Parameter Description
Description
N/A N/A

Defaults None

Command Privileged EXEC mode


mode

Usage Guide Running this command removes all RIPng routes and this operation may have great impact on the
RIPng protocol. This command should be used with caution.

Configuration The following example clears the RIPng routes:


Examples Ruijie# clear ipv6 rip

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

4.2 default-metric

Use this command to configure the default metric for RIPng. Use the no form of this command to
restore the default value.
default-metric metric
no default-metric

Parameter
Parameter Description
Description
metric Sets the default metric value. The valid range is from 1 to 16. The
route is unreachable if the metric value is larger than or equal to 16.

4-1
Command Reference RIPng

Defaults The default value is 1.

Command Routing process configuration mode.


mode

Usage Guide This command shall be used with the redistribute command. When redistributing the route from one
route process to RIPng, due to the incompatibility of metric calculation mechanisms of different
routing protocols, it fails to translate the routing metric values. To this end, the RIPng metric value
shall be defined when translating the metric values. If there is no defined metric value, use the
default-metric command to define one; and the defined metric value will overwrite the value of the
default-metric command. By default, the default-metric value is 1.

Configuration The following example shows how to set the RIPng metric value as 3 when redistributing OSPF
Examples process 100:

Ruijie(config)# ipv6 router rip

Ruijie(config-router)# default-metric 3

Ruijie(config-router)# redistribute ospf 100

Related
Command Description
Commands
redistribute Redistributes the route from one route domain
to another route domain.

Platform N/A
Description

4.3 distance

Use this command to set the administrative distance of RIPng. Use the no form of this command to
restore the default value.
distance distance
no distance

Parameter
Parameter Description
Description
distance Sets the RIPng administrative distance. The range is from 1 to 254.

Defaults The default distance is 120

Command Routing process configuration mode.


mode

4-2
Command Reference RIPng

Usage Guide N/A

Configuration The following example shows how to set the RIPng administrative distance as 160:
Examples Ruijie(config)# ipv6 router rip

Ruijie(config-router)# distance 160

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

4.4 distribute-list

Use this command to filter the in/out route in the prefix list. Use the no form of this command to
remove route filtering.
distribute-list prefix-list prefix-list-name { in | out } [ interface-type interface-name ]
no distribute-list prefix-list prefix-list-name { in | out } [ interface-type interface-name ]

Parameter
Parameter Description
Description
prefix-list prefix-list-name Name of the prefix list which is used to filter the route.
in | out Filters the in or out route in the distribute list.
interface-type
(Optional) Applies the distribute list to the specified interface.
interface-name

Defaults By default, no distribute list is defined.

Command Routing process configuration mode.


mode

Usage Guide This command is used to configure the route distribution control list to filter all update routes for the
purpose of refusing to receive or send the specified routes. If the interface is not specified, the update
routes on all interfaces are filtered.

Configuration The following example shows how to filter the received update route on the interface eth0 (only those
Examples update routes within the prefix-list allowpre prefix list range can be received)

Ruijie(config)# ipv6 router rip

Ruijie(config-router)# distribute-list prefix-list allowpre in eth0

4-3
Command Reference RIPng

Related
Command Description
Commands
redistribute Sets route redistribution.

Platform N/A
Description

4.5 graceful-restart

Use this command to configure the graceful restart (GR) function for the RIPng process.
graceful-restart [ grace-period grace-period ]

Use the no form of this command restore the default configurations.


no graceful-restart [ grace-period ]

Parameter
Parameter Description
Description
graceful-restart Enables the GR function.
grace-period Displays the configured grace period.
Indicates the configured GR period, ranging from 1 to 1800 seconds.
grace-period
The default value is the smaller between twice of the update time and 60s.

Defaults The GR function is enabled by default.

Command
Routing process configuration mode
Mode

Default Level 14

Usage Guide The GR function is configured based on RIPng instances. Different parameters can be configured for
different RIPng instances as required.
The GR period indicates the maximum duration from RIPng restart to RIPng GR completion. In this time
period, the forwarding table before restart is used and the RIPng route is restored to the status before
restart. After the GR period expires, the RIPng process exits the GR status and the common RIPng
operation is performed.
The graceful-restart grace-period command allows a user to modify the GR period in explicit mode. Note
that GR is completed and the RIPng route is updated once before the RIPng route becomes invalid. If the
GR period is improperly set, continuous data forwarding in the GR process cannot be ensured. A typical
case is as follows:
If the GR period is greater than the invalid time of the neighbor route, GR is not completed before the route
becomes invalid and the route is not advertised to the neighbor again. The neighbor route stops forwarding
data after the route becomes invalid, resulting in data forwarding interruption. Therefore, unless otherwise
specified, it is not recommended to adjust the GR period. If the GR period needs to be configured, check
configuration of the timers command to ensure that the GR period value is greater than the route update

4-4
Command Reference RIPng

time and smaller than the route invalid time.


When GR is performed for the RIPng process, ensure that the network environment is stable.

Configuration The following example enables the GR function for the RIPng process and configures the GR period.
Examples Ruijie(config)# ipv6 router rip
Ruijie(config-router)# graceful-restart grace-period 90

Verification Run the show ipv6 rip command to check whether the GR function is configured and query the configured
grace period.

Prompts N/A

Common
N/A
Errors

Platform
N/A
Description

4.6 ipv6 rip default-information

Use this command to generate a default IPv6 route to the RIPng. Use the no form of this command to
remove the default route.
ipv6 rip default-information { only | originate} [ metric metric-value ]
no ipv6 rip default-information

Parameter
Parameter Description
Description
only Advertises the IPv6 default route only.
originate Advertises both of the IPv6 default route and other routes.
Sets the metric value for the default route. The valid range is from 1 to
metric metric-value
15. The default metric is 1.

Defaults By default, no default route is configured.

Command Interface configuration mode


mode

Usage Guide With this command configured on an interface, the interface advertises an IPv6 default route and the
route itself is not to join the device route forwarding table and the RIPng route database.
To avoid the route loop, once this command has been configured on the interface, RIPng refuses to
receive the default route update message advertised from the neighbor.

Configuration The following example shows how to create a default route to the RIPng routing process on the
Examples interface GigabitEthernet 0/1 and enable this interface to advertise the default route only:

4-5
Command Reference RIPng

Ruijie(config)# interface GigabitEthernet 0/1

Ruijie(config-if-GigabitEthernet 0/1)# ipv6 rip default-information only

Related
Command Description
Commands
show ipv6 rip Displays the RIPng process and statistics.
show ipv6 rip database Displays the RIPng route.

Platform N/A
Description

4.7 ipv6 rip enable

Use this command to enable the RIPng on the interface. Use the no form of this command to disable
RIPng on the interface.
ipv6 rip enable
no ipv6 rip enable

Parameter
Parameter Description
Description
N/A N/A

Defaults It is disabled by default.

Command Interface configuration mode.


mode

Usage Guide This command is used to add the RIPng interface. Before this command is configured, if the RIPng is
not enabled, use this command to enable the RIPng automatically.

Configuration The following example shows how to enable the RIPng on the interface GigabitEthernet 0/1:
Examples Ruijie(config)# interface GigabitEthernet 0/1

Ruijie(config-if-GigabitEthernet 0/1)# ipv6 rip enable

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

4-6
Command Reference RIPng

4.8 ipv6 rip metric-offset

Use this command to set the interface metric value. Use the no form of this command to remove the
metric configurations.
ipv6 rip metric-offset value
no ipv6 rip metric-offset

Parameter
Parameter Description
Description
value Sets the interface metric value on the interface. The valid range is
from 1 to 16.

Defaults The default value is 1.

Command Interface configuration mode.


mode

Usage Guide Before the route is added to the routing list, the interface metric value shall be upon the route metric.
To this end, the interface metric value influences the route usage.

Configuration The following example shows how to set the metric value of the interface GigabitEthernet 0/1 as 5:
Examples Ruijie(config)# interface GigabitEthernet 0/1

Ruijie(config-if-GigabitEthernet 0/1)# ipv6 rip metric-offset 5

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

4.9 ipv6 router rip

Use this command to create the RIPng process and enter routing process configuration mode. Use
the no form of this command to remove the RIPng process.
ipv6 router rip
no ipv6 router rip

Parameter
Parameter Description
Description
N/A N/A

4-7
Command Reference RIPng

Defaults No RIPng process is configured by default.

Command Global configuration mode.


mode

Usage Guide N/A.

Configuration The following example shows how to create the RIPng process and enter routing process
Examples configuration mode:

Ruijie(config)# ipv6 router rip

Related
Command Description
Commands
ipv6 rip enable Enables the RIPng on the specified interface.

Platform N/A
Description

4.10 passive-interface

Use this command to disable the interface to send update packets. Use the no form of this command
to enable the interface to send update packets.
passive-interface { default | interface-type interface-num }
no passive-interface { default | interface-type interface-num }

Parameter
Parameter Description
Description
default Enables the passive mode on all interfaces.
interface-type interface-num Interface type and interface number.

Defaults No passive interface is configured by default.

Command Routing process configuration mode.


mode

Usage Guide You can use the passive-interface default command to enable the passive mode on all interfaces.
Then use the no passive-interface interface-type interface-num command to remove the specified
interface from the passive mode.

Configuration The following example shows how to enable the passive mode on all interfaces and remove interface
Examples GigabitEthernet 0/1 from the passive mode:

Ruijie(config-router)# passive-interface default

4-8
Command Reference RIPng

Ruijie(config-router)# no passive-interface GigabitEthernet 0/1

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

4.11 redistribute

Use this command to redistribute the route of other routing protocols to RIPng. Use the no form of this
command to remove the redistribution configuration.
redistribute { bgp | connected | isis [ area-tag ] | ospf process-id | static} [ metric metric-value |
route-map route-map-name ]
no redistribute { bgp | connected | isis [area-tag ] | ospf process-id | static} [ metric metric-value |
route-map route-map-name ]

Parameter
Parameter Description
Description
bgp Redistributes the BGP routes to RIPng.
connected Redistributes the connected routes to RIPng.
Redistributes the ISIS routes to RIPng.
isis [ area-tag ]
area-tag indicates the ISIS process number.
Redistributes the OSPF routes to RIPng.
ospf process-id process-id indicates the OSPF process number, and the range is
from 1 to 65,535.
static Redistributes the static routes to RIPng.
metric metric-value (Optional) Sets the metric value for the route redistributed to RIPng.
route-map route-map-name (Optional) Sets the redistribution route filtering.

Defaults By default, the routes of other routing protocols are not redistributed.
If the default-metric command is not configured, the default metric value is 1;
By default, the route-map is not configured;
By default, all sub-type routes in the specified routing process are redistributed.

Command Routing process configuration mode.


mode

Usage Guide This command is used to redistribute the external routes to RIPng.
It is unnecessary to transform the metric of one routing protocol into another routing protocol in the
process of the route redistribution, for the metric calculation methods of the different routing protocols
are different. The RIP and OSPF metric calculations are incomparable for the reason that the RIP

4-9
Command Reference RIPng

metric calculation is hop-based while the OSPF one is bandwidth-based.


The instance, from where the routing information is redistributed to the RIPng, must be specified in
the process of configuring the multi-instance protocol redistribution.

Configuration The following example shows how to redistribute the static route, use the route map mymap to filter
Examples and set the metric value as 8:

Ruijie(config)# ipv6 router rip

Ruijie(config-router)# redistribute static route-map mymap metric 8

Related
Command Description
Commands
Defines the default RIPng metric value when
default-metric
redistributing other routing protocols.
distribute-list Filters the RIPng routing update packets.

Platform N/A
Description

4.12 show ipv6 rip

Use this command to show the parameters and each statistical information of the RIPng routing
protocol process.
show ipv6 rip

Parameter
Parameter Description
Description
N/A N/A

Defaults N/A

Command Privileged EXEC mode or user mode.


mode

Usage Guide N/A

Configuration Ruijie# show ipv6 rip


Examples
Routing Protocol is "RIPng"

Sending updates every 10 seconds with +/-50%, next due in 8 seconds

Timeout after 30 seconds, garbage collect after 60 seconds

Outgoing update filter list for all interface is:

distribute-list prefix aa out

4-10
Command Reference RIPng

Incoming update filter list for all interface is: not set

Default redistribution metric is 1

Default distance is 120

Redistribution:

Redistributing protocol connected route-map rm

Redistributing protocol static

Redistributing protocol ospf 1

Default version control: send version 1, receive version 1

Interface Send Recv

VLAN 1 1 1

Loopback 1 1 1

Routing Information Sources:

None

Field Description
Indicates the interval for sending update
Sending update
packets.
Sending update Indicates the failure time.
garbage Indicates the recovery time.
Indicates the configured filter table of sent
Outgoing update filter list
packets.
Indicates the configured filter table of
Incoming update filter
received packets.
Default redistribution metric Indicates the default redistribution metric.
distance Indicates the management distance.
Redistribution Indicates the redistribution routing protocol.
Indicates the default RIPng version No.
Default version control
received/sent.
Indicates the interface that joins the RIPng
Interface
process.
Routing Information Sources: Routing Info

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

4-11
Command Reference RIPng

4.13 show ipv6 rip database

Use this command to display the RIPng route entries.


show ipv6 rip database

Parameter
Parameter Description
Description
N/A N/A

Defaults N/A

Command Privileged EXEC mode or user mode.


mode

Usage Guide N/A

Configuration Ruijie# show ipv6 rip database


Examples
Codes: R - RIPng,C - Connected,S - Static,O - OSPF,B - BGP

sub-codes:n - normal,s - static,d - default,r - redistribute,

i - interface, a/s - aggregated/suppressed

S(r) 2001:db8:1::/64, metric 1, tag 0

Loopback 0/::

S(r) 2001:db8:2::/64, metric 1, tag 0

Loopback 0/::

C(r) 2001:db8:3::/64, metric 1, tag 0

VLAN 1/::

S(r) 2001:db8:4::/64, metric 1, tag 0

Null 0/::

C(i) 2001:db8:5::/64, metric 1, tag 0

Loopback 1/::

S(r) 2001:db8:6::/64, metric 1, tag 0

Null 0/::

Field Description
Indicates the route type and corresponding
codes
abbreviation description.
Indicates the corresponding prefix of the
2001:db8:1::
route.
metric 1 Indicates the corresponding metric of the

4-12
Command Reference RIPng

route.
Loopback 0/:: Indicates the route interface.

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

4.14 split-horizon

Use the split-horizon command to enable the RIPng split-horizon function in routing process
configuration mode. Use the no form of this command to disable this function. Use the split-horizon
poisoned-reverse command to enable the RIPng poisoned reverse horizontal split function in routing
process configuration mode. Use the no form of this command to disable this function.
split-horizon [ poisoned-reverse ]
no split-horizon [ poisoned-reverse ]

Parameter
Parameter Description
Description
poisoned-reverse (Optional) Enables the poisoned-reverse horizontal split.

Defaults RIPng split horizon is enabled by default.

Command Routing process configuration mode.


mode

Usage Guide In the process of packet updating, split-horizon function prevents some routing information from being
advertised through the interface learning those routing information. The poisoned reverse horizontal
split function advertises some routing information to the interface learning those routing information,
and the metric value is set as 16. The RIPng routing protocol belongs to the distance vector routing
protocol, so the horizontal split shall be noticed in the actual application. You can use the show ipv6
rip command to determine whether the RIPng split-horizon function is enabled or not.

Configuration The following example shows how to disable the RIPng horizontal split:
Examples Ruijie(config)# ipv6 router rip

Ruijie(config-router)# no split-horizon

Related
Command Description
Commands
N/A N/A

4-13
Command Reference RIPng

Platform N/A
Description

4.15 timers

Use this command to adjust the RIPng timer. Use the no form of this command to restore the default
settings.
timers update invalid flush
no timers

Parameter
Parameter Description
Description
update Sets the routing update time, in seconds. The update parameter
defines the period of sending the routing update packets by the
device. The invalid and flush parameter reset once the update
packets are received.
invalid Sets the routing invalid time, in seconds, starting from receiving the
last valid update packet. The invalid parameter defines the invalid
time for the un-updated routing in the routing list. The routing invalid
time shall be three times larger than the routing update time. The
routing will be invalid if no update packets are received within the
routing invalid time, and it will reset if the update packets are received
within the invalid time.
flush Sets the routing flush time, in seconds, starting from RIPng entering
to invalid state. The invalid routing will be removed from the routing
list if the flush time expires.

Defaults The default update time is 30 seconds; the default invalid time is 180 seconds; and the default flush
time is 120 seconds.

Command Routing process configuration mode.


mode

Usage Guide Adjusting the above time may speed up the RIPng convergence time and the troubleshooting time.
The RIPng time must be consistent for the devices connecting to the same network. You are not
recommended to adjust the RIP time, except for the specific requirement.
Use the show ipv6 rip command to view the current RIPng time parameter setting.
In the low-speed link, with the short time configured, large amount of the update packets consumes a
lot of bandwidth. Generally, the short time can be configured in the Ethernet or 2Mbps-higher line to
shorten the convergence time of the network routing.

Configuration The following example shows how to send the RIP update packets every 10 seconds. The routing will
Examples be invalid if no update packets are received within 30 seconds, and the routing will be removed after

4-14
Command Reference RIPng

being invalid for 90 seconds.

Ruijie(config)# ipv6 router rip

Ruijie(config-router)# timers 10 30 90

Related
Command Description
Commands
Displays the parameters and the statistical
show ipv6 rip
information of the RIPng process.
show ipv6 rip database Displays the RIPng routes.

Platform N/A
Description

4-15
Command Reference OSPFv2 Commands

5 OSPFv2 Commands

5.1 area

Use this command to configure the specified OSPF area. Use the no form of this command to restore
the default setting.
area area-id
no area area-id

Parameter
Parameter Description
Description
ID of the OSPF area. The value can be a decimal integer or an IP
area-id
address.

Defaults No OSPF area is configured by default.

Command
Routing process configuration mode
Mode

Usage Guide Use the no form of this command to remove the specified OSPF area and its configuration, including
the area-based area authentication, area default-cost, area filter-list, and area nssa commands.

 Do not remove the OSPF area configuration under the following conditions:

 Virtual links exist in the backbone area. The virtual links must be removed at first.

 The corresponding network area command exists in any area. All network segment commands
added to an area must be removed at first.

Configuration The following example removes the configuration of OSPF area 2.


Examples Ruijie(config)# router ospf 2
Ruijie(config-router)# no area 2

Related
Command Description
Commands
Defines the interface where OSPF runs and the
network area
belonging area of the interface.

Platform N/A
Description

5-16
Command Reference OSPFv2 Commands

5.2 area authentication

Use this command to enable OSPF area authentication. Use the no form of this command to restore
the default setting.
area area-id authentication [ message-digest ]
no area area-id authentication

Parameter
Parameter Description
Description
Specifies ID of the area enabled with OSPF. The value can be a
area-id
decimal integer or an IP address.
message-digest (Optional) Enables MD5 (message digest 5) authentication mode.

Defaults No authentication is enabled by default.

Command
Routing process configuration mode
Mode

Usage Guide The RGOS software supports three authentication types:


1) 0, no authentication. The authentication type in the OSPF packet is 0when this command is not
executed to enable OSPF authentication. 2) 1, plain text authentication mode. When this command is
configured, the message-digest option is not used.3) 2, MD5 authentication mode. When this
command is configured, the message-digest option is used.
All devices in the same OSPF area must use the same authentication type. If authentication is
enabled, the authentication password must be configured on an interface connecting neighbors. You
can use the ip ospf authentication-key command to configure the plain text authentication
password, and the ip ospf message-digest-key command to configure the MD5 authentication
password in interface configuration mode.

Configuration The following example uses MD5 authentication and the authentication password backbone in area 0
Examples (backbone area) of the OSPF routing process.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link] [Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf message-digest-key 1 md5
backbone
Ruijie(config)# router ospf 1
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# area 0 authentication message-digest

Related
Command Description
Commands
Defines the OSPF plain text authentication
ip ospf authentication-key
password.
ip ospf message-digest-key Defines the OSPF MD5 authentication

5-17
Command Reference OSPFv2 Commands

password.
area virtual-link Defines a virtual link.

Platform N/A
Description

5.3 area default-cost

Use this command to define the cost ( OSPF metric ) of the default aggregate route advertised to the
stub area or not-so-stubby area ( NSSA ) in routing process configuration mode. Use the no form of
this command to restore the default setting.
area area-id default-cost cost
no area area-id default-cost

Parameter
Parameter Description
Description
area-id ID of the stub area or NSSA
Cost of the default aggregate route advertised to the stub area or
cost NSSA.
The range is from 0 to 16777215.

Defaults The default is 1.

Command
Routing process configuration mode
Mode

Usage Guide This command takes effect only on the Area Border Router ( ABR ) of the stub area or the
ABR/Autonomous System Border Router ( ASBR ) of the NSSA.
The ABR can advertise a Link State Advertisement ( LSA ) indicating the default route in the stub
area. The ABR/ASBR can advertise an LSA indicating the default route in the NSSA. You can use the
area default-cost command to modify the LSA cost.

Configuration The following example sets the cost of the default aggregate route to 50.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# network [Link] [Link] area 1
Ruijie(config-router)# area 1 stub
Ruijie(config-router)# area 1 default-cost 50

Related
Command Description
Commands
area stub Sets an OSPF area as a stub area.
area nssa Sets an OSPF area as an NSSA.

5-18
Command Reference OSPFv2 Commands

Platform N/A
Description

5.4 area filter-list

Use this command to filter the inter-area routes on the ABR. Use the no form of this command to
restore the default setting.
area area-id filter-list { access acl-name| prefix prefix-name } { in | out }
no area area-id filter-list { access acl-name | prefix prefix-name } { in | out }

Parameter
Parameter Description
Description
area-id Area ID
acl-name Name of an Access Control List ( ACL )
prefix-name Prefix-list name
in | out Applies the ACL rule to the routes incoming/outgoing the area.

Defaults No filtering is configured by default.

Command
Routing process configuration mode
Mode

Usage Guide This command can be configured only on an ABR.


You can use this command when it is required to filter the inter-area routes on the ABR.

Configuration The following example sets area 1 to learn only the inter-area routes of [Link]/8.
Examples Ruijie# configure terminal
Ruijie(config)# access-list 1 permit [Link] [Link]
Ruijie(config)# router ospf 100
Ruijie(config-router)# area 1 filter-list access 1 in

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.5 area nssa

Use this command to set an OSPF area as an NSSA in routing process configuration mode. Use the
no form of this command to delete the NSSA or the NSSA configuration.
area area-id nssa [ no-redistribution ] [ default-information-originate [ metric value ]

5-19
Command Reference OSPFv2 Commands

[ metric-type type ] ] [ no-summary ] [ translator [ stability-interval seconds | always ] ]


no area area-id nssa [ no-redistribution ] [ default-information-originate [ metric value ]
[ metric-type type ] ] [ no-summary ] [ translator [ stability-interval | always ] ]

Parameter
Parameter Description
Description
area-id NSSAID
Imports the routing information to a common area other than the
no-redistribution
NSSA for the NSSA ABR.
default-information Generates and imports the default Type 7 LSA to the NSSA. This
originate option takes effect only on the NSSA ABR or ASBR.
Sets the metric of the generated default LSA. The range is from 0 to
metric value
16777214. The default value is 1.
Sets the type of the generated LSA to N-1 or N-2. The default value is
metric-type type
N-2.
Prevents the NSSA ABR from sending summary LSAs ( Type-3
no-summary
LSA ).
translator Configures the translator for the NSSA ABR.
Configures the stability interval in seconds for the NSSA ABR that
stability-interval seconds functions as a translator to change to a non-translator. The range is
from 0 to 2147483647. The default value is 40.
Configures that an NSSA ABR always functions as a translator. The
always
NSSA ABR is the backup translator by default.

Defaults No NSSA is defined by default.

Command
Routing process configuration mode
Mode

Usage Guide The default-information-originate parameter is used to generate the default Type-7 LSA. However, on
the NSSA ABR, the default Type-7 LSA will always be generated; On the ASBR (which is not an ABR
at the same time), the default Type-7 LSA is generated only when the default route exists in the
routing table.
The no-redistribution parameter prevents the OSPF from advertising the external routes imported
with the redistribute command to the NSSA on the ASBR. This option is generally used when the
NSSA device is both an ASBR and an ABR.
To reduce the number of LSAs sent to the NSSA, you can configure the no-summary parameter on
the ABR to prevent it from advertising summary LSAs (Type-3 LSAs) to the NSSA. In addition, you
can use the area default-cost command on the NSSA ABR to configure the cost of the default route
advertised to the NSSA. By default, this cost is 1.
If an NSSA has multiple ABRs, the ABR with the greatest ID is selected as the Type-7 or Type-5
translator. To configure that an NSSA ABR always functions as a translator, you can use the
translator always parameter. If the translator role of an ABR is taken away by another ABR, the ABR
still possesses the conversion capability within stability-interval. If the ABR fails to take back its

5-20
Command Reference OSPFv2 Commands

translator role when stability-interval expires, the LSA that changes from Type-7 to Type-5 will be
removed from the autonomous domain.
To avoid route loops, Type-5 LSAs generated from Type-7 convergence will be eliminated
immediately after the current device stopped serving as a translator, with no need to wait until the
stability-interval expires.
In a same NSSA, you are recommended to configure the translator always parameter on only one
ABR.
When the Type-7 LSAs are translated to Type-5, forwarding addresses (FA) of Type-7 LSAs are
included in the translated Type-5 LSAs.

Configuration The following example sets area 1 as an NSSA on all routers of the area.
Examples Ruijie(config)#router ospf 1
Ruijie(config-router)#network [Link] [Link] area 0
Ruijie(config-router)#network [Link] [Link] area 1
Ruijie(config-router)# area1nssa

Related
Command Description
Commands
Defines the cost (OSPF metric) of the default
area default-cost
aggregate route advertised to the NSSA.

Platform N/A
Description

5.6 area range

Use this command to configure inter-area route aggregation for OSPF. Use the no form of this
command to delete route aggregation. Use the no form with the cost parameter to restore the default
metric of the aggregate route, but not delete route aggregation.
area area-id range ip-address net-mask [ advertise | not-advertise ] [ cost cost ]
no area area-id range ip-address net-mask [ cost ]

Parameter
Parameter Description
Description
ID of the area where the aggregate route is injected into. The value
area-id
can be a decimal integer or an IP address.
ip address net-mask Network segment whose routes are to be aggregated
advertise | not-advertise Whether to advertise the aggregate route
cost cost Sets the priority of the interface. The range is from 0 to 16777215.

Defaults No inter-area route aggregation is configured by default.


The configured aggregation range is advertised by default.
The default metric of the aggregate route depends on whether the device is compatible with
RFC1583. If yes, the default metric is the smallest cost of the aggregate route. If no, the default metric

5-21
Command Reference OSPFv2 Commands

is the largest cost of the aggregate route.

Command
Mode Routing process configuration mode

Usage Guide This command takes effect only on the ABR to aggregate multiple routes of an area into a route and
advertise it to other areas. Route combination occurs only on the border of an area. The devices
inside an area see the specific routing information, but the devices outside the area see only one
aggregate route. The advertise and not-advertise options can set whether to advertise the aggregate
route for filtering and masking. The aggregate route is advertised by default.
You can use the cost option to set the metric of the aggregate route.
You can define route aggregate in multiple areas to simplify the routes in the whole OSPF routing
area. This improves the network forwarding performance, especially in large networks.
The area range of route aggregation is determined according to the longest match when multiple
aggregate routes with direct inclusion relationships are configured.

Configuration The following example aggregate the routes of area 1 into a route [Link]/20.
Examples Ruijie(config)#router ospf 1
Ruijie(config-router)#network [Link] [Link] area 0
Ruijie((config-router)#network [Link] [Link] area 1
Ruijie(config-router)#area 1 range [Link] [Link]

Related
Command Description
Commands
Enables a discarded route to be added to a
discard-route
routing table.
Configures the OSPF external route
summary-address
aggregation.

Platform N/A
Description

5.7 area stub

Use this command to set an OSPF area as a stub area or full stub area. Use the no form of this
command to restore the default setting.
area area-id stub [ no-summary ]
no area area-id stub [ no-summary ]

Parameter
Parameter Description
Description
area-id Stub area ID
(Optional) Prevents the ABR from advertising the network summary
no-summary
link to the stub area. Here the stub area is called the full stub area.

5-22
Command Reference OSPFv2 Commands

Only the ABR needs this parameter.

Defaults No stub area is defined by default.

Command
Mode Routing process configuration mode

Usage Guide All devices in the OSPF stub area must be configured with the area stub command. The ABR only
sends three types of link state advertisement (LSA) to the stub area: 1) type 1, device LSA; 2) type 2,
network LSA; 3) type 3, network summary LSA. For the routing table, the devices in the stub area can
learn only the routes inside the OSPF routing domain, including the internal default routes generated
by the ABR.
To configure a full stub area, use the area stub command with the no-summary keyword on the ABR.
The devices in the full stub area can learn only the routes in the local area and the internal default
routes generated by the ABR.
Two commands can configure an OSPF area as a stub area: the area stub and area default-cost
commands. All devices connected to the stub area must be configured with the area stub command,
but the area default-cost command can be executed only on the ABR. The area default-cost
command defines the initial cost (metric) of the internal default route.

Configuration The following example sets area 1 as the stub area on all devices in area 1.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# network172.16.0.0 [Link] area 0
Ruijie(config-router)# network [Link] [Link] area 1
Ruijie(config-router)# area 1 stub

Related
Command Description
Commands
Defines the cost (OSPF metric value) of the
area default-cost default aggregate route advertised to the stub
area.

Platform N/A
Description

5.8 area virtual-link

Use this command to define the OSPF virtual link in routing process configuration mode. Use the no
form of this command to restore the default setting.
area area-id virtual-link router-id [ authentication [ message-digest | null ] ] [ dead-interval
{ seconds | minimal hello-multiplier multiplier } ] [ hello-interval seconds ] [ retransmit-interval
seconds ] [ transmit-delay seconds ] [ [ authentication-key [ 0 | 7 ] key ] | [ message-digest-key
key-id md5 [ 0 | 7 ] key ] ]
no area area-id virtual-link router-id [ authentication ] [ dead-interval ] [ hello-interval ]

5-23
Command Reference OSPFv2 Commands

[ retransmit-interval ] [ transmit-delay ] [ [ authentication-key ] | [ message-digest-key key-id ] ]

Parameter
Parameter Description
Description
ID of the OSPF transition area. The value can be a decimal integer or
area-id
an IP address.
ID of the router neighboring to the virtual link. It can be viewed with
router-id
the show ip ospf command.
(Optional) Defines the time to declare neighbor loss in seconds. The
dead-interval seconds range is 0 to [Link] value must be consistent with that of
the neighbor.
minimal Enables the Fast Hello function and sets the death clock to 1 second.
hello-multiplier Multiplies dead-interval with hello-interval in the Fast-Hello function.
Specifies the number of Hello packets that are sent every second in
multiplier
the Fast Hello function. The range is from 3 to 20.
(Optional)Defines the interval at which the HELLO packet is sent by
hello-interval seconds the OSPF to the virtual link in seconds. The range is from1 to
[Link] value must be consistent with that of the neighbor.
(Optional) OSPF LSA retransmission interval in seconds. The range
retransmit-interval seconds is from 0 to 65535. The parameter setting must consider the
round-trip time of packets on the link.
(Optional) OSPF LSA transmission delay in seconds. The range is
from 0 to 65535. This value adds the LSA keep alive period. When
transmit-delay seconds
the LSA keep alive period reaches a threshold, the LSA will be
refreshed.
(Optional) Defines the OSPF plain text authentication key. The plain
text authentication key between neighbors must be the same. The
authentication-key [ 0 | service password-encryption command enables the key to be
7 ]key displayed in encrypted manner.
0 indicates that the key is displayed in plain text.
7 indicates that the key is displayed in cipher text.
(Optional) Defines the OSPF MD5 authentication key and key ID. The
MD5 authentication key ID and key between neighbors must be the
message-digest-key key-id same. The service password-encryption command enables the key to
md5 [ 0 | 7 ] key be displayed in encrypted manner.
0 indicates that the key is displayed in plain text.
7 indicates that the key is displayed in cipher text.
authentication Sets the authentication type to plain text.
message-digest Sets the authentication type to MD5.
null Sets the authentication type to no authentication.

Defaults The following are the default values:


dead-interval: 40seconds
hello-interval: 10seconds

5-24
Command Reference OSPFv2 Commands

retransmit-interval: 5seconds
transmit-delay: 1second
authentication: null
The Fast Hello function is disabled by default.
The other parameters do not have default values.

Command
Mode Routing process configuration mode

Usage Guide A virtual link can connect an area to the backbone area, or another non-backbone area. In the OSPF
routing domain, all areas must connect to the backbone area. If an area disconnects from the
backbone area, a virtual link to the backbone area is required. Otherwise, the network communication
will become abnormal. The virtual link is created between two ABRs. The area that belongs to both
ABRs is called the transition area, which can never be a stub area or NSSA.
The router-id parameter indicates the ID of OSPF neighbor router and can be displayed with the show
ip ospf neighbor command. You can configure the loopback address as the router ID.
The area virtual-link command defines only the authentication key for a virtual link. You can use the
area authentication command to enable the OSPF packet authentication in areas connected over the
virtual link in routing process configuration mode.
OSPF supports the Fast Hello function.
If the Fast Hello function is enabled, the OSPF can discover neighbors and detects invalid neighbors
quickly. You can enable the OSPF Fast Hello function by specifying the keywords minimal and
hello-multiplier, and the multiplier parameter. You can set the death clock to 1 second in minimal
and hello-multiplier to a value equal to or greater than 2. In this case, the Hello packet sending
interval is less than 1 second.
The hello-interval field of a Hello packet received by a virtual link is omitted if the Fast Hello function is
enabled on the virtual link and the hello-interval field is set to 0 for Hello packets advertised from the
virtual link.
No matter the Fast Hello function is enabled or not, the values of dead-interval must be consistent on
both ends of a virtual link. The values of hello-multiplier on both ends can be different if at least one
Hello packet can be received within dead-interval. You can use the show ip ospf virtual-links
command to monitor dead-interval and hello-interval configured for a virtual link.
For the Fast Hello function, you can only configure either the dead-interval minimal hello-multiplier
parameter or the hello-interval parameter.

Configuration The following example sets area 1 as the transition area to establish virtual link with neighbor [Link].
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# network [Link] [Link] area 1
Ruijie(config-router)#area 1 virtual-link [Link]
The following example sets area 1 as the transition area to establish a virtual link with neighbor
[Link]. This virtual link connects area 10 and the backbone area, and works with the OSPF packet
authentication inMD5 mode.

5-25
Command Reference OSPFv2 Commands

Ruijie(config)# router ospf 1


Ruijie(config-router)# network [Link] [Link] area 1
Ruijie(config-router)# network [Link] [Link] area 10
Ruijie(config-router)# area 0 authentication message-digest
Ruijie(config-router)# area 1 virtual-link [Link] message-digest-key 1 md5
hello
The following example sets area 1 as the transition area to establish a virtual link with neighbor
[Link], enables the Fast Hello function on this virtual link, and sets the multiplier to 3.
Ruijie(config)# router ospf 1
Ruijie(config-router)# network [Link] [Link] area 1
Ruijie(config-router)# network [Link] [Link] area 10
Ruijie(config-router)# area1 virtual-link [Link] dead-interval minimal
hello-multiplier 3

Related
Command Description
Commands
Enables the OSPF area packet authentication
area authentication
and define the authentication mode.
Displays the OSPF process information,
show ip ospf
including the router ID.
show ip ospf virtual-links Monitors information about a virtual link.

Platform N/A
Description

5.9 auto-cost

Use this command to enable the auto-cost function and set the reference bandwidth according to the
reference bandwidth. Use the no form of this command to restore the default setting.
auto-cost [ reference-bandwidth ref-bw]
no auto-cost [ reference-bandwidth ]

Parameter
Parameter Description
Description
ref-bw Reference bandwidth, in the range from1 to 4294967 Mbps.

Defaults The default is 100Mbps.

Command
Mode Routing process configuration mode

Usage Guide By default, the cost of an OSPF interface is equal to the reference value of the auto cost divided by
the interface bandwidth.
Run the auto-cost command to obtain the reference value of the auto cost. The default value is 100

5-26
Command Reference OSPFv2 Commands

Mbps.
Run the bandwidth command to set the interface bandwidth.
The costs of OSPF interfaces on several typical lines are as follows:
64Kbps serial line: The cost is 1562.
E1 line: The cost is 48.
10M Ethernet: The cost is 10.
100M Ethernet: The cost is 1.
If you run the ip ospf cost command to configure the cost of an interface, the configured cost will
automatically overwrite the cost that is computed based on the auto cost.

Configuration The following example configures the reference bandwidth as 10 Mbps.


Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# auto-cost reference-bandwidth 10

Related
Command Description
Commands
Displays the OSPF global configuration
show ip ospf
information
ip ospf cost Sets the cost value of the OSPF interface.
Sets the interface bandwidth. This setting does
bandwidth
not affect data transmission rate.

Platform N/A
Description

5.10 capability opaque

Use this command to enable Opaque LSA. Use the no form of this command to disable this function.
capability opaque
no capability opaque

Parameter
Parameter Description
Description
N/A N/A

Defaults Opaque LSA is enabled by default.

Command
Routing process configuration mode.
Mode

Usage Guide N/A

Configuration The following example disables Opaque LSA capability.

5-27
Command Reference OSPFv2 Commands

Examples Ruijie(config)# router ospf 1


Ruijie(config-router)# no capability opaque

Related
Command Description
Commands
show ip ospf Displays the global configuration of OSPF.

Platform N/A
Description

5.11 clear ip ospf process

Use this command to clear and restart the OSPF instance.


clear ip ospf [ process-id ] process

Parameter
Parameter Description
Description
OSPF instance ID.
When the ID is specified, the command clears data related to the
process-id specified instance and restarts the OSPF instance.
When no ID is specified, the command clears data related to all
running OSPF instances and restarts all the running OSPF instances.

Defaults The rule recommended in the RFC 1583 is used by default.

Command
Mode Privileged EXEC mode

Usage Guide Resetting the entire OSPF process causes that all neighbors are re-established and OSPF is greatly
affected. Therefore, you are prompted to confirm the execution for deliberation.

Configuration The following example clears data of OSPF instance 1 and restarts OSPF instance 1.
Examples Ruijie#clear ip ospf 1 process

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5-28
Command Reference OSPFv2 Commands

5.12 compatible rfc1583

Use this command to determine the RFC 1583 or RFC 2328 rule for selecting the optimal route
among route table several routes to the same destination out of the Autonomous System (AS).
compatible rfc1583
no compatible rfc1583

Parameter
Parameter Description
Description
N/A N/A

Defaults The RFC 1583 rule is used by default.

Command
Mode Routing process configuration mode

Usage Guide
N/A

Configuration The following example determines the best route with the RFC 2328 rule.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# no compatible rfc1583

Related
Command Description
Commands
Displays the OSPF global configuration
show ip ospf
information

Platform N/A
Description

5.13 default-information originate

Use this command to generate a default route to be injected into the OSPF routing domain in routing
process configuration mode. Use the no form of this command to restore the default setting.
default-information originate [ always ] [ metric metric ] [ metric-type type ] [ route-map
map-name ]
no default-information originate [ always ] [ metric ] [ metric-type ] [ route-map map-name ]

Parameter
Parameter Description
Description
(Optional) Generates the default route unconditionally, no matter
always
whether the default route exists locally or not.

5-29
Command Reference OSPFv2 Commands

(Optional) Initial metric of the default route in the range from0 to


metric metric
16777214
(Optional) Type of the default route. There are two type of OSPF
external routes: type 1, different metrics on different devices; type 2,
metric-type type
same metric on different devices. An external route of type 1 is more
trustworthy than that of type 2.
route-map map-name Associated route map name. No route map is associated by default.

Defaults No default route is generated by default.


The default value of metric is 1.
The default value of metric-type is 2.

Command
Mode Routing process configuration mode

Usage Guide When the redistribute or default-information command is executed, the OSPF-enabled device
automatically turns into the ASBR. The ASBR cannot generate the default route automatically or
advertise it to all the devices in the OSPF routing domain. The ASBR can generate the default route
with the default-information originate command in routing process configuration mode.
If the always parameter is used, the OSPF routing process advertises an external default route to
neighbors, no matter the default route exists or not. However, the local device does not display the
default route. To make sure whether the default route is generated, use the show ip ospf database
command to display the OSPF link state database. The external link identified with [Link] indicates
the default route. You can use the show ip route command on the OSPF neighbor to display the
default route.
The metric of the external default route can be defined only with the default-information originate
command.
There are two types of OSPF external routes: type 1 external routes have changeable routing
metrics, while type 2 external routes have constant routing metrics. For two parallel routes with the
same route metric to the same destination network, the type 1 route takes precedence over the type 2
route. As a result, the show ip route command displays only the type 1 route.
This command generates a default route of Type-5 LSA, which will not be flooded to the NSSA area.
To generate a default route in the NSSA area, use the area nssa default-information-originate
command.
The routers in the stub area cannot generate external default routes.

The range of set metric is 0 to 16777214 for the associated route map. If the value exceeds the
range, introducing a route fails.

Configuration The following example configures that OSPF generates an external default route and injects it to the
Examples OSPF routing domain. The default route is of type 1 and the metric 50.
Ruijie(config)# router ospf 1
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# default-information originate always metric 50

5-30
Command Reference OSPFv2 Commands

metric-type 1

Related
Command Description
Commands
show ip ospf database Displays OSPF link state database.
show ip route Displays the IP route table.
redistribute Redistributes routes of other routing processes.

Platform N/A
Description

5.14 default-metric

Use this command to set the default metric of OSPF redistribution route. Use the no form of this
command to restore the default setting.
default-metric metric
no default-metric

Parameter
Parameter Description
Description
Default metric of the OSPF redistribution route in the range from1 to
metric
16777214

Defaults The default metric is not configured by default.

Command
Mode Routing process configuration mode

Usage Guide The default-metric command must work with the redistribute command in routing process
configuration mode to modify the initial metric of all redistributed routes.
The configuration result of the default-metric command does not take effect for the external routes
injected into the OSPF routing domain with the default-information originate command.

Configuration The following example configures the default metric of the OSPF redistribution route as 50.
Examples Ruijie(config)# router rip
Ruijie(config-router)# network [Link]
Ruijie(config-router)# version 2
Ruijie(config-router)# exit
Ruijie(config)# router ospf 1
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# default-metric 50
Ruijie(config-router)# redistribute rip subnets

Related Command Description

5-31
Command Reference OSPFv2 Commands

Commands
Redistributes the routes of other routing
redistribute
processes.
Displays the OSPF global configuration
show ip ospf
information.

Platform N/A
Description

5.15 discard-route

Use this command to enable adding the discard-route into the core route table. Use the no form of
this command to disable this function.
discard-route { internal | external }
no discard-route { internal | external }

Parameter
Parameter Description
Description
Enables adding the discard-route generated with the area range
internal
command
Enables adding the discard-route generated with the
external
summary-address command.

Defaults Adding the discard-route is enabled by default.

Command
Mode Routing process configuration mode

Usage Guide After route aggregation, the range may exceed the actual network range of the route table, and
sending the data to the nonexistent network may cause loops or increase router loads. To prevent
this situation, the discard-route is added to the route table on the ABR or the ASBR. The
discard-route is generated automatically and will not be transmitted.

Configuration The following example disables adding the discard routes generated with the area range command.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# no discard-route internal

Related
Command Description
Commands
Configures the route aggregation between
area range
OSPF areas.
Configures the route aggregation out of the
summary-address
OSPF routing domain.

5-32
Command Reference OSPFv2 Commands

Platform N/A
Description

5.16 distance ospf

Use this command to set the Administration Distance (AD) of different types of OSPF routes. Use the
no form of this command to restore the default setting.
distance { distance | ospf { [ intra-area distance ] [ inter-area distance ] [ external distance ] } }
no distance [ ospf ]

Parameter
Parameter Description
Description
distance Sets the route AD in the range from1 to 255.
intra-area distance Sets the AD of the intra-area route in the range from1 to 255.
inter-area distance Sets the AD of the inter-area route in the range from1 to 255.
external distance Sets the AD of the external route in the range from1 to 255.

Defaults The default value is 110.


The default intra-area distance is 110.
The default inter-area distance is 110.
The default external distance is 110.

Command
Mode OSPF Routing process configuration mode

Usage Guide This command is used to specify different ADs for different types of OSPF routes.

Configuration The following example sets the OSPF external route AD to 160.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# distance ospf external 160

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.17 distribute-list in

Use this command to configure LSA filtering. Use the no form of this command to restore the default
setting.

5-33
Command Reference OSPFv2 Commands

distribute-list { [ access-list-number | name ] | prefix prefix-list-name [ gateway prefix-list-name ] |


route-map route-map-name | gateway prefix-list-name } in [ interface-type interface-number ]
no distribute-list { [ access-list-number | name ] | prefix prefix-list-name [ gateway prefix-list-name ]
| route-map route-map-name | gateway prefix-list-name } in [ interface-type interface-number ]

Parameter
Parameter Description
Description
access-list-number | name Uses the ACL filtering rule.
gateway prefix-list-name Uses the gateway filtering rule.
prefix prefix-list-name Uses the prefix-list filtering rule.
route-map route-map-name Uses the route-map filtering rule.
interface-type
Configures the LSA route filtering on the interface.
interface-number

Defaults No filtering is configured by default.

Command
Mode Routing process configuration mode

Usage Guide This configuration filters the received LSAs, and only those matching the filtering conditions are
involved in the Shortest Path First (SPF) calculation to generate the corresponding routes. It does not
affect the link status database or the route table of the neighbors. It only affects the routing entries
calculated by local OSPF. This function is used to control routes that enter the ABR or ASBR.
The following route-map rules will be supported if the route-map parameter is configured:
match interface
match ip address
match ip address prefix-list
match ip next-hop
match ip next-hop prefix-list
match metric
match route-type
match tag
Filtering routes by using the distribute-list in command affects forwarding of local routes, but does
not affect route computation based on LSAs. Therefore, if route filtering is configured on the ABR,
Type 3 LSAs will still be generated and advertised to other areas because routes can still be
computed based on LSAs. As a result, black-hole routes are generated. In this case, you can run the
area filter-list or area range (containing the not-advertise parameter) command on the ABR to
prevent generation of black-hole routes.

Configuration The following example configures LSA filtering.


Examples Ruijie(config)# access-list3permit172.[Link].127.255
Ruijie(config)# router ospf 25
Ruijie(config-router)# distribute-list 3 in ethernet 0/1

5-34
Command Reference OSPFv2 Commands

Related
Command Description
Commands
distribute-list out Filters redistribution routes.

Platform N/A
Description

5.18 distribute-list out

Use this command to configure filtering redistribution routes. The function is similar to that of the
redistribute command. Use the no form of this command to restore the default setting.
distribute-list { [ access-list-number | name ] | prefix prefix-list-name } out [ connected | ospf
process-id | rip | static ]
no distribute-list { [ access-list-number | name ] | prefix prefix-list-name } out [ connected | ospf
process-id | rip | static ]

Parameter
Parameter Description
Description
access-list-number | name Uses the ACL filtering rule.
prefix prefix-list-name Uses the prefix-list filtering rule.
connected | ospf process-id
Source of the routes to be filtered
| rip | static

Defaults No filtering is configured by default.

Command
Mode Routing process configuration mode

Usage Guide Similar to the redistribute route-map command, the distribute-list out command filters the routes that
other protocols redistribute to the OSPF. However, the distribute-list out command does not
redistribute routes by itself. It works with the redistribute command in most cases. The ACL filtering
rule and the prefix-list filtering rule cannot coexist in the configuration, that is, the two rules cannot be
configured at the same time for routes from the same source.

Configuration The following example filters the redistributed static routes.


Examples Ruijie(config)# router ospf 1
Ruijie(config)# redistribute static subnets
Ruijie(config-router)# distribute-list 22 outstatic
Ruijie(config-router)# distribute-list prefix jjj out static
% Access-list filter exists, please de-config first

Related
Command Description
Commands
distribute-list in Configures LSA filtering.

5-35
Command Reference OSPFv2 Commands

redistribute Redistributes routes of other routing processes.

Platform N/A
Description

5.19 enable mib-binding

Use this command to bind the Management Information Base (MIB) with the specified OSPFv2
process. Use the no form of this command to restore the default setting.
enable mib-binding
no enable mib-binding

Parameter
Parameter Description
Description
N/A N/A

Defaults The MIB is bound with the OSPFv2 process with the smallest ID by default.

Command
Mode Routing process configuration mode

Usage Guide OSPFv2 MIB has no OSPFv2 process information, so the user operates a sole OSPFv2 process by
SNMP. By default, OSPFv2 MIB is bound with the OSPFv2 process with the smallest ID. User
operations take effect for this process.
To operate the specified OSPF process over Simple Network Management Protocol(SNMP), use this
command to bind the MIB to SNMP.

Configuration The following example operates OSPFv2 process 100 over SNMP:
Examples Ruijie(config)# router ospf 100
Ruijie(config-router)# enable mib-binding

Related
Command Description
Commands
Displays the OSPF global configuration
show ip ospf
information.
enable traps Configures the OSPF TRAP function.

Platform N/A
Description

5.20 enable traps

The OSPFv2 process supports 16 kinds of TRAP packets, which are classified into four categories.

5-36
Command Reference OSPFv2 Commands

Use this command to enable sending the specified TRAP messages. Use the no form of this
command to restore the default setting.
enable traps [ error [ IfAuthFailure | IfConfigError | IfRxBadPacket | VirtIfAuthFailure |
VirtIfConfigError | VirtIfRxBadPacket ] | lsa [ LsdbApproachOverflow | LsdbOverflow |
MaxAgeLsa | OriginateLsa ] | retransmit [ IfTxRetransmit | VirtIfTxRetransmit ] | state-change
[ IfStateChange | NbrRestartHelperStatusChange | NbrStateChange |
NssaTranslatorStatusChange | RestartStatusChange | VirtIfStateChange |
VirtNbrRestartHelperStatusChange | VirtNbrStateChange ] ]
no enable traps [ error [ IfAuthFailure | IfConfigError | IfRxBadPacket | VirtIfAuthFailure |
VirtIfConfigError | VirtIfRxBadPacket ] | lsa [ LsdbApproachOverflow | LsdbOverflow |
MaxAgeLsa | OriginateLsa ] | retransmit [ IfTxRetransmit | VirtIfTxRetransmit ] | state-change
[ IfStateChange | NbrRestartHelperStatusChange | NbrStateChange |
NssaTranslatorStatusChange | RestartStatusChange | VirtIfStateChange |
VirtNbrRestartHelperStatusChange | VirtNbrStateChange ] ]

Parameter
Parameter Description
Description
Configures all traps switches related to errors. Use this parameter to
set the following specified error traps switches.
Ifauthfailure Interface authentication error
Ifconfigerror Interface parameter configuration error
Ifrxbadpacket Error packets received on the interface
error
Virtifauthfailure Authentication error on the virtual interface
Virtifconfigerror Parameter configuration error on the virtual
interface
Virtifrxbadpacket Error packets received on the virtual
interface
Configures all traps switches related to the LSA. Use this parameter
to set the following specified LSA traps switches.
Lsdbapproachoverflow External LSA count has reached the
90% of the upper limit.
isa
Lsdboverflow External LSA count has reached the
upper limit.
Maxagelsa LSA reaching the aging time
Originatelsa Generates new LSA
Configures all traps switches related to the retransmission. Use this
parameter to set the following specified retransmit traps switches.
retransmit
Iftxretransmit Packet retransmission on the interface
Virtiftxretransmit Packet retransmission on the virtual interface
Configures all traps switches related to the state change. Use this
parameter to set the following specified state-change switches.
state-change Ifstatechange Interface state change
NbrRestartHelper State change during the
StatusChange neighbor GR process

5-37
Command Reference OSPFv2 Commands

Nbrstatechange Neighbor state change


NssaTranslatorStatusChange State change of the NSSA
translator
RestartStatusChange State change of the GR
Restarter on the device
Virtifstatechange State change on the virtual
interface
VirtNbrRestartHelper Status change of the virtual
StatusChange neighbor GR process
Virtnbrstatechange State change on the virtual
neighbor

Defaults All TRAP switches are disabled by default.

Command
Mode Routing process configuration mode

Usage Guide The snmp-server enable traps ospf command must be configured before you configure this
command, for it is limited by the snmp-server command.
This command is not limited by the binding of process and MIB, allowing to enable the TRAP switch
for different processes simultaneously.

Configuration The following example enables all TRAP switches of OSPFv2 process 100.
Examples Ruijie(config)# router ospf 100
Ruijie(config-router)# enable traps

Related
Command Description
Commands
Displays the OSPF global configuration
show ip ospf
information.
enable mib-binding Binds the OSPFv2 process with MIB.
snmp-server enable traps ospf Enables the OSPF TRAP notification function.

Platform N/A
Description

5.21 graceful-restart

Use this command to enable the graceful restart (GR) of OSPF on the device. Use the
graceful-restart grace-period command to configure the grace period parameter and enable the
OSPF GR function. Use the no form of this command to disable this function.
graceful-restart [ grace-period grace-period | inconsistent-lsa-checking ]
no graceful-restart [ grace-period | inconsistent-lsa-checking ]

5-38
Command Reference OSPFv2 Commands

Parameter
Parameter Description
Description
Indicates the grace period, which is the maximum time from
occurrence of an OSPF failure to completion of the OSPF GR. The
grace-period grace-period
value of the graceperiod varies from 1s to 1800s. The default value is
120s.
Enables topological change detection. If any topological change is
inconsistent-lsa-checking detected, OSPF exits the GR process to complete [Link]
GR is enabled, topological change detection is enabled by default.

Defaults This function is enabled by default.

Command
Mode Routing process configuration mode

Usage Guide GR is configured based on the OSPF instance. Different instances could be configured with different
parameters according to the actual situation.
The graceful restart interval is the longest time between the OSPF restart and the graceful restart. In
this period, you can perform link status reconstruction to restore the OSPF status to the original. With
the interval times out, the OSPF will exit GR and perform common OSPF operations.
The GR interval is 120 seconds set with the graceful-restart command, and the graceful-restart
grace-period command allows you to change the interval explicitly.
GR is unavailable when the Fast Hello function is enabled.

Configuration The following example enables GR for the OSPF instance 1 and sets the restart interval for GR.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# graceful-restart
Ruijie(config-router)# graceful-restart grace-period 60

Related
Command Description
Commands
graceful-restart helper Enables the OSPF graceful-restart helper.

Platform N/A
Description

5.22 graceful-restart helper

Use this command to disable the graceful restart helper function. Use the no form of this command to
restore the default setting.
graceful-restart helper disable
no graceful-restart helper disable
graceful-restart helper { strict-lsa-checking | internal-lsa-checking}

5-39
Command Reference OSPFv2 Commands

no graceful-restart helper {strict-lsa-checking | internal-lsa-checking}

Parameter
Parameter Description
Description
disable Prohibits a device from acting as a GR helper for another device.
Indicates that changes in Type 1 to Type 5 and Type 7 LSAs will be
checked during the period that the device acts as a GR helper to
strict-lsa-checking
determine whether the network changes. If the network changes, the
device will stop acting as the GR helper.
Indicates that changes in Type 1 to Type 3 LSAs will be checked
during the period that the device acts as a GR helper to determine
internal-lsa-checking
whether the network changes. If the network changes, the device will
stop acting as the GR helper.

Defaults The GR helper is enabled by default.


The router enabled with the GR helper does not check the LSA change by default.

Command
Mode Routing process configuration mode

Usage Guide This command is used to configure the GR helper capability of a router. When a neighbor router
implements GR, it sends a Grace-LSA to notify all neighbor routers. If the GR helper function is
enabled on the local router, the local router becomes the GR helper on receiving the Grace-LSA, and
helps the neighbor to complete GR. The disable option indicates that GR helper is not provided for
any device that implements GR.
After a device becomes the GR helper, the network changes are not detected by default. If any
change takes place on the network, the network topology converges after GR is completed. If you
wish that network changes can be quickly detected during the GR process, you can configure
strict-lsa-checking to check Type 1 to 5 and Type 7 LSAs that indicate the network information or
internal-lsa-checking to check Type 1 to 3 LSAs that indicate internal routes of the AS domain.
When the network scale is large, it is recommended that you disable the LSA checking options
(strict-lsa-checking and internal-lsa-checking) because regional network changes may trigger
termination of GR and consequently reduce the convergence of the entire network.

Configuration The following example disables the GF helper and modifies the policy of checking network changes.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# graceful-restart helper disable
Ruijie(config-router)# graceful-restart helper strict-lsa-checking

Related
Command Description
Commands
graceful-restart Enables GR on the device.

Platform N/A

5-40
Command Reference OSPFv2 Commands

Description

5.23 ip ospf authentication

Use this command to configure the authentication type. Use the no form of this command to restore
the default setting.
ip ospf authentication [ message-digest | null ]
no ip ospf authentication

Parameter
Parameter Description
Description
message-digest Enables MD5 authentication on the interface.
null Enables no authentication.

Defaults No authentication mode is configured and that of the local area is used on the interface by default.

Command
Mode Interface configuration mode

Usage Guide Plaintext authentication is applicable when no option is used with the command. Note that the no
form of this command restores the default value. Whether authentication is used actually depends on
authentication mode configured for the local area of the interface. If authentication mode is configured
as null, no authentication is enabled. When both the interface and its area are configured with
authentication, the one for the interface takes precedence.

Configuration The following example configures MD5 authentication for OSPF on GigabitEthernet 0/1.
Examples Ruijie(config)#interface GigabitEthernet0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link]
[Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf authentication message-digest

Related
Command Description
Commands
Enables authentication and defines
area authentication
authentication mode in the OSPF area.
ip ospf authentication-key Configures the plain text authentication key.
ip ospf message-digest-key Configures the MD5 authentication key.

Platform N/A
Description

5-41
Command Reference OSPFv2 Commands

5.24 ip ospf authentication-key

Use this command to configure the OSPF plain text authentication key in interface configuration
mode. Use the no form of this command to restore the default setting.
ip ospf authentication-key [ 0 | 7 ] key
no ip ospf authentication-key

Parameter
Parameter Description
Description
0 Displays the key in plain text.
7 Displays the key in cipher text.
key Key containing at most eight characters.

Defaults It is disabled by default.

Command
Mode Interface configuration mode

Usage Guide The ip ospf authentication-key command configures the key that will be inserted in all OSPF packet
headers. As a result, if the keys are inconsistent, the OSPF neighbor relationship cannot be
established between two devices directly connected, and thus route information exchange is
impossible.
The keys may vary by interface, but the devices that are connected to the same physical network
segment must use the same key.
To enable the OSPF area authentication, execute the area authentication command in routing
process configuration mode.
The authentication can be enabled separately on an interface by executing the ip ospf authentication
command in interface configuration mode. When both the interface and the area are configured with
authentication, the one for the interface takes precedence.

Configuration The following example configures the OSPF authentication key ospfauth for fast Ethernet 0/1.
Examples Ruijie(config)#interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link]
[Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf authentication-key ospfauth

Related
Command Description
Commands
Enables OSPF area authentication and defines
area authentication
authentication mode
Enables authentication on the interface and
ip ospf authentication
defines authentication mode

Platform N/A

5-42
Command Reference OSPFv2 Commands

Description

5.25 ip ospf cost

Use this command to configure the cost (OSPF metric) of the OSPF interface for sending a packet in
interface configuration mode. Use the no form of this command to restore the default setting.
ip ospf cost cost
no ip ospf cost

Parameter
Parameter Description
Description
cost OSPF interface cost in the range from 0 to 65535

Defaults The default interface cost is calculated as follows:


Reference bandwidth/Bandwidth
The reference bandwidth is 100 Mbps by default.

Command
Mode Interface configuration mode

Usage Guide By default, the OSPF interface cost is 100Mbps/Bandwidth, where Bandwidth is the interface
bandwidth configured with the bandwidth command in interface configuration mode.
The default costs of different types of lines are as follows:

 64K serial line: 1562

 E1 line: 48

 10M Ethernet: 10

 100M Ethernet: 1

The OSPF cost configured with the ip ospf cost command will overwrite the default configuration.

Configuration The following example configures the OSPF cost of GigabitEthernet 0/1 to100.
Examples Ruijie(config)# interface GigabitEthernet0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf cost 100

Related
Command Description
Commands
Specifies the interface bandwidth. This setting
bandwidth
does not affect the data transmission rate.
Displays the OSPF global configuration
show ip ospf
information

Platform N/A
Description

5-43
Command Reference OSPFv2 Commands

5.26 ip ospf database-filter all out

Use this command to stop advertising LSAs of an interface, that is, the LSA update packets are not
sent on the interface. Use the no form of the command to restore the default setting.
ip ospf database-filter all out
no ip ospf database-filter

Parameter
Parameter Description
Description
N/A N/A

Defaults This function is disabled and all LSA update packets can be sent on the interface by default.

Command
Mode Interface configuration mode

Usage Guide To stop sending LSA update packets on the interface, enable this function on the interface.
Then, the device maintains the neighboring connections and accepts LSAs from neighbors, but stops
sending LSAs to neighbors.

Configuration The following example stops sending LSA update packets of GigabitEthernet 0/1.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link] [Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf database-filter all out

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.27 ip ospf dead-interval

Use this command to configure the interval for determining the death of an interface neighbor in
interface configuration mode. Use the no form of this command to restore the default setting.
ip ospf dead-interval { seconds | minimal hello-multiplier multiplier }
no ip ospf dead-interval

Parameter
Parameter Description
Description
Defines the interval for determining the neighbor death in seconds.
seconds
The range is from 0 to 2,147,483,647.

5-44
Command Reference OSPFv2 Commands

Indicates that the Fast Hello function is enabled to set the dead
minimal
interval to 1s.
Indicates the number of Hello packets sent per second in the Fast
hello-multiplier multiplier
Hello function. The value ranges from 3 to 20.

Defaults The value of dead-interval is 4 times the interval configured with the ip ospf hello-interval command
by default.

Command
Mode Interface configuration mode

Usage Guide The OSPF dead interval is contained in the Hello packet. If OSPF does not receive a Hello packet
from a neighbor within the dead interval, it declares that the neighbor is invalid and deletes this
neighbor record form the neighbor list. By default, the dead interval is four times the Hello interval. If
the Hello interval is modified, the dead interval is modified automatically.
When using this command to manually modify the dead interval, pay attention to the following issues:
1. The dead interval cannot be shorter than the Hello interval.
2. The dead interval must be the same on all routers in the same network segment.

OSPF supports the Fast Hello function.

After the OSPF Fast Hello function is enabled, OSPF finds neighbors and detects neighbor failures
faster. You can enable the OSPF Fast Hello function by specifying the minimal and hello-multiplier
keywords and the multiplier parameter. The minimal keyword indicates that the death interval is set
to 1s, and hello-multiplier indicates the number of Hello packets sent per second. In this way, the
interval at which the Hello packet is sent decreases to less than 1s.

If the Fast Hello function is configured for a virtual link, the Hello interval field of the Hello packet
advertised on the virtual link is set to 0, and the Hello interval field of the Hello packet received on this
virtual link is ignored.

No matter whether the Fast Hello function is enabled, the death interval must be consistent and the
hello-multiplier values can be inconsistent on routers at both ends of the virtual link. Ensure that at
least one Hello packet can be received within the death interval.

Run the show ip ospf virtual-links command to monitor the death interval and Fast Hello interval
configured for the virtual link.

The dead-interval minimal hello-multiplier and hello-interval parameters introduced for the Fast
Hello function cannot be configured simultaneously.

Configuration The following example configures the interval for determining the death of the OSPF neighbor on
Examples GigabitEthernet 0/1 to30seconds.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link] [Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf dead-interval 30

The following example configures the value of hello-multiplier to3.

5-45
Command Reference OSPFv2 Commands

Ruijie(config)# interface GigabitEthernet 0/1


Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link] [Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf dead-interval minimal hello-multiplier 3

Related
Command Description
Commands
Specifies the interval at which the OSPF sends
ip ospf hello-interval
Hello packets
show ip ospf interface Displays OSPF interface information.

Platform N/A
Description

5.28 ip ospf disable all

Use this command to prevent the specified interface from generating OSPF packets. Use the no form
of this command to restore the default setting.
ip ospf disable all
no ip ospf disable all

Parameter
Parameter Description
Description
N/A N/A

Defaults OSPF packets are generated on the specified interface by default.

Command
Mode Interface configuration mode

Usage Guide The interface configured with this command will ignore whether the network areas are matched. After
this command is configured, an interface will not generate OSPF packets even if the interface
belongs to the network; therefore, the interface does not receive or send any OSPF packets or
participate in OSPF calculation.

Configuration The following example prevents the specified interface from generating OSPF packets.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link] [Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf disable all

Related
Command Description
Commands
N/A N/A

Platform N/A

5-46
Command Reference OSPFv2 Commands

Description

5.29 ip ospf hello-interval

Use this command to set the interval for sending Hello packets in interface configuration mode. Use
the no form of this command to restore the default setting.
ip ospf hello-interval seconds
no ip ospf hello-interval

Parameter
Parameter Description
Description
Interval for sending Hello packets in seconds. The range is from1 to
seconds
65535.

Defaults The defaults are as follows:


10 seconds for Ethernet
10 seconds for PPP or HDLC encapsulated interfaces
10 seconds for frame relay PTP interfaces
30 seconds for non-frame relay PTP sub-interface and X.25 interfaces

Command
Mode Interface configuration mode

Usage Guide The interval of sending the Hello packets is included in the Hello packet. A shorter interval means that
OSPF detects the topological change faster, which will increase network traffic. The Hello packet
sending intervals for all the devices in the same network segment must be the same. To manually
modify the interval to determine neighbor death, ensure that the Hello packet sending interval cannot
be greater than dead-interval of the neighbor.

Configuration The following example configures the interval of sending the Hello packets on GigabitEthernet 0/1
Examples to15.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link] [Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf hello-interval 15

Related
Command Description
Commands
Sets the interval for determining the death of
ip ospf dead-interval
the OSPF neighbor.

Platform N/A
Description

5-47
Command Reference OSPFv2 Commands

5.30 ip ospf message-digest-key

Use this command to configure the MD5 authentication key in interface configuration mode. Use the
no form of this command to restore the default setting.
ip ospf message-digest-key key-id md5 [ 0 | 7 ] key
no ip ospf message-digest-key key-id

Parameter
Parameter Description
Description
key Key of up to 16 characters
0 Displays the key in plain text.
7 Displays the key in cipher text.
key-id Key identifier in the range from1 to 255

Defaults No MD5 key is configured by default.

Command
Mode Interface configuration mode

Usage Guide The ip ospf message-digest-key command configures the key that will be inserted in all OSPF
packet headers. As a result, if the keys are inconsistent, the OSPF neighboring relationship cannot be
established between two devices directly connected, and thus route information exchange is
impossible.
The keys can be different for different interfaces, but the devices that are connected to the same
physical network segment must be configured with the same key. For neighbors, the same key
identifier must correspond to the same key.
To enable OSPF area authentication, execute the area authentication command in routing process
configuration mode. The authentication can be enabled separately on an interface by executing the ip
ospf authentication command in interface configuration mode. When both the interface and the area
are configured with authentication, the one for the interface takes precedence.
The RGOS software supports smooth modification of MD5 authentication keys, which shall be added
before deleted. When an MD5 authentication key of the device is added, the device will regard other
devices have not had new keys and thus send multiple OSPF packets by using different keys, till it
confirms that the neighbors have been configured with new keys. When all devices have been
configured with new keys, it is possible to delete the old key.

Configuration The following example adds a new OSPF authentication key "hello5" with key ID 5 for GigabitEthernet
Examples 0/1.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip address [Link] [Link]
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf authentication message-digest
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf message-digest-key 10 md5 hello
10
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf message-digest-key 5 md5 hello

5-48
Command Reference OSPFv2 Commands

5
When all neighbors are added with new keys, the old keys shall be deleted for all devices.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# no ip ospf message-digest-key 10 md5
hello 10

Related
Command Description
Commands
Enables OSPF area authentication and defines
area authentication
authentication mode.
Enables authentication on the interface and
ip ospf authentication
defines authentication mode.

Platform N/A
Description

5.31 ip ospf mtu-ignore

Use this command to disable the MTU check when an interface receives the database description
packet. Use the no form of this command to restore the default setting.
ip ospf mtu-ignore
no ip ospf mtu-ignore

Parameter
Parameter Description
Description
N/A N/A

Defaults MTU check is disabled by default.

Command
Mode Interface configuration mode

Usage Guide After receiving the database description packet, the device will check whether the MTU of the
neighbor interface is the same as its own MTU. If the received database description packet indicates
an MTU greater than the interface’s MTU, the neighboring relationship cannot be established. This
can be fixed by disabling the MTU check.

Configuration The following example disables the MTU check function on GigabitEthernet 0/1.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf mtu-ignore

Related
Command Description
Commands
N/A N/A

5-49
Command Reference OSPFv2 Commands

Platform N/A
Description

5.32 ip ospf network

Use this command to configure the OSPF network type in interface configuration mode. Use the no
form of this command to restore the default setting.
ip ospf network { broadcast | non-broadcast | point-to-multipoint [ non-broadcast ] |
point-to-point }
no ip ospf network

Parameter
Parameter Description
Description
broadcast Sets the OSPF network type as the broadcast type.
Sets the OSPF network type as the non-broadcast multi-path access
non-broadcast
type, i.e. NBMA network.
Sets the OSPF network type as the point-to-multipoint type.
point-to-multipoint The value is the point-to-multipoint broadcast type by default. The
[ non-broadcast ] non-broadcast option means the point-to-multipoint non-broadcast
type.
point-to-point Sets the OSPF network type as the point-to-point type.

Defaults The default configurations are as follows:


PTP network type: Point-to-Point Protocol(PPP), Serial Line Internet Protocol(SLIP), frame relay
point-to-point (PTP) sub-interface, X.25 PTP sub-interface encapsulation
NBMA network type: frame relay (except for PTP sub-interface), X.25 encapsulation (except for PTP
sub-interface)
Broadcast network type: Ethernet encapsulation
By default, the network type is the point-to-multipoint network type.

Command
Mode Interface configuration mode

Usage Guide The broadcast type requires that the interface must have the broadcast capability.
The P2P type requires that the interfaces are interconnected in one-to-one manner.
The NBMA type requires full-meshed connections, and all interconnected routers can directly
communicate with each other.
The P2MP type does not raise any requirement.

Configuration The following example configures the interface network as the P2P type.
Examples Ruijie(config)# interface Serial 1/0
Ruijie(config-Serial 1/0)#ip address [Link] [Link]
Ruijie(config-Serial 1/0)# encapsulation frame-relay

5-50
Command Reference OSPFv2 Commands

Ruijie(config-Serial 1/0)# ip ospf network point-to-point


The following example configures the interface network as the NBMA type.
Ruijie(config)# interface Serial 1/0
Ruijie(config-Serial 1/0)# ip address [Link] [Link]
Ruijie(config-Serial 1/0)# encapsulation frame-relay
Ruijie(config-Serial 1/0)# ip ospf network non-broadcast
Ruijie(config-Serial 1/0)#exit
Ruijie(config)# router ospf 20
Ruijie(config-router)# neighbor [Link] priority 1 poll-interval 150

Related
Command Description
Commands
Defines the mapping between IP address and
dialer map ip
dialing number.
Defines the mapping between IP address and
frame-relay map
frame DLCI.
Defines the IP address of neighbor applicable
neighbor(OSPF) to NBMA network type and point-to-multipoint
non-broadcast type only.
Defines the mapping between IP address and
X25 map
X.25 network address.

Platform N/A
Description

5.33 ip ospf priority

Use this command to configure the OSPF priority in interface configuration mode. Use the no form of
this command to restore the default setting.
ip ospf priority priority
no ip ospf priority

Parameter
Parameter Description
Description
priority Sets the OSPF priority of the interface in the range from 0 to 255.

Defaults The default is 1.

Command
Mode Interface configuration mode

Usage Guide The interface priority is included in the Hello packet. When DR/BDR election occurs in the OSPF
broadcast type network, the device with higher priority will become the DR or BDR. If the devices
have the same priority, the one with higher ID will become the DR or BDR. The device with priority 0

5-51
Command Reference OSPFv2 Commands

cannot become DR or BDR. This command is valid only for OSPF broadcast and non-broadcast
network types.

Configuration The following example configures the priority ofGigabitEthernet 0/1 as 0.


Examples Switch(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf priority 0

Related
Command Description
Commands
ip ospf network Configures the network type of the interface.

Platform N/A
Description

5.34 ip ospf retransmit-interval

Use this command to define the interval for sending the link state update (LSU) packet on the
interface in interface configuration mode. Use the no form of this command to restore the default
setting.
ip ospf retransmit-interval seconds
ip ospf retransmit-interval

Parameter
Parameter Description
Description
Interval for sending the LSU packets in seconds. The range is from 0
seconds to 65535. This interval must be greater than the round trip delay of
packets between two neighbors.

Defaults The default is 5.

Command
Mode Interface configuration mode

Usage Guide After the device sends an LSU packet, the LSU packet stays in the transmission buffer queue. If no
confirmation from the neighbor is obtained in the interval defined with the ip ospf retransmit-interval
command, the LSU will be sent once again.
In serial lines or virtual links, the retransmission interval shall be slightly larger. The LSU packet
retransmission interval of virtual links is defined with the area virtual-link command followed with the
keyword retransmit-interval.

Configuration The following example configures the LSU packet retransmission interval on GigabitEthernet 0/1 as
Examples 10 seconds.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf retransmit-interval 10

5-52
Command Reference OSPFv2 Commands

Related
Command Description
Commands
area virtual-link Defines an OSPF virtual link.

Platform N/A
Description

5.35 ip ospf source-check-ignore

Use this command to disable the source address check in the point-to-point link. Use the no form of
this command to restore the default setting
ip ospf source-check-ignore
no ip ospf source-check-ignore

Parameter
Parameter Description
Description
N/A N/A

Defaults This function is enabled by default.

Command
Mode Interface configuration mode

Usage Guide For OSPF, the source address of the received packet is required to be in the same network segment
with the receiving interface. However, in a point-to-point link, the addresses of two ends of the link are
individually set, and they are not required to be in the same network segment. The peer address is
informed during the process of point-to-point link negotiation; therefore, OSPF will check whether the
source address of the packet is the informed one. If no, the OSPF regards this packet as illegal and
drops it. In some applications, the addresses informed during the negotiation are shielded. You need
to disable the source address check to ensure the normal establishment of OSPF neighbors. The
source address check shall be never enabled, especially for the unnumbered interfaces.

Configuration The following example disables the source address check function in the point-to-point link.
Examples Ruijie(config)# interface serial 1/0
Ruijie(config-if)# ip ospf source-check-ignore

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5-53
Command Reference OSPFv2 Commands

5.36 ip ospf transmit-delay

Use this command to define the LSU packet transmission delay in interface configuration mode. Use
the no form of this command to restore the default setting.
ip ospf transmit delay seconds
no ip ospf transmit delay

Parameter
Parameter Description
Description
LSU packet transmission delay in seconds in the range from 1 to
seconds
65535.

Defaults The default is 1.

Command
Mode Interface configuration mode

Usage Guide Before the LSU packet is transmitted, the Age field in all the LSAs of the packet will be increased by
the value defined with the ip ospf transmit-delay command in interface configuration mode. The
configuration of this parameter shall consider the transmission and line transmission delay of the
interface. For low-rate lines, the transmission delay of the interface shall be slightly larger. The LSU
packet transmission delay of the virtual link is defined with the area virtual-link command followed
with the keyword retransmit-interval.
The RGOS software will resend or request resending the LSA with Age up to 3600. If no update is
obtained in time, the aged LSA will be cleared from the link state database.

Configuration The following example configures the transmission delay of GigabitEthernet 0/1 as 10.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ip ospf transmit-delay 10

Related
Command Description
Commands
area virtual-link Defines an OSPF virtual link.

Platform N/A
Description

5.37 log-adj-changes

Use this command to enable the logging of the neighbor state changes. Use the no form of the
command to disable this function.
log-adj-changes [ detail ]
no log-adj-changes [ detail ]

5-54
Command Reference OSPFv2 Commands

Parameter
Parameter Description
Description
detail Records the detail of changes.

Defaults This function is enabled by default. Without the detail parameter, the system records the logs that the
neighbor enters or exits the full state.

Command
Mode Routing process configuration mode

Usage Guide N/A

Configuration The following example logs the neighbor state changes.


Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# log-adj-changes detail

Related
Command Description
Commands
Displays the OSPF global configuration
show ip ospf
information.

Platform N/A
Description

5.38 max-concurrent-dd

Use this command to specify the maximum number of DD packets that can be processed (initiated or
accepted) at the same time. Use the no form of this command to restore the default setting.
max-concurrent-dd number
no max-concurrent-dd

Parameter
Parameter Description
Description
number Maximum number of DD packets in the range from1 to 65535

Defaults The default is 5.

Command
Mode Routing process configuration mode

Usage Guide When a router is exchanging data with multiple neighbors, its performance will be affected. This
command is configured to limit the maximum number of DD packets that each OSPF instance can
have at the same time.

5-55
Command Reference OSPFv2 Commands

Configuration The following example sets the maximum number of DD packets to 4.


Examples After the configuration, the device can initiate to interact with four neighbors and can concurrently
accept the interaction. That is, the device can interact with a maximum of eight neighbors.
Ruijie(config)# router ospf 10
Ruijie(config-router)# max-concurrent-dd4

Related
Command Description
Commands
Sets the maximum number of neighbors
router ospf max-concurrent-dd allowed in concurrent interaction for all OSPF
routing processes.

Platform N/A
Description

5.39 max-metric

Use this command to set the maximum metric of the router-lsa, so that this routing device will not
firstly be used as the transmission node by other devices in SPF computing. Use the no form of this
command to restore the default setting.
max-metric router-lsa [ external-lsa [ max-metric-value ] ] [ include-stub ] [ on-startup [ seconds ] ]
[ summary-lsa [ max-metric-value ] ]
no max-metric router-lsa [ external-lsa [ max-metric-value ] ] [ include-stub ] [ on-startup
[ seconds ] ] [ summary-lsa [ max-metric-value ] ]

Parameter
Parameter Description
Description
Configures the maximum metric (0XFFFF) of non-stub links in the
router-lsa
Router LSA.
Uses the maximum metric instead of the external-lsa metric (including
external-lsa
the Type-5 and Type-7).
Maximum metric of the LAS. The range is 1 to [Link] default
max-metric-value
value is 16711680,
include-stub Configures the maximum metric of the stub links in the Router LSA.
on-startup Advertises the maximum metric when the routing device starts up.
Interval of advertising the maximum metric. The range is 5 to 86400.
seconds
The default value is 600 seconds.
Uses the maximum metric to replace the summary LSA metric.
summary-lsa
(including Type-3 and Type-4)

Defaults The normal metric LSAs are used by default.

5-56
Command Reference OSPFv2 Commands

Command
Mode Routing process configuration mode

Usage Guide With the max-metric router-lsa command enabled, the maximum metric of non-stub links in the
Router LSA generated by the routing device is set. The link’s normal metric is restored after canceling
this configuration or reaching the timer.
By default, with this command enabled, the normal metric of the stub links is still advertised, which is
the output interface cost. If the include-stub parameter is configured, the maximum metric of the stub
links will be advertised.
When the device acts as an ABR, if no interval flow transmission is expected, use the summary-lsa
parameter to set the summary LSA as the maximum metric.
When the device acts as an ASBR device, if no external flow transmission is expected, use the
external lsa parameter to set the external LSA as the maximum metric.
The max-metric router-lsa command is usually used in the following scenes:
The device is restarted, which generally makes the IGP protocol converge faster, so that other
devices attempt forwarding the dataflow through the new started-up device.
The device is added into the network without being used for dataflow transmission. If the backup path
exists, the current device is not used for the dataflow transmission. Otherwise, this device is still used
to transmit the dataflow.
Remove the device from the network gracefully. With this command enabled, the current device
advertises the maximum metric to all devices, as that the other devices in this network can choose
the backup path to for the dataflow transmission before the current device is removed.

For the OSPF implementation in the earlier versions (RFC 1247 or earlier versions), the links
with the maximum metric (0xFFFF) in the LSA will not participate in the SPF calculation, that is,
no dataflow will be sent to the router that have generated these LSAs.

Configuration The following example configures the LSA maximum metric as 100 seconds after starting the device.
Examples Ruijie(config)# router ospf 20
Ruijie(config-router)# max-metric router-lsa on-startup 100

Related
Command Description
Commands
show ip ospf Displays the OSPF related configurations.

Platform N/A
Description

5.40 neighbor

Use this command to define the OSPF neighbor in routing process configuration mode. Use the no
form of this command to restore the default setting.
neighbor ip-address [ poll-interval seconds ] [ priority priority ] [ cost cost ] ]
no neighbor ip-address [ [ poll-interval ] [ priority ] | [ cost ] ]

5-57
Command Reference OSPFv2 Commands

Parameter
Parameter Description
Description
ip address IP address of the neighbor
(Optional) Specifies the interval of polling neighbors in seconds. The
poll-interval seconds range is from 0 to 2147483647.
Only the non-broadcast (NBMA) network type supports this option.
(Optional) Configures the priority of non-broadcast network
priority priority neighbors. The range is from 0 to 255. Only the non-broadcast
(NBMA) network type supports this option.
(Optional) Configures the cost to each neighbor in point-to-multipoint
network, not defined by default, where the cost configured on the
cost cost interface will be used. The range is from 0 to 65535.
Only the point-to-multipoint [non-broadcast] network type supports
this option.

Defaults No neighbor is defined by default.


The default neighbor polling interval is 120 seconds.
The default NBMA neighbor priority is 0.

Command
Mode Routing process configuration mode

Usage Guide The RGOS software must explicitly configure the neighbor information for every non-broadcast
network neighbor. The IP address of a neighbor must be the master IP address of that neighbor
interface.
In the NBMA network, if the neighbor device becomes inactive, in other words, if the Hello packet is
not received within the device dead-interval, the OSPF will send more Hello packets to the neighbor.
The interval at which the Hello packets are sent is called the polling interval. When the OSPF starts to
work for the first time, it sends Hello packets only to the neighbor whose priority is not 0, so that the
neighbor whose priority is set as 0 will not participate in the DR/BDR election. When the DR/BDR is
generated, the DR/BDR sends the Hello packets to all neighbors to establish the neighbor
relationship.
Since the point-to-multipoint non-broadcast network has no broadcast capability, neighbors cannot be
found dynamically. So, it is required to use this command to manually configure neighbor. In addition,
it is possible to configure the cost to each neighbor through the cost option for the point-to-multipoint
network type.

Configuration The following example declares an OSPF non-broadcast network neighbor, with the IP address
Examples [Link], priority 1 and polling interval 150 seconds.
Ruijie(config)# router ospf 20
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# neighbor [Link] priority 1 poll-interval 150

5-58
Command Reference OSPFv2 Commands

Related
Command Description
Commands
ip ospf priority Sets the interface priority.
ip ospf network Sets the network type

Platform N/A
Description

5.41 network area

Use this command to define which interfaces run OSPF and the OSPF areas they belong to in routing
process configuration mode. Use the no form of this command to restore the default setting.
network ip-address wildcard area area-id
no network ip-address wildcard area area-id

Parameter
Parameter Description
Description
ip-address IP address of the interface
Defines the comparison bits in the IP address, with 0 for exact match
wildcard
and 1 for no comparison
OSPF area identifier. An OSPF area is always associated with an
area-id address range. For easy of management, a subnet can be used as
the OSPF area identifier.

Defaults No OSPF area is configured by default.

Command
Mode Routing process configuration mode

Usage Guide The ip-address and wildcard parameters allow associating multiple interfaces with one OSPF area.
To run OSPF on an interface, it is required to include the primary IP address and secondary IP
address of the interface in the IP address range defined by the network area command. If only the
secondary IP address is included, OSPF cannot be enabled on the interface.
You can determine the OSPF process that the interface takes part in by the means of the best match
if the IP address of the interface matches the IP address ranges defined by the network command in
multiple OSPF processes.

Configuration The following example defines:


Examples Three areas: 0, 1 and [Link]
The interfaces whose IP addresses fall into the [Link]/24 range to area 1
The interfaces whose IP addresses fall into the [Link]/20 range to area 2
The remaining interface being assigned to area 0.
Ruijie(config)# router ospf 20
Ruijie(config-router)# network [Link] [Link] area [Link]

5-59
Command Reference OSPFv2 Commands

Ruijie(config-router)# network [Link] [Link] area 1


Ruijie(config-router)# network [Link] [Link] area 0

Related
Command Description
Commands
router ospf Creates the OSPF routing process.

Platform N/A
Description

5.42 overflow database

Use this command to configure the maximum number of LSAs supported by the current OSPF
instance. Use the no form of this command to restore the default setting.
overflow database number [ hard | soft ]
no overflow database

Parameter
Parameter Description
Description
number Maximum number of LSAs. The range is from 1 to 4294967294.
hard: shuts down the OSPF instance when the number of LSAs
hard | soft exceeds that number.
soft: issues an alarm when the number of LSAs exceeds that number.

Defaults The maximum number of LSAs supported by the current OSPF instance is not restricted by default.

Command
Mode Routing process configuration mode

Usage Guide To shut down the OSPF instance when the number of LSAs exceeds that number, use the hard
parameter; otherwise, use the soft parameter.

Configuration The following example configures that OSPF instance 10 will be shut down when there are more than
Examples 10 LSAs.
Ruijie(config)# router ospf 10
Ruijie(config-router)# overflow database 10 hard

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5-60
Command Reference OSPFv2 Commands

5.43 overflow database external

Use this command to configure the maximum number of external LSAs and the waiting time from the
overflow state to the normal state. Use the no form of this command to restore the default setting.
overflow database external max-dbsize wait-time
no overflow database external

Parameter
Parameter Description
Description
Maximum number of external LSAs (the value shall be the same for
max-dbsize all routing devices in the same AS). The range is from 0 to
2147483647.
Waiting time of the routing device from the overflow status to normal
wait-time
status. The range is from 0 to 2147483647.

Defaults The maximum number of external-LSAs is not restricted by default.


If the maximum number of external-LSAs is restricted, the normal status cannot be restored when the
maximum number is exceeded.

Command
Mode Routing process configuration mode

Usage Guide When the number of external-LSAs exceeds the value of max-db size, the device enters the overflow
state. Then no more external-LSA will be loaded and the external-LSAs generated locally will be
cleared. After wait-time expires, the device restores to the normal state and external-LSAs are
reloaded.

When using this function, ensure that all routers of the OSPF backbone area and common areas
use the same max-db size value. Otherwise, the following situations occur:

The link status is inconsistent on the entire network and neighbors fail to achieve the Full state.

Incorrect routes occur, including loops.

AS-External-LSAs may be frequently retransmitted.

Configuration The following example configures that the maximum number of external LSAs is 10, and it turns to the
Examples overflow status upon timeout, and the time interval attempting to restore from the overflow state to the
normal state is 3 seconds.
Ruijie(config)# router ospf 10
Ruijie(config-router)# overflow database external 10 3

Related
Command Description
Commands
N/A N/A

5-61
Command Reference OSPFv2 Commands

Platform N/A
Description

5.44 overflow memory-lack

Use this command to allow OSPF to enter the OVERFLOW state when the memory lacks. Use the no
form of this command to disable this function.
overflow memory-lack
no overflow memory-lack

Parameter
Parameter Description
Description
N/A N/A

Defaults This function is enabled by default

Command
Mode Routing process configuration mode

Usage Guide The action of OSPF entering the OVERFLOW state is to discard the newly-learned external route and
effectively prevent the memory from increasing.
It is possible that enabling this function causes the route loop in the whole network. To reduce that
possibility, OSPF will generate a default route directing to the NULL port and this default route will
exist in the OVERFLOW state.
Use the clear ip ospf process command to reset the OSPF and remove the OSPF OVERFLOW
state.
Use the no form of this command to prevent the OSPF to enter the OVERFLOW state when the
memory is insufficient, which may result in the constantly consumption of the memory resources. If
the memory is exhausted to some degree, the OSPF instance will stop and all learned routes will be
removed.

Configuration The following example prevents the OSPF from entering the OVERFLOW state when the memory is
Examples insufficient.
Ruijie(config)# router ospf 1
Ruijie(config-router)# no overflow memory-lack

Related
Command Description
Commands
clear ip ospf process Resets the OSPF instances.
show ip protocols ospf Displays the OSPF information.

Platform N/A
Description

5-62
Command Reference OSPFv2 Commands

5.45 passive-interface

Use this command to configure the specified network interface or all interface as the passive
interfaces. Use the no form of this command to restore the default setting.
passive-interface { default | interface-type interface-number | interface-type interface-number
ip-address }
no passive-interface { default | interface-type interface-number | interface-type interface-number
ip-address }

Parameter
Parameter Description
Description
interface-type
Interface to be set as a passive interface
interface-number
default Sets all the interfaces as passive interfaces
interface-type
interface-number Sets the address of the specified interface as a passive address.
ip-address

Defaults No interface is configured as a passive interface by default. All interfaces are allowed to receive or
send OSPF packets.

Command
Mode Routing process configuration mode

Usage Guide To prevent other devices in the network from dynamically learning the routing information of the
device, set the specified network interface of this device as a passive interface or the IP address of
the specified network interface as a passive address

Configuration The following example configures GigabitEthernet 0/1 as a passive interface and the IP address of
Examples the interface [Link] as the passive address.
Ruijie(config)# router ospf 30
Ruijie(config-router)# passive-interface GigabitEthernet 0/1
Ruijie(config-router)# passive-interface GigabitEthernet 0/1 [Link]

Related
Command Description
Commands
Displays the configuration information of the
show ip ospf interface
interface.

Platform N/A
Description

5-63
Command Reference OSPFv2 Commands

5.46 redistribute

Use this command to redistribute the external routing information. Use the no form of this command
to restore the default setting.
redistribute { connected | ospf process-id | rip | static } [ match { internal | external [ 1 | 2 ] |
nssa-external [ 1 | 2 ] } ] | rip | static } [ metric metric-value ] [ metric-type { 1 | 2 } ] [ route-map
route-map-name ] [ subnets ] [ tag tag-value ]
no redistribute { connected] | ospf process-id | rip | static } [ match { internal | external [ 1 | 2 ] |
nssa-external [ 1 | 2 ] } ] [ metric metric-value ] [ metric-type { 1 | 2 } ] [ route-map route-map-name ]
[ subnets ] [ tag tag-value ]

Parameter
Parameter Description
Description
connected Redistribution from direct routes
Redistribution from an ospf instance specified in process-id in the
ospf process-id
range from 1 to 65,535
rip Redistribution from rip
static Redistribution from static routes
Filters specified routes for configuring OSPF route redistribution. By
match
default, all the OSPF routes are redistributed.
Specifies the metric of an OSPF external LSA in the range from 0 to
metric metric-value
16777214.
metric-type { 1 | 2 } Sets the external routing type as E-1 or E-2.
route-map route-map-name Redistribution filter rule
subnets Redistributes the routes of non standard networks.
Sets the tag value of the routes redistributed to the OSPF in the range
tag tag-value
from 0 to 4294967295.

Defaults Redistribution configuration is not supported by default.


If you configure OSPF redistribution, all subtype routes of the instance are redistributed.
In other cases, all routings of this type are redistributed.
The default metric of the redistribution BGP route is 1. The default metric of LSAs generated by
routes of other types is 20.
The default value of metric-type is E-2.
No route-map is associated by default.

Command
Mode Route configuration mode

Usage Guide After the command is configured, the router will become an ASBR, and the related routing information
is imported into the OSPF domain and broadcasted to other OSPF routers through type-5 LSAs.
When you configure OSPF router distribution without the match parameter, the OSPF routes of all
sub types are redistributed by default. Then the first configured match parameter is used as the

5-64
Command Reference OSPFv2 Commands

original one. Only the routes matching the specific type can be redistributed. Use the no form of this
command to restore the default configuration.
When you filter routes for redistribution by following the route-map rule, the match rule of the
route-map rule is specific for the original redistribution parameters. The route-map rule works only
when the redistributed OSPF routes follow the match rule.

The range of set metric is from 0 to 16777214 for the associated route-map. If the value exceeds
the range, introducing a route fails. The following are the rules for configuring the no form of the
redistribute command.1. If the no form specifies some parameters, restore their default values.

2. If the no form contains no parameter, delete the whole command.

Configuration The following example redistributes OSPF 2 to OSPF 1.


Examples Ruijie> enable
Ruijie# configure terminal
Ruijie(config)# router ospf 1
Ruijie(config-router)# redistribute ospf 2 subnets
Ruijie(config-router)# redistribute ospf 2 match external 1 internal

Related
Command Description
Commands
Configures the aggregate route for the external
summary-address
route of the OSPF route area.
Sets the default metric of the OSPF
default-metric
redistribution route.

Platform N/A
Description

5.47 router ospf

Use this command to create the OSPF routing process in global configuration mode. Use the no form
of this command to restore the default setting.
router ospf [ process-id ]
no router ospf process-id
Parameter
Parameter Description
Description
process-id Indicates the process number.

Defaults No OSPF routing process exists by default.

Command
Mode Global configuration mode

5-65
Command Reference OSPFv2 Commands

Usage Guide The routing process ID can be added to multi-instance OSPF. Different OSPF instances are mutually
independent and can be approximately considered as two routing protocols that run independently.

Configuration
Examples N/A

Related
Command Description
Commands
show ip protocols Displays the routing protocol information.
show ip ospf Displays the OSPF information.

Platform N/A
Description

5.48 router ospf max-concurrent-dd

Use this command to specify the maximum number of DD packets that can be processed (initiated or
accepted) at the same time. Use the no form of this command to restore the default setting.
router ospf max-concurrent-dd number
no router ospf max-concurrent-dd

Parameter
Parameter Description
Description
number Maximum number of DD packets in the range from 1 to 65535.

Defaults The default is 10.

Command
Mode Global configuration mode

Usage Guide When a routing device is exchanging data with multiple neighbors, its performance will be affected.
This command is configured to limit the maximum number of DD packets that each OSPF instance
can have (initiated or accepted) at the same time.

Configuration The following example sets the maximum number of DD packets to 4.


Examples After the configuration, the device can initiate to interact with four neighbors and can concurrently
accept the interaction. That is, the device can interact with a maximum of eight neighbors.
Ruijie# configure terminal
Ruijie(config)# router ospf max-concurrent-dd 4

Related
Command Description
Commands
Sets the maximum number of the neighbors
max-concurrent-dd
that the OSPF routing process can concurrently

5-66
Command Reference OSPFv2 Commands

interact with.

Platform N/A
Description

5.49 router-id

Use this command to set the router ID. Use the no form of this command to restore the default
setting.
router-id router-id
no router-id

Parameter
Parameter Description
Description
router-id Router ID in IP address form

Defaults The OSPF routing process will select the maximal interface IP address as the router ID by default.
If the loopback interface of an IP address is not configured, the OSPF routing process will select the
maximum IP address among all its physical interfaces as the router ID.

Command
Mode Routing process configuration mode

Usage Guide You can configure any IP address as the router ID. However, the router ID should be unique. Note
that once the router ID changes, the OSPF protocol will do a lot of processing. Therefore, it is not
recommended to change the router ID. The device can be changed only when no LSA is generated.

Configuration The following example modifies the router ID to [Link].


Examples Ruijie(config)# router ospf 20
Ruijie(config-router)# router-id [Link]

Related
Command Description
Commands
show ip protocols Displays the routing protocol information.

Platform N/A
Description

5.50 show ip ospf

Use this command to display the OSPF information.


show ip ospf [ process-id ]

5-67
Command Reference OSPFv2 Commands

Parameter
Parameter Description
Description
process-id OSPF process ID

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide This command displays the information of the OSPF routing process.

Configuration The following example displays the output of the show ip ospf command.
Examples Ruijie# show ip ospf
Routing Process "ospf 1" with ID [Link]
Domain ID type 0x0105, value 0x010101010101
Process uptime is 4 minutes
Process bound to VRF default
Memory Overflow is enabled.
Router is not in overflow state now.
Conforms to RFC2328, and RFC1583Compatibility flag isenabled
Supports only single TOS(TOS0) routes
Enable two-way-maintain
Supports opaque LSA
Supports Graceful Restart
This router is an ASBR (injecting external routing information)
Originating router-LSAs with maximum metric
Condition:on startup for 100 seconds, State:inactive
Advertise stub links with maximum metric in router-LSAs
Advertise summary-LSAs with metric 16711680
Advertise external-LSAs with metric 16711680
Unset reason:timer expired, Originated for 100 seconds
Unset time:00:02:02.080, Time elapsed: 00:23:54.656
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Initial LSA throttle delay 0 msecs
Minimum hold time for LSA throttle 5000 msecs
Maximum wait time for LSA throttle 5000 msecs
Lsa Transmit Pacing timer 40 msecs, 10 LS-Upd
Minimum LSA arrival 1000 msecs
Pacing lsa-group:240 secs
Number of incomming current DD exchange neighbors 0/5
Number of outgoing current DD exchange neighbors 0/5
Number of external LSA 4. Checksum 0x0278E0
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 4

5-68
Command Reference OSPFv2 Commands

External LSA database is unlimited.


Number of LSA originated 6
Number of LSA received 2
Log Neighbor Adjency Changes :Enabled
Graceful-restart disabled
Graceful-restart helper support enabled
Number of areas attached to this router: 1
BFD enabled
Area 0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Area has no authentication
SPF algorithm last executed 00:01:26.640 ago
SPF algorithm executed 4 times
Number of LSA 3. Checksum 0x0204bf
Area 1 (NSSA)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 0
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 02:09:23.040 ago
SPF algorithm executed 4 times
Number of LSA 6. Checksum 0x028638
NSSA Translator State is disabled, Stability Interval expired in 00:00:03

Field Description

Router ID ID of a router.

Effective time of the current OSPF process (the process does


Process uptime
not take effect when device-id is [Link])

Conforms to RFC2328 Same as the RFC2328

Whether the RFC1583 or RFC2328 is adopted for the


RFC1583Compatibilit calculation of external routes.
flag This policy is used in the selection of best ASBR and in the
route comparison.

Support Tos Supports Only TOS0.

Supports opaque LSA Supports opaque-LSA.

GR Restart capability described in the RFC3623 Graceful


Graceful-restart
Restart

5-69
Command Reference OSPFv2 Commands

GR Help capability described in the RFC3623 Graceful


Graceful-restart helper
Restart

Router Type OSPF device type, including normal, ABR, and ASBR

Delay before the SPF calculation is invoked after the


SPF Delay
topology change is received

SPF-holdtime Minimum holdtime between two SPF calculations

Parameter used for LSA pacing, checksum calculation, and


LsaGroupPacing
aging interval
Number of neighbors under interaction. The incoming
Incomming current DD
neighbors are those entering the exstart status for the first
exchange neighbors
time.
Number of neighbors under interaction. The outgoing
Outgoing current DD
neighbors are those exiting from the higher status to the
exchange neighbors
exstart status for re-interaction.

Number of external LSA Number of external LSAs stored in the database

External LSA Checksum


Checksum sum of external LSAs stored in the database
Sum

Number of opaque LSA Number of external LSAs stored in the database

Opaque LSA Checksum


Checksum sum of external LSAs stored in the database
Sum
Number of non-default
Number of external LSAs with non-default routes
external LSA
External LSA database
Limit of external LSA number
limit
Exit database overflow
Time of exiting the overflow status
state interval

Database overflow state Whether the current OSPF process is in the overflow status

Number of LSA
Number of LSAs generated
originated

Number of LSA received Number of LSAs received

Log Neighbor Adjency Whether the record switch for neighbor status change is
Changes enabled
Number of areas
Total number of areas on the devices
attached to this router

Area type Area type, including normal, stub, and nssa

Number of interfaces in
Number of interfaces in this area
this area

5-70
Command Reference OSPFv2 Commands

Number of fully adjacent


Number of Full neighbors of the area
neighbors in this area
Number of fully adjacent
Number of Full neighbors with virtual connections in the area.
virtual neighbors through
It is effective only in the non-backbone default-type areas.
this area

Area authentication Authentication mode of the area

SPF algorithm last


Time from the previous SPF calculation to the current time
executed
SPF algorithm executed
Times of SPF calculations
times

Number of LSA Total number of LSAs in this area

Checksum Sum Checksum sum of the LSAs in the area

Whether to convert the NSSA LSA to External LSA. It is


NSSATranslatorState
effective on the ABR OSPF process in the NSSA.

BFD enabled Enables BFD for OSPF.

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.51 show ip ospf border-routers

Use this command to display the OSPF internal routing table on the ABR/ASBR.
show ip ospf [ process-id ] border-routers

Parameter
Parameter Description
Description
process-id OSPF process ID

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide This command displays the OSPF internal routes from the local routing device to the ABR or ASBR.
The OSPF internal routing table is different from the one displayed with the show ip route command.
The OSPF internal routing table has the destination address of the router ID instead of the destination

5-71
Command Reference OSPFv2 Commands

network.

Configuration The following example displays the output of the show ip ospf border-mrouters command.
Examples Ruijie# show ip ospf border-routers
OSPF internal Routing Table
Codes:i - Intra-area route, I - Inter-area route
i [Link] [2] via [Link], GigabitEthernet 0/1, ABR, ASBR, Area [Link] select
The following table describes fields in the output.
Field Description
Route type code, where “i” means intra-area routes, while “I” means
Codes
inter-area routes.
I Intra-area routes
[Link] Displays the OSPF ID of the border device.
[2] Displays the cost to the border device.
via [Link] Displays the next-hop gateway to the border device.
GigabitEthernet 0/1 Displays the interface to the border device.
Displays the type of the border device, including ABR, ASBR, or
ABR, ASBR
both.
Area [Link] Displays the area that learns the route.
Indicates the currently selected optimal path when there are multiple
select
paths to the ASBR.

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.52 show ip ospf database

Use this command to display the OSPF link state database information. Use the no form of this
command to restore the default setting. Different formats of the command will display different LSA
information.
show ip ospf [ process-id [ area-id | ip-address ] ] database [ asbr-summary | external | network |
nssa-external | opaque-area | opaque-as | opaque-link | router | summary ] [ adv-router
ip-address | self-originate | link-state-id | brief ] [ database-summary | max-age | detail ]

Parameter
Parameter Description
Description
process-id (Optional) Displays the process ID.
area-id (Optional) Displays the area ID.
ip-address (Optional) Displays the IP address.

5-72
Command Reference OSPFv2 Commands

(Optional) Displays the LSA information generated by the specified


adv-device
advertising device.
(Optional) Displays the LSA information of the specified OSPF link
link-state-id
state identifier.
(Optional) Displays the LSA information generated by the device
self-originate
itself.
max-age (Optional) Displays the LSAs aged.
router (Optional) Displays the OSPF device LSA information.
network (Optional) Displays the OSPF network LSA information.
summary (Optional) Displays the OSPF summary LSA information.
asbr-summary (Optional) Displays the ASBR summary LSA information.
external (Optional) Displays the OSPF external LSA information.
nssa-external (Optional) Displays the category 7 OSPF external LSA information.
opaque-area (Optional) Displays type 10 LSAs.
opaque-as (Optional) Displays type 11 LSAs.
opaque-link (Optional) Displays type 9 LSAs.
database-summary (Optional) Displays the statistics of LSAs of the link state database.
detail Displays detailed information of LSAs of the OSPF.
brief Displays the brief information of the LSAs of the specified type.

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide When the OSPF link state database is very large, you should display the information on the link state
database by item. Proper use of commands may help OSPF troubleshooting.

Configuration The following example displays the output of the show ip ospf database command.
Examples Ruijie# show ip ospf database
OSPF Device with ID ([Link]) (Process ID 1)
Device Link States (Area [Link])
Link ID ADV Device Age Seq# CkSum Link count
[Link] [Link] 2 0x80000011 0x6f39 2
[Link] [Link] 120 0x80000002 0x26ac 1
Network Link States (Area [Link])
Link ID ADV Device Age Seq# CkSum
[Link] [Link] 120 0x80000001 0x5366
Summary Link States (Area [Link])
Link ID ADV Device Age Seq# CkSum Route
[Link] [Link] 2 0x80000003 0x350d [Link]/24
[Link] [Link] 2 0x8000000c 0x1ecb [Link]/16
Device Link States (Area [Link] [NSSA])
Link ID ADV Device Age Seq# CkSum Link count

5-73
Command Reference OSPFv2 Commands

[Link] [Link] 2 0x80000001 0x91a2 1


Summary Link States (Area [Link] [NSSA])
Link ID ADV Device Age Seq# CkSum Route
[Link] [Link] 2 0x80000001 0x52a4 [Link]/16
[Link] [Link] 2 0x80000001 0xbb2d [Link]/24
NSSA-external Link States (Area [Link] [NSSA])
Link ID ADV Device Age Seq# CkSum Route Tag
[Link] [Link] 1 0x80000001 0x033c E2 [Link]/24 0
[Link] [Link] 1 0x80000001 0x9469 E2 [Link]/28 0
AS External Link States
Link ID ADV Device Age Seq# CkSum Route Tag
[Link] [Link] 380 0x8000000a 0x7627 E2 [Link]/24 0
[Link] [Link] 620 0x8000000a 0x0854 E2 [Link]/28 0
The following table describes the fields in the output of the show ip ospf database command.

Field Description

OSPF Device with ID Displays the Router ID.

Device Link States Displays the device LSA information.

Net Link States Displays the network LSA information.

Summary Net Link


Displays the summary network LSA information.
States
NSSA-external Link
Displays the type 7 autonomous external LSA information.
States
AS External
Displays the type 5 autonomous external LSA information.
Link States

Link ID Displays the Link ID.

ADV Device Displays the ID of the device that advertises the LSAs.

Age Displays the keepalive period of the LSA.

Displays the sequence number of the LSA, which is used to


Seq#
check aged or duplicate LSAs.

Cksum Displays the checksum of LSAs.

Link-Count Displays the number of links in the device LSA information.

Route Displays the device information included in the LSA.

Tag Displays the tag of the LSA.

The following example displays the output the show ip ospf database asbr-summary command.
Ruijie# show ip ospf database asbr-summary
OSPF Device with ID ([Link]) (Process ID 1)
ASBR-Summary Link States (Area [Link])
LS age: 47
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: ASBR-summary-LSA
Link State ID: [Link] (AS Boundary Device address)

5-74
Command Reference OSPFv2 Commands

Advertising Device: [Link]


LS Seq Number: 80000001
Checksum: 0xbe8c
Length: 28
Network Mask: /0
TOS: 0 Metric: 1
The following table describes the fields in the output of the show ip ospf database asbr-summary
command.
Field Description

OSPF Device with ID Displays the router ID.

AS Summary Link
Displays the summary LSA information in the AS.
States

LS age Displays the keepalive period of the LSA.

Options Option

LS Type Displays the type of the LSA.

Link State ID Displays the link ID of the LSA.

AdvertisingRouter Displays the device advertising the LSA.

LS Seq Number Displays the sequence number of the LSA.

Checksum Displays the checksum of the LSAs.

Length Displays the length (in bytes) of the LSA.

Displays the network mask of the route corresponding to the


Network Mask
LSA.

TOS TOS value, which can be only 0 now.

Metric Displays the metric of the route corresponding to the LSA.


The following example displays the output of the show ip ospf database external command.
Ruijie# show ip ospf database external
OSPF Device with ID ([Link]) (Process ID 1)
AS External Link States
LS age: 752
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: AS-external-LSA
Link State ID: [Link] (External Network Number)
Advertising Device: [Link]
LS Seq Number: 8000000a
Checksum: 0x7627
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: [Link]

5-75
Command Reference OSPFv2 Commands

External Route Tag: 0


The following table describes the fields in the output of the show ip ospf database external
command.
Field Description

OSPF Device with ID Displays the router ID.

Type-5 AS External
Displays autonomous external LSA information.
Link States

LS age Displays the keepalive period of the LSA.

Options Option

LS Type Displays the type of the LSA.

Link State ID Displays the link ID of the LSA.

Advertising Router Displays the device advertising the LSA

LS Seq Number Displays the sequence number of the LSA.

Checksum Displays the checksum of the LSAs.

Length Displays the length (in bytes) of the LSA.

Displays the network mask of the route corresponding to the


Network Mask
LSA.

Metric Type Indicates the external link type.

TOS TOS value, which can be 0 only now.

Metric Displays the metric of the route corresponding to the LSA.

IP address through which traffic is forwarded to the destination


Forward Address network. If this address is [Link], the data traffic will be
forwarded to the device that generates the link state.

External route tag. Each external route has a 32-byte route


tag. The OSPF does not use the route tag by itself, but it will
External Route Tag
be used by other routing processes to redistribute OSPF
routes.
The following example displays the output of the show ip ospf database network command:
Ruijie# show ip ospf database network
OSPF Router with ID ([Link]) (Process ID 1)
Network Link States (Area [Link])
LS age: 572
Options:0x2 (*|-|-|-|-|-|E|-)
LS Type:network-LSA
Link State ID:[Link] (address of Designated Router)
Advertising Router:[Link]
LS Seq Number: 80000001
Checksum:0x5366
Length: 32
Network Mask: /24
Attached Router:[Link]

5-76
Command Reference OSPFv2 Commands

Attached Router:[Link]
The following table describes the fields in the output of the show ip ospf database network
command.
Field Description

Displays the router ID corresponding to the follow-up


OSPF Router with ID
information and the process ID corresponding to the OSPF.

Network LinStates Displays the network LSA information.

LS age Displays the keepalive period of the LSA.

Options Option

LS Type Displays the type of the LSA.

Link State ID Displays the link ID of the LSA.

Advertising Device Displays the device advertising the LSA.

LS Seq Number Displays the sequence number of the LSA.

Checksum Displays the checksum of LSAs.

Length Displays the length (in bytes) of the LSA.

Displays the network mask of the network corresponding to


Network Mask
the LSA.

Attached Router Displays the device that is connected with the network.
The following example displays the output of the show ip ospf database device command:
Ruijie# show ip ospf database router
OSPF Router with ID ([Link]) (Process ID 1)
Router Link States (Area [Link])
LS age: 322
Options:0x2 (*|-|-|-|-|-|E|-)
Flags:0x3 :ABR ASBR
LS Type:router-LSA
Link State ID:[Link]
Advertising Router:[Link]
LS Seq Number: 80000012
Checksum:0x6d3a
Length: 48
Number of Links: 2
Link connected to:Stub Network
(Link ID) Network/subnet number: [Link]
(Link Data) Network Mask: [Link]
Number of TOS metrics: 0
TOS 0 Metric: 0
The following table describes the fields in the output of the show ip ospf database device
command.

Field Description

5-77
Command Reference OSPFv2 Commands

OSPF Device
Displays the router ID.
with ID

Device Link
Displays the device LSA information.
States

LS age Displays the keepalive period of the LSA.

Options Option

Flag Flag

LS Type Displays the type of the LSA.

Link State ID Displays the link ID of the LSA.

Advertising
Displays the device advertising the LSA.
Router

LS Seq Number Displays the sequence number of the LSA.

Checksum Displays the checksum of LSAs.

Length Displays the length (in bytes) of the LSA.

Number of Links Displays the number of links associated with the device.

Link connected to Displays what the link is connected to and the network type.

(Link ID) Link identifier

(Link Data) Link data

Number of TOS
TOS value, supporting TOS0 only
metrics

TOS 0 Metrics TOS0 metric

The following example displays the output of the show ip ospf database summary command:
Ruijie# show ip ospf database summary
OSPF Device with ID ([Link]) (Process ID 1)
Summary Link States (Area [Link])
LS age: 499
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: summary-LSA
Link State ID: [Link] (summary Network Number)
Advertising Device: [Link]
LS Seq Number: 80000004
Checksum: 0x330e
Length: 28
Network Mask: /24

5-78
Command Reference OSPFv2 Commands

TOS: 0 Metric: 11

The following table describes the fields in the output of the show ip ospf database summary
command.

Field Description

OSPF Router
Displays the router ID.
with ID

Summary Net
Displays the summary network LSA information.
Link States

LS age Displays the keepalive period of the LSA.

Options Option

LS Type Displays the type of the LSA.

Link State ID Displays the link ID of the LSA.

Advertising
Displays the device advertising the LSA.
Router

LS Seq Number Displays the sequence number of the LSA.

Checksum Displays the checksum of LSAs.

Length Displays the length (in bytes) of the LSA.

Network Mask Displays the network mask of the route corresponding to the LSA.

TOS TOS value, supporting only 0 now

Metric Displays the metric of the route corresponding to the LSA.

The following example displays the output of the show ip ospf database nssa-external command:
Ruijie# show ip ospf database nssa-external
OSPF Device with ID ([Link]) (Process ID 1)
NSSA-external Link States (Area [Link] [NSSA])
LS age: 1
Options: 0x0 (*|-|-|-|-|-|-|-)
LS Type: AS-NSSA-LSA
Link State ID: [Link] (External Network Number For NSSA)
Advertising Device: [Link]
LS Seq Number: 80000001
Checksum: 0x033c
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)

5-79
Command Reference OSPFv2 Commands

TOS: 0
Metric: 20
NSSA: Forward Address: [Link]
External Route Tag: 0
The following table describes the fields in the output of the show ip ospf database nssa-external
command.

Field Description

OSPF Router
Displays the router ID.
with ID

NSSA-external
Displays the type 7 autonomous external LSA information.
Link States

LS age Displays the keepalive period of the LSA.

Options Option

LS Type Displays the type of the LSA.

Link State ID Displays the link ID of the LSA.

Advertising
Displays the device advertising the LSA.
Router

LS Seq Number Displays the sequential number of the LSA.

Checksum Displays the checksum of the LSAs.

Length Displays the length (in bytes) of the LSA.

Network Mask Displays the network mask of the route corresponding to the LSA.

Metric Type Displays the metric type.

TOS TOS value, which can be 0 only now.

Metric Displays the metric of the route corresponding to the LSA.

IP address through which traffic is forwarded to the destination


NSSA:Forward
network. If this address is [Link], the data traffic will be forwarded to
Address
the device that generates the link state.

External route tag. Each external route has a 32-byte route tag. The
External Route
OSPF does not use the route tag by itself, but it will be used in
Tag
redistributing OSPF routes by other routing process.

5-80
Command Reference OSPFv2 Commands

The following example displays the output of the show ip ospf database external command:
Ruijie# show ip ospf database external
OSPF Device with ID ([Link]) (Process ID 1)
AS External Link States
LS age: 1290
Options: 0x2 (*|-|-|-|-|-|E|-)
LS Type: AS-external-LSA
Link State ID: [Link] (External Network Number)
Advertising Device: [Link]
LS Seq Number: 8000000a
Checksum: 0x7627
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: [Link]
External Route Tag: 0

The following table describes the fields in the output of the show ip ospf database external
command.

Field Description

OSPF Device
Displays the router ID.
with ID

Type-7 AS
External Displays the type 7 autonomous external LSA information.
Link States

LS age Displays the keepalive period of the LSA.

Options Option

LS Type Displays the type of the LSA.

Link State ID Displays the link ID of the LSA.

Advertising
Displays the device advertising the LSA.
Router

LS Seq Number Displays the sequence number of the LSA.

Checksum Displays the checksum of the LSAs.

Length Displays the length (in bytes) of the LSA.

Network Mask Displays the network mask of the route corresponding to the LSA.

Metric Type Displays the metric type.

5-81
Command Reference OSPFv2 Commands

TOS TOS value, which can be 0 only now.

Metric Displays the metric of the route corresponding to the LSA.

IP address through which traffic is forwarded to the destination


Forward Address network. If this address is [Link], the data traffic will be forwarded to
the device that generates the link state.

External route tag. Each external route has a 32-byte route tag. The
External Route
OSPF does not use the route tag by itself, but it will be used in
Tag
redistributing OSPF routes by other routing process.

The following example displays the output of the show ip ospf database database-summary
command:
Ruijie# show ip ospf database database-summary
OSPF process 1:
Device Link States : 4
Network Link States : 2
Summary Link States : 4
ASBR-Summary Link States : 0
AS External Link States : 4
NSSA-external Link States: 2
The following table describes the fields in the output of the command show ip ospf database
database-summary.

Field Description

OSPF Process OSPF process ID

Router Link Number of device LSAs in the area

Network Link Number of network LSAs in the area

Summary Link Number of summary LSAs in the area

ASBR-Summary
Number of ASBR summary LSAs in the area
Link

AS External Link Number of NSSA LSAs in the area

NSSA-external
Number of NSSA LSAs in the area
Link

Related
Command Description
Commands
N/A N/A

5-82
Command Reference OSPFv2 Commands

Platform N/A
Description

5.53 show ip ospf interface

Use this command to display the OSPF-associated interface information.


show ip ospf [ process-id ] interface [ interface-type interface-number | brief ]

Parameter
Parameter Description
Description
process-id OSPF process ID
interface-type (Optional) type of the specified interface
interface-number (Optional) number of the specified interface
brief Displays the summary of the interface.

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide This command displays the OSPF information on the interface.

Configuration The following example displays the output of the show ip ospf interface GigabitEthernet 0/1
Examples command:
Ruijie# show ip ospf interface GigabitEthernet0/1
GigabitEthernet 0/1 is up, line protocol is up
Internet Address [Link]/24, Ifindex 4, Area [Link], MTU 1500
Matching network config: [Link]/24
Process ID 1, Router ID [Link], Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1,BFD enabled
Designated Router (ID) [Link], Interface Address [Link]
Backup Designated Router (ID) [Link], Interface Address [Link]
Timer intervals configured,Hello 10,Dead 40,Wait 40,Retransmit 5
Hello due in 00:00:03
Neighbor Count is 1, Adjacent neighbor count is 1
Crypt Sequence Number is 70784
Hello received 1786 sent 1787, DD received 13 sent 8
LS-Req received 2 sent 2, LS-Upd received 29 sent 53
LS-Ack received 46 sent 23, Discarded 1
The following table describes the fields in the output of the show ip ospf interface serial1/0
command.
Field Description

5-83
Command Reference OSPFv2 Commands

GigabitEthernet 0/1 State of the network interface; UP means normal working and
State Down means faults.

Internet Address Interface IP address

Area OSPF area of the interface

MTU Corresponding MTU

Matching network config Network area configured for the corresponding OSPF

Process ID Corresponding process ID

Router ID OSPF router id

Network Type OSPF network type

Cost OSPF interface cost

Transmit Delay is OSPF interface transmit delay

State DR/BDR state ID

Priority Priority of the interface

Designated Router(ID) DR ID of the interface

DR's Interface address Address of the DR of the interface

Backup designated
Router ID of the BRD of the interface
device(ID)

BDR's Interface address Address of the BDR of the interface

Time intervals
Hello, Dead, Wait, and Retransmit intervals of the interface
configured

Hello due in Time when the previous Hello is sent

Neighbor count Total number of neighbors

Adjacent neighbor count Number of Full neighbors

The corresponding md5 authentication number of the


Crypt Sequence Number
interface

Hello received send Statistics on the Hello packets sent and received

DD received send Statistics on the DD packets sent and received

LS-Req received send Statistics on the LS request packets sent and received

LS-Upd received send Statistics on the LS update packets sent and received

LS-Ack received send Statistics on the LS response packets sent and received

Discard Statistics on the discarded OSPF packets

BFD enabled Enables BFD for OSPF.

Related
Command Description
Commands
N/A N/A

Platform N/A

5-84
Command Reference OSPFv2 Commands

Description

5.54 show ip ospf neighbor

Use this command to display the OSPF neighbor list.


show ip ospf [ process-id ] neighbor [ statistics | [ interface-type interface-number ] | [ neighbor-id ]
| [ detail ] ]

Parameter
Parameter Description
Description
detail (Optional) Displays the neighbor details.
interface-type
(Optional) Displays the neighbor information of the specified interface
interface-number
neighbor-id (Optional) Displays the information of the specified neighbor
statistics (Optional) Displays the neighbor statistics.

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide This command displays neighbor information usually used to check whether the OSPF is running
normally.

Configuration The following example displays the output of the show ip ospf neighbor command.
Examples Ruijie# show ip ospf neighbor
OSPF process 1, 1 Neighbors, 1 is Full:
Neighbor ID Pri State BFD State Dead Time Address Interface
[Link] 1 Full/BDR Up 00:00:32 [Link]
GigabitEthernet 0/1

Ruijie# show ip ospf neighbor detail


Neighbor [Link], interface address [Link]
In the area [Link] via interface GigabitEthernet 0/1
Neighbor priority is 1, State is Full, 11 state changes
DR is [Link], BDR is [Link]
Options is 0x52 (*|O|-|EA|-|-|E|-)
Dead timer due in 00:00:32
Neighbor is up for 05:11:27
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
Crypt Sequence Number is 0
Thread Inactivity Timer on

5-85
Command Reference OSPFv2 Commands

Thread Database Description Retransmission off


Thread Link State Request Retransmission off
Thread Link State Update Retransmission off
Thread Poll Timer on
Graceful-restart helper disabled
BFD session state up
The following table describes the fields in the output of the show ip ospf neighbor command.
Field Description

Neighbor ID Neighbor ID

Pri Neighbor priority (for selection of DR)

State Neighbor status

Dead Time Remaining time for the neighbor to enter the Dead status

Address Interface address of the neighbor

Interface Interface of the neighbor

interface address Interface address of the neighbor device

In the area Displays the area that learns the neighbor.

via interface Displays the interface that learns the neighbor

Neighbor priority Priority of the neighbor OSPF

OSPF neighbor connection state. FULL means the stable state;


DR indicates that the neighbor is the designated device; BDR
State indicates that the neighbor is the backup designated device;
DROTHER indicates that the neighbor is not a DR/BDR.
Point-to-point network type has no DR or DBR.

State changes times Times of state changes

Dead Time Dead time of the neighbor

Interface address of the DR elected by the neighbor device (that


DR
is, the DR field of the Hello packet)

Interface address of the BDR elected by the neighbor device (that


BDR
is, the BDR field of the Hello packet)

Hello packet E-bit option, where 0 indicates that the area is a


Options
STUB area; 2 indicates that the area is not a STUB area.

Dead timer due in Dead time of the neighbor device

Neighbor up time Period from when the device is discovered till now

Database Summary
Statistics on the neighbor DD packets
List

LinkState Request
Statistics on the neighbor LS request packets
List

LinkState
Statistics on the neighbor re-transmit packets
Retransmission List

5-86
Command Reference OSPFv2 Commands

Crypt Sequence
Area MD5 authentication code
Number

Thread Inactivity
Status of invalid neighbor timer
Timer

Thread Database
Description Status of DD packet timer of the interface
Retransmission

ThreadLinkState
Request Status of LS request packet timer of the interface
Retransmission

ThreadLinkState
Update Status of LS update packet timer of the interface
Retransmission

Thread Poll Timer Poll Timer start status of the static neighbor

Graceful-restart Whether it is able to function as the GR Helper of a specified


helper neighbor

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.55 show ip ospf route

Use this command to display the OSPF routes.


show ip ospf [ process-id ] route [ count | ip-address mask ]

Parameter
Parameter Description
Description
OSPF process ID. All OSPF routes will be displayed without an ID
process-id
specified.
count Statistics of various OSPF routes
ip-address mask Statistics of routes which have a specified prefix and mask.

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide This command displays the OSPF routing information. The count option displays the OSPF routing

5-87
Command Reference OSPFv2 Commands

statistics.

Configuration The following example displays the output of the show ip ospf route command.
Examples Ruijie# show ip ospf route
OSPF process 1:
Codes: C - connected, D - Discard , O - OSPF,
IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external
type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
E2 [Link]/24 [1/20] via [Link], GigabitEthernet 0/1
C [Link]/24 [1] is directly connected,GigabitEthernet 0/1,Area [Link]
The following table describes the fields in the output of the show ip ospf route command.
Field Description

codes Route type and corresponding abbreviation and description

[Link]/24 Route prefix

[1] Route cost

via Route next hop and interface

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.56 show ip ospf spf

Use this command to display the routing count in the OSPF area.
show ip ospf [ process-id ] spf

Parameter
Parameter Description
Description
process-id OSPF process ID

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide This command displays the routing counts within the latest 30 minutes in the OSPF area and current
routing total counts.

Configuration The following example displays the output of the show ip ospf [process-id] spf command:

5-88
Command Reference OSPFv2 Commands

Examples Ruijie# show ip ospf 1 spf

OSPF process 1:
Area_id 30min_counts Total_counts
0 32 1235
1 6 356
The following table describes the fields in the output of the show ip ospf [process-id] spf command.
Field Description

Area_id OSPF area ID

30min_counts OSPF routing counts within the latest 30 minutes

Total_counts Total counts of the OSPF routing till now

Related
Command Description
Commands
show ip ospf Displays the OSPF summary.

Platform N/A
Description

5.57 show ip ospf summary-address

Use this command to display the converged route of all redistributed routes.
show ip ospf [ process-id ] summary-address

Parameter
Parameter Description
Description
ID of the OSPF process. All OSPF routing processes will be
process-id
displayed if this parameter is not configured.

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide This command is valid only on the NSSA ABR, and displays only the routes with local aggregation
operations.

Configuration The following example displays the output of the show ip ospf summary-address command:
Examples Ruijie# show ip ospf summary-address
OSPF Process 1, Summary-address:
[Link]/16, Metric 20, Type 2, Tag 0, Match count 3, advertise
Field Description

5-89
Command Reference OSPFv2 Commands

Summary Address IP address to be aggregated

Summary Mask Mask to be aggregated

Advertise Whether to advertise the aggregated route

Status Whether the aggregation range takes effect

Aggregated subnets Number of external routes included in the aggregation range

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.58 show ip ospf virtual-link

Use this command to display the OSPF virtual link information.


show ip ospf [ process-id ] virtual-link [ ip-address ]

Parameter
Parameter Description
Description
ID of the OSPF process. All OSPF routing processes will be
process-id
displayed if this parameter is not configured.
ip-address Associated ID of a virtual link neighbor

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide If no virtual link is configured, the command displays the neighbor status and other related
information. The show ip ospf neighbor command does not display the neighbor of the virtual link.

Configuration The following is the output of the show ip ospf virtual-links command:
Examples Ruijie# show ip ospf virtual-links
Virtual Link VLINK0 to device [Link] is up
Transit area [Link] via interface GigabitEthernet 0/1
Local address [Link]/32
Remote address [Link]/32
Transmit Delay is 1 sec, State Point-To-Point,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Adjacency state Full
The following table describes the fields in the output.

5-90
Command Reference OSPFv2 Commands

Field Description

Virtual Link VLINK0 to


Displays the virtual link neighbors and their status.
router

Virtual Link State Displays the virtual link state.

Transit area Displays the transit area of the virtual link.

via interface Displays the associated interface of the virtual link.

Local address Local interface address

Remote Address Peer interface address

Transmit Delay Displays the transmit delay of the virtual link.

State Interface state

Time intervals
Hello, Dead, Wait, and Retransmit interval of the interface
configured

Adjacency State Neighbor state, where FULL means the stable state

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

5.59 summary-address

Use this command to configure the aggregate route out of the OSPF routing domain. Use the no form
of this command to restore the remove the aggregate route.
summary-address ip-address net-mask [ not-advertise | tag value | cost cost ]
no summary-address ip-address net-mask [ not-advertise | tag | cost]

Parameter
Parameter Description
Description
ip address IP address of the aggregate route
net-mask Network mask of the aggregate route
Does not advertise the aggregate route. If the parameter is not
not-advertise
configured, the aggregate route is advertised.
Sets the tag value of an aggregate route. The range is from 0 to
tag value
4,294,967,295.
cost cost Cost value of the aggregate route. The range is from 0 to 16,777,214.

Defaults No aggregate route is configured by default.

Command Routing process configuration mode

5-91
Command Reference OSPFv2 Commands

Mode

Usage Guide When routes are redistributed by another routing process into the OSPF routing process, every route
is advertised to the OSPF-enabled device separately in external LSAs. If the incoming routes are
continuous addresses, the autonomous border device can advertise only one aggregate route,
reducing the scale of routing table greatly.
Unlike the area range command, the area range command aggregates inter-OSPF-area routes,
while the summary-address command aggregates external routes of the OSPF routing domain.
For the NSSA, the summary-address command is valid only on the NSSA ABR now, and
aggregates only redistributed routes.

Configuration The following example generates an external aggregate route [Link]/16.


Examples Ruijie(config)# router ospf20
Ruijie(config-router)# summary-address100.100.0.0 [Link]
Ruijie(config-router)# redistribute static subnets
Ruijie(config-router)# network200.2.2.0 [Link] area 1
Ruijie(config-router)# network172.16.24.0 0.0.0.255area 0
Ruijie(config-router)# area1nssa

Related
Command Description
Commands
Configures route convergence on the OSPF
area-range
area border device.
redistribute Redistributes routes of other routing processes.

Platform N/A
Description

5.60 timers lsa arrival

Use this command to configure the time delay for the same LSA received. Use the no form of this
command to restore the default setting.
timers lsa arrival arrival-time
no timers lsa arrival

Parameter
Parameter Description
Description
Configures the time delay when receiving the same LSA. The range
arrival-time
is from 0 to 600000 in the unit of milliseconds.

Defaults The default is 1000 milliseconds.

Command
Mode Routing process configuration mode

5-92
Command Reference OSPFv2 Commands

Usage Guide No action is done when the same LSA is received within the specified time.

Configuration The following example configures the time delay for the same LSA as 2 seconds.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# timers lsa arrival 2000

Related
Command Description
Commands
show ip ospf Displays the OSPF information.

Platform N/A
Description

5.61 timers pacing lsa-group

Use this command to configure the LSA grouping and then refresh the whole groups as well as the
update interval for the aged link state. Use the no form of this command to restore the default setting.
timers pacing lsa-group seconds
no timers pacing lsa-group

Parameter
Parameter Description
Description
Parameter used for LSA pacing, checksum calculation, and aging
seconds interval.
The range is from 10 to1800 in the unit of seconds.

Defaults The default is 30.

Command
Mode Routing process configuration mode

Usage Guide Each LSA has its own update and aging time (LSA age). If you update and age LSAs separately,
many CPU resources will be consumed. To effectively use CPU resources, you can update LSAs of a
device in batches.
You can use this command to modify the value of seconds, whose default value is 240 seconds. This
parameter needs not to be adjusted often. The optimal group pacing interval is inversely proportional
to the number of LSAs that need to be calculated. For example, if you have approximately 10000
LSAs in the database, decreasing the pacing interval would be better. If the switch has a small
database (40 to 100 LSAs), increasing the pacing interval to 10 to 20 minutes might be better.

Configuration The following example configures the pacing time as 120 seconds.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# timers paing lsa-group 120

5-93
Command Reference OSPFv2 Commands

Related
Command Description
Commands
show ip ospf Displays the OSPF information.

Platform N/A
Description

5.62 timers pacing lsa-transmit

Use this command to transmit the LSA grouping updating. Use the no form of this command to
restore the default setting.
timers pacing lsa-transmit transmit-time transmit-count
no timers pacing lsa-transmit

Parameter
Parameter Description
Description
Configures the interval of sending the LSA grouping. The range is
transmit-time
from 10 to 1000.
Configures the number of LS-UPD packets per group. The range is
transmit-count
from 1 to 200.

Defaults The default configurations are as follows:


Transmit-time: 40 milliseconds.
Transmit-count: 1

Command
Mode Routing process configuration mode

Usage Guide If there are a large number of LSAs and the load on the system is heavy, you can properly use the
transmit-time and transmit-count to inhibit the flooding LS-UPD packet number in the network.
If the CPU and network bandwidth loads are not too much, reduce transimi-time and increase
transimit-count to quicken the environment convergence.

Configuration The following example sets the interval of sending the LS-UPD packets as 50ms, the packets number
Examples as 20.
Ruijie(config)# router ospf 1
Ruijie(config-router)# timers pacing lsa-transmit 50 20

Related
Command Description
Commands
Displays the OSPF process information,
show ip ospf
including the router ID.

5-94
Command Reference OSPFv2 Commands

Platform N/A
Description

5.63 timers spf

Use this command to configure the delay for SPF calculation after the OSPF receives the topology
change as well as the interval between two SPF calculations. Use the no form of this command to
restore the default setting.
timers spf spf-delay spf-holdtime
no timers spf

Parameter
Parameter Description
Description
Defines the SPF calculation waiting period in seconds. The range is
from 0 to [Link] receiving the topology change, the OSPF
spf-delay
routing process must wait for the specified period to start the SPF
calculation.
Defines the interval between two SPF calculations in seconds. The
range is from 0 to [Link] the waiting time is up but the
spf-holdtime
interval between two calculations is still elapsing, the SPF calculation
cannot start.

Defaults By default, the timers spf command takes no effect. Spf-delay depends on the default configuration of
the timers throttle spf command.

Command
Mode Routing process configuration mode

Usage Guide Smaller values of spf-delay and spf-holdtime mean that OSPF adapts to the topology change faster,
and the network convergence period is shorter, but this will occupy more CPU of the router.

The configurations of the timers spf command and the timers throttle spf command may
overwrite each other.

Configuration The following example configures the delay and holdover period of the OSPF as 3 and 9 seconds
Examples respectively.
Ruijie(config)# router ospf 1
Ruijie(config-router)# timersspf 3 9

Related
Command Description
Commands
Displays the configuration information of the
show ip ospf
ospf.
timers throttle spf Configures the exponential back off delay for

5-95
Command Reference OSPFv2 Commands

SPF calculation. The command is


recommended to replace the timers spf
command because it is more powerful.

Platform N/A
Description

5.64 timers throttle lsa all

Use this command to configure the exponential back off algorithm for the LSA. Use the no form of this
command to restore the default setting.
timers throttle lsa all delay-time hold-time max-wait-time
no timers throttle lsa all

Parameter
Parameter Description
Description
Configures the time delay of generating the LSA first. The range is
delay-time
from 1 to 600000.
Configures the minimum interval of refreshing the LSA between the
hold-time
first time and second time. The range is from1 to 600000.
Configures the maximum interval of successive refreshing the LSA.,
max-wait-time which determines whether the LSA is refreshed successively. The
range is from1 to 600000

Defaults The default configurations are as follows:


Delay-time: 0 millisecond,
Hold-time: 5000 milliseconds,
Max-wait-time: 5000 milliseconds.

Command
Mode Routing process configuration mode

Usage Guide If high convergence performance is required for the link change, the value of delay-time can be
relatively small. if you expect to reduce the CPU consumption, increase appropriately several values.

The value of hold-time cannot be smaller than that of delay-time, and the value of max-wait-time
cannot be smaller than that of hold-time.

Configuration The following example configures the first delay as 10ms, hold-time as 1second and the longest delay
Examples as 5seconds.
Ruijie(config)# router ospf 1
Ruijie(config-router)# timers throttle lsa all 10 1000 5000

5-96
Command Reference OSPFv2 Commands

Related
Command Description
Commands
Displays the configuration information of the
show ip ospf
ospf

Platform N/A
Description

5.65 timers throttle route

Use this command to configure the delay time of route calculation on receiving the ASBR summary
LSA and the external summary LSA. Use the no form of this command to restore the default setting.
timers throttle route { inter-area ia-delay | ase ase-delay }
no timers throttle route { inter-area | ase }

Parameter
Parameter Description
Description
inter-area Calculates the inter area routes.
Sets the delay time of the inter-area route calculation, in the range
from 0 to 600,000 in the unit of milliseconds. On receiving the ASBR
ia-delay
summary LSA, the router will not calculate the inter-area routes until
the ia-delay time runs out.
ase Calculates the external routes.
Defines the delay time of the external route calculation, in the range
from 0 to 600,000 in the unit of milliseconds. On receiving the
ase-delay
external summary LSA, the router will not calculate the external
routes until the ase-delay time runs out.

Defaults The default values are as follows:


ia-delay: 0,
ase-delay: 0,

Command
Mode Routing process configuration mode

Usage Guide The default setting is recommended if the network needs to be fast converged. For the instable
network where multiple inter-area and external routes exist, if you want to optimize the route
calculation and save the CPU resources, increase the delay time.

Configuration The following example sets the .delay time of the inter-area route calculation to one second.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# timers throttle route inter-area 1000

Related Command Description

5-97
Command Reference OSPFv2 Commands

Commands
N/A N/A

Platform N/A
Description

5.66 timers throttle spf

Use this command to configure the topology change information for OSPF, including the delay for
SPF calculation as well as the interval between two SPF calculations in routing process configuration
mode. Use the no form of this command to restore the default setting.
timers throttle spf spf-delay spf-holdtime spf-max-waittime
no timers throttle spf

Parameter
Parameter Description
Description
Defines the SPF calculation waiting period, in the unit of milliseconds,
in the range from1 to 600,000. After receiving the topology change,
spf-delay
the OSPF routing process must wait for the specified period to start
the SPF calculation.
Defines the interval between two SPF calculations in seconds in the
spf-holdtime
range from1 to 600,000.
Defines the maximum interval between two SPF calculations, in
spf-max-waittime
milliseconds in the range from1 to 60,0000.

Defaults The default configurations are as follows:


spf-delay: 1000ms;
spf-holdtime: 5000ms;
spf-max-waittime: 10000ms.

Command
Mode Routing process configuration mode

Usage Guide The spf-delay parameter indicates the delay time of the topology change to the SPF calculation.
The spf-holdtime parameter indicates the minimum interval between two SPF calculations. Then, the
interval of the consecutive SPF calculations is at least twice as the last interval until it reaches to
spf-max-waittime. If the interval between two SPF calculations has exceeded the required value, the
SPF calculation will restart from spf-holdtime.
Smaller spf-delay and spf-holdtime values can make the topology converge faster. A greater
spf-max-waittime value can reduce the system resource consumption of SPF calculation. Those
configurations can be flexibly adjusted according to the actual stability of the network topology.
Compared with the timers spf command, this command is more flexible. It speeds up the SPF
calculation convergence, and reduces the system resource consumption of SPF calculation due to
the topology change. To this end, the timers throttle spf command is recommended.

5-98
Command Reference OSPFv2 Commands

The value of spf-holdtime cannot be smaller than the value of spf-delay, or the value
ofspf-holdtime will be set to be equal to the value of spf-delay;
The value of spf-max-waitime cannot be smaller than the value of spf-holdtime, or the value of
spf-max-waittime will be set to be equal to the value of spf-holdtime automatically;
The configurations of the timers spf command and the timers throttle spf command may
overwrite each other.
If both the timers spf command and the timers throttle spf command are not configured, the
default value of the timers throttle spf command is used.

Configuration The following example configures the delay and holdtime and the maximum time interval of the OSPF
Examples as 5ms, 1000ms and 90000ms respectively. If the topology changes consecutively, the SPF
calculation intervals are: 5ms, 1second, 3 seconds, 7 seconds, 15 seconds, 31 seconds, 63 seconds,
89 seconds, 179 seconds, 179+90seconds…
Ruijie(config)# routerospf20
Ruijie(config-router)# timersspf 5 1000 90000

Related
Command Description
Commands
show ip ospf Displays the configuration information of OSPF
Configures the SPF calculation delay. This
command is supported in versions earlier than
timers spf RGOS 10.4. It is recommended to replace the
timers spf command with the timers throttle spf
command.

Platform N/A
Description

5.67 two-way-maintain

Use this command to enable the OSPF two-way-maintain function. Use the no form of this command
to disable this function.
two-way-maintain
no two-way-maintain

Parameter
Parameter Description
Description
N/A N/A

Defaults This function is enabled by default.

Command
Mode Routing process configuration mode

5-99
Command Reference OSPFv2 Commands

Usage Guide In the large-scale network, partial packets delay or dropped may exist due to much CPU and memory
are occupied caused by lots of packet transmission. If the Hello packets are handled over
dead-interval, the corresponding adjacency will be disconnected. In this case, you can enable the
two-way-maintain function for the packets such as DD, LSU, LSR and LSAck packets from a neighbor
in the network (except for the Hello packets), avoiding the neighbor invalidation caused by delayed or
dropped Hello packets.

Configuration The following example disables the OSPF two-way-maintain function.


Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# notwo-way-maintain

Related
Command Description
Commands
Displays the configuration information of the
show ip ospf
OSPF

Platform N/A
Description

5-100
Command Reference OSPFv3 Commands

6 OSPFv3 Commands

6.1 area authentication

Use this command to configure OSPFv3 area authentication. Use the no form of this command to
restore the default settings.
area area-id authentication ipsec spi spi [ md5 [string-key] | sha1 ] [ 0 | 7 ] key
no area area-id authentication

Parameter
Parameter Description
Description
Specifies an area ID.
area-id
It can be an integer or the prefix of an IPv4 address.
Specifies a security parameter index, in the range from 256 to
spi
4294967295.
md5 Specifies a message digest 5 (MD5) authentication mode.
string-key Indicates that MD5 authentication key supports special characters.
sha1 Specifies a secure hash algorithm 1 (SHA1) authentication mode.
0 Indicates that a key is displayed in a plain-text format.
7 Indicates that a key is displayed in a cipher-text format.
key Specifies an authentication key.

Defaults Authentication is not performed by default.

Command Routing process configuration mode


Mode

Usage Guide RGOS supports three authentication modes:


 null authentication mode, which is configured when authentication is not needed
 MD5 authentication mode
 SHA1 authentication mode
If OSPFv3 area authentication is configured, the configuration takes effect on all interfaces (except for
those of virtual links) in the area. Interface authentication configuration, however, takes precedence
over area authentication configuration.

Configuration The following example specifies MD5 authentication for area 1 where OSPFv3 routing processes
Examples reside, and sets the authentication password to aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.
Ruijie(config-router)# area 1 authentication ipsec spi 300 md5
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Ruijie(config-router)#area 0 authentication ipsec spi 606 md5 string-key ruijie@123
Ruijie(config-router)#show this

6-1
Command Reference OSPFv3 Commands

Building configuration...
!
graceful-restart
area 0 authentication ipsec spi 606 md5 string-key ruijie@123
area 1 authentication ipsec spi 300 md5 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
!
end
Ruijie(config-router)#

Related
Command Description
Commands
ipv6 ospf authentication Specifies interface authentication.
area virtual-link authentication Specifies virtual link authentication.

Platform N/A
Description

6.2 area default-cost

Use this command to set the cost of the default route for the ABR in the stub or NSSA area. Use the
no form of this command to restore the default settings.
area area-id default-cost cost
no area area-id default-cost

Parameter
Parameter Description
Description
Area ID of the stub or NSSA area.
area-id
It can be an integer or an IPv4 prefix.
Cost of the default route of the stub or NSSA area in the range from 0
cost
to 16777215.

Defaults The default cost is 1.

Command
Routing process configuration mode.
Mode

Usage Guide This command can only work in the ABR connected to the stub area.

Configuration The following example sets the cost of the default route of stub area 50 to 100.
Examples ipv6 router ospf 1
area 50 stub
area 50 default-cost 100

Related Command Description

6-2
Command Reference OSPFv3 Commands

Commands
area stub Sets a stub area.

Platform N/A
Description

6.3 area encryption

Use this command to enable encryption authentication for an OSPFv3 area. Use the no form of this
command to restore the default settings.
area area-id encryption ipsec spi spi esp [ null | [ des | 3des | aes-cbc [128 | 192 | 256] ] [ 0 | 7 ]
des-key ] [ md5 | sha1 ] [ 0 | 7 ] key
no area area-id encryption

Parameter
Parameter Description
Description
Specifies an area ID.
area-id
It can be an integer or the prefix of an IPv4 address.
Specifies a security parameter index, in the range from 256 to
spi
4294967295.
null Uses the null encryption mode.
des Uses Data Encryption Standard (DES) encryption mode.
3des Uses 3DES encryption mode.
Uses Advanced Encryption Standard-Cipher Block Chaining
aes-cbc[ 128 | 192 | 256 ]
encryption mode. The key length is 128,192,256 bytes.
des-key Encryption key
md5 Specifies the MD5 authentication mode.
sha1 Specifies the SHA1 authentication mode.
0 Indicates that a key is displayed in the plain-text format.
7 Indicates that a key is displayed in the cipher-text format.
Key Specifies an authentication key.

Defaults Encryption authentication is not performed by default.

Command
Routing process configuration mode
Mode

Usage Guide RGOS supports the null encryption mode and two authentication modes: MD5 and SHA1.
If encryption authentication is configured for an OSPFv3 area, the configuration takes effect on all
interfaces (except for those of virtual links) in the area. Encryption authentication configuration on
interfaces, however, takes precedence over that of the OSPFv3 area.

Configuration The following example specifies null encryption and MD5 authentication for area 1 where OSPFv3

6-3
Command Reference OSPFv3 Commands

Examples routing processes reside, and sets the authentication password to


aaaaaaaaaaaaaaaaaaaaaaaaaaaaa.
Ruijie(config-router)# area 1 encryption ipsec spi 300 esp null md5
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Related
Command Description
Commands
ipv6 ospf encryption Specifies interface encryption authentication.
area virtual-link encryption Specifies virtual link encryption authentication.

Platform N/A
Description

6.4 area range

Use this command to set the range of the converged inter-area addresses. Use the no form of this
command to restore the default settings.
area area-id range ipv6-prefix/prefix-length [ advertise | not-advertise ]
no area area-id range ipv6-prefix/prefix-length

Parameter
Parameter Description
Description
ID of the area in which the addresses are converged.
area-id
It can be an integer or an IPv4 prefix.
ipv6-prefix/prefix-length Range of the converged addresses.
advertise Advertises the range of converged addresses.
The range of the converged addresses is not advertised.
not-advertise
By default, the function is enabled.

Defaults No converged inter-area address range is defined by default.

Command
Routing process configuration mode
Mode

Usage Guide This command applies only to ABR. Use this command to converge multiple routes of an area into
one route and advertise it to other areas. This command applies only to ABR. Use this command to
converge multiple routes of an area into one route and advertise it to other areas. The routing
information combination only takes place on the area border. The specific routing information is seen
on the intra-area routers, but only one converged route can be seen on the devices in other areas. By
configuring the two options of advertise and not-advertise, you can decide whether to advertise the
convergence range to enable blocking and filtering. By default, the range is advertised to the outside.
The option cost can be used to set the metric value of convergence routing.
A number of route convergence commands can be defined. In this way, the number of the routes in
the OSPF AS is reduced. Particularly for a large network, the forwarding performance will be

6-4
Command Reference OSPFv3 Commands

improved.
When a number of routes are converged, and the containment relationship exists between items, the
area range converged is determined by the longest match principle.

Configuration The following example converges the routes in area 1.


Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# area 1 range 2001:abcd:1:2::/64

Related
Command Description
Commands
Sets the range of the external routes to be
summary-prefix
converged.

Platform N/A
Description

6.5 area stub

Use this command to create a stub area or set its attributes. Use the no form of this command to
restore the default settings.
area area-id stub [ no-summary ]
no area area-id stub [ no-summary ]

Parameter
Parameter Description
Description
ID of the stub area.
area-id
It can be an integer or an IPv6 prefix.
This option applies only to the ABR in the stub area, indicating that
no-summary the ABR only advertises the type 3 LSA indicating the default route to
the stub area, not other type 3 LSAs.

Defaults No stub area is defined by default.

Command
Mode Routing process configuration mode

Usage Guide If an area is at the end of an entire network, it can be designed as the stub area, in which all the
routers must execute the area stub command. If the area is designed as the stub area, it cannot learn
the AS external routing information (type 5 LSAs). In practical application, the external routing
information takes a large proportion of the link state database, so the devices in the stub area can
only learn very little routing information, thus reducing the system resources required for the running
of the OSPFv3 protocol.
By default, a type 3 LAS advertisement indicating default routing on the ABR in the stub area is
generated, then the devices in the stub area can get to the outside of the AS.

6-5
Command Reference OSPFv3 Commands

If a totally stub area needs to be configured, just select the keyword no-summary when executing the
area stub command on the ABR.

Configuration The following example enables the ABR in stub area 10 to advertise the default route to the stub area.
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# area 10 stub
Ruijie(config-router)# area 10 stub no-summary

Related
Command Description
Commands
Sets the cost of the default route in the stub
area default-cost
area.

Platform N/A
Description

6.6 area virtual-link

Use this command to create a virtual link or set its parameters. Use the no form of this command to
restore the default settings.
area area-id virtual-link router-id [ hello-interval seconds ] [ dead-interval seconds ]
[ retransmit-interval seconds ] [ transmit-delay seconds ] [ instance instance-id ] [ authentication
ipsec spi spi [ md5 | sha1 ] [ 0 | 7 ] key ] [ encryption ipsec spi spi esp null [ md5 | sha1 ] [ 0 | 7 ]
key ]
no area area-id virtual-link router-id [ hello-interval ] [ dead-interval ] [ retransmit-interval ]
[ transmit-delay ] [ instance ] [ authentication ] [ encryption ]

Parameter
Parameter Description
Description
ID of the area in which the virtual link is located.
area-id
It can be an integer or an IPv6 prefix.
router-id Neighbor router ID of the virtual link.
Sets the interval to send the hello message on the local virtual link
hello-interval seconds
interface in the range from 1 to 65535 in the unit of seconds.
Interval for the local interface of the virtual link to wait before
dead-interval seconds considering that the neighbor fails.
It is in the range from 1 to 65535 in the unit of seconds.
Interval for retransmitting LSA on the local interface of the virtual link .
retransmit-interval seconds
The range is from 1 to 65535 in the unit of seconds.
Delay on the local interface of the virtual link in sending LSA.
transmit-delay seconds
The range is from 1 to 65535 in the unit of seconds.
Specifies the instance corresponding to the virtual link. No virtual link
instance instance-id
can be established between different instances. Range: 0.-255

6-6
Command Reference OSPFv3 Commands

Specifies OSPFv3 authentication.

Authentication configuration on two neighboring devices must


be consistent. The service password-encryption command
enables a key to be displayed in the cipher-text format.

authentication ipsec spi spi specifies a security parameter index, in the range from 256 to
spi [ md5 | sha1 ] [ 0 | 7 ] key 4294967295.
md5 specifies the MD5 authentication mode.
sha1 specifies the SHA1 authentication mode.
0 indicates that a key is displayed in the plain-text format.
7 indicates that a key is displayed in the cipher-text format.
key specifies an authentication key.
Specifies OSPFv3 encryption authentication.

Authentication configuration on two neighboring devices must


be consistent. The service password-encryption command
enables a key to be displayed in the cipher-text format.

encryption ipsec spi spi spi specifies a security parameter index, in the range from 256 to
esp null [ md5| sha1 ] [ 0|7 ] 4294967295.
key null specifies the null encryption mode.
md5 specifies the MD5 authentication mode.
sha1 specifies the SHA1 authentication mode.
0 indicates that a key is displayed in the plain-text format.
7 indicates that a key is displayed in the cipher-text format.
key specifies an authentication key.
Specifies OSPFv3 authentication.

Authentication configuration on two neighboring devices must


be consistent. The service password-encryption command
enables a key to be displayed in the cipher-text format.

authentication ipsec spi spi specifies a security parameter index, in the range from 256 to
spi [ md5 | sha1 ] [ 0 | 7 ] key 4294967295.
md5 specifies the MD5 authentication mode.
sha1 specifies the SHA1 authentication mode.
0 indicates that a key is displayed in the plain-text format.
7 indicates that a key is displayed in the cipher-text format.
key specifies an authentication key.

Defaults No virtual link is defined by default


hello-interval: 10 seconds; dead-interval: four times of the hello-interval; retransmit-interval: five
seconds; transmit-interval: one second.
Authentication and encryption are not performed by default.

Command
Routing process configuration mode
Mode

6-7
Command Reference OSPFv3 Commands

Usage Guide In the OSPFv3 AS, all the areas must be connected with the backbone area to ensure that they can
learn the routes of the whole OSPFv3 AS. If an area cannot be directly connected with the backbone
area, it can connect it through a virtual link.

The virtual link shall not be in the stub or NSSA area.

Hello-interval, dead-interval and instance shall be configured consistently on both sides of the
virtual link neighbors, otherwise neighboring relationship cannot be set up between the virtual
neighbors.

Configuration The following example configures a virtual link.


Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# area 1 virtual-link [Link]

Related
Command Description
Commands
Displays the OSPFv3 routing process
show ipv6 ospf
information.
show ipv6 ospf neighbor Displays the OSPFv3 neighbor information.
show ipv6 ospf
Displays the OSPFv3 virtual link information.
virtual-links

Platform N/A
Description

6.7 auto-cost

The metric of the OSPFv3 protocol is the interface-based bandwidth. Use this command to enable the
bandwidth-based interface metric calculation or modify the reference bandwidth. Use the no form of
this command to restore the default settings.
auto-cost [ reference-bandwidth ref-bw ]
no auto-cost [ reference-bandwidth ]

Parameter
Parameter Description
Description
reference-bandwidth
Reference bandwidth in the range from 1 to 4294967 Mbps.
ref-bw

Defaults The interface metric is calculated based on the reference bandwidth, which is 100Mbps.

Command
Routing process configuration mode
Mode

Usage Guide Use no auto-cost reference-bandwidth to restore it to the default reference bandwidth.

6-8
Command Reference OSPFv3 Commands

You can use ipv6 ospf cost in the interface configuration mode to set the cost of the specified
interface, and it takes precedence over the metric calculated based on the reference bandwidth.

Configuration The following example changes the reference bandwidth to 10M.


Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# auto-cost reference-bandwidth 5

Related
Command Description
Commands
ipv6 ospf cost Sets the cost of an interface.
Displays the OSPFv3 routing process
show ipv6 ospf
information.

Platform N/A
Description

6.8 clear ipv6 ospf process

Use this command to clear and restart the OSPF process.


clear ipv6 ospf [ process-id ] process

Parameter
Parameter Description
Description
process-id OSPF process ID, in the range from 1 to 65535

Defaults N/A

Command
Privileged EXEC mode
Mode

Usage Guide In normal case, it is not necessary to use this command.


Use the parameter process-id to clear only one specific OSPFv3 instance. If no process-id is
specified, all the OSPFv3 instances will be cleared.

Configuration The following example restarts the OSPF process.


Examples Ruijie# clear ipv6 ospf process

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

6-9
Command Reference OSPFv3 Commands

6.9 default-information originate

Use this command to generate a default route to the OSPFv3 routing domain in the routing process
mode. Use the no form of this command to restore the default settings.
default-information originate [ always ] [ metric metric ] [ metric-type type ] [ route-map map ]
no default-information originate [ always ] [ metric ] [ metric-type ] [ route-map map ]

Parameter
Parameter Description
Description
( Optional ) It makes OSPFv3 generate the default route
always unconditionally, no matter whether the default route exists locally or
not.
(Optional) Initial metric value of the default route, in the range from 0
metric metric
to 16777214
(Optional) Type of the default route. There are two type of OSPF
metric-type type external routes: type 1, different metrics seen on different routers;
type 2, the same metric seen on different routers.
route-map map Associated route-map name, no associated route-map by default

Defaults No default route is created;


The initial metric value is 1;
The default route type is type 2.

Command
Routing process configuration mode
Mode

Usage Guide When the redistribute or default-information command is executed, the OSPFv3-enabled router
automatically turns into the autonomous system border router ( ASBR ). But the ASBR cannot
generate the default route automatically or advertise it to all the routers in the OSPFv3 routing
domain. The ASBR generates default routes by default. It is required to configure with the routing
process configuration command default-information originate.
If the always parameter is used, the OSPF routing process advertises an external default route to the
neighbors, no matter whether the default route in the core routing table exists or not. However, the
local router does not display the default route. To make sure whether the default route is generated,
execute show ipv6 ospf database to observe the OSPF link state database. The execution of the
show ipv6 route command on the OSPF neighbor will display the default route.
The metric of the external default route can be defined only with the default-information originate
command and cannot be set with the default-metric command.
There are two types of OSPFv3 external routes: type 1 external routes have changeable routing
metrics, while type 2 external routes have constant routing metrics. For two parallel routes with the
same route metric to the same destination network, type 1 takes precedence over type 2. As a result,
the show ipv6 route command displays only the type 1 route.
This command generates a default route of Type-5 LSA, which will not be flooded to the NSSA area.
To generate a default route in the NSSA area, use the area nssa default-information-originate

6-10
Command Reference OSPFv3 Commands

command.
The routers in the stub area cannot generate external default routes.

Configuration The following example generates a default route.


Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# default-information originate always

Related
Command Description
Commands
redistribute Redistribute routes.
Displays the OSPFv3 routing process
show ipv6 ospf
information.
Displays the OSPFv3 link state database
show ipv6 ospf database
information.

Platform N/A
Description

6.10 default-metric

Use this command to set the default metric for the routes to be redistributed. Use the no form of this
command to restore the default settings.
default-metric metric-value
no default-metric

Parameter
Parameter Description
Description
Default metric for the routes to be redistributed.
metric-value
Its range is from 1 to 16777214.

Defaults The default is 20.

Command
Mode Routing process configuration mode

Usage Guide This command can be used together with redistribute to set the default metric for the routes to be
redistributed. But this command does not apply to two types of routes:
 The default route generated with default-information originate;
 The redistributed direct route, for which 20 is always the default metric value.

Configuration The following example sets the default metric for the routes to be redistributed to 10.
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# default-metric 10

6-11
Command Reference OSPFv3 Commands

Related
Command Description
Commands
redistribute Redistributes the routes.
Displays the OSPFv3 routing process
show ipv6 ospf
information.

Platform N/A
Description

6.11 distance

Use this command to set the management distance corresponding to different types of OSPFv3
routes. Use the no form of this command to restore the default settings.
distance { distance | ospf { intra-area distance | inter-area distance | external distance } }
no distance [ ospf ]

Parameter
Parameter Description
Description
Sets the management distance of the route, in the range from 1 to
distance
255.
Sets the management distance of the intra-area route, in the range
intra-area distance
from1 to 255.
Sets the management distance of the inter-area route, in the range
inter-area distance
from 1 to 255.
Sets the management distance of the external route, in the range
external distance
from 1 to 255.

Defaults The default value is 110.


Management distance of the intra-area route: 110,
Management distance of the inter-area route: 110
Management distance of the external-area route: 110.

Command
Routing process configuration mode.
Mode

Usage Guide This command is used to specify different management distances for different types of OSPFv3
routes. The management distance of the route is used for the comparison of routing priority, the
smaller the management distance is, the higher the routing priority.

The priority of the route generated by different OSPFv3 processes must be compared using
the management distance.

Setting the management distance as 255 indicates the routing entry is unreliable and will not for
the packet forwarding.

6-12
Command Reference OSPFv3 Commands

Configuration The following example sets the OSPFv3 external route management distance to 160.
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# distance ospf external 160

Related
Command Description
Commands
ipv6 router ospf Enables the OSPFv3 routing process .

Platform N/A
Description

6.12 distribute-list in

Use this command to filter routes that are computed based on Link State Advertisement (LSA). Use
the no form of this command to restore the default settings.
distribute-list { name | prefix-list prefix-list-name } in [ interface-type interface-number ]
no distribute-list { name | prefix-list prefix-list-name } in [ interface-type interface-number ]

Parameter
Parameter Description
Description
name Specifies an ACL filtering rule.
prefix-list prefix-list-name Specifies a prefix list filtering rule.
interface-type
Specifies an interface on which LSA-based routes are filtered.
interface-number

Defaults Routes are not filtered by default.

Command
Routing process configuration mode
Mode

Usage Guide Filter the routes computed based on LSA. Only the routes meeting filtering conditions can be
forwarded. Route filtering does not affect the link state database and the routing tables of the
neighbors. The ACL and prefix list filtering rules cannot be set at the same time. You can set only the
ACL filtering rule or the prefix list filtering rule for a specific interface.
The routing filtering rules affect only forwarding of local routes but not route computation based on
LSA. When route filtering is configured on an ABR, LSA can still compute routes and generate and
send inter-area LSAs with prefixes to other areas. This will cause blackhole routes. To prevent the
generation of blackhole routes, you can run the area range command with the not-advertise
keyword.

Configuration The following example filters routes that are computed based on Link State Advertisement (LSA).
Examples Ruijie(config)# ipv6 prefix-list aaa seq 10 permit 2001::/64
Ruijie(config)# ipv6 router ospf 25

6-13
Command Reference OSPFv3 Commands

Ruijie(config-router)# redistribute rip metric 100


Ruijie(config-router)# distribute-list prefix-list aaa in ethernet 0/1

Related
Command Description
Commands
area range Configures route aggregation in an area.

Platform N/A
Description

6.13 distribute-list out

Use this command to filter routes that are re-distributed. This command has the similar function as the
redistribute command. Use the no form of this command to restore the default settings.
distribute-list { name | prefix-list prefix-list-name } out [ bgp | connected | isis [ area-tag ] | ospf
process-id | rip | static ]
no distribute-list { name | prefix-list prefix-list-name } out [ bgp | connected | isis [ area-tag ] | ospf
process-id | rip | static ]

Parameter
Parameter Description
Description
name Specifies the ACL filtering rule.
prefix-list prefix-list-name Specifies the prefix list filtering rule.
bgp | connected | isis
[ area-tag ] | ospf process-id Specifies the source from which the routes are filtered.
| rip | static

Defaults Routes are not filtered by default.

Command
Routing process configuration mode
Mode

Usage Guide The distribute-list out command has the similar function as the redistribute route-map command.
It can be used to filter the routes that are re-distributed based on other protocols into an OSPFv3
area. It does not directly re-distribute routes but works with the redistribute command to re-distribute
routes. The ACL and prefix list filtering rules cannot be configured at the same time. You can set only
the ACL filtering rule or the prefix list filtering rule to filter the routes from a specific source.

Configuration The following example filters static routes that are re-distributed.
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# redistribute static
Ruijie(config-router)# distribute-list prefix-list jjj out static

Related Command Description

6-14
Command Reference OSPFv3 Commands

Commands
Re-distributes routes that are carried by other
redistribute
routing processes.

Platform N/A
Description

6.14 enable mib-binding

Use this command to bind MIB to a specific OSPFv3 process. Use the no form of this command to
restore the default settings.
enable mib-binding
no enable mib-binding

Parameter
Parameter Description
Description
N/A N/A

Defaults MIB is bound to an OSPFv3 process with the smallest process number by default.

Command
Routing process configuration mode
Mode

Usage Guide OSFPv3 MIB has no configuration information about OSFPv3 processes. You can operate only one
OSFPv3 process through SNMP. OSFPv3 MIB is bound to the OSFPv3 process with the smallest
process number by default. Users' operations take effect on this process.
To operate a specific OSFPv3 process through SNMP, you can bind OSFPv3 MIB to the process.

Configuration The following example enables users to operate the OSPFv3 process with the process number of 100
Examples through SNMP.
Ruijie(config)# ipv6 router ospf 100
Ruijie(config-router)# enable mib-binding

Related
Command Description
Commands
Displays global OSPFv3 configuration
show ipv6 ospf
information.
enable traps Enables the OSPFv3 trap function.

Platform N/A
Description

6-15
Command Reference OSPFv3 Commands

6.15 enable traps

OSPFv3 processes support eight types of trap information, which are classified into two categories.
Use this command to send specific trap information. Use the no form of this command to restore the
default settings.
enable traps [ error [ IfConfigError | IfRxBadPacket | VirtIfConfigError | VirtIfRxBadPacket ] |
state-change [ IfStateChange | NbrStateChange | NssaTranslatorStatusChange |
VirtIfStateChange | VirtNbrStateChange ] ]
no enable traps [ error [ IfConfigError | IfRxBadPacket | VirtIfConfigError | VirtIfRxBadPacket ] |
state-change [ IfStateChange | NbrStateChange | NssaTranslatorStatusChange |
VirtIfStateChange | VirtNbrStateChange ] ]

Parameter
Parameter Description
Description
Configures all error-related trap types. This keyword can also
specify the following types of error traps:
IfConfigError Specifies an interface parameter error;
Specifies incorrect packets received by an
IfRxBadPacket
Error interface;
Specifies a parameter error on a virtual
VirtIfConfigError
interface;
Specifies incorrect packets received by a
VirtIfRxBadPacket
virtual interface.
Configures all traps related to state change. This keyword can also
specify the following traps related to state change:
Specifies state change of an
IfStateChange
interface;
Specifies state change of a
NbrStateChange
neighbor;
state-change
Specifies status change of the
NssaTranslatorStatusChange
NSSA translator.
Specifies state change of a
VirtIfStateChange
virtual interface;
Specifies state change of a
VirtNbrStateChange
virtual neighbor.

Defaults All traps are disabled by default.

Command
Routing process configuration mode
Mode

Usage Guide Before configuring this command, you must run the snmp-server enable traps ospf command;
otherwise, OSPFv3 trap information cannot be sent correctly. This is because the function of this

6-16
Command Reference OSPFv3 Commands

command is restricted by the snmp-server command.


You can synchronously enable the trap function of different processes even if MIB is not bound to
these processes.

Configuration The following example enables all traps of OSPFv3 process 100.
Examples Ruijie(config)#ipv6 router ospf 100
Ruijie(config-router)# enable traps

Related
Command Description
Commands
Displays global OSPFv3 configuration
show ipv6 ospf
information.
enable mib-binding Binds MIB to an OSPFv3 process.
snmp-server enable traps ospf Enables OSPFv3 to send trap information.

Platform N/A
Description

6.16 graceful-restart

Use this command to enable the OSPFv3 graceful restart (GR) function and to set the GR period.
Use the no form of this command to restore the default settings.
graceful-restart [ grace-period grace-period | inconsistent-lsa-checking ]
no graceful-restart [ graceful-period ]

Parameter
Parameter Description
Description
Configures the GR period. The GR period is the longest interval that
lasts from the moment when OSPFv3 fails to the moment when
grace-period grace-period OSPFv3 gracefully restarts.
The GR period is in the range from 1 to 1800 in the unit of seconds.
The default is 120.
Configures the topology change detection. Once the topology change
inconsistent-lsa-checking is detected, the device will exit GR and finish the convergence,
This function is enabled by default after GR is enabled.

Defaults This function is enabled by default.

Command
Mode Routing process configuration mode

Usage Guide GR is configured based on the OSPFv3 instance. Different instances could be configured with
different parameters.
Use this command to configure the GR period. The GR period is the longest interval that lasts from

6-17
Command Reference OSPFv3 Commands

the moment when OSPFv3 fails to the moment that OSPFv3 gracefully restarts. In this period, the
device will perform link reconstruction to restore OSPFv3. When the GR period expires, OSPFv3
exits GR and finishes regular operation.
To enable the GR function and set the GR period to the 120 seconds, use the graceful-restart
command. To modify the GR period, use the graceful-restart grace-period command. Topology
stability is indispensable for uninterrupted forwarding. If topology changes, OSPFv3 finishes
convergence instead of continuing GR to avoid long time interruption
1) Disabling the topology change detection: If the topology cannot converge in time in the hot backup
process, the long term forwarding interruption may occur.
2) Enabling the topology change detection: Forwarding interruption may occur but the interruption
time is much shorter than the time it takes to disable topology detection.
It is not recommended to disable the topology change detection. In some scenario where long term
forwarding interruption does not occur, disabling the topology change detection minimizes the
forwarding interruption time.
The GR function is unavailable when the Fast Hello function is enabled.

Configuration The following example enables GR for OSPFv3 instance 1 and sets the GR period to 60 seconds.
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# graceful-restart
Ruijie(config-router)# graceful-restart grace-period 60

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

6.17 graceful-restart helper

Use this command to enable the OSPFv3 graceful restart helper function. Use the no form of this
command to disable this function.
graceful-restart helper disable
no graceful-restart helper disable
Use this command configure the topology change detection method of OSPFv3 GR helper. Use the
no form of this command to cancel the configuration.
graceful-restart helper { strict-lsa-checking | internal-lsa-checking}
no graceful-restart helper {strict-lsa-checking | internal-lsa-checking}

Parameter
Parameter Description
Description
disable Disables the device to assist other devices in performing GR.
Checks the change of the LSA of types 1-5 and 7 to judge whether
strict-lsa-checking
the network topology changes. If the topology changes, the GR

6-18
Command Reference OSPFv3 Commands

helper function will be disabled.


Checks the change of the LSA of types 1–3 to judge whether the
internal-lsa-checking network topology changes. If the topology changes, the GR helper
function will be disabled.

Defaults The GR helper is enabled by default.


The device where the GR helper is enabled does not check the LSA change by default.

Command
Mode Routing process configuration mode

Usage Guide Use this command to enable the GR helper function. When one neighbor device performs graceful
restart, the Grace-LSA is advertised to all neighbors. If the device enabled with the GR helper
receives the Grace-LSA, it will become the GR Helper to help the neighbors perform GR. The disable
option means that it is not allowed to perform the GR helper function for any device in GR.
The GR helper does not perform the network change detection by default. The convergence is not
performed again until the GR is implemented even if the network changes. Use the
strict-lsa-checking orinternal-lsa-checking command to enable the device to detect the change of
network topology during the GR. The former checks any LSA (types 1-5,7) that stands for the network
information, the latter checks the LSA that stands for the AS inner-area route. In the large scale
network, it is not recommended to enable the LSA check option because the partial network changes
trigger the ending of the GR, decreasing the convergence speed of the entire network.

Configuration The following example disables the GF helper function of the OSPFv3 instance 1 and modifies the
Examples topology change detection policy.
Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# graceful-restart helper disable
Ruijie(config-router)# no graceful-restart helper disable
Ruijie(config-router)# graceful-restart helper strict-lsa-checking

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

6.18 ipv6 ospf area

Use this command to enable the interface to participate in the OSPFv3 routing process. Use the no
form of this command to restore the default settings.
ipv6 ospf process-id area area-id [ instance instance-id ]
no ipv6 ospf process-id area [ instance instance-id ]

6-19
Command Reference OSPFv3 Commands

Parameter
Parameter Description
Description
process-id OSPF process ID.
OSPFv3 area in which the interface participates.
area area-id
It can be an integer or an IPv4 prefix.
Configures the specific OSPFv3 instance on the interface.
instance instance-id
Range: 0-255.

Defaults This function is disabled by default.

Command
Interface configuration mode.
Mode

Usage Guide Run this command to enable the OSPFv3 on an interface, and then configure the OSPFv3 process
with ipv6 router osp. The interface will be automatically started after this command is used.
Use no ipv6 ospf area to disable the specified interface to participate in the OSPFv3 routing process.
Use no ipv6 router ospf to disable all the interfaces to participate in the OSPFv3 routing process.
The neighbor relationship can only be established between the routers with the same instance ID.
After this command is configured, all the prefix information on the interface will be used in the
operation of the OSPFv3.

Configuration The following example starts the OSPFv3 process on int GigabitEthernet 0/0 for the specified area of
Examples the specified instance.
Ruijie(config)# int GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ipv6 ospf 1 area 2 instance 2

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.
passive-interface Setsthe a passive interface.
show ipv6 ospf interface Displays the OSPFv3 interface information.

Platform N/A
Description

6.19 ipv6 ospf authentication

Use this command to configure OSPFv3 interface authentication. Use the no form of this command to
restore the default settings.
ipv6 ospf authentication [ null | ipsec spi spi [ md5 [string-key] | sha1 ] [ 0 | 7 ] key ] [ instance
instance-id ]
no ipv6 ospf authentication

6-20
Command Reference OSPFv3 Commands

Parameter
Parameter Description
Description
null Indicates that authentication is not performed.
Specifies a security parameter index, in the range from 256 to
spi
4294967295.
md5 Specifies the MD5 authentication mode.
string-key Indicates that MD5 authentication key supports special characters.
sha1 Specifies the SHA1 authentication mode.
0 Indicates that a key is displayed in the plain-text format.
7 Indicates that a key is displayed in the cipher-text format.
key Specifies an authentication key.
Configure the OSPFv3 instance specified on the interface.
instance instance-id
Range: 0-225.

Defaults Authentication is not performed by default.

Command
Interface configuration mode
Mode

Usage Guide RGOS supports three authentication modes:


 null authentication mode, which is configured when authentication is not needed
 MD5 authentication mode
 SHA1 authentication mode

OSPFv3 authentication parameters configured on interconnected interfaces must be consistent.

Configuration The following example specifies MD5 authentication in OSPFv3 interface configuration mode and
Examples sets the authentication password to aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.
Ruijie(config-if)# ipv6 ospf authentication ipsec spi 300 md5
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Related
Command Description
Commands
ipv6 ospf authentication Specifies interface authentication.
area virtual-link authentication Specifies virtual link authentication.

Platform N/A
Description

6.20 ipv6 ospf cost

Use this command to set the cost of the interface. Use the no form of this command to restore the
default settings.
ipv6 ospf cost cost [ instance instance-id ]

6-21
Command Reference OSPFv3 Commands

no ipv6 ospf cost [ instance instance-id ]

Parameter
Parameter Description
Description
cost Cost of interface, in the range from 0 to 65535.
Configures the specific OSPFv3 instance on the interface, in the
instance instance-id
range from 0 to 255.

Defaults The default interface cost is the reference bandwidth/Bandwidth (100Mbps by default).

Command
Interface configuration mode.
Mode

Usage Guide By default, the cost of the OSPFv3 interface is 100Mbps/Bandwidth, in which the Bandwidth is the
bandwidth of the interface and configured with the command bandwidth in the interface configuration
mode.
The default costs of OSPFv3 interfaces for several typical lines are:
 64K serial line: 1562;
 E1 line: 48
 10M Ethernet: 10
 100M Ethernet: 1
The OSPFv3 cost configured with the command ipv6 ospf cost will overwrite the default
configuration.

Configuration The following example sets the cost of the interface to 1:


Examples Ruijie(config)# int GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ipv6 ospf cost 1

Related
Command Description
Commands
show ipv6 ospf interface Displays the OSPFv3 interface information.
Sets the interface to participate in the OSPFv3
ipv6 ospf area
routing process.

Platform N/A
Description

6.21 ipv6 ospf dead-interval

Use this command to set a dead interval of neighbors on an interface. If no hello packet is received
from a neighbor within the interval, the neighboring relationship is considered to fail. Use the no form
of this command to restore the default settings.
ipv6 ospf dead-interval { seconds | minimal hello-multiplier multiplier } [ instance instance-id ]
no ipv6 ospf dead-interval [ instance instance-id ]

6-22
Command Reference OSPFv3 Commands

Parameter
Parameter Description
Description
Dead interval of neighbors.
seconds
Its range is from 1 to 65535 in the unit of seconds.
Enables the fast hello function, which takes 1s as the dead interval of
minimal hello-multiplier neighbors.
multiplier Multiplier specifies the number of hello packets sent in one second, in
the range from 3 to 20.
Configures the specific OSPFv3 instance on the interface, in the
instance instance-id
range from 0 to 255.

Defaults If the fast hello function is not enabled, the dead interval of neighbors is four times longer than the
hello interval.

If the hello interval is changed, the dead interval of neighbors varies automatically.

Command
Interface configuration mode
Mode

Usage Guide The dead interval of neighbors must be longer than the hello interval.
The OSPFv3 fast hello function allows OSPFv3 to fast discovery neighbors and detect whether
neighboring relationships are valid. To enable the OSPFv3 fast hello function, you can specify the
minimal and hello-multiplier keywords and the multiplier parameter in this command. minimal
specifies the deal interval of neighbors to be 1s; hello-multiplier specifies the number of times that
hello packets are sent in a second. Therefore, this configuration reduces the hello interval to be
shorter than 1s.
If an interface is enabled with the fast hello function, the hello-interval field of hello packets to be
advertised by this interface is set to 0, and that of hello packets received from this interface is omitted.

dead-interval, minimal, and hello-multiplier that are introduced to enable the fast hello
function cannot be configured together with hello-interval.

No matter whether the fast hello function is configured, the dead interval of neighbors on the
interconnected interfaces of neighbors must be consistent. The values of hello-multiplier on the
interconnected interfaces can be different but you must ensure that at least one hello packet is
received within the dead interval of neighbors.
You can use the show ipv6 ospf interface command to monitor the dead interval of neighbors and
the fast hello interval on an interface.

Configuration The following example sets the dead interval of neighbors to 60 seconds on an interface.
Examples Ruijie(config)# int GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ipv6 ospf dead-interval 60

Related Command Description

6-23
Command Reference OSPFv3 Commands

Commands
Sets the interval for sending the Hello message
ipv6 ospf hello-interval
on an interface.
show ipv6 ospf interface Displays the OSPFv3 interface information.
Sets the interface to participate in the OSPFv3
ipv6 ospf area
routing process

Platform N/A
Description

6.22 ipv6 ospf encryption

Use this command to enable OSPFv3 encryption authentication on an interface. Use the no form of
this command to restore the default settings.
ipv6 ospf encryption [ null | ipsec spi spi esp [ null | [ des | 3des | aes-cbc [128 | 192 | 256] ] [ 0 |
7 ] des-key ] [ md5 | sha1 ] [ 0 | 7 ] key ] [ instance instance-id ]
no ipv6 ospf encryption [ instance instance-id ]

Parameter
Parameter Description
Description
null Indicates that encryption authentication is not performed.
Specifies a security parameter index, in the range from 256 to
spi
4294967295.
null Specifies the null encryption mode.
des Uses Data Encryption Standard (DES) encryption mode.
3des Uses 3DES encryption mode.
Uses Advanced Encryption Standard-Cipher Block Chaining
aes-cbc[ 128 | 192 | 256 ]
encryption mode. The key length is 128,192,256 bytes.
des-key Encryption key
md5 Specifies the MD5 authentication mode.
sha1 Specifies the SHA1 authentication mode.
0 Indicates that a key is displayed in the plain-text format.
7 Indicates that a key is displayed in the cipher-text format.
key Specifies an authentication key.

Defaults Encryption authentication is not performed by default.

Command
Interface configuration mode
Mode

Usage Guide RGOS supports the 3 encryption modes: DES, 3DES and AES-CBC, and 2 authentication modes:
MD5 and SHA1

OSPFv3 encryption authentication parameters configured on interconnected interfaces must be

6-24
Command Reference OSPFv3 Commands

consistent.

Configuration The following example specifies null encryption and MD5 authentication in OSPFv3 interface
Examples configuration mode and sets the authentication password to aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.
Ruijie(config-if)# ipv6 ospf encryption ipsec spi 300 esp null md5
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Related
Command Description
Commands
area encryption Specifies area encryption authentication.
area virtual-link encryption Specifies virtual link encryption authentication.

Platform N/A
Description

6.23 ipv6 ospf hello-interval

Use this command to set the interval for the interface to send the Hello message. Use the no form of
this command to restore the default settings.
ipv6 ospf hello-interval seconds [ instance instance-id ]
no ipv6 ospf hello-interval [ instance instance-id ]

Parameter
Parameter Description
Description
Interval for sending the Hello message.
seconds
Its range is from 1 to 65535 in the unit of seconds.
instance instance-id Configures the specific OSPFv3 instance on the interface.

Defaults The broadcast network and point-to-point network :10 seconds. The point-to-multipoint network and
NBMA network :30 seconds.

Command
Mode Interface configuration mode.

Usage Guide The same hello sending intervals must be set for the neighbors, otherwise the normal adjacency
cannot be established.

The dead-interval minimal hello-multiplier and hello-interval parameters for Fast Hello cannot be
configured simultaneously.

Configuration The following example sets the interval for the interface to send the Hello message to 20 seconds.
Examples Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ipv6 ospf hello-interval 20

6-25
Command Reference OSPFv3 Commands

Related
Command Description
Commands
Sets the interval for the interface to consider
ipv6 ospf dead-interval
that the neighbor fails.
show ipv6 ospf interface Displays the OSPFv3 interface information.
Sets the interface to participate in the OSPFv3
ipv6 ospf area
routing process.

Platform N/A
Description

6.24 ipv6 ospf mtu-ignore

Use this command to ignore the MTU check when an interface receives the database description
message. Use the no form of this command to restore the default settings.
ipv6 ospf mtu-ignore [ instance instance-id ]
no ipv6 ospf mtu-ignore [ instance instance-id ]

Parameter
Parameter Description
Description
Configures the specific OSPFv3 instance on the interface, in the
instance instance-id
range from 0 to 255.

Defaults The MTU check is enabled by default.

Command
Mode Interface configuration mode.

Usage Guide After receiving the database description message, the OSPFv3 device will check whether the MTU of
neighbor interface is the same as its own MTU. If the received database description message
indicates an MTU greater than its own interface’s MTU, the neighbor relationship cannot be
established. This can be fixed by disabling the MTU check.

Configuration The following example disables the MTU check function on the GigabitEthernet 0/0.
Examples Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ipv6 ospf mtu-ignore

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.
ipv6 mtu Sets the value of IPv6 MTU of the interface.

6-26
Command Reference OSPFv3 Commands

Platform N/A
Description

6.25 ipv6 ospf neighbor

Use this command to configure the OSPFv3 neighbor manually. Use the no form of this command to
restore the default settings.
ipv6 ospf neighbor ipv6-address [ [ cost cost ] [ poll-interval seconds | priority priority ] ]
[ instance instance-id ]
no ipv6 ospf neighbor ipv6-address [ [ cost cost ] [ poll-interval seconds | priority priority ] ]
[ instance instance-id ]

Parameter
Parameter Description
Description
(Optional) Configures the cost to each neighbor in point-to-multipoint
network. It is not defined by default, where the cost configured on the
cost cost
interface will be used. It ranges from 1 to 65535.
Only the networks of the point-to-multipoint type support this option.
(Optional) Interval for polling the neighbors (in seconds), which
ranges from 1 to 2147483647.
poll-interval seconds
Only the networks of the non-broadcast (NBMA) type support this
option.
(Optional) Configures the priority value of non-broadcast network
priority priority neighbors, which ranges from 0 to 255.
Only the non-broadcast (NBMA) type network supports this option.
(Optional) Configures the specific OSPFv3 instance on the interface,
instance instance-id
which ranges from 0 to 255.

Defaults No neighbor is defined;


Neighbor polling interval: 120 seconds;
Priority value of non-broadcast network neighbor: 0.

Command
Mode Interface configuration mode.

Usage Guide You can set relevant parameters for the neighbors depending on the actual network type.

Configuration The following example shows how to configure the OSPFv3 neighbor as follows: IPv6 address:
Examples 2001:DB8:4::1, priority value: 1, polling interval: 150 seconds.
Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 ospf neighbor 2001:DB8:4::1
priority 1 poll-interval 150

Related Command Description

6-27
Command Reference OSPFv3 Commands

Commands
Ipv6 ospf priority Sets the priority value of an interface.
Ipv6 ospf network Sets the network type of an interface.

Platform N/A
Description

6.26 ipv6 ospf network

Use this command to set the network type of the interface. Use the no form of this command to
restore the default settings.
ipv6 ospf network { broadcast | non-broadcast | point-to-point | point-to-multipoint
[ non-broadcast ] } [ instance instance-id ]
no ipv6 ospf network [ broadcast | non-broadcast | point-to-point | point-to-multipoint
[ non-broadcast ] ] [ instance instance-id ]

Parameter
Parameter Description
Description
broadcast Specifies the broadcast network type.
non-broadcast Specifies the non-broadcast network type.
point-to-point Specifies the point-to-point network type.
point-to-multipoint Specifies the point-to-multipoint network type.
point-to-multipoint
Specifies the point-to-multipoint non-broadcast network type.
non-broadcast
Configures the specific OSPFv3 instance on the interface with the
instance instance-id
valid id range from 0 to 255.

Defaults Point-to-point network type: PPP, SLIP, frame relay point-to-point sub-interface and X.25
point-to-point sub-interface encapsulation.
NBMA network type: frame relay(except for the point-to-point sub-interface) and X.25 encapsulation
(except for the point-to-point sub-interface)
Broadcast network type: Ethernet encapsulation.
The point-to-multipoint network type is not the default type.

Command
Interface configuration mode.
Mode

Usage Guide You can set the network type of the interface according to the actual link type applied and the
topology.

Configuration The following example sets the network type of the interface that participates in the OSPFv3 to
Examples point-to-point.
Ruijie(config)# interface GigabitEthernet 0/1

6-28
Command Reference OSPFv3 Commands

Ruijie(config-if-GigabitEthernet 0/1)# ipv6 ospf network point-to-point

Related
Command Description
Commands
ipv6 ospf priority Sets the interface priority.
show ipv6 ospf interface Displays the OSPFv3 interface information.
Sets the interface to participate in the OSPFv3
ipv6 ospf area
routing process.

Platform N/A
Description

6.27 ipv6 ospf priority

Use this command to set the interface priority. Use the no form of this command to restore the default
settings.
ipv6 ospf priority number-value [ instance instance-id ]
no ipv6 ospf priority [ instance instance-id ]

Parameter
Parameter Description
Description
The priority of the interface.
number-value
Its range is from 0 to 255.
Configures the specific OSPFv3 instance on the interface. Its range is
instance instance-id
from 0 to 255.

Defaults The default priority is 1.

Command Interface configuration mode.


Mode

Usage Guide In the broadcast network type, it is necessary to elect the DR/BDR. In electing the DR/BDR, the
device of a higher priority is preferred. If several devices are of the same priority, the one with the
largest router-ID is preferred.
The device with the priority level of 0 does not participate in the election of DR/BDR.

Configuration The following example disables the interface from being elected as the DR/BDR.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 ospf priority 0

Related
Command Description
Commands
ipv6 ospf network Sets the network type of an interface.

6-29
Command Reference OSPFv3 Commands

router-id Sets the ID of a router.


show ipv6 ospf interface Displays the OSPFv3 interface information.
Configures the specific OSPFv3 instance on
instance instance-id
the interface.

Platform N/A
Description

6.28 ipv6 ospf retransmit-interval

Use this command to set the interval for the interface to retransmit the LSA. Use the no form of this
command to restore the default settings.
ipv6 ospf retransmit-interval seconds [ instance instance-id ]
no ipv6 ospf retransmit-interval [ instance instance-id ]

Parameter
Parameter Description
Description
Interval for retransmitting the LSA.
seconds
Its range is from 1 to 65535 in the unit of seconds.
instance instance-id Configures the specific OSPFv3 instance on the interface.

Defaults The default is five seconds.

Command
Mode Interface configuration mode.

Usage Guide To ensure the reliability of the routing information transmission, the LSA sent to the neighbor shall be
acknowledged by the neighbor. You can use this command to set the interval for the
acknowledgement by the neighbor. If no acknowledgement is received within the specified period, the
LSA information will be retransmitted.

Configuration The following example sets the interval for retransmitting the LSA to 10 seconds.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 ospf retransmit-interval 10

Related
Command Description
Commands
show ipv6 ospf interface Displays the OSPFv3 interface information.
Sets the interface to participate in the OSPFv3
ipv6 ospf area
routing process.

Platform N/A
Description

6-30
Command Reference OSPFv3 Commands

6.29 ipv6 ospf transmit-delay

Use this command to set the delay on the interface in sending the LSA. Use the no form of this
command to restore the default settings.
ipv6 ospf transmit-delay seconds [ instance instance-id ]
no ipv6 ospf transmit-delay [ instance instance-id ]

Parameter
Parameter Description
Description
The delay in sending LSA.
seconds
Its range is from 1 to 65535 in the unit of seconds.
Configures the ID of a specific OSPFv3 instance on the interface, in
instance instance-id
the range from 0 to 255.

Defaults The default is one second.

Command Interface configuration mode.


Mode

Usage Guide Use this command to set the delay on the interface in transmitting the LSA.

Configuration The following example sets the delay on the interface in transmitting the LSA.
Examples Ruijie(config)# interface GigabitEthernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)# ipv6 ospf transmit-delay 2

Related
Command Description
Commands
show ipv6 ospf interface Displays the OSPFv3 interface information.

Platform N/A
Description

6.30 ipv6 router ospf

Use this command to start the OSPFv3 routing process. Use the no form of this command to restore
the default settings.
ipv6 router ospf process-id
no ipv6 router ospf process-id

Parameter
Parameter Description
Description
OSPFv3 process ID number. Without the process number configured,
process-id
it indicates that process 1 is started.

6-31
Command Reference OSPFv3 Commands

Defaults No OSPFv3 routing process is started.

Command
Mode Global configuration mode.

Usage Guide After the OSPFv3 process is started, the routing process configuration mode is entered.
At present, our products support up to 32 OSPFv3 processes.

Configuration The following example starts OSPFv3 process.


Examples Ruijie(config)# ipv6 router ospf 1

Related
Command Description
Commands
Configures an interface to participate in the
ipv6 ospf area
OSPFv3 routing process.
Displays the OSPFv3 routing process
show ipv6 ospf
information.

Platform N/A
Description

6.31 ipv6 router ospf max-concurrent-dd

Use this command to set the maximum concurrent interacting neighbors allowed in all OSPFv3
routing processes. Use the no form of this command to restore the default settings.
ipv6 router ospf max-concurrent-dd number
no ipv6 router ospf max-concurrent-dd

Parameter
Parameter Description
Description
Maximum concurrent interacting neighbors, in the range from 1 to
number
65535.

Defaults The default is 5.

Command Global configuration mode


Mode

Usage Guide When a router is exchanging data with multiple neighbors at the same time which affects its
performance, by configuring this command, the maximum concurrent interacting neighbors allowed in
all OSPFv3 routing processes can be restricted.

Configuration The following example sets the maximum concurrent interacting neighbors allowed in all OSPFv3

6-32
Command Reference OSPFv3 Commands

Examples routing processes to 4. The result is that in the interaction between a large number of neighbors,
interactions with up to 4 neighbors are allowed to be initiated on this device concurrently, and
interactions initiated by up to 4 neighbors are allowed to be received concurrently. That is, interaction
with up to 8 neighbors is allowed on this device.
Ruijie#conf terminal
Ruijie(config)#ipv6 router ospf max-concurrent-dd 4

Related
Command Description
Commands
Sets the maximum concurrent interacting
max-concurrent-dd
neighbors in the OSPFv3 processes

Platform N/A
Description

6.32 log-adj-changes

Use this command to enable the logging of adjacency changes. Use the no form of this command to
restore the default settings.
log-adj-changes [ detail ]
no log-adj-changes [ detail ]

Parameter
Parameter Description
Description
detail Displays details of adjacency changes

Defaults By default, the adjacency state log on the entry of or exit from the FULL state is output.

Command Routing process configuration mode


Mode

Usage Guide N/A

Configuration The following example turns on the log of adjacency state change.
Examples Ruijie(config)# router ospf 1
Ruijie(config-router)# log-adj-changes detail

Related
Command Description
Commands
Displays the OSPF global configuration
show ipv6 ospf
information

Platform N/A
Description

6-33
Command Reference OSPFv3 Commands

6.33 max-concurrent-dd

Use this command to set the maximum number of DD packets that can be processed concurrently in
the OSPFv3 routing process. Use the no form of this command to restore the default settings.
max-concurrent-dd number
no max-concurrent-dd

Parameter
Parameter Description
Description
Maximum number of DD packets that can be processed concurrently,
number
in the range from 1 to 65535.

Defaults The default is 5.

Command
Mode Routing process configuration mode.

Usage Guide When a router is exchanging data with multiple neighbors at the same time which affects its
performance, by configuring this command, the maximum concurrent interacting neighbors allowed in
each OSPFv3 instance can be restricted.

Configuration The following example sets the maximum concurrent interacting neighbors allowed in the current
Examples OSPFv3 routing process to 4. The result is that in the interaction between a large number of
neighbors, interactions with up to 4 neighbors are allowed to be initiated on this device concurrently,
and interactions initiated by up to 4 neighbors are allowed to be received concurrently. That is,
interaction with up to 8 neighbors is allowed on this device.
Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# max-concurrent-dd 4

Related
Command Description
Commands
Sets the maximum concurrent interacting
ipv6 router ospf max-concurrent-dd
neighbors allowed in the OSPFv3 processes.

Platform N/A
Description

6.34 passive-interface

Use this command to set the passive interface. Use the no form of this command to restore the
default settings.
passive-interface { default | interface-type interface-number }
no passive-interface { default | interface-type interface-number }

6-34
Command Reference OSPFv3 Commands

Parameter
Parameter Description
Description
default Sets all the interfaces to passive ones.
interface-type
Sets the specified interface to a passive one.
interface-number

Defaults No passive interface is set by default.

Command Routing process configuration mode


Mode

Usage Guide After an interface is set to a passive one, it no longer receives or sends the hello message.
This command applies to the interfaces participating in the OSPFv3 but not to the virtual links.

Configuration The following example enables only the GigabitEthernet 0/1 interface to participate in the OSPFv3
Examples process.
Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# passive-interface default
Ruijie(config-router)# no passive-interface GigabitEthernet 0/1

Related
Command Description
Commands
Configures an interface to participate in the
ipv6 ospf area
OSPFv3 routing process.
Displays the OSPFv3 routing process
show ipv6 ospf
information.
show ipv6 ospf neighbor Displays the OSPFv3 neighbor information.

Platform N/A
Description

6.35 redistribute

Use this command to start the route redistribution in order to import the routing information of other
routing protocols to the OSPFv3 routing process. Use the no form of this command to restore the
default settings.
redistribute { bgp | connected | isis [ area-tag] | ospf process-id | rip | static } [ { level-1 | level-1-2
| level-2 } | match { internal | external [ 1 | 2 ] | nssa-external [ 1 | 2 ] } | metric metric-value |
metric-type { 1 | 2 } | route-map route-map-name | tag tag-value ]
no redistribute { bgp | connected | isis [ area-tag] | ospf process-id | rip | static } [ { level-1 |
level-1-2 | level-2 } | match { internal | external [1|2] | nssa-external [ 1 | 2 ] } | metric | metric-type
{ 1 | 2 } | route-map route-map-name | tag tag-value ]

6-35
Command Reference OSPFv3 Commands

Parameter
Parameter Description
Description
bgp The bgp protocol is redistributed.
connected The directly connected route is redistributed.
The isis is redistributed. The area-tag specifies a particular isis
isis [ area-tag ]
instance.
The ospf is redistributed. The process-id specifies a particular ospf
ospf process-id
instance within the range of 1-65535.
rip The rip is redistributed.
static The static route is redistributed.
It is used in the IS-IS route redistribution only and redistributes the
level-1 | level-1-2 | level-2 routes at a specified level. .

It is used in the OSPFv3 route redistribution only and filters specific


routes for redistribution;
internal: inter-area and intra-area routes.
match
external [1|2]: E1, E2 or all external routes.
Nssa-external [ 1 | 2 ]: N1, N2 or all external routes of the NSSA area.
All sub-type OSPFv3 routes are redistributed by default.
Specifies the metric for the OSPFv3 external 2 LSA with metric-value.
metric metric-value
Its range is 0 to 16777214.
metric-type { 1 | 2 } Set the metric type for the external route to E-1 or E-2.
Specifies the routing policy for route redistribution.
route-map route-map-name The name of map-tag can be composed of up to 32 characters.
No route-map is associated by default.
Specifies the tag value redistributed to the OSPFv3 inner route, in the
tag tag-value
range of 0 to 4294967295.

Defaults The function is disabled by default;


Metric-type: 2;
Level-2 routes are redistributed in the ISIS redistribution
OSPFv3 routes of all sub-types are redistributed in the OSPFv3 redistribution
No route-map is associated

Command
Mode Routing process configuration mode

Usage Guide When a device supports multiple routing protocols, the coordination between these protocols
becomes an important task. The device can run the protocols at the same time, so it should
redistribute the protocols. This is applicable to all IP routing protocols.
The parameters level-1, level-2 or level-1-2 can be configured in the redistribution of the ISIS routes
to indicate the level of the routes in the redistribution. By default, the level-2 ISIS routes are
redistributed
When redistributing OSPFv3 routes, you can configure match to redistribute the routes of the

6-36
Command Reference OSPFv3 Commands

corresponding sub-type among the redistributed OSPFv3 routes. All types of OSPFv3 routes are
redistributed by default.
The match parameter of route-map is specific to the source of routes. The parameters tag, metric and
metric-type of the set rule of route-map take precedence over the ones configured for the redistribute
command.

The metric value of the route-map associated should be in the range of 0 to 16777214. If the
metric value is not in this range, the route cannot be introduced.

The rules for the no form of the redistribute command are as follows:
If some parameters are specified in the no command, restore their default settings;
If no parameters are specified in the no command, delete the whole command.
For example, if the configuration is made below:
Now modify the configuration with the command no redistribute isis 112 level-2
According to the above rules, the command only restores level-2 to default and level-2 is default per
se, so after the above no command is executed, the configuration remains as
redistribute isis 112 level-2
To delete the whole command, use the command below

Configuration The following example redistributes the direct route and associates route-map test:
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# redistribute connect metric 10 route-map test
The associated route-map is configured as follows:
Ruijie(config)# route-map test permit 10
Ruijie(config-route-map)# match metric 20
Ruijie(config-route-map)# set metric 30
The effect of the above configuration is to set the metric value which is 20 of the redistributed routes
to 30, and that of other routes to 10

Related
Command Description
Commands
default-information originate Sets the default route to be redistributed.
Sets the default metric for the route to be
default-metric
redistributed.
Sets the converged address range of the
summary-prefix
external route.
Displays the OSPFv3 routing process
show ipv6 ospf
information.
Displays the OSPFv3 link state database
show ipv6 ospf database
information.

Platform N/A
Description

6-37
Command Reference OSPFv3 Commands

6.36 router-id

Use this command to set the router ID (device ID). Use the no form of this command to restore the
default settings.
router-id router-id
no router-id

Parameter
Parameter Description
Description
router-id ID of the device in the IPv4 address format.

Defaults The OSPFv3 routing process, the largest IPv4 address of all loopback interfaces is elected as the
router ID; If there is no loopback interface with an IPv4 address, the OSPFv3 process will elect the
largest IPv4 of all other interfaces as the router ID

Command Routing process configuration mode


Mode

Usage Guide Each device that runs the OSPFv3 process shall be identified with a router ID. Router ID is in the
format of IPv4 address.
Any IPv4 address can be set as the router ID, but the router ID of every routers in the AS must be
unique. If multiple OSPFv3 processes are running on the same device, the router ID of every process
must be unique. Note that the change of the router ID results in considerable processing work in the
protocol. Therefore, it is not recommended to change any router ID without proper reason. A prompt
will be given to ask whether you are sure to modify the router ID. It is recommended that you specify a
router ID once an OSPFv3 process starts before configuring other parameters for the process

Configuration The following example sets the ID of the device that participates in the OSPFv3 process to [Link].
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# router-id [Link]

Related
Command Description
Commands
ipv6 ospf priority Sets the interface priority.
Displays the OSPFv3 routing process
show ipv6 ospf
information.

Platform N/A
Description

6.37 summary-prefix

Use this command to configure the converged route outside the OSPFv3 routing domain in the

6-38
Command Reference OSPFv3 Commands

routing process configuration mode. Use the no form of this command to restore the default settings.
summary-prefix ipv6-prefix/prefix-length [ not-advertise | [ tag number ] [ cost cost ] ]
no summary-prefix ipv6-prefix/prefix-length [ not-advertise | [ tag ] [ cost ] ]

Parameter
Parameter Description
Description
ipv6-prefix/prefix-length Address range of the converged route
Does not advertise the converged route to neighbors.
not-advertise
Absence of this parameter means to advertise.
Tag value redistributed to the OSPFv3 inner route, in the range from
tag number
0 to 4294967295.
cost cost Cost value of converged route, in the range from 0 to 16777214.

Defaults No converged route is configured by default.

Command Routing process configuration mode.


Mode

Usage Guide When routes are redistributed by another routing process into the OSPFv3 routing process, every
route is advertised to the OSPFv3-enabled device separately in the form of external link state. If the
incoming routes are continuous addresses, the autonomous system border device can advertise only
one converged route, thus reducing the scale of routing table greatly.
It is different from the area range command. The area range involves the convergence of routes
between OSPFv3 areas, while the summary-prefix involves the convergence of external routes of
the OSPFv3 routing domain.
Configuring the summary-prefix command on the ASBR can perform convergence for only
redistributed routes; while configuring this command on the NSSA ABR translator can perform
convergence for the redistributed routes and the Type-5 routes translated from Type-7.

Configuration The following example configures the external route within the 2001:DB8::/64 to the converged route
Examples 2001:DB8::/64 to advertise it.
Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# summary-prefix 2001:DB8::/64

Related
Command Description
Commands
Configures route convergence between the
area-range
OSPFv3 areas.
Redistributes the routes in other routing
redistribute
process.

Platform N/A
Description

6-39
Command Reference OSPFv3 Commands

6.38 show ipv6 ospf

Use this command to display the information of the OSPFv3 process.


show ipv6 ospf [ process-id ]

Parameter
Parameter Description
Description
process- id OSPF process ID number.

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following example displays the information about the OSPFv3 process.
Examples Ruijie# show ipv6 ospf
Routing Process "OSPFv3 (1)" with ID [Link]
Process uptime is 24 minutes
Enable two-way-maintain
SPF schedule delay 5 secs, Hold time between SPFs 10 secs
Initial LSA throttle delay 0 msecs
Minimum hold time for LSA throttle 5000 msecs
Maximum wait time for LSA throttle 5000 msecs
Lsa Transmit Pacing timer 40 msecs, 1 LS-Upd
LSA interval 5 secs, Minimum LSA arrival 1000 msecs
Pacing lsa-group: 30 secs
Number of incomming current DD exchange neighbors 0/5
Number of outgoing current DD exchange neighbors 0/5
Number of external LSA 0. Checksum Sum 0x0000
Number of AS-Scoped Unknown LSA 0
Number of LSA originated 11
Number of LSA received 4
Log Neighbor Adjency Changes : Enabled
Number of areas in this router is 2
Area BACKBONE(0)
Number of interfaces in this area is 1(1)
SPF algorithm executed 4 times
Number of LSA 3. Checksum Sum 0x1DDF1
Number of Unknown LSA 0
Area [Link] (NSSA)
Number of interfaces in this area is 1(1)
SPF algorithm executed 5 times

6-40
Command Reference OSPFv3 Commands

Number of LSA 7. Checksum Sum 0x445FE


Number of Unknown LSA 0

Field Description

Routing Process
"OSPFv3 (x)" with ID OSPFv3 process ID and OSPFv3 router ID
[Link]

Validation time of this OSPFv3 process (the process is invalid


Process uptime
when the router ID is [Link])

Enable two-way-maintain Whether to enable two-way maintenance of OSPFv3

Required delay time before calling the SPF computation when


SPF schedule delay
a topology change is received

SPF Hold time Minimum holding time between two SPF computations

Initial LSA throttle delay Minimum delay time of generating LSAs

Minimum hold time for


Minimum interval between two SPF computations
LSA throttle

Maximum wait time for


Maximum interval between two SPF computations
LSA throttle

Lsa Transmit Pacing


LSA group update frequency
timer

Minimum LSA arrival Minimum receiving delay time of LSAs

Pacing lsa-group Group pace interval

Incomming current DD Number of neighbors in interaction. Incoming means that a


exchange neighbors neighbor enters the Exstart state for the first time.

Number of neighbors in interaction. Outgoing means that a


Outgoing current DD
neighbor returns from a higher state to the Exstart state for
exchange neighbors
re-interaction.

Number of external LSA Number of external LSAs stored in the database

External LSA Checksum


Sum of checksums of external LSAs stored in the database
Sum

Number of AS-Scoped
Number of unknown LSAs in the flooding scope
Unknown LSA

Number of LSA originated Number of generated LSAs

Number of LSA received Number of received LSAs

Log Neighbor Adjency


Whether the neighbor state change recording is enabled
Changes

BFD enabled Whether to associate OSPFv3 with BFD

Number of areas in this


Number of areas on this router
router

6-41
Command Reference OSPFv3 Commands

Number of interfaces in
Number of interfaces in this area
this area

SPF algorithm executed SPF computation times

Number of LSA Total number of LSAs in this area

Checksum Sum Sum of the checksums of LSAs in this area

Number of Unknown LSA Number of LSAs of unknown types received in this area

Whether an NSSA LSA is translated to an external LSA. This


NSSA Translator State field is valid only for the OSPFv3 process that is an ABR in
the NSSA.

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.
default-information originate Sets the default route to be redistributed.
Sets the default metric for the route to be
default-metric
redistributed.
router-id Sets the OSPFv3 routing process ID
Sets the delay and the minimum and maximum
intervals for the OSPFv3 to perform SPF
timers spf
calculation after receiving the topology change
information.

Platform N/A
Description

6.39 show ipv6 ospf database

Use this command to display the database information of the OSPFv3 process
show ipv6 ospf [ process- id ] database [ database-summary | lsa-type [ adv-router router-id ] ]

Parameter
Parameter Description
Description
process- id OSPF process ID number
The LSA types are as follows:
NSSA-external-LSA, AS-external-LSAs, Link-LSAs,
lsa-type Inter-Area-Prefix-LSAs, Inter-Area-Router-LSAs,
Intra-Area-Prefix-LSAs, Network-LSAs, Router-LSAs
If this parameter is not specified, all LSA information will be displayed.
adv-router router-id Displays the LSA information generated by the specified router.
Displays the LSA statistic information of OSPFv3 link status
database-summary
database.

6-42
Command Reference OSPFv3 Commands

Defaults N/A

Command Privileged EXEC mode.


Mode

Usage Guide N/A

Configuration The following example displays the information about the OSPFv3 process database.
Examples Ruijie# show ipv6 ospf database
OSPFv3 Router with ID ([Link]) (Process 1)
Link-LSA (Interface GigabitEthernet 0/1)
Link State ID ADV Router Age Seq# CkSum Prefix
[Link] [Link] 197 0x80000001 0x7cd8 0
[Link] [Link] 206 0x80000001 0x8c86 0
Link-LSA (Interface Loopback 1)
Link State ID ADV Router Age Seq# CkSum Prefix
[Link] [Link] 82 0x80000001 0xb760 0
Router-LSA (Area [Link])
Link State ID ADV Router Age Seq# CkSum Link
[Link] [Link] 17 0x80000006 0x62a1 1
[Link] [Link] 156 0x80000003 0x8653 1
Network-LSA (Area [Link])
Link State ID ADV Router Age Seq# CkSum
[Link] [Link] 157 0x80000001 0xf8f6
Router-LSA (Area [Link])
Link State ID ADV Router Age Seq# CkSum Link
[Link] [Link] 17 0x80000002 0x0529 0
Inter-Area-Prefix-LSA (Area [Link])
Link State ID ADV Router Age Seq# CkSum
[Link] [Link] 77 0x80000002 0x83b4
AS-external-LSA
Link State ID ADV Router Age Seq# CkSum
[Link] [Link] 1 0x80000001 0x6035 E2

Field Description

6-43
Command Reference OSPFv3 Commands

Link-LSA (Interface GigabitEthernet


0/1)
Type-1 LSA—Router-LSA
Type-2 LSA—Network-LSA
Type-3 LSA—Inter-Area-Prefix-LSA
Types of OSPFv3 Link-LSA
Type-4 LSA—Inter-Area-Router-LSA
Type-5 LSA—AS-External-LSA
Type-7 LSA—NSSA-external-LSA
Type-8 LSA—Link-LSA
Type-9 LSA—Intra-Area-Prefix-LSA

Link State ID Link state ID of LSA

ADV Router Advertising router of LSA

Age LSA aging time

Seq# LSA serial number

CkSum LSA checksum

Prefix Number of IPv6 address prefixes in Type-8 LSA

Link Number of links in Type-1 LSA

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.

Platform N/A
Description

6.40 show ipv6 ospf interface

Use this command to display the OSPFv3 interface information.


show ipv6 ospf [ process- id ] interface [ interface-type interface-number | brief ]

Parameter
Parameter Description
Description
interface-type
Specifies the interface type and interface number.
interface-number
process- id OSPFv3 process ID
brief Displays the interface summary.

Defaults N/A

Command Privileged EXEC mode.


Mode

6-44
Command Reference OSPFv3 Commands

Usage Guide N/A

Configuration The following example displays the information about the OSPFv3 interface.
Examples Ruijie# show ipv6 ospf interface
GigabitEthernet 0/1 is up, line protocol is up
Interface ID 2
IPv6 Prefixes
fe80::2d0:22ff:fe22:2223/64 (Link-Local Address)
OSPFv3 Process (1), Area [Link], Instance ID 0
Router ID [Link], Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) [Link]
Interface Address fe80::c800:eff:fe84:1c
Backup Designated Router (ID) [Link]
Interface Address fe80::2d0:22ff:fe22:2223
Timer interval configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:02
Neighbor Count is 1, Adjacent neighbor count is 1
Hello received 26 sent 26, DD received 5 sent 4
LS-Req received 1 sent 1, LS-Upd received 3 sent 6
LS-Ack received 6 sent 2, Discarded 0
If the BFD has been enabled for the neighbor on the interface, the content of “BFD enabled” is also
displayed. For example:
Ruijie# show ipv6 ospf interface
GigabitEthernet 0/1 is up, line protocol is up
Interface ID 2
IPv6 Prefixes
fe80::2d0:22ff:fe22:2223/64 (Link-Local Address)
OSPFv3 Process (1), Area [Link], Instance ID 0
Router ID [Link], Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1, BFD enabled
Designated Router (ID) [Link]
Interface Address fe80::c800:eff:fe84:1c
Backup Designated Router (ID) [Link]
Interface Address fe80::2d0:22ff:fe22:2223
Timer interval configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:02
Neighbor Count is 1, Adjacent neighbor count is 1
Hello received 26 sent 26, DD received 5 sent 4
LS-Req received 1 sent 1, LS-Upd received 3 sent 6
LS-Ack received 6 sent 2, Discarded 0

Field Description

6-45
Command Reference OSPFv3 Commands

GigabitEthernet 0/1 is up, line protocol


Link and protocol state
is up

Interface ID Interface index

IPv6 Prefixes IPv6 prefix information of an interface

OSPFv3 Process (1) OSPFv3 process where an interface resides

Area Area to which an interface belongs

Instance ID Instance to which an interface belongs

Router ID ID of an OSPFv3 router

Network Type OSPFv3 network type

Cost Cost of an OSPFv3 interface

Transmit Delay Transmission delay of an OSPFv3 interface

State DR/BDR state

Priority Priority of an OSPFv3 interface

BFD enabled Whether to associate OSPFv3 with BFD

Designated Router (ID) ID for the DR of this interface

DR's Interface address Interface address for the DR of this interface

Backup Designated Router (ID) ID for the BDR of this interface

BDR's Interface address Interface address for the BDR of this interface

Hello, Dead, Wait, and Retransmit time


Time intervals configured
corresponding to this interface

Hello due in Hello packet sending duration last time

Neighbor Count Total number of neighbors

Adjacent neighbor count Number of neighbors in full neighbor relationship

Hello received sent Statistics of the received and sent hello packets

DD received send Statistics of the received and sent DD packets

Statistics of the received and sent LS request


LS-Req received send
packets

Statistics of the received and sent LS update


LS-Upd received send
packets

Statistics of the received and sent LS response


LS-Ack received send
packets

Discard Statistics of the discarded OSPFv3 packets

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.
Enables the interface to participate in the
ipv6 ospf area
OSPFv3 process.

6-46
Command Reference OSPFv3 Commands

Platform N/A
Description

6.41 show ipv6 ospf neighbor

Use this command to display the neighbor information of the OSPFv3 process.
show ipv6 ospf [ process- id ] neighbor [ interface-type interface-number [ detail ] | neighbor-id |
detail | statistics ]

Parameter
Parameter Description
Description
process- id OSPFv3 process ID number
detail Displays details about the neighbor.
interface-type
Interface type and interface number
interface-number
neighbor-id Neighbor’s router ID
statistics Displays the statistics of the neighbor.

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following command displays the brief information about the OSPFv3 neighbor.
Examples Ruijie# show ipv6 ospf neighbor
OSPFv3 Process (1) , 1 Neighbors, 1 is Full:
Neighbor ID Pri State Dead Time Interface Instance ID
[Link] 1 Full/DR 00:00:33 GigabitEthernet 1/0 0
Ruijie# show ipv6 ospf neighbor detail
Neighbor [Link], interface address fe80::c800:eff:fe84:1c
In the area [Link] via interface GigabitEthernet 1/0
Neighbor priority is 1, State is Full, 6 state changes
DR is [Link] BDR is [Link]
Options is 0x000013 (-|R|-|-|E|V6)
Dead timer due in 00:00:36
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
BFD session state up

Field Description

6-47
Command Reference OSPFv3 Commands

OSPFv3 Process (1), 1 Neighbors, 1 Process ID, number of neighbors, and number of
is Full: neighbors in full neighbor relationship

Neighbor ID Router ID of a neighbor

Pri Priority of a neighbor

Neighbor states, including


Down—Initial status of a neighbor in a session
Attempt—When the interface of a device in the
NBMA qualified for DR election becomes valid,
the neighbor state is reset to Attempt. This state
is applicable to neighbors in the NBMA.
Init—The neighbor receives a hello packet that
does not contain the neighbor ID.
2-Way—The hello packet received from the
neighbor contains the local router ID, indicating
that 2-way communication has been established.
Exstart—An active/standby relationship is
established between a router and its neighbors
and the sequence number of DD packets is
determined, which is ready for DD packet
exchange.
State Exchange—A router sends DD packets that
describe local LSDB information to its neighbors.
Loading—A router sends LSR packets to a
neighbor to request the latest LSA.
Full—A router establishes full adjacency
relationship with neighbors.
OSPF routers play the following roles in
broadcast and NBMA networks:
DR—A DR exists in only broadcast and NBMA
networks.
BDR—A BDR exists in only broadcast and
NBMA networks.
DRother—Indicates all other devices except the
DR and BDR in broadcast and NBMA networks.
In P2P and P2MP networks, the preceding roles
do not exist, and this field is displayed as a
hyphen (-).

Dead Time Time before the neighbor enters the dead state

Instance ID ID of a neighbor instance

Interface Interface connected to neighbors

Interface address Interface address of the neighbor router

In the area Area that learns this neighbor

6-48
Command Reference OSPFv3 Commands

via interface Interface that learns this neighbor

Neighbor priority Priority value of the neighbor

State changes times Change times of the neighbor state

Interface address (namely, the DR field in the


DR hello packet) of the DR elected by the neighbor
router

Interface address (namely, the BDR field in the


BDR hello packet) of the BDR elected by the neighbor
router

Options Options for the hello packet

Time when the dead state of this neighbor is


Dead Time due in
declared

Database Summary List DD packet statistics of the neighbor

Link State Request List LSR packet statistics of the neighbor

Link State Retransmission List Retransmitted packet statistics of the neighbor

BFD session state up BFD association state

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.
Enables the interface to participate in the
ipv6 ospf area
OSPFv3 process.
area virtual-link Configures the OSPFv3 virtual link.
show ipv6 ospf interface Displays the OSPFv3 interface information.

Platform N/A
Description

6.42 show ipv6 ospf restart

Use this command to display the OSPFv3 graceful restart configuration.


show ipv6 ospf [ process- id ] restart

Parameter
Parameter Description
Description
process- id OSPFv3 process ID number.

Defaults N/A

Command Privileged EXEC mode


Mode

6-49
Command Reference OSPFv3 Commands

Usage Guide N/A

Configuration The following example displays the restarter status.


Examples Ruijie# show ipv6 ospf restart
Routing Process is ospf 1
Graceful-restart enabled
Restart grace period 120 secs
Current Restart status is plannedRestart
Current Restart remaining time 50 secs
Graceful-restart helper support enabled

Field Description

Routing Process is ospf ID of a process that starts GR

Graceful-restart enabled Whether to enable the GR function

Restart grace period GR period

Current Restart status Current GR status

Current Restart remaining time Remaining GR time

Graceful-restart helper support


Whether to support restart helper
enabled

The following example displays the helper status.


Ruijie# show ipv6 ospf restart
Routing Process is ospf 1
Neighbor [Link], interface addr [Link]
In the area [Link] via interface GigabitEthernet 6/0/0
Graceful-restart helper enabled
Current helper status is helping
Current helper remaining time 50 secs

Field Description

Neighbor Router ID of the neighbor of the helper

IP address of the interface corresponding to the


interface addr
helper

In the area Area in which the helper resides

interface GigabitEthernet Interface corresponding to the helper

Graceful-restart helper enabled Whether to enable the helper function

Current helper status Current helper status

Current helper remaining time Remaining time of a router in the helper state

Related Command Description

6-50
Command Reference OSPFv3 Commands

Commands
ipv6 router ospf Starts the OSPFv3 routing process.

Platform N/A
Description

6.43 show ipv6 ospf route

Use this command to display the OSPFv3 route information.


show ipv6 ospf [ process- id ] route [ count ]

Parameter
Parameter Description
Description
process- id OSPFv3 process ID number.
count Total number of OSPFv3 routes

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following example displays the information about OSPFv3 routes.
Examples Ruijie# show ipv6 ospf route
OSPFv3 Process (1)
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2Destination
Metric Next-hop
E2 2001:DB8:1::/64 1/20 via fe80::c800:eff:fe84:1c, GigabitEthernet 1/0
O 2001:DB8:2::/64 11 via fe80::c800:eff:fe84:1c, GigabitEthernet 1/0,
Area [Link]

Field Description

OSPFv3 Process (1) OSPFv3 process ID

Type and destination network of OSPFv3 routes


OSPFv3 supports the following four types of
routes:
Destination
C: Direct route
D: Black-hole route
O: Internal route of OSPFv3

6-51
Command Reference OSPFv3 Commands

IA: Inter-area route of OSPFv3


N1: NSSA external type 1 route of OSPFv3
N2: NSSA external type 2 route of OSPFv3
E1: External type 1 route of OSPFv3
E2: External type 2 route of OSPFv3

Metric Cost of a route

Next-hop Next hop of a route

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.

Platform N/A
Description

6.44 show ipv6 ospf summary-prefix

Use this command to display the external route convergence information of OSPFv3
show ipv6 ospf [ process- id ] summary-prefix

Parameter
Parameter Description
Description
process- id OSPFv3 process ID number

Defaults N/A

Command Privileged EXEC mode.


Mode

Usage Guide N/A

Configuration The following example displays the external route convergence information of OSPFv3.
Examples Ruijie# show ipv6 ospf summary-prefix
OSPFv3 Process 1, Summary-prefix:
2001:db8::/64,Metric 16777215,Type0,Tag0,Match count0,advertise

Field Description

Summary-prefix Prefix of a summarized route

Metric Metric of a summarized route

Type Type of a summarized route

Match count Number of summarized routes

6-52
Command Reference OSPFv3 Commands

Advertise Advertisement after summarization

Tag Tag of a summarized route

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.
Configures the converge route outside the
summary-prefix
OSPFv3 routing domain.

Platform N/A
Description

6.45 show ipv6 ospf topology

Use this command to display the topology information about each area of OSPFv3.
show ipv6 ospf [ process- id ] topology [ area area-id ]

Parameter
Parameter Description
Description
process- id OSPFv3 process ID number
area-id Area ID

Defaults N/A

Command Privileged EXEC mode


Mode

Usage Guide N/A

Configuration The following command displays the topology information about each area of OSPFv3.
Examples Ruijie# show ipv6 ospf topology
OSPFv3 Process (1)
OSPFv3 paths to Area ([Link]) routers
Router ID Bits Metric Next-Hop
Interface
[Link] EB --
[Link] E 1 [Link]
GigabitEthernet 1/0

OSPFv3 paths to Area ([Link]) routers


Router ID Bits Metric Next-Hop
Interface
[Link] B --

6-53
Command Reference OSPFv3 Commands

Field Description

OSPFv3 paths to Area Topological information corresponding to an area

Router ID Router ID of a node

Bits Options for a node

Metric Metric from this node to the root node

Interface Outbound interface to this node

Next-Hop(router/address) Next hop to this node

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.
Configures the address range of the OSPF
area range
area.

Platform N/A
Description

6.46 show ipv6 ospf virtual-links

Use this command to display the virtual link information of the OSPFv3 process
show ipv6 ospf [ process- id ] virtual-links

Parameter
Parameter Description
Description
process- id OSPFv3 process ID number

Defaults N/A

Command Privileged EXEC mode.


Mode

Usage Guide N/A

Configuration The following command displays the information about the OSPFv3 virtual link.
Examples Ruijie# show ipv6 ospf virtual-links
Virtual Link VLINK1 to router [Link] is down
Transit area [Link] via interface GigabitEthernet 1/0, instance ID 0
Local address *
Remote address 3333::1/128
Transmit Delay is 1 sec, State Down,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

6-54
Command Reference OSPFv3 Commands

Hello due in inactive


Adjacency state Down

Field Description

Virtual Link VLINK1 to router Neighbor and neighbor state of a virtual link

Transit area Transmission area of a virtual link

via interface Interface associated with a virtual link

Local address Address of the local interface

Remote address Address of the peer interface

Transmit Delay Transmission delay of a virtual link

State Network type of a virtual link

Timer of a virtual link, including Hello, Dead, and


Timer intervals configured
Retransmit

Hello due in Hello packet sending interval

Adjacency state Neighbor state of a virtual link

Related
Command Description
Commands
ipv6 router ospf Starts the OSPFv3 routing process.
area virtual-link Configures the OSPFv3 virtual link.
show ipv6 ospf neighbor Displays the OSPFv3 neighbor information.

Platform N/A
Description

6.47 timers lsa arrival

Use this command to configure a delay for receiving repeated LSAs. Use the no form of this
command to restore the default settings.
timers lsa arrival arrival-time
no timers lsa arrival

Parameter
Parameter Description
Description
Specifies the delay for receiving repeated LSAs. The range is from 0
arrival-time
to 600000 in the unit of milliseconds.

Defaults The default is 1000.

Command
Routing process configuration mode
Mode

6-55
Command Reference OSPFv3 Commands

Usage Guide Configure the device not to process repeated LSAs received within the specific delay.

Configuration The following example sets the delay for receiving repeated LSAs to 2 seconds.
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# timers lsa arrival 2000

Related
Command Description
Commands
Displays OSPFv3 process information,
show ipv6 ospf
including identifiers of routing devices.

Platform N/A
Description

6.48 timers pacing lsa-group

Use this command to set an LSA group pace interval. Use the no form of this command to restore the
default settings.
timers pacing lsa-group seconds
no timers pacing lsa-group

Parameter
Parameter Description
Description
Specifies the LSA group pace interval. The range is from 10 to 1800
seconds
in the unit of seconds. The default value is 30.

Defaults The default is 30.

Command
Routing process configuration mode
Mode

Usage Guide Each LSA has its own lifetime, that is, LSA aging time. An LSA existing for 1800s will be refreshed so
that the living time of the LSA will not exceed its aging time. This ensures that normal LSAs are not
cleared due to timeout of aging time. If update and aging operations of each LSA are separately
computed, a large number of CPU resources will be consumed.
To effectively utilize CPU resources, configure the device to group LSAs for uniform refreshment. The
time for refreshing a group of LSAs is called an LSA group pace interval. Grouping refreshment is to
put the LSAs to be refreshed within an LSA group pace interval into a group and refresh them
uniformly.
When the number of LSAs is fixed, a longer LSA group pace interval will allow the CPU to process
more LSAs when the timer expires for one time. To keep the stability of the CPU, you are
recommended not to set an over long LSA group pace interval. This prevents the CPU from
processing excessive LSAs when the timer expires each time. If the CPU processes a large number

6-56
Command Reference OSPFv3 Commands

of LSAs each time, it is recommended to shorten the LSA group pace interval. For example, if the
database has 10000 LSAs, you need to reduce the LSA group pace interval. If it has only 40 to 100
LSAs, you can adjust the group pace interval to 10 through 20 minutes.

Configuration The following example sets the LSA group pace interval to 120 seconds.
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)#timers pacing lsa-group 120

Related
Command Description
Commands
show ipv6 ospf Displays OSPFv3 configuration information.

Platform N/A
Description

6.49 timers pacing lsa-transmit

Use this command to set an interval for sending LSA groups. Use the no form of this command to
restore the default settings.
timers pacing lsa-transmit transmit-time transmit-count
no timers pacing lsa-transmit

Parameter
Parameter Description
Description
Specifies the interval for sending LSA groups. The range is from 10 to
transmit-time
1000 in the unit of milliseconds.
Specifies the number of LS-UPD packets in an LSA group. The range
transmit-count
is from 1 to 200.

Defaults The default transmit-time is 40 and the transmit-count is 1.

Command
Routing process configuration mode
Mode

Usage Guide There are usually a lot of LSAs on a network; therefore, the load of the device is very high. Setting
proper transimit-time and transimit-count values can restrict flooding of LS-UPD packets on the
network.
When the CPU load is not high and network bandwidth usage is not large, you can reduce the
transimit-time value and increase the transimit-count value to accelerate route convergence.

Configuration The following example sets the interval for sending LS-UPDs to 50 milliseconds and the specified 20
Examples packets to be sent each time.
Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# timers pacing lsa-transmit 50 20

6-57
Command Reference OSPFv3 Commands

Related
Command Description
Commands
show ipv6 ospf Displays OSPFv3 process information.

Platform N/A
Description

6.50 timers spf

Use this command to set the delay and interval for the OSPFv3 to calculate SPF after receiving the
topology change. Use the no format of this command to restore the default settings.
timers spf spf-delay holdtime
no timers spf

Parameter
Parameter Description
Description
Defines the waiting time for the SPF calculation, which ranges from 0
to 2147483647 seconds. After receiving the topology change
spf-delay
information, the OSPF routing process has to waiting for a given
period before making the SPF calculation.
Defines the interval between two SPF calculations, which ranges
spf-holdtime from 0 to 2147483647 seconds. If the interval has not passed even if
the waiting time has elapsed, no SPF calculation can be made yet.

Defaults There are two default situations: 1. The versions earlier than RGOS 10.4 do not support the
command timers throttle spf. The system default is timers spf 5 10. 2. The RGOS 10.4 and the later
versions do support the command timers throttle spf, where timer spf takes no effect by default.
The delay for SPF calculation is subject to the default settings of the command timers throttle spf.
Refer to the description of the command.

Command
Routing process configuration mode
Mode

Usage Guide The smaller the spf-delay and spf-holdtime, the shorter time the OSPF takes to adapt to the topology
change, but the more CPU time will be used of the router.

The timer spf configuration and the timers throttle spf configuration will overwrite each other.

Configuration The following example sets the delay and holdtime of the OSPFv3 to 3 seconds and 9 seconds
Examples respectively.
Ruijie(config)# ipv6 router ospf 20
Ruijie(config-router)# timers spf 3 9

6-58
Command Reference OSPFv3 Commands

Related
Command Description
Commands
clear ipv6 ospf Restarts part of the function of the OSPFv3.
Displays the OSPFv3 routing process
show ipv6 ospf
information.
Configures the exponential backoff delay of the
timers throttle spf
SPF calculation

Platform N/A
Description

6.51 timers throttle lsa all

Use this command to configure an exponential backoff algorithm for generating LSAs. Use the no
form of this command to restore the default settings.
timers throttle lsa all delay-time hold-time max-wait-time
no timers throttle lsa all

Parameter
Parameter Description
Description
Specifies a shortest LSA generation delay, in milliseconds (the first
delay-time batch of LSAs is usually generated immediately).
The range is from 0 to 600000 in the unit of milliseconds.
Specifies a shortest interval between the first two times of LSA
hold-time refreshment, in milliseconds.
The range is from 1 to 600000 in the unit of milliseconds
Specifies a longest interval for consecutive two times of LSA
refreshment, in milliseconds. The value is used to determine whether
max-wait-time
LSAs are refreshed consecutively.
The range is from 1 to 600000 in the unit of milliseconds.

Defaults The default delay-time is 0, hold-time is 5000 and max-wait-time is 5000.

Command
Routing process configuration mode
Mode

Usage Guide If high route convergence capability is needed when links are changed, set a small delay-time value.
To reduce CPU consumption, you can properly increase the values of the parameters.

The hold-time value cannot be smaller than the delay-time value and must be smaller than or
equal to the max-wait-time value.

Configuration The following example sets delay-time to 10 milliseconds, hold-time to one second, and
Examples max-wait-time to five seconds.

6-59
Command Reference OSPFv3 Commands

Ruijie(config)# ipv6 router ospf 1


Ruijie(config-router)# timers throttle lsa all 10 1000 5000

Related
Command Description
Commands
show ipv6 ospf Displays OSPFv3 process information.

Platform N/A
Description

6.52 timers throttle route

Use this command to configure the delay time of route calculation on receiving the ASBR summary
LSA and the external summary LSA. Use the no form of this command to restore the default settings.
timers throttle route { inter-area ia-delay | ase ase-delay }
no timers throttle route { inter-area | ase }

Parameter
Parameter Description
Description
inter-area Calculates the inter area routes.
Sets the delay time of the inter-area route calculation, in the range
from 0 to 600000 in the unit of milliseconds. On receiving the ASBR
ia-delay
summary LSA, the router will not calculate the inter-area routes until
the ia-delay time runs out.
ase Calculates the external routes.
Sets the delay time of the external route calculation, in the range from
0 to 600000 in the unit of milliseconds. On receiving the external
ase-delay
summary LSA, the router will not calculate the external routes until
the ase-delay time runs out.

Defaults The default ia-delay is 0 and ase-delay is 0.

Command
Mode Routing process configuration mode

Usage Guide The default settings are recommended if the network needs to be fast converged. For the instable
network where multiple inter-area and external routes exist, if you want to optimize the route
calculation and save the CPU resources, increase the delay time.

Configuration The following example sets the delay time of the inter-area route calculation to one second.
Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# timers throttle route inter-area 1000

6-60
Command Reference OSPFv3 Commands

Related
Command Description
Commands
N/A N/A

Platform N/A
Description

6.53 timers throttle spf

Use this command to configure, the delay for SPF calculation as well as the minimum and maximum
intervals between two SPF calculations after receiving the topology change information for OSPFv3
in the routing process configuration mode. Use the no form of this command to restore the default
settings.
timers throttle spf spf-delay spf-holdtime spf-max-waittime
no timers throttle spf

Parameter
Parameter Description
Description
Specifies an SPF calculation delay after the topology change
spf-delay information is received.
The range is from 1 to 600000 in the unit of milliseconds.
Specifies a shortest interval between two SPF calculations.
spf-holdtime
The range is from 1 to 600000 in the unit of milliseconds.
Specifies a longest interval between two SPF calculations.
spf-max-waittime
The range is from 1 to 600000 in the unit of milliseconds.

Defaults The default spf-delay is 1000. spf-holdtime is 5000 and spf-max-waittime is 10000.

Command
Mode Routing process configuration mode.

Usage Guide Spf-delay refers to the delay from the topology change to the SPF calculation. Spf-holdtime refers to
the minimum interval between the first and the second SPF calculations. Then, the interval of the
consecutive SPF calculations is at least twice as the last interval till it reaches to spf-max-waittime. If
the interval between two SPF calculations has exceeded the required minimum value, the interval of
SPF calculation will re-start from spf-holdtime.
Smaller spf-delay and spf-holdtime value can make the topology convergence faster. Greater
spf-max-waittime value can reduce the SPF calculations. Those configuration are flexible according
to the actual stability of the network topology.
Compared with the timers spf command, this command is more flexible. It not only speeds up the
SPF convergence calculation, but also reduces the system resources consumption of SPF calculation
as the topology changes continuously. Therefore, the timers throttle spf command is recommended.

The spf-holdtime cannot be smaller than spf-delay, or the spf-holdtime will be set to be equal

6-61
Command Reference OSPFv3 Commands

to spf-delay;

The spf-max-waitime cannot be smaller than spf-holdtime, or the spf-max-waittime will be set
to be equal to spf-holdtime automatically;

The configuration of the timers spf command and of the timers throttle spf command are
overwritten each other.

With neither timers spf command nor timers throttle spf command configured, the default
value refers to the default of the timers throttle spf command

Configuration The following example configures the delay and holdtime and the maximum time interval of the
Examples OSPFv3 as 5ms, 1000ms and 90000ms respectively. If the topology changes consecutively, the time
for SPF calculation is: five milliseconds, one second, three seconds, seven seconds, 15 seconds, 31
seconds, 63 seconds, 89 seconds, 179 seconds, 179+90 seconds……
Ruijie(config)# ipv6 router ospf 20
Ruijie(config-router)# timers spf 5 1000 90000

Related
Command Description
Commands
clear ipv6 ospf Restarts part of the OSPFv3 function.
Displays the routing process information of the
show ipv6 ospf
OSFPv3
timers spf Configures the SPF calculation delay .

Platform N/A
Description

6.54 two-way-maintain

Use this command to enable two-way OSPFv3 maintenance. Use the no form of this command to
disable this function.
two-way-maintain
no two-way-maintain

Parameter
Parameter Description
Description
N/A N/A

Defaults Two-way OSPFv3 maintenance is enabled by default.

Command
Routing process configuration mode
Mode

Usage Guide Sometimes, there are a lot of sent and received packets on a network, occupying large CPU and

6-62
Command Reference OSPFv3 Commands

memory resources. As a result, some packets cannot be processed immediately or are directly lost. If
hello packets from a neighbor cannot be processed within the dead interval of neighbors, the
connection with the neighbor will be interrupted due to connection timeout. If two-way OSPFv3
maintenance is enabled and a large number of packets exist on the network, besides hello packets,
the two-way neighboring relationship between the device and the neighbor can also be maintained by
DD, LSU, LSR, and LSAck packets from the neighbor. This prevents the neighboring relationship
from failing due to receiving delay or discarding of hello packets.

Configuration The following example disables two-way OSPFv3 maintenance.


Examples Ruijie(config)# ipv6 router ospf 1
Ruijie(config-router)# no two-way-maintain

Related
Command Description
Commands
Displays global OSPFv3 configuration
show ipv6 ospf
information.

Platform N/A
Description

6-63
Command Reference Protocol-independent Commands

7 Protocol-independent Commands

7.1 accept-lifetime

Use this command in the encryption key configuration mode to specify the lifetime of an encryption key
in its receiving direction. Use the no form of this command to restore the default value.
accept-lifetime start-time { infinite | end-time | duration seconds }
no accept-lifetime

Parameter Parameter Description


description start-time Start time of the lifetime. The syntax is as follows:
hh:mm:ss month date year
hh:mm:ss date month year
 hh—hour
 mm—minute
 ss—second
 month—month
 date—day
 year—year
The default start time is Jun 1, 1993, which is also the earliest start
time available.
infinite Indicates that the encryption key is valid for ever.
end-time End time of the encryption key. It must be later than the start time.
duration seconds Duration of the encryption key after the start time. The value ranges
from 1 to 2147483646.

Defaults By default, the lifetime is infinite

Command
Encryption key configuration mode
mode

Usage Use this command to specify the lifetime of an encryption key in its receiving direction.
Guide

Examples The following example configures the lifetime from 0:00 on September 9, 2000 to 0:00 on October 12,
2011.
Ruijie(config)# key chain ripkeys
Ruijie(config-keychain)# key 1
Ruijie(config-keychain-key)#key-string Hello
Ruijie(config-keychain-key)#accept-lifetime 00:00:00 Sep 9 2000 00:00:00 Dec
12 2011

7-1
Command Reference Protocol-independent Commands

Related Command Description


command - -

Platform -
description

7.2 ip as-path access-list

Use this command to configure an autonomous system (AS) path filter using a regular expression. Use
the no form of this command to remove the AS path filter using a regular expression.
ip as-path access-list path-list-num { permit | deny } regular-expression
no ip as-path access-list path-list-num [ { permit | deny } regular-expression ]

Parameter Parameter Description


description path-list-num Specifies the AS-path access-list number. The range is from 1 to
500.
permit Permits advertisement based on matching conditions.
deny Denies advertisement based on matching conditions.
regular-expression Regular expression that defines the AS-path filter. The expression
length range is from 1 to 255 characters.

Defaults By default, no AS path filter using a regular expression is configured.

Command
Global configuration mode
mode

Usage N/A
Guide

Examples The following example configures an AS path filter matching the path which contains AS number 123
only.
Ruijie(config)# ip as-path access-list 105 deny ^123$

Related Command Description


command - -

Platform -
description

7.3 ip community-list

Use this command to define a standard or expanded community list and control access to it. Use the

7-2
Command Reference Protocol-independent Commands

no form of this command to remove the setting.


ip community-list { community-list-number | standard community-list-name } { permit | deny }
[ community-list-number | internet | local-AS ]
ip community-list { community-list-number | expanded community-list-name } { permit | deny }
[ regular-expression ]
no ip community-list { { standard | expanded } community-list-name | community-list-number }

Parameter Description
community-list-name Name of the community list.
community-list-number Number of the community list.
standard Indicates standard community list numbered in 1 to 99.
expanded Indicates expanded community list numbered in 100 to 199.
Parameter
permit Permits access to the community list.
description
deny Denies access to the community list.
internet Internet community.
local-AS Autonomous system.
Defines a matching template that is used to match an
regular-expression
extcommunity.

Defaults None

Command
Global configuration mode.
mode

Usage Up to 32 community numbers are supported by each community, including internet, local-AS,
Guides no-advertise and no-export.

Ruijie(config)# ip community-list standard 1 deny [Link]


Examples
Ruijie(config)# ip community-list standard 1 permit internet

Command Description
match community Match the community list.
Related
Remove the community value of the BGP path according to
commands set community-list delete
the community list.
show ip community-list Show the community list information.

7.4 ip extcommunity-list

Use this command to create an extcommunity list and add an entry to the list. Use the no form of this
command to remove the setting.
ip extcommunity-list {expanded-list | expanded list-name } { permit | deny } [ regular-expression ]

7-3
Command Reference Protocol-independent Commands

ip extcommunity-list {standard-list | standard list-name } { permit | deny } [ rt value] [ soo value ]


no ip extcommunity-list { expanded-list | expanded list-name | standard-list | standard list-name }

Parameter Description
Indicates an extended extcommunity list, ranging from 100 to
expand-list
199. One extcommunity list may contain multiple rules.
Indicates a standard extcommunity list, ranging from 1 to 99. One
standard-list
extcommunity list may contain multiple rules.
Indicates the name of an extended extcommunity, comprising not
expanded list-name more than 32 characters. When using this parameter, you enter
the extcommunity list configuration mode.
Indicates the name of a standard extcommunity list, comprising
standard list-name not more than 32 characters. When using this parameter, you
enter the extcommunity list configuration mode.
Parameter
permit Defines an extcommunity rule for permitting.
description
deny Defines an extcommunity rule for denying.
(optional) Defines a matching template that is used to match an
regular-expression
extcommunity.
(Optional) Sets the RT attribute value. This command can be
rt used only for the standard extcommunity configuration, but not
for the extended extcommunity configuration.
(Optional) Sets the SOO attribute value. This command can be
soo used only for the standard extcommunity configuration, but not
for the extended extcommunity configuration.
Indicates the value of an extended community
value
(extend_community_value).

Defaults It is disabled by default.

Command
Global configuration mode and ip extcommunity-list configuration mode.
mode

Usage This command is used to define the extcommunity list.


Guides
[Link] following example defines an ip extcommunity-list.
Ruijie(config)# ip extcommunity-list 1 permit rt 100:1
Ruijie(config)# ip extcommunity-list standard aaa permit rt
100:2
Ruijie(config)# ip extcommunity-list expanded ext1 permit 200:[0~9][0~9]
Examples

2. The following example displays how to use ip extcommunity.


Ruijie(config)# route-map rt_in_filter
Ruijie(config-route-map)# match extcommunity 1
Ruijie(config-route-map)# match extcommunity ext1

7-4
Command Reference Protocol-independent Commands

Ruijie(config)# router bgp 100


Ruijie(config-router)# address-family vpn
Ruijie(config-router-af)#neighbor [Link] send-community extended
Ruijie(config-router-af)#neighbor [Link] route-map rt_in_filter in

7.5 ip prefix-list

Use this command to create a prefix list or add an entry to the prefix list. Use the no form of this
command to remove the prefix list or an entry.
ip prefix-list prefix-list-name [ seq seq-number] { deny | permit } ip-prefix [ ge minimum-prefix-length ]
[ le maximum-prefix- length]
no ip prefix-list prefix-list-name [ seq seq-number] { deny | permit } ip-prefix [ ge
minimum-prefix-length ] [ le maximum-prefix- length ]

Parameter Description
prefix-list-name Name of the prefix list
Sequence number of an entry in the range of 1 to
2147483647. When you execute this command to add an
entry without a sequence number, the system allocates a
default sequence number for the entry. The default
seq-number
sequence number of the first entry is 5. Every
subsequential entry without a sequence number uses the
time of 5 larger than the previous sequence number as the
default sequence number.
Parameter
deny Deny the route matching the prefix list.
description
permit Permit the route matching the prefix list.
Network address and mask. Network address can be any
ip-prefix valid IP address and the mask length is in the range of 0 to
32.
(Optional) Minimum length of the prefix (the starting length)
minimum-prefix-length Note: “ge” indicates the operation of “larger than” and
“equivalent to”.
(Optional) Maximum length of the prefix (the ending length)
maximum-prefix-length Note: “le” indicates the operation of “less than” and
“equivalent to”.

Defaults None

Command
Global configuration mode.
mode

Usage The ip prefix-list command configures the prefix list, with the permit or deny keyword to determine the
Guides action in case of matching.

7-5
Command Reference Protocol-independent Commands

You can execute this command to define an exact match, or use “ge” or “le” to define a range match for
a prefix for flexible configuration. “ge” indicates the range of minimum-prefix-length to 32; “le” indicates
the range of the mask length of the IP prefix to maximum-prefix-length; “ge” and “le” indicates the range
of minimum-prefix-length to maximum-prefix-length, namely, mask length of IP prefix <
minimum-prefix-length < maximum-prefix-length <=32.

The following example filters the RIP routes the OSPF redistributes by the destination IP address
following the rule defined in the associated IP prefix list, for example, redistribute the routes whose
destination IP address is in the range [Link]/24.
Ruijie# configure terminal
Examples
Ruijie(config)# ip prefix-list pre1 permit [Link]/24
Ruijie(config)# router ospf
Ruijie(config-router)# distribute-list prefix pre1 out rip
Ruijie(config-router)# end

7.6 ip prefix-list description

Use this command to add the description of a prefix list. Use the no form of this command to delete the
description.
ip prefix-list prefix-list-name description description-text

Parameter Description
Parameter
prefix-list-name Name of the prefix list
description
description-text Description of the prefix list

Defaults No description is added for a prefix list, by default.

Command
Global configuration mode
mode

The example below adds the description for the prefix list:
Examples Ruijie# configure terminal
Ruijie(config)# ip prefix-list pre description Deny routes from Net-A

7.7 ip prefix-list sequence-number

Use this command to enable sort function for a prefix list. Use the no form of this command to disable
the sort function.
ip prefix-list sequence-number
no ip prefix-list sequence-number

7-6
Command Reference Protocol-independent Commands

Parameter
Disabled
description

Defaults No sequence number is added for a prefix list, by default.

Command
Global configuration mode
mode

The example below adds a sequence number for the prefix list:
Examples Ruijie# configure terminal
Ruijie(config)# ip prefix-list sequence-number

Related Command Description


commands ip prefix-list Configure the prefix list.

Platform
N/A
description

7.8 key

Use this command to define an encryption key and enter the encryption key chain configuration mode.
Use the no form of this command to delete it.
key key-id
no key key-id

Parameter Parameter Description


description key-id Key ID, ranging from 0 to 2147483647.

Defaults No encryption key is configured.

Command
Encryption key chain configuration mode.
mode

Usage Use this command to define an encryption key.


Guide

Examples The following example configures encryption key chain ripkeys and key 1.
Ruijie(config)# key chain ripkeys
Ruijie(config-keychain)# key 1
Ruijie(config-keychain-key)#

7-7
Command Reference Protocol-independent Commands

Related Command Description


command - -

Platform -
description

7.9 key chain

Use this command to define a key chain and enter the key chain configuration mode. Use the no form
of this command to delete it.
key chain key-chain-name
no key chain key-chain-name

Parameter Parameter Description


description key-chain-name Key chain name.

Defaults No key chain is configured.

Command
Global configuration mode.
mode

Usage
For a key chain to take effect, you need to configure at least one key.
Guide

Examples The following example configures key chain ripkeys and enters the key chain configuration mode.
Ruijie(config)# key chain ripkeys
Ruijie(config-keychain)#

Related Command Description


command - -

Platform -
description

7.10 key-string

Use this command to specify a key string. Use the no form of this command to delete it.
key-string [ 0 | 7 ] text
no key-string

Parameter Parameter Description


description 0 Use plaintext.
7 Use encryption.

7-8
Command Reference Protocol-independent Commands

text Authentication string.

Defaults No key string is configured.

Command
Encryption key configuration mode.
mode

Usage Use this command to specify a key string.


Guide

Examples The following example configures key chain ripkeys, key 1 and the key string abc:
Ruijie(config)# key chain ripkeys
Ruijie(config-keychain)# key 1
Ruijie(config-keychain-key)#key-string abc

Related Command Description


command - -

Platform -
description

7.11 match community

Use this command to redistribute the routes matching the Community attribute permitted by the ACL in
the route map configuration mode. Use the no form of this command to remove the setting.
match community { community-list-number | community-list-name} [exact-match]
[ {community-list-number | community-list-name} [exact-match] …]
no match community { community-list-number | community-list-name} [exact-match]
[ { community-list-number | community-list-name} [exact-match] …]

Parameter Description
Number of the standard community list in the range 1 to 99.
Parameter community-list-number
Number of the extended community list in the range of 100 to 199
description
communitys-list-name Name of the community list in the range of less than 80 characters
exact-match Match the community list exactly.

Defaults None.

Command
mode Route map configuration mode.

The match community can be followed by more than one community list number or name, but the
Usage Guides
total of community lists and names should not be greater than 6.

7-9
Command Reference Protocol-independent Commands

Each exact-match applies to only the previous list, not all the lists.
One or more match or set commands can be executed to configure one route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation
will be performed.

Ruijie(config)# ip community-list 1 permit 100:2 100:30


Ruijie(config)# route-map set_lopref
Examples
Ruijie(config-route-map)# match community 1 exact-match
Ruijie(config-route-map)# set local-preference 20

Command Description
match as-path Match the AS_PATH attribute.
match metric Match the metric.
Related
match origin Match the source.
commands
set as-path prepend Set the AS_PATH attribute.
set metric Set the metric.
set metric-type Set the metric type.

7.12 match interface

Use match interface command to redistribute the routes whose next hop is the specified interface.
Use the no form of this command to remove the setting.
match interface interface-type interface-number […interface-type interface-number]
no match interface [interface-type interface-number […interface-type interface-number]]

Parameter Description
Parameter
interface-type Interface type
description
interface-number Interface number

Defaults None.

Command
mode Route map configuration mode.

This command can be followed by multiple interfaces.


You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the route in the OSPF routing domain and then advertise it to the RIP routing
domain, and vice versa. The mutual route redistribution can be implemented between all the IP
Usage
routing protocols.
Guides
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will

7-10
Command Reference Protocol-independent Commands

be performed.

The route map can be configured very flexibly for route redistribution and policy-based routing. No
matter how the route map is used, the configuration principle is the same, except that different
command sets are used. Even if it is used on the route redistribution, different routing protocols can
use different commands with the route map.
The following example redistributes the RIP route with the next hop of GigabitEthernet 0/0 in the
OSPF routing protocol.
Examples router ospf
Ruijie(config)# router ospf
Ruijie(config-router)# redistribute rip subnets route-map redrip
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match interface GigabitEthernet 0/0

Command Description
match ip address Match the address in the access list.
match ip next-hop Match the next-hop IP address in the access list.
match ip route-source Match the source IP address in the access list.
Related match metric Match the metric.
commands match route-type Match the route type.
match tag Match the tag.
set metric Set the metric.
set metric-type Set the metric type.
set tag Set the tag.

7.13 match ip address

Use match ip address command to redistribute the routes matching the IP address permitted by the
ACL or the prefix list. Use the no form of this command to remove the setting.
match ip address { { access-list-number | access-list-name }&<1-6> | prefix-list
prefix-list-name&<1-6>
no match ip address [ { access-list-number | access-list-name }&<1-6> | prefix-list
prefix-list-name&<1-6>

Parameter Description
access-list-number Number of the access list
Parameter
access-list-name Name of the access list
description
prefix-list prefix-list-name Specify the prefix list to match.
&<1-6> The parameter can be input up to six times.

Defaults None.

7-11
Command Reference Protocol-independent Commands

Command
mode Route map configuration mode.

Multiple access list numbers or names may follow match ip address.


You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the route in the OSPF routing domain and then advertise it to the RIP routing
domain, and vice versa. The mutual route redistribution can be implemented between all the IP
Usage routing protocols.
Guides For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The route map can be configured very flexibly for route redistribution and policy-based routing. No
matter how the route map is used, the configuration principle is the same, except that different
command sets are used. Even if it is used on the route redistribution, different routing protocols can
use different commands with the route map.
The following example enables the OSPF routing protocol to redistribute RIP routes that match
access list 10, with the route type being type-1 external type and the default metric being 40.
Ruijie(config)# router ospf
Examples Ruijie(config-router)# redistribute rip subnets route-map redrip
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# exit
Ruijie(config)# access-list 10 permit [Link] [Link]
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match ip address 10
Ruijie(config-route-map)# set metric 40
Ruijie(config-route-map)# set metric-type type-1

Command Description
access-list Set the access list.
match interface Match the next-hop interface of the route.
match ip next-hop Match the next-hop address in the access list.
match ip route-source Match the route source address in the access list.
Related
match metric Match the metric.
commands
match route-type Match the route type.
match tag Match the tag.
set metric Set the metric.
set metric-type Set the metric type.
set tag Set the tag.

7-12
Command Reference Protocol-independent Commands

7.14 match ip next-hop

Use match ip next-hop command to redistribute the routes whose next-hop IP address matches the
access list or the prefix list. Use the no form of this command to remove the setting.
match ip next-hop { { access-list-number | access-list-name }&<1-6> | prefix-list
prefix-list-name&<1-6>
no match ip next-hop [ { access-list-number | access-list-name }&<1-6> | prefix-list
prefix-list-name&<1-6>

Parameter Description
access-list-number Number of the access list
Parameter
access-list-name Name of the access list
description
prefix-list prefix-list-name Specify the prefix list to match.
&<1-6> The parameter can be input up to six times.

Defaults None.

Command
mode Route map configuration mode.

Multiple access list numbers or names may follow match ip next-hop.


You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the route in the OSPF routing domain and then advertise it to the RIP routing
domain, and vice versa. The mutual route redistribution can be implemented between all the IP
Usage routing protocols.
Guides For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the OSPF routing protocol redistributes the RIP routes. As long as the next hop
address of the RIP route matches the access list 10 or 20, the OSPF allows for redistribution.
Ruijie(config)# router ospf
Ruijie(config-router)# redistribute rip subnets route-map redrip
Ruijie(config-router)# network [Link] [Link] area 0
Examples
Ruijie(config-router)# exit
Ruijie(config)# access-list 10 permit host [Link]
Ruijie(config)# access-list 20 permit host [Link]
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match ip next-hop 10 20

Related Command Description


commands access-list Set the access list.

7-13
Command Reference Protocol-independent Commands

match ip address Match the IP address in the access list.


match interface Match the next-hop interface of the route.
match ip route-source Match the route source address in the access list.
match metric Match the metric.
match route-type Match the route type.
match tag Match the tag.
set metric Set the metric.
set metric-type Set the metric type.
set tag Set the tag.

7.15 match ip route-source

Use match ip route-source command to redistribute the routes whose source IP address matches the
access list. Use the no form of this command to remove the setting.
match ip route-source { { access-list-number | access-list-name }&<1-6> | prefix-list
prefix-list-name&<1-6>
no match ip route-source [ { access-list-number | access-list-name }&<1-6> | prefix-list
prefix-list-name&<1-6>

Parameter Description
access-list-number Number of the access list
Parameter
access-list-name Name of the access list
description
prefix-list prefix-list-name Specify the prefix list to match.
&<1-6> The parameter can be input up to six times.

Defaults None.

Command
mode Route map configuration mode.

Multiple access list numbers may follow match ip route-source.


You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the route in the OSPF routing domain and then advertise it to the RIP routing
domain, and vice versa. The mutual route redistribution can be implemented between all the IP
Usage routing protocols.
Guides For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the OSPF routing protocol redistributes the RIP routes. As long as the source
Examples
IP address of the RIP route matches the access list 5, the OSPF allows for redistribution.

7-14
Command Reference Protocol-independent Commands

Ruijie(config)# router ospf


Ruijie(config-router)# redistribute rip subnets
Ruijie(config-router)# route-map redrip
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# exit
Ruijie(config)# access-list 5 permit host [Link]
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match ip route-source 5

Command Description
access-list Set the access list.
match ip address Match the IP address in the access list.
match interface Match the next-hop interface of the route.
match ip next-hop Match the next-hop IP address in the access list.
Related
match metric Match the metric.
commands
match route-type Match the route type.
match tag Match the tag.
set metric Set the metric.
set metric-type Set the metric type.
set tag Set the tag.

7.16 match length

Use this command to implement the policy-based routing based on the IP packet length in the route
map configuration mode. The no form of Use this command to remove the setting.
match length min-length max-length
no match length min-length max-length

Parameter Description
Parameter
min-length Minimum length of the IP packet
description
max-length Maximum length of the IP packet

Defaults None

Command
mode Route map configuration mode

7-15
Command Reference Protocol-independent Commands

Policy-based routing is a packet forwarding mechanism that is more flexible than the routing based on
the destination network. After the policy-based routing is used, the device will decide how to process
the packets needed to route according to the route map, which decides the next-hop device of the
packets.
To apply the policy-based routing, you must specify the route map for it and create the route map. A
route map contains multiple policies, and each policy defines one or more match rules and the
Usage Guide
corresponding operations. After policy-based routing is applied to an interface, the packets received
by the interface will be checked. The packets that do not match any policy in the route map will be
forwarded to the usual route. The packets that match a policy in the route map will be processed
according to the operation defined in the policy.
To route interactive traffic and mass traffic respectively, use the packet size based policy-based
routing.

In the example below, the policy-based routing is enabled on GigabitEthernet 1/0 to send the traffic
with packet size smaller than 500 bytes through GigabitEthernet 1/2 interface.
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ip policy route-map smallpak
Examples
Ruijie(config-if-GigabitEthernet 0/0)# exit
Ruijie(config)# route-map smallpak permit 10
Ruijie(config-route-map)# match length 0 500
Ruijie(config-route-map)# set interface GigabitEthernet 0/2

Command Description
route-map Define the route map
match ip address Match the address in the access list
Related set default interface Set the default packet output interface.
commands set interface Set the packet output interface
set ip default next-hop Set the default next hop of the packets.
set ip next-hop Set the next-hop IP address of the packets
set ip precedence Set the priority of the packets.

7.17 match metric

Use match metric command to redistribute the routes of the specified metric. Use the no form of this
command to remove the setting.
match metric metric
no match metric metric

Parameter Parameter Description


description metric Route metric, in the range 0 to 4294967295

Defaults None.

7-16
Command Reference Protocol-independent Commands

Command
mode Route map configuration mode.

You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the route in the OSPF routing domain and then advertise it to the RIP
routing domain, and vice versa. The mutual route redistribution can be implemented between all the
IP routing protocols.
Usage
In the route redistribution, route maps are usually used to control the mutual route redistribution
Guides
between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the OSPF routing protocol redistributes the RIP routes of metric 10.
Ruijie(config)# router ospf
Ruijie(config-router)# redistribute rip subnets route-map redist-rip
Examples Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# exit
Ruijie(config)# route-map redist-rip permit 10
Ruijie(config-route-map)# match metric 10

Command Description
access-list Set the access list.
match ip address Match the IP address.
match interface Match the interface.
match ip next-hop Match the next-hop IP address.
Related
match ip route-source Match the source IP address.
commands
match route-type Match the route type.
match tag Match the tag.
set metric Set the metric.
set metric-type Set the metric type.
set tag Set the tag.

7.18 match route-type

Use this command to redistribute the network routes of the specified type. Use the no form of this
command to delete the setting.
match route-type { internal | external [ type-1 | type-2 ] | nssa-external [ type-1 | type-2 ] }
no match route-type [ internal | external [ type-1 | type-2 ] | nssa-external [ type-1 | type-2 ]]

Parameter Parameter Description


description internal Indicates the OSPF internal route type.

7-17
Command Reference Protocol-independent Commands

external Indicates the OSPF external route type.


nssa-external Indicares the OSPF NSSA external route type.
type-1 | type-2 Indicates the OSPF type-1 or type-2 route type.

Defaults None

Command
mode Route map configuration mode

You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the route in the OSPF routing domain and then advertise it to the RIP
routing domain, and vice versa. The mutual route redistribution can be implemented between all the IP
routing protocols.
Usage
In the route redistribution, route maps are usually used to control the mutual route redistribution
Guide
between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the RIP routing protocol redistributes only the internal routes in the OSPF routing
domain.
Ruijie(config)# router rip
Ruijie(config-router)# redistribute ospf route-map redrip
Examples
Ruijie(config-router)# network [Link]
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match route-type internal

Command Description
access-list Set the access list.
match ip address Match the IP address.
match interface Match the interface.
match ip next-hop Match the next-hop IP address.
Related
match ip route-source Match the source IP address.
commands
match metric Match the metric.
match tag Match the tag.
set metric Set the metric.
set metric-type Set the access list.
set tag Match the IP address.

7-18
Command Reference Protocol-independent Commands

7.19 match tag

Use this command to redistribute the network routes with the specified tag. Use the no form of this
command to delete the setting.
match tag tag&<1-4>
no match tag tag&<1-4>

Parameter Description
Parameter
tag Route tag
description
&<1-4> Adds up to four tags.

Defaults None

Command
mode Route map configuration mode

Multiple tags may follow the match tag command.


You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the route in the OSPF routing domain and then advertise it to the RIP
routing domain, and vice versa. The mutual route redistribution can be implemented between all the
IP routing protocols.
Usage Guide
In the route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

In the example below, the RIP routing protocol redistributes only the routes with tag 50 and 80 in the
OSPF routing domain.
Ruijie(config)# router rip
Ruijie(config-router)# redistribute ospf 100 route-map redrip
Examples
Ruijie(config-router)# network [Link]
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match tag 50 80

Command Description
access-list Set the access list.
match ip address Match the IP address.
Related
match interface Match the next-hop IP interface.
commands
match ip route-source Match the source IP address.
match metric Match the metric.
match ip next-hop Match the next-hop IP address.

7-19
Command Reference Protocol-independent Commands

match route-type Match the route type.


set metric Set the metric.
set metric-type Set the metric type.
set tag Set the tag.

7.20 memory-lack exit-policy

Use this command to configure a policy to preferentially exit a routing protocol when the memory
reaches the lower limit. Use the no form of this command to restore the default policy, namely, exit the
routing protocol which occupies the largest memory.
memory-lack exit-policy { ospf | rip }
no memory-lack exit-policy

Parameter
Parameter Description
description
ospf Preferentially exit OSPF when the memory is insufficient.
rip Preferentially exit RIP when the memory is insufficient.

Defaults By default, the routing protocol which occupies the largest memory exits preferentially.

Command
Global configuration mode
mode

Usage When the memory reaches the lower limit, you can disable a routing protocol to release the memory to
Guide ensure the normal running of other protocols.
When the system runs out of memory, disable a routing protocol which has the minimal impact on the
system to ensure the operation of main services.
Configuring the policy to preferentially exit the routing protocols which are disabled cannot help the
system release memory.
This command ensures the operation of main services to some extent when the memory is insufficient.
If the memory is further consumed, all routing protocols will exit and stop running.

Examples Configures a policy to preferentially exit BGP.


Ruijie(config)# memory-lack exit-policy bgp

Related Command Description


command - -

Platform -
description

7-20
Command Reference Protocol-independent Commands

7.21 route-map

Use route-map to enter the route map configuration mode and define a route map. Use the no form of
this command to remove the setting.
route-map route-map-name [ permit | deny ] [sequence-number]
no route-map route-map-name [ { permit | deny } sequence-number ]

Parameter Description
Name of the route map. The redistribute command references the
route map according to its name. Multiple routing policies can be
route-map-name
defined in a route map, and each policy corresponds to one sequence
number.
(Optional) If the permit keyword is defined and the rule defined by
match is met, The set command controls the redistributed routes. For
policy-based routing, the set command controls the packet forwarding,
permit and exits the route map operation.
If the permit keyword is defined but the rule defined by match is not
Parameter
met, the system performs the routing policy of the second route map till
description
the set command is executed finally.
(Optional) If the deny keyword is defined and the rule defined by match
is met, no operation will be performed. Neither route redistribution nor
policy-based routing is supported in the route map. The system exits
deny the route map operation.
If the deny keyword is defined but the rule defined by match is not met,
the system performs the routing policy of the second route map till the
set command is executed finally.
Sequence number of the route map. The policy with a lower sequence
sequence-number
number is preferred, so it’s noted when setting the sequence number.

Defaults None.

Command
mode Global configuration mode.

At present, the RGOS software primarily uses the route map for route redistribution and policy-based
routing.
1. Route redistribution control
Usage You can redistribute the routes from one routing process to another routing process. For example,
Guides you can redistribute the route in the OSPF routing domain and then advertise it to the RIP routing
domain, and vice versa. The mutual route redistribution can be implemented between all the IP
routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution

7-21
Command Reference Protocol-independent Commands

between two routing domains.


One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.
When configuring route maps, pay attention to the following when using the sequence number of a
route map:
When you create the first route map policy, if sequence-number is not specified, it is 10 by default;
If only one route map policy exists and sequence-number is not specified, no new route map policy
will be created, and the existing route map policy will be accessed for configuration;
If more than one route map policy is available, the sequence number of each policy shall be specified;
otherwise an error message will be displayed.
2. policy-based routing
Policy-based routing refers to a routing mechanism based on user defined policies. Compared with
traditional destination IP address-based routing, policy-based routing offers a flexibility for routing
based on source IP address, length and port of IP packets. Policy-based routing can apply to the IP
packets received on an interface or the IP packets sent from the local device.

Policy-based routing utilizes route map to define routing and forwarding policy. The match command
defines packet filtering rule and the set command defines the action for the packets matching the
filtering rules. The match command used includes match ip address and match length; the set
command includes set ip tos, set ip precedence, set ip dscp, set ip [default] nexthop, set ip next-hop
verify-availability, set [default] interface.

The following example enables the OSPF routing protocol to redistribute the RIP routes with the hop
count of 4. In the OSPF route domain, the route type is the external route type-1, the default metric is
40 and the tag is 40.
Ruijie(config)# router ospf
Ruijie(config-router)# redistribute rip subnets route-map redrip
Ruijie(config-router)# network [Link] [Link] area 0
Examples
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match metric 4
Ruijie(config-route-map)# set metric 40
Ruijie(config-route-map)# set metric-type type-1
Ruijie(config-route-map)# set tag 40

Related Command Description


commands redistribute Redistribute the routes.

7.22 send-lifetime

Use this command in the encryption key configuration mode to specify the lifetime of an encryption key
in its send direction. Use the no form of this command to restore the default value.
send-lifetime start-time { infinite | end-time | duration seconds }

7-22
Command Reference Protocol-independent Commands

no send-lifetime

Parameter Parameter Description


description start-time Start time of the lifetime.
infinite Indicates that the encryption key is valid for ever.
end-time End time of the encryption key. It must be later than the start time.
duration Duration of the encryption key after the start time. The value ranges from 1 to
seconds 2147483646.

Defaults By default, the lifetime is infinite.

Command
Encryption key configuration mode
mode

Usage Use this command to specify the lifetime of an encryption key in its send direction.
Guide

Examples The following example configures the lifetime from 0:00 on September 9, 2000 to 0:00 on October 12,
2011
Ruijie(config)# key chain ripkeys
Ruijie(config-keychain)# key 1
Ruijie(config-keychain-key)# key-string World
Ruijie(config-keychain-key)# send-lifetime 00:00:00 Sep 9 2000 00:00:00 Dec 12
2011

Related Command Description


command - -

Platform -
description

7.23 set default interface

Use this command to specify the default interface for forwarding the packets whose route matches the
rule but without an egress in the route map configuration mode. Use the no form of this command to
remove the setting.
set default interface { interface-type interface-number }&<1-4>
no set default interface { interface-type interface-number }&<1-4>

Parameter Description
Parameter
interface-type Interface type.
description
interface-number Interface number.

7-23
Command Reference Protocol-independent Commands

The previous parameters can be input up to


&<1-4>
four times.

Defaults None

Command
mode Route map configuration mode

Multiple interfaces may follow the set default interface command.


Policy-based routing is a packet forwarding mechanism more flexible than the routing based on the
target network. If policy-based routing is used, the device will determine how to process the packets
to be routed according to the route map, which determines the next-hop device of the packets.
To use the policy-based routing, you must specify the route map for it and create the route map. A
route map contains multiple policies, and each policy defines one or more match rules and the
Usage Guide
corresponding operations. After policy-based routing is applied to an interface, the packets received
by the interface will be checked. The packets that do not match any policy in the route map will be
forwarded to the usual route. The packets that match a policy in the route map will be processed
according to the operation defined in the policy.
If the first defined interface becomes down, the interface set by the second set command will be
attempted. A route-map policy may contain multiple set operations.

In the example below, the policy-based routing is enabled on GigabitEthernet 0/2 to send the traffic
whose packet size is less than 500 bytes and the route is not defined through GigabitEthernet 0/1
interface.
Ruijie(config)# interface GigabitEthernet 0/2
Examples Ruijie(config-if-GigabitEthernet 0/2)# ip policy route-map smallpak
Ruijie(config-if-GigabitEthernet 0/2)# exit
Ruijie(config)# route-map smallpak permit 10
Ruijie(config-route-map)# match length 0 500
Ruijie(config-route-map)# set default interface GigabitEthernet 0/1

Command Description
route-map Define a route map.
match ip address Match the IP address.
Related match length Match the packet length.
commands set interface Set the outgoing interface.
set ip default next-hop Set the default next hop of the packets.
set ip next-hop Set the next-hop IP address of the packets.
set ip precedence Set the priority of the packets.

7-24
Command Reference Protocol-independent Commands

7.24 set interface

Use this command to specify the interface for forwarding the packets matching the rule in the route
map configuration mode. Use the no form of this command to remove the setting.
set interface interface-type interface-number […interface-type interface-number]
no set interface interface-type interface-number […interface-type interface-number]

Parameter Description
Parameter
interface-type Interface type.
description
interface-number Interface ID

Defaults None

Command
mode Route map configuration mode

Multiple interfaces may follow the set interface command.


Policy-based routing is a packet forwarding mechanism more flexible than the routing based on the
target network. If policy-based routing is used, the device will determine how to process the packets
to be routed according to the route map, which determines the next-hop device of the packets.
To use the policy-based routing, you must specify the route map for it and create the route map. A
route map contains multiple policies, and each policy defines one or more match rules and the
Usage Guide corresponding operations. After policy-based routing is applied to an interface, the packets received
by the interface will be checked. The packets that do not match any policy in the route map will be
forwarded to the usual route. The packets that match a policy in the route map will be processed
according to the operation defined in the policy.
If the first defined interface becomes down, the interface set by the second set command will be
attempted. A route-map policy may contain multiple set operations.
If the interface is set as null 0, the packets will be discarded.

In the example below, the policy-based routing is enabled on GigabitEthernet 0/2 to send the traffic
whose packet size is less than 500 bytes through GigabitEthernet 0/0 interface.
Ruijie(config)# interface GigabitEthernet 0/2
Ruijie(config-if-GigabitEthernet 0/2)# ip policy route-map smallpak
Examples
Ruijie(config-if-GigabitEthernet 0/2)# exit
Ruijie(config)#route-map smallpak permit 10
Ruijie(config-route-map)#match length 0 500
Ruijie(config-route-map)#set interface GigabitEthernet 0/0

Command Description
route-map Define a route map.
Related
match ip address Match the IP address.
commands
match length Match the packet length.
set default interface Set the default outgoing interface when there is no route

7-25
Command Reference Protocol-independent Commands

in the routing table.


Set the default next hop of the packets when there is no
set ip default next-hop
route in the routing table.
set ip next-hop Set the next-hop IP address of the packets.
set ip precedence Set the priority of the packets.

Platform
description This command is not supported on switches, but supported on the routers.

7.25 set ip default next-hop

Use this command to specify the default next-hop IP address for the packets that match the rule in the
route map configuration mode. Use the no form of this command to remove the setting.
set ip default next-hop { ip-address [ weight ] }&<1-32>
no set ip default next-hop { ip-address [ weight ] }&<1-32>

Parameter Description
ip-address IP address of the next hop.
Parameter
weight Weight of the next hop.
description
&<1-32> The previous parameters can be input up to
32 times.

Defaults None

Command
mode Route map configuration mode

This command supports two operation modes: WCMP load balancing mode and non-WCMP load
balancing mode. In the former mode, the system implements WCMP load balancing according to the
weight inputted.
Up to 32 IP addresses may follow the set ip default next-hop command.
If a weight follows ip address, up to 4 next hop IP addresses can be configured.

If a weight follows any next-hop, the operation mode of this command will be automatically
switched to the WCMP load balancing mode. In this mode, the weight of those next hop IP
Usage Guide addresses whose weight is not configured is 1 by default.

Differences between set ip next-hop and set ip default next-hop: After the set ip next-hop command is
configured, the policy-based routing takes precedence over the routing table; while after the set ip
default next-hop command is configured, the routing table takes precedence over the policy-based
routing.
Use this command to customize a default route for a specified user. If the software fails to find the
forwarding route, the packet will be forwarded to the nexthop set with this command.
To use the policy-based routing, you must specify the route map for it and create the route map. A

7-26
Command Reference Protocol-independent Commands

route map contains multiple policies, and each policy defines one or more match rules and the
corresponding operations. After policy-based routing is applied to an interface, the packets received
by the interface will be checked. The packets that do not match any policy in the route map will be
forwarded through the usual route. The packets that match a policy in the route map will be processed
according to the operation defined in the policy.
A route-map policy may contain multiple set operations.

The following example forwards the packets from two different nodes through different routes.
For the messages received on the synchronous interface 1 from [Link], if the software cannot find
the forwarding route, they are forwarded to device [Link]. For the messages received from [Link], if
the software cannot find the forwarding route, they are forwarded to device [Link]. The other
messages will be discarded if the software cannot find the forwarding route.
Ruijie(config)#access-list 1 permit [Link] [Link]
Ruijie(config)#access-list 2 permit [Link] [Link]
Ruijie(config)#interface gigabitethernet 0/1
Examples Ruijie(config-if-GigabitEthernet 0/1)#ip policy route-map equal-access
Ruijie(config)#route-map equal-access permit 10
Ruijie(config- route-map)#match ip address 1
Ruijie(config-route-map)#set ip default next-hop [Link]
Ruijie(config)#route-map equal-access permit 20
Ruijie(config-route-map)#match ip address 2
Ruijie(config-route-map)#set ip default next-hop [Link]
Ruijie(config)#route-map equal-access permit 30
Ruijie(config- route-map)#set default interface null 0

Command Description
route-map Define a route map.
match ip address Match the IP address.
Related
set default interface Set the default outgoing interface.
commands
set interface Set the outgoing interface.
set ip next-hop Set the next hop of the packets.
set ip precedence Set the priority of the packets.

Platform
description N/A

7.26 set ip dscp

Use this command to specify the DSCP value for the packets that match the rule in the route map
configuration mode. Use the no form of this command to remove the setting.
set ip dscp dscp-value
no set ip dscp

7-27
Command Reference Protocol-independent Commands

Parameter Parameter Description


description dscp-value DSCP value

Defaults N/A

Command
mode Route map configuration mode

Usage Guide N/A

Examples N/A

Command Description
route-map Define a route map.
match ip address Match the IP address.
Related
set default interface Set the default outgoing interface.
commands
set interface Set the outgoing interface.
set ip next-hop Set the next hop of the packets.
set ip precedence Set the priority of the packets.

7.27 set ip next-hop

Use this command to specify the next-hop IP address for the packets that meet the matching rule.
Use the no form of this command to remove the setting. This command is only used to configure
policy-based routing.
set ip next-hop ip-address [ weight ] [ …ip-address [ weight ] ]
no set ip next-hop [ ip-address [ weight ] [ …ip-address [ weight ] ] ]

Parameter Description
Parameter
ip-address Indicates the next-hop IP address.
description
weight Indicates the weight of this next hop.

Defaults None

Command
mode Route map configuration mode

This command supports two operation modes: WCMP load balancing mode and non-WCMP load
balancing mode. In the former mode, the system implements WCMP load balancing according to the
Usage Guide weight entered by the user.
Multiple IP addresses may follow set ip next-hop and the number of addresses should be less than 32.
If a weight follows ip address, up to 4 next hop IP addresses can be configured.

7-28
Command Reference Protocol-independent Commands

If weight follows any next-hop, the operation mode of this command will be
automatically switched to the WCMP load balancing mode. In the WCMP load
balancing mode, for the nexthop address without configuring the corresponding
weight, the weight is 1 by default.

This command can be used to set different routes for the traffic that meets different match rule. If
multiple IP addresses are configured, they can be used in turn.
Policy-based routing is a packet forwarding mechanism more flexible than the routing based on the
target network. After the policy-based routing is used, the device will decide how to process the packets
that need be routed according to the route map, which decides the next-hop device of the packets.
To use the policy-based routing, you must specify the route map for it and create the route map. A route
map contains multiple policies, and each policy defines one or more match rules and the corresponding
operations. After policy-based routing is applied to an interface, the packets received by the interface will
be checked. The packets that do not match any policy in the route map will be forwarded to the usual
route. The packets that match a policy in the route map will be processed according to the operation
defined in the policy.
A route-map policy may contain multiple set operations.

The following example enables policy-based routing on GigabitEthernet 0/1. When the interface
receives the packets from [Link]/8, they will be sent to [Link]; when the interface receives
the packets from [Link]/16, they will be sent to [Link]; all other packets will be discarded.
Ruijie(config)#interface gigabitethernet 0/1
Ruijie(config-if-GigabitEthernet 0/1)#ip policy route-map load-balance
Ruijie(config)#access-list 10 permit [Link] [Link]
Ruijie(config)#access-list 20 permit [Link] [Link]
Examples Ruijie(config)#route-map load-balance permit 10
Ruijie(config-route-map)#match ip address 10
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config)#route-map load-balance permit 20
Ruijie(config-route-map)#match ip address 20
Ruijie(config-route-map)#set ip next-hop [Link]
Ruijie(config)#route-map load-balance permit 30
Ruijie(config-route-map)#set interface Null 0

Command Description
route-map Define the route map.
match ip address Match the IP address.
Related
set default interface Set the default outgoing interface.
commands
set interface Set the outgoing interface.
set ip default next-hop Set the default next hop.
set ip precedence Set the priority of the packets.

7-29
Command Reference Protocol-independent Commands

7.28 set ip next-hop verify-availability

Use this command to verify the availability of the next hop IP address for the packets that meet the
matching rule. Use the no form of this command to remove the setting. This command is only used to
configure policy-based routing.
set ip next-hop verify-availability ip-address [ weight ] track track-object-num
no set ip next-hop verify-availability ip-address [ weight ] [ track track-obj-number ]

Parameter Description
ip-address Indicates the next-hop IP address.
weight Indicates the weight in the load balancing
Parameter
mode.
description
track Judges whether the next hop is effective by
using Track.
track-object-num Indicates the track object number.

Defaults None

Command
mode Route map configuration mode

Usage Guide None

The following example verifies the availability of the next hop IP address being [Link] and the
number of the object to be tracked to 1.
Examples Ruijie(config)#route-map rmap permit 10
Ruijie(config-route-map)#set ip next-hop verify-availability [Link]
track 1

Command Description
route-map Define the route map.
match ip address Match the IP address.
Related
set default interface Set the default outgoing interface.
commands
set interface Set the outgoing interface.
set ip default next-hop Set the default next hop.
set ip precedence Set the priority of the packets.

7.29 set ip precedence

Use this command to set the precedence of the IP head of the packet matching the rule in the route
map configuration mode. Use the no form of this command to remove the configured precedence
setting.
set ip precedence { number | critical | flash | flash-override | immediate | internet | network |

7-30
Command Reference Protocol-independent Commands

priority | routine }
no set ip precedence

Parameter
Parameter Description
Description
Indicates the priority of the IP header with a number, ranging from 0
to 7.
7: critical
6: flash
5: flash-override
number
4: immediate
3: internet
2: network
1: priority
0: routine
critical | flash |
flash-override | immediate
Priority of an IP header.
| internet | network |
priority | routine

Defaults N/A

Command
mode Route map configuration mode

With different precedence values for the IP packet head configured, the IP packets matching the
PBR routing are sent according to the different precedence values.
Usage Guide Multiple set ip precedence commands can be executed in the route map configuration rule, but only
the last one takes effect, and the precedence will be specified for the head of the IP packet matched
the PBR.

The following example sets the precedence of the packet with the source IP address
[Link] received at the interface GigabitEthernet 0/0 as 4:
Ruijie(config)# access-list 1 permit [Link] [Link]
Ruijie(config)# route-map name
Examples
Ruijie(config-route-map)# match ip address 1
Ruijie(config-route-map)# set ip precedence 4
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ip policy route-map name

Command Description
Related match interface Match the next-hop interface.
commands match ip address Match the IP address in the ACL.
match ip next-hop Match the next-hop IP address in the ACL.

7-31
Command Reference Protocol-independent Commands

match ip route-source Match the route source IP address in the ACL.


match metric Match the route metric value.
match route-type Match the route type.
match tag Match the route tag value.
set metric-type Set the type of redistributed route.
set tag Set the tag value of redistributed route.
set ip tos Set the tos for the IP packet head.

7.30 set ip tos

Use this command to set the tos of the IP head of the packet matching the rule in the route map
configuration mode. Use the no form of this command to remove the configured tos setting.
set ip tos { number | max-reliability | max-throughput | min-delay | min-monetary-cost | normal }
no set ip tos

Parameter
Parameter Description
Description
Indicates the TOS value of an IP header with a number, ranging from 0
to 15.
2: max-reliability
4: max-throughput
number
8: min-delay
1: min-monetary-cost
0: normal

max-reliability |
max-throughput |
min-delay | Priority of an IP header.
min-monetary-cost |
normal

Defaults N/A

Command
mode Route map configuration mode

With different TOS values for the IP packet head configured, the IP packets matching the PBR routing
Usage Guide are transmitted with different service qualities.
The TOS value will be specified for the head of the IP packet matched the PBR.

The following example sets the TOS value of the packet with the source IP address [Link]
Examples
received at the interface GigabitEthernet 0/0 as 4:

7-32
Command Reference Protocol-independent Commands

Ruijie(config)# access-list 1 permit [Link] [Link]


Ruijie(config)# route-map name
Ruijie(config-route-map)# match ip address 1
Ruijie(config-route-map)# set ip tos 4
Ruijie(config)# interface GigabitEthernet 0/0
Ruijie(config-if-GigabitEthernet 0/0)# ip policy route-map name

Command Description
match interface Match the next-hop interface.
match ip address Match the IP address in the ACL.
match ip next-hop Match the next-hop IP address in the ACL.
match ip route-source Match the route source IP address in the ACL.
Related
match metric Match the route metric value.
commands
match route-type Match the route type.
match tag Match the route tag value.
set metric-type Set the type of redistributed route.
set tag Set the tag value of redistributed route.
set ip precedence Set the precedence for the IP packet head.

7.31 set level

Use this command to set the level of the area where the routes matching the rule are redistributed in
the route map configuration command. Use the no form of this command to remove the setting.
set level { stub-area | backbone }
no set level
Parameter Parameter Description
Description stub-area Indicates that the re-distribution route is advertised to OSPF Stub Area.
Indicates that the re-distribution route is advertised to the OSPF
backbone
backbone area.

Defaults None

Command
mode Route map configuration mode

7-33
Command Reference Protocol-independent Commands

In the example below, the OSPF routing protocol redistributes the RIP protocol to the backbone
area.

Ruijie(config)# router ospf


Examples Ruijie(config-router)# redistribute rip subnets route-map redrip
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# set level backbone

Command Description
match interface Match the interface.
match ip address Match the IP address.
match ip next-hop Match the next-hop IP address.
Related match ip route-source Match the source IP address.
commands match metric Match the metric.
match route-type Match the route type.
match tag Match the tag.
set metric-type Set the metric type.
set tag Set the tag.

7.32 set metric

Use set metric to set the metric for the routes to be redistributed. Use the no form of this command to
remove the setting.
set metric [ + metric-value | - metric-value | metric-value ]
no set metric

Parameter Description
Parameter + Increase based on the metric of the original route
description - Decrease based on the metric of the original route
metric-value Metric for the route to be redistributed

Defaults The default metric for route redistribution varies with the routing protocol.

Command
mode Route map configuration mode

7-34
Command Reference Protocol-independent Commands

You should set the metric according to the actual network topology, because the routing depends on
the metric of routes. Attentions should be paid to the upper and lower limits of the routing protocols
when you execute the set metric, + metric or – metric commands. When the RIP protocol redistributes
the routes of other protocols, the range of the metric after increase or decrease is 1 to 16.
You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the route in the OSPF routing domain and then advertise it to the RIP routing
Usage Guide domain, and vice versa. The mutual route redistribution can be implemented between all the IP
routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The following example enables the OSPF routing protocol to redistribute the RIP routes and sets the
default metric to 40.

Ruijie(config)# router ospf


Examples Ruijie(config-router)# redistribute rip subnets route-map redrip
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# set metric 40

Command Description
match interface Match the interface.
match ip address Match the IP address.
match ip next-hop Match the next-hop IP address.
Related match ip route-source Match the source IP address.
commands match metric Match the metric.
match route-type Match the route type.
match tag Match the tag.
set metric-type Set the metric type.
set tag Set the tag.

7.33 set metric-type

Use set metric-type to set the type of the routes to be redistributed. Use the no form of this
command to remove the setting.
set metric-type type
no set metric-type

7-35
Command Reference Protocol-independent Commands

Parameter Description
Type of the routes to be redistributed. At present, you can set the
Parameter
type of the routes that the OSPF protocol redistributes.
description type
type-1: Type-1 external route;
type-2: Type-2 external route.

Defaults Type-2

Command
Route map configuration mode
mode

You can redistribute the routing information from one routing process to another routing process.
For example, you can redistribute the route in the OSPF routing domain and then advertise it to the
RIP routing domain, and vice versa. The mutual route redistribution can be implemented between
all the IP routing protocols.
Usage Guide In the route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation
will be performed.

The following example enables the OSPF routing protocol to redistribute the RIP route and sets the
type as type-1.
Ruijie(config)# router ospf
Ruijie(config-router)# redistribute rip subnets route-map redrip
Examples
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# set metric-type type-1

Command Description
match interface Match the interface.
match ip address Match the IP address.
match ip next-hop Match the next-hop IP address.
Related match ip route-source Match the source IP address.
commands match metric Match the metric.
match route-type Match the route type.
match tag Match the tag.
set metric Set the metric.
set tag Set the tag.

7-36
Command Reference Protocol-independent Commands

7.34 set next-hop

Use this command to specify the next-hop IP address for the routes that match the rule. Use the no
form of this command to remove the setting. This command is only used to configure routing policies.
set next-hop ip-address
no set next-hop

Parameter Parameter Description


description ip-address IP address of the next hop.

Defaults None

Command
Route map configuration mode
mode

You can redistribute the routing information from one routing process to another routing process. For
example, you can redistribute the route in the OSPF routing domain and then advertise it to the RIP
routing domain, and vice versa. The mutual route redistribution can be implemented between all the
IP routing protocols.
Usage Guide In the route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
In configuring one route map, one or more match or set commands can be executed. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.

The following example enables the OSPF routing protocol to redistribute the RIP route and sets the
next-hop to [Link].
Examples Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# match ip address 1
Ruijie(config-route-map)# set next-hop [Link]

If you configure this command after the set vrf command has been configured, the following
notification will be displayed:
% Route-map: can not set next-hop.
% Remove set vrf clause before set next-hop.
Notifications
If the configured IP address is an invalid host address (valid host addresses include class A
addresses except those starting with 0 or 127, class B addresses, and class C addresses), the
following notification will be displayed:
% Can't set invalid nexthop address!

Command Description
Related match interface Match the interface.
commands match ip address Match the IP address.
match ip next-hop Match the next-hop IP address.

7-37
Command Reference Protocol-independent Commands

match ip route-source Match the source IP address.


match metric Match the metric.
match route-type Match the route type.
match tag Match the tag.
set metric-type Set the metric type.
set tag Set the tag.

7.35 set tag

Use this command to set the tag for the routes to be redistributed. Use the no form of this command to
remove the setting.
set tag tag
no set tag

Parameter Parameter Description


description tag Tag of the route to be redistributed

Defaults The original routing tag remains unchanged.

Command
Route map configuration mode
mode

This command can only be used for route redistribution. If this command is not configured, the default
Usage Guide
route tag is used.

The following example enables the OSPF routing protocol to redistribute the RIP route and sets the
tag as 100.
Ruijie(config)# router ospf
Ruijie(config-router)# redistribute rip subnets route-map redrip
Examples
Ruijie(config-router)# network [Link] [Link] area 0
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# set tag 100

Command Description
match interface Match the interface.
match ip address Match the IP address.
Related match ip next-hop Match the next-hop IP address.
commands match ip route-source Match the source IP address.
match metric Match the metric.
match route-type Match the route type.
match tag Match the tag.

7-38
Command Reference Protocol-independent Commands

set metric Set the metric.


set metric-type Set the metric type.

7.36 show ip as-path-access-list

Use this command to display the configuration of AS path access lists.


show ip as-path-access-list [ num ]

Parameter
Parameter Description
description
num AS path access list number.

Defaults N/A

Command
Privileged EXEC mode
mode

Usage Guide N/A

Examples The following example displays the AS path access lists.


Ruijie# show ip as-path-access-list
AS path access list 30
permit ^30$

Field Description

AS path access list AS path access list number

permit Permits advertisement based on matching conditions.

^30$ Regular expression.

Related Command Description


command - -

Platform -
description

7.37 show ip community-list

Use show ip community-list command to display the community list.


show ip community-list [community-list-number | community-list-name]

Parameter Parameter Description

7-39
Command Reference Protocol-independent Commands

description community-list-number Number of the community list.


community-list-name Name of the community list.

Defaults None

Command
mode Privileged EXEC mode

Usage
Guides N/A

The following example displays the community list.


Ruijie# show ip community-list
Community-list standard local
permit local-AS
Community-list standard Red-Giant
permit 0:10
deny 0:20
Examples

Field Description

Community-list standard local Type and name of a community list

permit Mode of a filtering rule

local-AS Value of the community attribute

0:10 Value of the community attribute

Command Description
Related
match community Match the route community.
commands
set comm-list delete Delete the community attribute in the BGP routes.

7.38 show ip extcommunity-list

Use this command to display the extcommunity list.


show ip extcommunity-list [ extcommunity-list-num | extcommunity-list-name ]

Parameter Parameter Description


description extcommunity-list-num extcommunity-list number, ranging from 1 to 199.
extcommunity-list-name extcommunity-list name.

Default -

Command Privileged EXEC mode, global configuration mode, interface configuration mode, routing protocol
mode configuration mode and route map configuration mode.

7-40
Command Reference Protocol-independent Commands

Usage Guide -

Examples The following example displays the information about all extcommunity lists.
Ruijie # show ip extcommunity-list
Standard extended community-list 1
10 permit RT:1:200
20 permit RT:1:100
Standard extended community-list 2
10 permit RT:1:200
Expanded extended community-list rt_filter
13 permit 1:100

Field Description

Standard extended community-list 1 Type and name of an extcommunity list

10 Sequence number of a filtering rule

permit Mode of a filtering rule

RT:1:200 Value of the extcommunity attribute

Related Command Description


command ip extcommunity-list Create an extcommunity-list.
match extcommunity Match an extcommunity.
set extcommunity Set an extcommunity.

Platform -
description

7.39 show ip prefix-list

Use show ip prefix-list to display the prefix list or the entries.


show ip prefix-list [prefix-name]

Parameter Parameter Description


description prefix-name Name of the prefix list.

Defaults The configuration information of all the prefix lists is displayed by default.

Command Privileged EXEC mode, global configuration mode, interface configuration mode, routing protocol
mode configuration mode, route map configuration mode.

Usage If no prefix list is specified, the configurations of all the prefix lists are displayed, otherwise only the

7-41
Command Reference Protocol-independent Commands

Guides configuration of the specified prefix list is displayed.

The following example displays the IPv4 prefix list.


Ruijie# show ip prefix-list
seq pre: 2 entries
seq 5 permit [Link]/24
seq 10 permit [Link]/24

Field Description
Examples
seq pre Name of an IPv4 prefix list

2 entries Number of rules in the prefix list

seq 5 Sequence number of a filtering rule

permit Mode of a filtering rule

[Link]/24 IPv4 route prefix

7.40 show ip protocols

Use this command to display information about the status of the currently running IPv4 routing
protocol.
show ip protocols { ospf | rip }

Parameter
Parameter Description
Description
ospf Displays information about the status of the OSPF protocol.
rip Displays information about the status of the RIP protocol.
- Displays information about the status of all running routing protocols.

Command Privileged EXEC mode, global configuration mode, interface configuration mode, routing protocol
Mode configuration mode, and routing map configuration mode

Default Level 14

Usage Guide Information about the status of only the currently running routing protocol is displayed, and the
information about a routing protocol that is not running is not displayed.

Examples The following example displays the status information of running routing protocols.
Hostname# show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID [Link]

7-42
Command Reference Protocol-independent Commands

Memory Overflow is enabled


Router is not in overflow state now
It is an autonomous system boundary router
Redistributing External Routes from,
connected, includes subnets in redistribution
bgp, includes subnets in redistribution
Number of areas in this router is 2: 2 normal 0 stub 0 nssa
Routing for Networks:
[Link] [Link] area 0
[Link] [Link] area 0
[Link] [Link] area 0
[Link] [Link] area 0
[Link] [Link] area 1
[Link] [Link] area 0
Reference bandwidth unit is 100 mbps
Distance: (default is 110)
Routing Protocol is "bgp 10"
IGP synchronization is disabled
Default-information originate is disabled
Default local-preference applied to incoming route is 100
Redistributing: connected
Neighbor(s):
Address AddressFamily FiltIn FiltOut DistIn DistOut
RouteMapIn RouteMapOut Weight
Distance: external 20(default) internal 200(default) local 200(default)

Field Description

Routing Protocol is "ospf 1" Name of a routing protocol

Redistributing External
Route redistribution status of the routing protocol
Routes from

Distance: Distance of the routing protocol

Router ID Unique ID of the router

Memory Overflow Whether the memory overflow alarm function is enabled

Number of areas in this router Number of areas where the routing protocol is applied

Area distribution of interfaces where the current routing


Routing for Networks
protocol is applied

Reference bandwidth unit Reference bandwidth unit of the interface cost

IGP synchronization IGP synchronization function

Allows the BGP speaker to advertise the default route to the


Default-information originate
peer group.

Default local-preference
Default local-preference value
applied to incoming route

7-43
Command Reference Protocol-independent Commands

Redistributing Route redistribution type

Neighbor(s) BGP neighbor list

Address Address of a BGP neighbor

AddressFamily Address family of a BGP neighbor

FiltIn AS filtering in the inbound direction

FiltOut AS filtering in the outbound direction

DistIn ACL filtering in the inbound direction

DistOut ACL filtering in the outbound direction

RouteMapIn Routing policy in the inbound direction

RouteMapOut Routing policy in the outbound direction

Weight Weight used by a neighbor

7.41 show key chain

Use this command to display the key chain configuration.


show key chain [key-chain-name]

Parameter Parameter Description


description key-chain-name (Optional) Display the configuration of the specified key chain.

Default The configuration information of all key chains is displayed.

Command Privileged EXEC mode, global configuration mode, interface configuration mode, routing protocol
mode configuration mode, and key chain configuration mode.

Usage Guide If no key chain is specified, the configuration information of all key chains is displayed.

Examples The following example displays the key chain configuration.


Ruijie# show key chain
route-map AAA, permit, sequence 10
Match clauses:
ip address 2
Set clauses:
metric 10
Ruijie(config)#show key chain
key chain kc
key 1 -- text "ruijie"
accept-lifetime (12:11:00 May 2 2001) - (infinite)
send-lifetime (always valid) - (always valid) [valid now]

Field Description

7-44
Command Reference Protocol-independent Commands

key chain Key chain name.

key Key ID.

accept-lifetime Lifetime in the accept direction.

send-lifetime Lifetime in the send direction.

Related Command Description


command - -

Platform -
description

7.42 show route-map

Use the command to display the configuration of the route map.


show route-map [route-map-name]

Parameter Description
Parameter
(Optional) Display the configuration information of the specified
description route-map-name
the route map.

Defaults The configuration information of all the route maps is displayed.

Command Privileged EXEC mode, global configuration mode, interface configuration mode, routing protocol
mode configuration mode, route map configuration mode.

If no route map is specified, the configurations of all the route maps will be displayed, otherwise only
Usage Guides
the configuration of the specified route map is displayed.

Ruijie# show route-map


route-map AAA, permit, sequence 10
Match clauses:
ip address 2
Set clauses:
metric 10
Examples

Field Description

route-map Name of the route map.

Permit The route map contains the permit keyword.

sequence 10 Sequence number of the route map.

7-45
Command Reference Protocol-independent Commands

Set the matching rule. Whether to perform the set operation depends on the
Match clauses
permit or deny keyword in the route map.

Set clauses Set the operation when the rule is matched.

7-46
Command Reference NSM Commands

8 NSM Commands

8.1 clear ip route

Use this command to clear the route cache.


clear ip route { * | network [ netmask ] | }

Parameter Description
* Clears all route cache.
network Specifies the route cache of the network or subnet.
Parameter
(Optional) Subnet mask. If no subnet mask is specified,
Description
the longest match principle is used when you match
netmask
network with the route. The cache of the longest match is
cleared.

Command
Mode Privileged EXEC mode

Usage Clearing route cache clears the corresponding routes and triggers the routing protocol relearning.
Guide Please note that clearing all route cache leads to temporary network disconnection.

The following example clears the cache of the route which is the longest match with IP address
Examples [Link].
clear ip route [Link]

Related Command Description


Commands N/A N/A

Platform
Description

8.2 ip default-gateway

Use this command to configure the default gateway IP address on 2-layer devices. Use the no or
default form of this command to restore the default setting.
ip default-gateway ip-address
no ip default-gateway
default ip default-gateway

Parameter Parameter Description


Description ip-address IPv4 address of the default gateway

8-1
Command Reference NSM Commands

Defaults No gateway IP address is configured by default.

Command
Mode Global configuration mode

When the device does not know the destination address of a packet, the device will forward the packet to
Usage the default gateway.
Guide
This command is supported after the no ip routing command is applied.

The following example sets the IP address of default gateway to [Link].


Examples
Ruijie(config)# ip default-gateway [Link]

Related Command Description


Commands N/A N/A

Platform
Description

8.3 ip default-network

Use this command to configure the default network globally. Use the no or default form of this
command to restore the default setting.
ip default-network network
no ip default-network network
default ip default-network network

Parameter Parameter Description


Description network Default network

Defaults The default is [Link]/0.

Command
Global configuration mode
Mode

The goal of this command is to generate the default route. The default network must be reachable in the
routing table, but not the directly connected network.
Usage
The default network always starts with an asterisk (“*”), indicating that it is the candidate of the default
Guide
route. If there is connected route and the route without the next hop in the default network, the default
route must be a static route.

The following example sets [Link] as the default network. Since the static route to the network is
Examples
configured, the device will automatically generate a default route.

8-2
Command Reference NSM Commands

Ruijie(config)# ip route [Link] [Link] gigabitethernet 0/1


Ruijie(config)# ip default-network [Link]
The following example sets [Link] as the default network. The route becomes the default one
only when it is available in the routing table.
Ruijie(config)# ip default-network [Link]

Related Command Description


Commands show ip route Displays the routing table.

8.4 ip route

Use this command to configure a static route. Use the no or default form of this command to restore
the default setting.
ip route network net-mask { ip-address | interface [ ip-address ] } [ distance ] [ tag tag ] [ permanent |
{ track object-number } ] [ weight number ] [description description-text] [ disabled | enabled ]
no ip route network net-mask { ip-address | interface [ ip-address ] } [ distance ]
no ip route all
default ip route network net-mask { ip-address | interface [ ip-address ] } [ distance ]

Parameter Description
network Network address of the destination
net-mask Mask of the destination
ip-address The next hop IP address of the static route
interface (Optional) The next hop egress of the static route
distance (Optional) The administrative distance of the static route
tag (Optional) The tag of the static route
permanent (Optional) Permanent route ID
Parameter track object-number (Optional) Indicates correlation with Track. object-number
Description indicates the ID of the track object. By default, the
static route is not correlated with the Track function.
weight number (Optional) Indicates the weight of the static route. The
weight is 1 by default.
description description-text (Optional) Indicates the description of the static route. By
default, no description is configured. description-text is a
string of one to 60 characters.
disabled/enabled (Optional) Indicates the enable flag of the static route. The
flag is enabled by default.

Defaults No static route is configured by default.

Command
Global configuration mode
Mode

8-3
Command Reference NSM Commands

The default administrative distance of the static route is 1. Setting the administrative distance allows
the learnt dynamic route to overwrite the static route. Setting the administrative distance of the static
route can enable route backup, which is called floating route in this case. For example, the
administrative distance of the OSPF is 110. You can set its administrative distance to 125. Then the
data can switch over the static route when the route running OSPF fails.
The default weight of the static route is 1. To view the static route of non default weight, execute the
show ip route weight command. The parameter weight is used to enable WCMP. When there are
load-balanced routes to the destination, the device assigns data flows by their weights. The higher the
weight of a route is, the more data flow the route carries. WCMP limit is generally 32 for routers.
However, WCMP limit varies by switch models for their chipsets support different weights. When the
sum of the weights of load balanced routes is beyond this weight limit, the excessive ones will not
take effect.
Enablement/disablement shows the state of the static route. Disablement means the static route is
Usage Guide not used for forwarding. The forwarding table used the permanent route until administrator deletes it.
When you configure the static route on an Ethernet interface, do not set the next hop as an interface,
for example, ip route [Link] [Link] GigabitEthernet 0/0. In this case, the switch may consider that all
unknown destination networks are directly connected to the GigabitEthernet 0/0. So it sends an ARP
request to every destination host, which occupies many CPU and memory resources. It is not
recommended to set the static route to an Ethernet interface.
Association between a static route and a track object can be specified. When association between a
static route and a specified track object is configured and the advertised track object status is inactive,
the static route does not take effect. If the advertised track object status is active, the static route
takes effect based on another status. With association between a static route and a track object, the
third-party status concerned by the track object is mainly used to determine whether the static route
takes effect. Association between a static route and a track object cannot be used for routes with the
permanent attribute.

The following example adds a static route to the destination network of [Link]/24 whose next
hop is [Link] and administrative distance is 115.
Ruijie(config)# ip route [Link] [Link] [Link] 115
If the static route has not a specific interface, data flows may be sent thought other interface in case
Examples
of interface failure. The following example configures data flows to be sent through fastehternet 0/0
to the destination network of [Link]/24.
Ruijie(config)# ip route [Link] [Link] GigabitEthernet 0/0
[Link]

8.5 ip routing

Use this command to enable IP routing in the global configuration mode. Use the no or default form of this
command to disable this function.
ip routing
no ip routing

8-4
Command Reference NSM Commands

default ip routing

Defaults This function is enabled by default.

Command
Global configuration mode
Mode

When a device functions only as a bridge or VoIP gateway, the IP routing function of the RGOS
software is not required. In this case, the IP routing function of the RGOS software can be disabled.
After the IP routing function is disabled, the device functions as a common host. The device can send
and receive packets but cannot forward packets. All route-related configurations will be deleted
except the static route configuration. A large number of static routes may be configured. If a user runs
Usage Guide the no ip routing command, the configuration of a large number of static routes may be lost. To
prevent this situation, the static route configuration will be hidden temporarily when the no ip routing
command is run. If the ip routing command is run again, the static route configuration can be
restored.
Note that if the process or whole system restarts when the no ip routing command is run, the static
route configuration will not be reserved.

The following example disables IP routing.


Examples
Ruijie(config)# no ip routing

Related
Commands N/A

Platform
Description

8.6 ip static route-limit

Use this command to set the upper threshold of the static route. Use the no or default form of this
command to restore the default setting.
ip static route-limit number
no ip static route-limit
default ip static route-limit

Parameter Description
Parameter
Upper threshold of static routes in the range from 1 to
Description number
10000

Defaults The default is 1024.

Command
Global configuration mode
Mode

8-5
Command Reference NSM Commands

The goal is to control the number of static routes. You can view the upper threshold of the configured
Usage Guide
non-default static routes with the show running-config command.

The following example sets the upper threshold of the static routes to 900 and then restores the
setting to the default value.
Examples
Ruijie(config)# ip static route-limit 900
Ruijie(config)# no ip static route-limit

Related
Commands N/A

8.7 ipv6 default-gateway

Use this command to configure the default gateway IPv6 address on 2-layer devices. Use the no or default
form of this command to restore the default setting.
ipv6 default-gateway ipv6-address
no ipv6 default-gateway
default ipv6 default-gateway

Parameter
Parameter Description
Description
ipv6-address Sets the default gateway IPv6 address.

Defaults No gateway IPv6 address is configured by default.

Command Global configuration mode


Mode

Usage Guide When the device does not know the destination address of a packet, the device will forward the packet to the
default gateway. Use the command show ipv6 redirects to display default gateway configuration.

This feature is supported after IPv6 routing is disabled by running the no ipv6 unicast-routing
command.

Examples The following example sets the default gateway IPv6 address to 10::1.
Ruijie(config)# ipv6 default-gateway 10::1

Platform This command is supported on 2-layer devices or 3-layer devices configured with the no ip routing
Description command.

8-6
Command Reference NSM Commands

8.8 ipv6 route

Use this command to configure an ipv6 static route. Use the no or default form of this command to restore
the default setting.
ipv6 route ipv6-prefix/prefix-length { ipv6-address | interface [ ipv6-address ] } [ distance ] [ tag tag ] [ weight
number ] [description description-text]
no ipv6 route ipv6-prefix/prefix-length { ipv6-address | interface [ ipv6-address ] } [ distance ]
no ipv6 route all
default ipv6 route ipv6-prefix / prefix-length { ipv6-address | interface [ ipv6-address ] } [ distance ]

Parameter Description

ipv6-prefix IPv6 prefix in the form compliant with the rule of RFC4291.

prefix-length Mask length of the destination


ipv6-address The next hop IP address of the static route
interface (Optional) The next hop egress of the static route
(Optional) The administrative distance of the static route.
distance
The default is 1.
tag (Optional) The tag value of the static route. The default is 0.
(Optional) Indicates the weight of the static route, which
Parameter
must be specified when you configure equal-cost routes.
Description
The weight ranges from 1 to 8. When the weights of all
equal-cost routes of a route are summed up, the sum
weight number
cannot exceed the maximum number of equal-cost routes
that can be configured for the route. Weighting of
equal-cost routes of a route indicates the traffic ratio of
these routes. The weight is 1 by default.
(Optional) Indicates the description of the static route. By
description description-text default, no description is configured. description-text is a
string of one to 60 characters.
all (Optional) Removes all static IPv6 routes.

Defaults No IPv6 static route is configured by default.

Command
Global configuration mode
Mode

When the multi-protocol VRF deletes the IPv6 address family, the IPv6 static route of VRF that the
route or nexthop belongs is deleted.
If the VRF of the IPv6 static route interface is not same as the nexthop’s VRF, then this IPv6 static
Usage Guide route takes no effect.
The default administrative distance of the static route is 1. Setting the administrative distance allows
the learnt dynamic route to overwrite the static route. Setting the administrative distance of the static
route can enable route backup, which is called floating route in this case. For example, the

8-7
Command Reference NSM Commands

administrative distance of the OSPF is 110. You can set its administrative distance to 125. Then the
data can switch over the static route when the route running OSPF fails.

The following example adds a static route to the destination network of 2001::/64 whose next hop is
2002::2 and administrative distance are 115.
Ruijie(config)# ipv6 route 2001::/64 2002::2 115
Examples If the static route has not a specific interface, data flows may be sent thought other interface in case of
interface failure. The following example configures that data flows are sent through fastehternet 0/0 to
the destination network of 2001::/64.
Ruijie(config)# ipv6 route 2001::/64 GigabitEthernet 0/0 2002::2

Related Command Description


Commands show ipv6 route Displays IPv6 routing table.

Platform
Description This command is not supported on 2-layer devices.

8.9 ipv6 static route-limit

Use this command to set the upper threshold of the static route. Use the no or default form of this command
to restore the default setting.
ipv6 static route-limit number
no ipv6 static route-limit
default ipv6 static route-limit

Parameter Description
Parameter
Upper threshold of static routes in the range from 1 to
Description number
1,000,000.

Defaults The default is 1000.

Command
Global configuration mode
Mode

The goal is to control the number of static routes. You can view the upper threshold of the configured
Usage Guide
non-default static routes with the show running config command.

The following example sets the upper threshold of the global static routes to 900.
Examples
Ruijie(config)# ipv6 static route-limit 900

Command Description
Related
ipv6 route Configures the IPv6 static route.
Commands
show ipv6 route Displays the IPv6 routing table.

8-8
Command Reference NSM Commands

Platform
This command is not supported on 2-layer devices.
Description

8.10 ipv6 unicast-routing

Use this command to enable the IPv6 route function of the RGOS. Use the no or default form of this
command to disable this function.
ipv6 unicast-routing
no ipv6 unicast-routing
default ipv6 unicast-routing

Parameter
N/A
Description

Defaults This function is enabled by default.

Command
Mode Global configuration mode

This function can be disabled if the device is just used as the bridge-connection device or the VOIP
Usage Guide
gateway device.

The example disables the IPv6 route function of RGOS.


Examples
Ruijie(config)# no ipv6 unicast-routing

Command Description
Related
ipv6 route Configure the IPv6 static route.
Commands
show ipv6 route Displays the IPv6 routing table.

Platform
Description This command is not supported on 2-layer devices.

8.11 maximum-paths

Use this command to specify the number of equivalent routes. Use the no or default form of this command is
used to restore the default setting.
maximum-paths number
no maximum-paths number
default maximum-paths

8-9
Command Reference NSM Commands

Parameter Description
Parameter
Number of equivalent routes in the range from 1 to 64 (vary with
Description number
products).

Defaults For routers, the default value is 64.

Command
Mode Global configuration mode

The number of equivalent routes is configured to control the number of equivalent routes. After the
number of equivalent routes is configured by running the maximum-paths command, the number of
Usage Guide load-sharing channels in load-sharing mode will not exceed the number of configured static routes.
The command take effect both on IPv4 and IPv6.
You can run the show running config command to query the number of configured static routes.

The following example sets the number of equivalent routes to 10 and then restores the default
setting.
Examples
Ruijie(config)# maximum-paths 10
Ruijie(config)# no maximum-paths 10

8.12 show ip redirects

Use this command to display the default gateway IP address.


show ip redirects

Parameter Parameter Description


Description N/A N/A

Defaults N/A

Command
Privileged EXEC mode
Mode

Use this command to display the default gateway IP address. This command is supported on 2-layer
Usage Guide
devices or 3-layer devices with the no ip routing command executed.

The following example displays the default gateway.


Ruijie# show ip redirects
Default Gateway: [Link]
Examples

Field Description
Default Gateway IP address of the default gateway.

8-10
Command Reference NSM Commands

Related Command Description


Commands N/A N/A

Platform
Description

8.13 show ip route

Use the commands to display the configuration of the IP routing table.


show ip route [ network [ mask [longer-prefix] ] | count | protocol [ process-id ] | weight ] ]
show ip route [ [ normal | ecmp ] [ network [ mask ] ] ]
Parameter Description
network (Optional) Displays the route information to the network.
mask (Optional)Displays the route information to the network of this mask.
longer-prefix (optional) Displays the routes that match the specified prefix.
(Optional)Displays the number of existent routes. (for the
Parameter count
ECMP/WCMP route, displays one route)
Description
protocol (Optional) Displays the route information of specific protocol.
process-id (Optional) Routing protocol process ID.
weight (Optional) Displays the route information of non default weight.
normal Displays normal routes and not equivalent routes or fast reroutes.
ecmp Displays only equivalent routes.

Defaults All routes are displayed by default.

Command Privileged EXEC mode/ Global configuration mode/Interface configuration mode/ Routing protocol
Mode configuration mode/ Route map configuration mode

This command can display route information flexibly.


Usage Guide
This command shows all routes. To show different attributes of routes, specify normal | ecmp.

The following example displays the configuration of the IP routing table.


Ruijie# show ip route

Codes: C - Connected, L - Local, S - Static


R - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow route
Examples N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
IA - Inter area, * - candidate default
Gateway of last resort is no set
S [Link]/8 is directly connected, VLAN 1

8-11
Command Reference NSM Commands

S [Link]/8 [1/0] via [Link]


O E2 [Link]/8 [110/20] via [Link], 00:00:06, VLAN 1
R [Link]/8 [120/20] via [Link], 00:00:23, VLAN 1
B [Link]/8 [120/0] via [Link], 00:00:41
C [Link]/24 is directly connected, VLAN 1
C [Link]/32 is local host.

Field Description

Source routing protocol, which may be:


C: directly connected route
S: static route
O R: RIP route
B: BGP route
O: OSPF route
I: IS-IS route

Route type, which may be:


E1: OSPF external route type 1
E2: OSPF external route type 2
N1: OSPF NSSA external type 1
N2: OSPF NSSA external type 2
E2
IA: OSPF area internal route
SU: IS-IS summary route
L1: IS-IS level-1 route
L2: IS-IS level-2 route
IA: IS-IS area internal route

[Link]/8 Network address and mask of the destination network

[1/0] Administrative distance/metric

Ruijie# show ip route [Link]


Routing entry for [Link]/8
Distance 110, metric 20
Routing Descriptor Blocks:
[Link], 00:01:11 ago, via VLAN 1, generated by OSPF, extern 2

Field Description

8-12
Command Reference NSM Commands

Next hop IP address, source, update time, forwarding


Routing Descriptor Blocks interface, source routing protocol and type of route
information

Ruijie# show ip route count


--------- route info ----------
the num of active route: 5

Ruijie# show ip route weight


------------[distance/metric/weight]-----------
S [Link]/8 [1/0/2] via [Link]
S [Link]/16 [1/0/4] via [Link]

Ruijie#show ip route normal

Codes: C - Connected, L - Local, S - Static


R - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow route
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
IA - Inter area, EV - BGP EVPN, * - candidate default

Gateway of last resort is [Link] to network [Link]


S* [Link]/0 [1/0] via [Link], GigabitEthernet 0/7
C [Link]/24 is directly connected, GigabitEthernet 0/7
C [Link]/32 is local host.
C [Link]/24 is directly connected, SSLVPN 0
C [Link]/32 is local host.

Ruijie#show ip route ecmp

Codes: C - Connected, L - Local, S - Static


R - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow route
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
IA - Inter area, EV - BGP EVPN, * - candidate default

Gateway of last resort is [Link] to network [Link]

8.14 show ip route summary

Use this command to display the statistical information about one routing table.

8-13
Command Reference NSM Commands

show ip route summary


Use this command to display the statistical information about all routing tables.
show ip route summary all

Parameter Parameter Description


Description N/A N/A

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide N/A

The following example displays the statistics of the global routing table.
Ruijie# show ip route summary
Codes: NORMAL - Normal route ECMP - ECMP route FRR - Fast-Reroute route

Memory: 11280 bytes


Entries: 5, based on route prefixes

NORMAL ECMP FRR TOTAL


Connected 4 0 0 4
Static 1 0 0 1
RIP 0 0 0 0
OSPF 0 0 0 0
ISIS 0 0 0 0
BGP 0 0 0 0
TOTAL 5 0 0 5
Examples

The following example displays the statistics of all routing tables.


Ruijie# show ip route summary all
Codes: NORMAL - Normal route ECMP - ECMP route FRR - Fast-Reroute route

IP routing table count: 0


Total
Memory: 11280 bytes
Entries: 5, based on route prefixes

NORMAL ECMP FRR TOTAL


Connected 4 0 0 4
Static 1 0 0 1
RIP 0 0 0 0
OSPF 0 0 0 0

8-14
Command Reference NSM Commands

ISIS 0 0 0 0
BGP 0 0 0 0
TOTAL 5 0 0 5

Global
Memory: 11280 bytes
Entries: 5, based on route prefixes

NORMAL ECMP FRR TOTAL


Connected 4 0 0 4
Static 1 0 0 1
RIP 0 0 0 0
OSPF 0 0 0 0
ISIS 0 0 0 0
BGP 0 0 0 0
TOTAL 5 0 0 5

Field Description
Type of the table entries. Value:
NORMAL: common routes (not ECMP or FRR);
NORMAL ECMP: equivalent route;
FRR: fast reroute;
TOTAL: total
Memory Memory occupied by the table.
Entries Number of entries (based on prefix, not next-hop)
Protocol type. Value:
Connected: direct connection;
Static: static;
Connected
RIP: RIP;
OSPF: OSPF;
TOTAL: total

8.15 show ip route track-table

Use this command to display the IP route correlated Track information.


show ip route track-table

Parameter Parameter Description


Description N/A N/A

Defaults N/A

8-15
Command Reference NSM Commands

Command
Privileged EXEC mode
Mode

Usage Guide Use this command to display the IP route correlated Track information.

The following example displays the IP route correlated Track information.


Ruijie# show ip route track-table
ip route [Link] [Link] GigabitEthernet 0/0 track 2 state is [up]
ip route [Link] [Link] GigabitEthernet 0/0 2 track 3 state is [down]
Examples
:
Field Description
track Track target index
state Track target state

Related Command Description


Commands N/A N/A

Platform
Description

8.16 show ipv6 redirects

Use this command to display the IPv6 default gateway IP address.


show ipv6 redirects

Parameter Parameter Description


Description N/A N/A

Defaults N/A

Command
Privileged EXEC mode
Mode

To run this command, you need to disable IPv6 routing by running the no ipv6 unicast-routing
Usage Guide
command first.

The following example displays the default gateway IPv6 address.


Ruijie# show ipv6 redirects
Default Gateway: 10::1
Examples

Field Description
Default Gateway IPv6 address of the default gateway

8-16
Command Reference NSM Commands

Related Command Description


Commands N/A N/A

Platform This command is supported on 2-layer devices and 3-layer devices with the no ip routing
Description command executed.

8.17 show ipv6 route

Use the command to display the configuration of the IPv6 routing table.
show ipv6 route [ [ ipv6-prefix / prefix-length [ longer-prefixes ] | protocol [ process-id ] | weight ] ]
Use the command to display the configuration of the IPv6 routing table.
show ipv6 route [ [ ipv6-prefix / prefix-length [ longer-prefixes ] | protocol [ process-id ] | weight ] ]

Parameter Description
ipv6-prefix/prefix-length (Optional) Specifies a prefix for route’s IPv6 address.
(Optional) Displays the route with an IPv6 address
longer-prefixes
Parameter prefix mostly matched.
Description ((Optional) Displays the route information of specific
protocol
protocol.
process-id (Optional) Specifies a route process ID.
weight (Optional) Displays the non-default-weight routes only.

Defaults All routes are displayed by default.

Command
Mode Privileged EXEC mode

Usage Guide Use this command to display route information.

The following example displays the IPv6 routing table.


Ruijie(config)# show ipv6 route

IPv6 routing table - Default - 7 entries


Codes: C - Connected, L - Local, S - Static
R - RIP, O - OSPF, B - BGP, I - IS-IS, V - Overflow route
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
Examples
E1 - OSPF external type 1, E2 - OSPF external type 2
SU - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
IA - Inter area

C 10::/64 via Loopback 1, directly connected


L 10::1/128 via Loopback 1, local host
S 20::/64 [20/0] via 10::4, Loopback 1C

8-17
Command Reference NSM Commands

C FE80::/10 via Null 0, directly connected


C FE80::/64 via Loopback 1, directly connected
L FE80::2D0:F8FF:FE22:33AB/128 via Loopback 1, local host

Field Description

Source routing protocol, which may be:


C: directly connected route
S: static route
C R: RIP route
B: BGP route
O: OSPF route
I: IS-IS route

Route type, which may be:


E1: OSPF external route type 1
E2: OSPF external route type 2
N1: OSPF NSSA external type 1
N2: OSPF NSSA external type 2
E2
IA: OSPF area internal route
SU: IS-IS summary route
L1: IS-IS level-1 route
L2: IS-IS level-2 route
IA: IS-IS area internal route

10::/64 Network address and mask of the destination network

[20/0] Administrative distance/metric

Related Command Description


Commands ipv6 route Configures the IPv6 static route.

Platform
Description This command is not supported on 2-layer devices.

8.18 show ipv6 route summary

Use this command to display the statistics of the IPv6 routing table of a specified VRF.
show ipv6 route summary
Use this command to display statistics of all IPv6 routing tables.
show ipv6 route summary all

8-18
Command Reference NSM Commands

Parameter Parameter Description


Description N/A N/A

Defaults N/A

Command
Mode Privileged EXEC mode

Usage Guide N/A

The following example displays statistics of all IPv6 routing tables.


Ruijie#show ipv6 route summary all
IPv6 routing table name is - Default(0) global scope - 0 entries
IPv6 routing table default maximum-paths is 64
Local 0
Connected 0
Static 0
RIP 0
OSPF 0
------------------------
Total 0
Bonjour-(config)#show ipv6 route summary all

IPv6 routing table count: 1


Total
Memory: 0 bytes
Entries: 0
Examples
Local:0,Connected:0,Static:0,RIP:0,OSPF:0,ISIS:0,BGP:0

Global
Memory: 0 bytes
Entries: 0
Local:0,Connected:0,Static:0,RIP:0,OSPF:0,ISIS:0,BGP:0

Field Description
Memory The memory size occupied by the current routing table.
Entries The entries in the current routing table (based on the entry
prefix instead of the next hop entry.)
Connected Describes the protocol type of the entry. The field can be;
Connected: Connected route entry.
Static: Static route entry.
RIP: RIP route entry.
OSPF: OSPF route entry.
ISIS: ISIS route entry.

8-19
Command Reference NSM Commands

BGP: BGP route entry.


TOTAL: Total number of all protocol entries.
IPv6 routing table count The number of the routing tables.
Global The name of the current routing table. The field can be:
Global : Global (The default VRF)
VRF1: VRF name.
TOTAL: All VRF routing table summaries.

Related Command Description


Commands N/A N/A

Platform
Description This command is not supported on 2-layer devices.

8-20

You might also like