- Table of Contents
-
- 05-Network Connectivity
- 00-Preface
- 01-About the network connectivity configuration guide
- 02-MAC address table configuration
- 03-Ethernet link aggregation configuration
- 04-Port isolation configuration
- 05-VLAN configuration
- 06-Loop detection configuration
- 07-Spanning tree configuration
- 08-LLDP configuration
- 09-Layer 2 forwarding configuration
- 10-VLAN termination configuration
- 11-PPP configuration
- 12-L2TP configuration
- 13-Modem management configuration
- 14-3G and 4G modem management configuration
- 15-ARP configuration
- 16-IP addressing configuration
- 17-DHCP configuration
- 18-DHCPv6 configuration
- 19-DNS configuration
- 20-NAT configuration
- 21-IP performance optimization configuration
- 22-IPv6 basics configuration
- 23-GRE configuration
- 24-Tunneling configuration
- 25-IP forwarding basics configuration
- 26-Basic IP routing configuration
- 27-Static routing configuration
- 28-IPv6 static routing configuration
- 29-Policy-based routing configuration
- 30-IPv6 policy-based routing configuration
- 31-RIP configuration
- 32-RIPng configuration
- 33-Multicast overview
- 34-IGMP snooping configuration
- 35-MLD snooping configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
26-Basic IP routing configuration | 96.34 KB |
Contents
Setting the maximum lifetime for routes in the RIB
Setting the maximum lifetime for routes in the FIB
Setting the maximum number of ECMP routes
Configuring inter-protocol FRR
Display and maintenance commands for basic IP routing
Configuring basic IP routing
About IP routing
IP routing directs IP packet forwarding on routers. Based on the destination IP address in the packet, a router looks up a route for the packet in a routing table and forwards the packet to the next hop. Routes are path information used to direct IP packets.
Routing table
A RIB contains the global routing information and related information, including route recursion, route extension, and route redistribution information. The router selects optimal routes from the routing table and puts them into the FIB table. It uses the FIB table to forward packets.
Route categories
Table 1 categorizes routes by different criteria.
Criterion |
Categories |
Origin |
· Direct route—A direct route is discovered by the data link protocol on an interface, and is also called an interface route. · Static route—A static route is manually configured by an administrator. · Dynamic route—A dynamic route is dynamically discovered by a routing protocol. |
Destination |
· Network route—The destination is a network. The subnet mask is less than 32 bits. · Host route—The destination is a host. The subnet mask is 32 bits. |
Whether the destination is directly connected |
· Direct route—The destination is directly connected. · Indirect route—The destination is indirectly connected. |
Route preference
Routing protocols, including static and direct routing, each by default have a preference. If they find multiple routes to the same destination, the router selects the route with the highest preference as the optimal route.
The preference of a direct route is always 0 and cannot be changed. You can configure a preference for each static route and each dynamic routing protocol. The following table lists the route types and default preferences. The smaller the value, the higher the preference.
Table 2 Route types and default route preferences
Route type |
Preference |
Direct route |
0 |
Multicast static route |
1 |
Unicast static route |
60 |
RIP |
100 |
Unknown (route from an untrusted source) |
256 |
Load sharing
A routing protocol might find multiple optimal equal-cost routes to the same destination. You can use these routes to implement equal-cost multi-path (ECMP) load sharing.
Static routing, IPv6 static routing, RIP, and RIPng support ECMP load sharing.
Route backup
Route backup can improve network availability. Among multiple routes to the same destination, the route with the highest priority is the primary route and others are secondary routes.
The router forwards matching packets through the primary route. When the primary route fails, the route with the highest preference among the secondary routes is selected to forward packets. When the primary route recovers, the router uses it to forward packets.
Route recursion
To use a static or RIP route that has an indirectly connected next hop, a router must perform route recursion to find the output interface to reach the next hop.
The RIB records and saves route recursion information, including brief information about related routes, recursive paths, and recursion depth.
Route redistribution
Route redistribution enables routing protocols to learn routing information from each other. A dynamic routing protocol can redistribute routes from other routing protocols, including direct and static routing. For more information, see the respective chapters on those routing protocols in this configuration guide.
The RIB records redistribution relationships of routing protocols.
Setting the maximum lifetime for routes in the RIB
About this task
Perform this task to prevent routes of a certain protocol from being aged out due to slow protocol convergence resulting from a large number of route entries or long GR period.
Restrictions and guidelines
The configuration takes effect at the next protocol or RIB process switchover.
Procedure (IPv4)
1. Enter system view.
system-view
2. Enter RIB view.
rib
3. Create the RIB IPv4 address family and enter its view.
address-family ipv4
4. Set the maximum lifetime for IPv4 routes in the RIB.
protocol protocol lifetime seconds
By default, the maximum lifetime for routes in the RIB is 480 seconds.
Procedure (IPv6)
1. Enter system view.
system-view
2. Enter RIB view.
rib
3. Create the RIB IPv6 address family and enter its view.
address-family ipv6
4. Set the maximum lifetime for IPv6 routes in the RIB.
protocol protocol lifetime seconds
By default, the maximum lifetime for routes in the RIB is 480 seconds.
Setting the maximum lifetime for routes in the FIB
About this task
When GR or NSR is disabled, FIB entries must be retained for some time after a protocol process switchover or RIB process switchover. When GR or NSR is enabled, FIB entries must be removed immediately after a protocol or RIB process switchover to avoid routing issues. Perform this task to adjust the maximum lifetime for route entries in the FIB.
Procedure (IPv4)
1. Enter system view.
system-view
2. Enter RIB view.
rib
3. Create the RIB IPv4 address family and enter its view.
address-family ipv4
4. Set the maximum lifetime for IPv4 routes in the FIB.
fib lifetime seconds
By default, the maximum lifetime for routes in the FIB is 600 seconds.
Procedure (IPv6)
1. Enter system view.
system-view
2. Enter RIB view.
rib
3. Create the RIB IPv6 address family and enter its view.
address-family ipv6
4. Set the maximum lifetime for IPv6 routes in the FIB.
fib lifetime seconds
By default, the maximum lifetime for routes in the FIB is 600 seconds.
Setting the maximum number of ECMP routes
Hardware and feature compatibility
Hardware series |
Model |
Product code |
Feature compatibility |
WX1800H series |
WX1804H-PWR |
EWP-WX1804H-PWR-CN |
Yes |
WX2500H series |
WX2508H-PWR-LTE WX2510H-PWR WX2510H-F-PWR WX2540H WX2540H-F WX2560H |
EWP-WX2508H-PWR-LTE EWP-WX2510H-PWR EWP-WX2510H-F-PWR EWP-WX2540H EWP-WX2540H-F EWP-WX2560H |
Yes |
MAK series |
MAK204 MAK206 |
EWP-MAK204 EWP-MAK206 |
Yes |
WX3000H series |
WX3010H WX3010H-X-PWR WX3010H-L-PWR WX3024H WX3024H-L-PWR WX3024H-F |
EWP-WX3010H EWP-WX3010H-X-PWR EWP-WX3010H-L-PWR EWP-WX3024H EWP-WX3024H-L-PWR EWP-WX3024H-F |
Yes: · WX3010H · WX3010H-L-PWR · WX3024H · WX3024H-L-PWR · WX3024H-F No: WX3010H-X-PWR |
WX3500H series |
WX3508H WX3508H WX3510H WX3510H WX3520H WX3520H-F WX3540H WX3540H |
EWP-WX3508H EWP-WX3508H-F EWP-WX3510H EWP-WX3510H-F EWP-WX3520H EWP-WX3520H-F EWP-WX3540H EWP-WX3540H-F |
No |
WX5500E series |
WX5510E WX5540E |
EWP-WX5510E EWP-WX5540E |
No |
WX5500H series |
WX5540H WX5560H WX5580H |
EWP-WX5540H EWP-WX5560H EWP-WX5580H |
No |
Access controller modules |
LSUM1WCME0 EWPXM1WCME0 LSQM1WCMX20 LSUM1WCMX20RT LSQM1WCMX40 LSUM1WCMX40RT EWPXM2WCMD0F EWPXM1MAC0F |
LSUM1WCME0 EWPXM1WCME0 LSQM1WCMX20 LSUM1WCMX20RT LSQM1WCMX40 LSUM1WCMX40RT EWPXM2WCMD0F EWPXM1MAC0F |
No |
Hardware series |
Model |
Product code |
Feature compatibility |
WX1800H series |
WX1804H-PWR WX1810H-PWR WX1820H WX1840H |
EWP-WX1804H-PWR EWP-WX1810H-PWR EWP-WX1820H EWP-WX1840H-GL |
Yes |
WX3800H series |
WX3820H WX3840H |
EWP-WX3820H-GL EWP-WX3840H-GL |
No |
WX5800H series |
WX5860H |
EWP-WX5860H-GL |
No |
Restrictions and guidelines
This configuration takes effect at reboot. Make sure the reboot does not impact your network.
Procedure
1. Enter system view.
system-view
2. Set the maximum number of ECMP routes.
max-ecmp-num number
By default, the maximum number of ECMP routes is 4.
Configuring RIB NSR
About this task
When an active/standby switchover occurs, nonstop routing (NSR) backs up routing information from the active process to the standby process to avoid routing flapping and ensure forwarding continuity.
RIB NSR provides faster route convergence than protocol NSR during an active/standby switchover.
Hardware and feature compatibility
Hardware series |
Model |
Product code |
Feature compatibility |
WX1800H series |
WX1804H-PWR |
EWP-WX1804H-PWR-CN |
No |
WX2500H series |
WX2508H-PWR-LTE WX2510H-PWR WX2510H-F-PWR WX2540H WX2540H-F WX2560H |
EWP-WX2508H-PWR-LTE EWP-WX2510H-PWR EWP-WX2510H-F-PWR EWP-WX2540H EWP-WX2540H-F EWP-WX2560H |
No |
MAK series |
MAK204 MAK206 |
EWP-MAK204 EWP-MAK206 |
No |
WX3000H series |
WX3010H WX3010H-X-PWR WX3010H-L-PWR WX3024H WX3024H-L-PWR WX3024H-F |
EWP-WX3010H EWP-WX3010H-X-PWR EWP-WX3010H-L-PWR EWP-WX3024H EWP-WX3024H-L-PWR EWP-WX3024H-F |
No |
WX3500H series |
WX3508H WX3508H WX3510H WX3510H WX3520H WX3520H-F WX3540H WX3540H |
EWP-WX3508H EWP-WX3508H-F EWP-WX3510H EWP-WX3510H-F EWP-WX3520H EWP-WX3520H-F EWP-WX3540H EWP-WX3540H-F |
Yes |
WX5500E series |
WX5510E WX5540E |
EWP-WX5510E EWP-WX5540E |
Yes |
WX5500H series |
WX5540H WX5560H WX5580H |
EWP-WX5540H EWP-WX5560H EWP-WX5580H |
Yes |
Access controller modules |
LSUM1WCME0 EWPXM1WCME0 LSQM1WCMX20 LSUM1WCMX20RT LSQM1WCMX40 LSUM1WCMX40RT EWPXM2WCMD0F EWPXM1MAC0F |
LSUM1WCME0 EWPXM1WCME0 LSQM1WCMX20 LSUM1WCMX20RT LSQM1WCMX40 LSUM1WCMX40RT EWPXM2WCMD0F EWPXM1MAC0F |
No |
Hardware series |
Model |
Product code |
Feature compatibility |
WX1800H series |
WX1804H-PWR WX1810H-PWR WX1820H WX1840H |
EWP-WX1804H-PWR EWP-WX1810H-PWR EWP-WX1820H EWP-WX1840H-GL |
No |
WX3800H series |
WX3820H WX3840H |
EWP-WX3820H-GL EWP-WX3840H-GL |
Yes |
WX5800H series |
WX5860H |
EWP-WX5860H-GL |
Yes |
Restrictions and guidelines
Use this feature with protocol GR or NSR to avoid route timeouts and traffic interruption.
Procedure (IPv4)
1. Enter system view.
system-view
2. Enter RIB view.
rib
3. Create the RIB IPv4 address family and enter its view.
address-family ipv4
4. Enable IPv4 RIB NSR.
non-stop-routing
By default, RIB NSR is disabled.
Procedure (IPv6)
1. Enter system view.
system-view
2. Enter RIB view.
rib
3. Create the RIB IPv6 address family and enter its view.
address-family ipv6
4. Enable IPv6 RIB NSR.
non-stop-routing
By default, RIB NSR is disabled.
Configuring inter-protocol FRR
About this task
Inter-protocol fast reroute (FRR) enables fast rerouting between routes of different protocols. A backup next hop is automatically selected to reduce the service interruption time caused by unreachable next hops. When the next hop of the primary link fails, the traffic is redirected to the backup next hop.
Among the routes to the same destination in the RIB, a router adds the route with the highest preference to the FIB table.
Restrictions and guidelines
This feature uses the next hop of a route from a different protocol as the backup next hop, which might cause loops.
Procedure (IPv4)
1. Enter system view.
system-view
2. Enter RIB view.
rib
3. Create the RIB IPv4 address family and enter its view.
address-family ipv4
4. Enable IPv4 RIB inter-protocol FRR.
inter-protocol fast-reroute
By default, inter-protocol FRR is disabled.
Procedure (IPv6)
1. Enter system view.
system-view
2. Enter RIB view.
rib
3. Create the RIB IPv6 address family and enter its view.
address-family ipv6
4. Enable IPv6 RIB inter-protocol FRR.
inter-protocol fast-reroute
By default, inter-protocol FRR is disabled.
Display and maintenance commands for basic IP routing
IMPORTANT: Support for the display max-ecmp-num command depends on the device model. For more information, see the command reference. |
Execute display commands in any view and reset commands in user view.
Task |
Command |
Display routing table information. |
display ip routing-table [ verbose ] |
Display information about routes permitted by an IPv4 basic ACL. |
display ip routing-table acl ipv4-acl-number [ verbose ] |
Display information about routes to a specific destination address. |
display ip routing-table ip-address [ mask-length | mask ] [ longer-match ] [ verbose ] |
Display information about routes to a range of destination addresses. |
display ip routing-table ip-address1 to ip-address2 [ verbose ] |
Display information about routes permitted by an IP prefix list. |
display ip routing-table prefix-list prefix-list-name [ verbose ] |
Display information about routes installed by a protocol. |
display ip routing-table protocol protocol [ inactive | verbose ] |
Display IPv4 route statistics. |
display ip routing-table statistics |
Display brief IPv4 routing table information. |
display ip routing-table summary |
Display route attribute information in the IPv6 RIB. |
display ipv6 rib attribute [ attribute-id ] |
Display IPv6 RIB GR state information. |
display ipv6 rib graceful-restart |
Display next hop information in the IPv6 RIB. |
display ipv6 rib nib [ self-originated ] [ nib-id ] [ verbose ] display ipv6 rib nib protocol protocol [ verbose ] |
Display next hop information for IPv6 direct routes. |
display ipv6 route-direct nib [ nib-id ] [ verbose ] |
Display IPv6 routing table information. |
display ipv6 routing-table [ verbose ] |
Display information about routes permitted by an IPv6 basic ACL. |
display ipv6 routing-table acl ipv6-acl-number [ verbose ] |
Display information about routes to an IPv6 destination address. |
display ipv6 routing-table ipv6-address [ prefix-length ] [ longer-match ] [ verbose ] |
Display information about routes to a range of IPv6 destination addresses. |
display ipv6 routing-table ipv6-address1 to ipv6-address2 [ verbose ] |
Display information about routes permitted by an IPv6 prefix list. |
display ipv6 routing-table prefix-list prefix-list-name [ verbose ] |
Display information about routes installed by an IPv6 protocol. |
display ipv6 routing-table protocol protocol [ inactive | verbose ] |
Display IPv6 route statistics. |
display ipv6 routing-table statistics |
Display brief IPv6 routing table information. |
display ipv6 routing-table summary |
Display the maximum number of IPv4 ECMP routes. |
display max-ecmp-num |
Display route attribute information in the RIB. |
display rib attribute [ attribute-id ] |
Display RIB GR state information. |
display rib graceful-restart |
Display next hop information in the RIB. |
display rib nib [ self-originated ] [ nib-id ] [ verbose ] display rib nib protocol protocol [ verbose ] |
Display next hop information for direct routes. |
display route-direct nib [ nib-id ] [ verbose ] |
Clear IPv4 route statistics. |
reset ip routing-table statistics protocol { protocol | all } |
Clear IPv6 route statistics. |
reset ipv6 routing-table statistics protocol { protocol | all } |