- Table of Contents
-
- 05-Network Connectivity Configuration Guide
- 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-L2TP configuration
- 11-ARP configuration
- 12-IP addressing configuration
- 13-DHCP configuration
- 14-DHCP snooping configuration
- 15-DHCPv6 configuration
- 16-DHCPv6 snooping configuration
- 17-DNS configuration
- 18-HTTP configuration
- 19-HTTP redirect configuration
- 20-IP forwarding basics configuration
- 21-Fast forwarding configuration
- 22-Adjacency table configuration
- 23-IP performance optimization configuration
- 24-IPv6 basics configuration
- 25-IPv6 neighbor discovery configuration
- 26-IPv6 fast forwarding configuration
- 27-IPv6 transition technologies configuration
- 28-NAT configuration
- 29-GRE configuration
- 30-Basic IP routing configuration
- 31-Static routing configuration
- 32-OSPF configuration
- 33-Policy-based routing configuration
- 34-IPv6 static routing configuration
- 35-IPv6 policy-based routing configuration
- 36-Multicast overview
- 37-IGMP snooping configuration
- 38-MLD snooping configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
30-Basic IP routing configuration | 183.79 KB |
Contents
Extension attribute redistribution
Enabling symmetric load sharing
Verifying and maintaining load sharing
Setting the maximum lifetime for routes in the RIB
Setting the maximum lifetime for routes in the FIB
Configuring inter-protocol FRR
Associating the direct routes on an interface with a track entry
Enabling route fast switchover
Configuring next hop recursion loop suppression
About next hop recursion loop suppression
Restrictions and guidelines for configuring next hop recursion loop suppression
Disabling suppression for next hop recursion loop (IPv4)
Setting the interval for clearing the recursion loop counter (IPv4)
Disabling suppression for next hop recursion loop (IPv6)
Setting the interval for clearing the recursion loop counter (IPv6)
Setting the maximum number of active routes supported by the device
Setting the maximum number of RIB next hop records or route entry records
Enabling notifications for RIB
Verifying and maintaining basic IP routing (IPv4)
Displaying IPv4 routing table information
Displaying and clearing IPv4 routing table statistics
Displaying and clearing IPv4 route entry records
Displaying IPv4 RIB information
Displaying and clearing IPv4 RIB next hop records
Verifying and maintaining basic IP routing (IPv6)
Displaying IPv6 routing table information
Displaying and clearing IPv6 routing table statistics
Displaying and clearing IPv6 route entry records
Displaying IPv6 RIB information
Displaying and clearing IPv6 RIB next hop records
Configuring basic IP routing
The term "router" in this chapter refers to a routing-capable device.
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 redistribution, and route extension 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. For more information about the FIB table, see "Configuring IP forwarding basic settings."
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 |
OSPF |
10 |
Unicast static route |
60 |
OSPF ASE |
150 |
OSPF NSSA |
150 |
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.
ECMP load sharing is available for the following routing methods or protocols:
· Static routing and IPv6 static routing.
· OSPF.
Route recursion
To use a static route, a router must perform route recursion to find the output interface to reach the next hop.
Link-state routing protocols, such as OSPF, do not need route recursion, because they obtain directly connected next hops through route calculation.
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.
Extension attribute redistribution
Extension attribute redistribution enables routing protocols to learn route extension attributes from each other, including OSPF area IDs, route types, and router IDs.
The RIB records extended attributes of each routing protocol and redistribution relationships of different routing protocol extended attributes.
Configuring load sharing
Configuring load sharing mode
About this task
Load sharing can be implemented on a per-flow basis or per-packet basis.
In the per-flow load sharing mode, the device forwards flows over equal-cost routes. Packets of one flow travel along the same routes. You can configure the device to identify a flow based on the following criteria: source IP address, destination IP address, source port number, destination port number, and IP protocol number.
In a complex network, when the criteria cannot distinguish flows, you can use the algorithm keyword to specify an algorithm to identify flows.
Procedure
1. Enter system view.
system-view
2. Configure load sharing.
ip load-sharing mode { per-flow [ algorithm algorithm-number [ seed seed-number ] | [ dest-ip | dest-port | ingress-port | ip-pro | src-ip | src-port ] * ] | per-packet } { global | slot slot-number }
By default, the device performs per-flow load sharing based on the destination IP address.
Enabling symmetric load sharing
About this task
Symmetric load sharing ensures that bidirectional traffic specific to a source and destination address pair flow along the same path.
Procedure
1. Enter system view.
system-view
2. Enable symmetric load sharing.
ip load-sharing symmetric enable
By default, symmetric load sharing is disabled.
Verifying and maintaining load sharing
Perform display tasks in any view.
· Display the load sharing mode in use.
display ip load-sharing mode slot slot-number
· Display the load sharing path selected for a flow.
display ip load-sharing path ingress-port interface-type interface-number packet-format { ipv4oe dest-ip ip-address [ src-ip ip-address ] | ipv6oe dest-ipv6 ipv6-address [ src-ipv6 ipv6-address ]} [ dest-port port-id | ip-pro protocol-id | src-port port-id ] *
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 [ instance instance-name ] lifetime seconds
By default, the maximum lifetime for routes in the RIB is 900 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 [ instance instance-name ] lifetime seconds
By default, the maximum lifetime for routes in the RIB is 900 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 meet such requirements.
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.
Configuring inter-protocol FRR
About this task
Inter-protocol fast reroute (FRR) is applicable to services that are sensitive to packet loss and latency. This feature 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. After you configure this feature, the device selects a route of another routing protocol as the backup route. When the next hop of the primary route is unreachable, the device forwards packets through the backup route.
Restrictions and guidelines for inter-protocol FRR
This feature uses the next hop of a route from a different protocol as the backup next hop, which might cause loops.
If you configure both inter-protocol FRR and protocol-specific FRR, protocol-specific FRR takes effect.
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.
Associating the direct routes on an interface with a track entry
About this task
Perform this task to associate the direct routes on an interface with a track entry to change the cost of the direct routes according to the track entry state.
· If the track entry does not exist or the track entry is in NotReady or Positive state, the cost of the direct routes changes to 0.
· If the track entry is in Negative state, the cost of the direct routes changes to the value configured by using the route-direct track or ipv6 route-direct track command.
For more information about associating the direct routes on an interface with a track entry, see Track configuration in High Availability Configuration Guide.
Procedure (IPv4)
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Associate the IPv4 direct routes on the interface with a track entry and apply the specified cost value to the IPv4 direct routes after the track entry changes to Negative state.
route-direct track track-entry-number degrade-cost cost-value
By default, the IPv4 direct routes on an interface are not associated with a track entry.
To change the track entry associated with the IPv4 direct routes on an interface, you must first execute the undo route-direct track command to remove the original association.
Procedure (IPv6)
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Associate the IPv6 direct routes on the interface with a track entry and apply the specified cost value to the IPv6 direct routes after the track entry changes to Negative state.
ipv6 route-direct track track-entry-number degrade-cost cost-value
By default, the IPv6 direct routes on an interface are not associated with a track entry.
To change the track entry associated with the IPv6 direct routes on an interface, you must first execute the undo ipv6 route-direct track command to remove the original association.
Enabling route fast switchover
About this task
This feature applies to a device that provides the same physical output interface for large numbers of routes, including ECMP routes and primary/secondary routes. When a link failure occurs on the interface, the device must perform the following tasks before switching the traffic to another route:
1. Deletes all ARP or ND entries for the link.
2. Instructs the FIB to delete the associated FIB entries.
This procedure is time consuming and interrupts traffic for a long time. To resolve this issue, you can enable route fast switchover. This feature allows the device to instruct the FIB to delete the invalid FIB entries for route switchover first.
Procedure (IPv6)
1. Enter system view.
system-view
2. Enable IPv6 route fast switchover.
ipv6 route fast-switchover enable
By default, IPv6 route fast switchover is disabled.
Configuring next hop recursion loop suppression
About next hop recursion loop suppression
A recursion loop occurs when a route recurses to a related route that recurses back to the route. It causes a route recursion failure and further lookup for a related route. If recursion loop persists, continuous route flapping will cause high system resource consumption and CPU utilization.
This feature enables the system to use a counter to record the number of route recursion failures. When the counter reaches 20, the system suppresses route recursion for a specified period of time to save system resources on the device.
Restrictions and guidelines for configuring next hop recursion loop suppression
The configuration of disabling next hop recursion loop suppression takes effect immediately.
The setting of clearing the recursion loop counter takes effect for the next recursion loop suppression.
Disabling suppression for next hop recursion loop (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. Disable next hop recursion loop suppression.
nexthop recursive-lookup restrain disable
By default, next hop recursion loop suppression is enabled.
Setting the interval for clearing the recursion loop counter (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 interval for clearing the recursion loop counter.
nexthop recursive-lookup restrain clear-interval interval
By default, the interval for clearing the recursion loop counter is 600 seconds.
Disabling suppression for next hop recursion loop (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. Disable next hop recursion loop suppression.
nexthop recursive-lookup restrain disable
By default, next hop recursion loop suppression is enabled.
Setting the interval for clearing the recursion loop counter (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 interval for clearing the recursion loop counter.
nexthop recursive-lookup restrain clear-interval interval
By default, the interval for clearing the recursion loop counter is 600 seconds.
Setting the maximum number of active routes supported by the device
About this task
The feature allows you to set the maximum number of active IPv4/IPv6 routes supported by the device.
· You can use the routing-table limit number warn-threshold command to specify an alarm threshold. When the percentage of active routes exceeds the alarm threshold, the system generates a system log message but still accepts active routes. You can take relevant actions based on the message to save system resources. If the number of active routes reaches the maximum number, no more routes can be added and new routes are discarded.
· You can use the routing-table limit number simply-alert command to specify an alarm threshold. When the maximum number of active IPv4/IPv6 routes is exceeded, the device still accepts new active routes but generates a system log message. You can take relevant actions based on the message to save system resources.
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 number of active IPv4 routes supported by the device.
routing-table limit number { warn-threshold | simply-alert }
By default, the maximum number of active IPv4 routes is not set for the device.
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 number of active IPv6 routes supported by the device.
routing-table limit number { warn-threshold | simply-alert }
By default, the maximum number of active IPv6 routes is not set for the device.
Setting the maximum number of RIB next hop records or route entry records
About this task
When adding, modifying, or deleting RIP next hops or route entries, the device records associated information to facilitate troubleshooting. To view the recorded information, execute the display rib nib record command.
As a best practice to avoid excessive system resource usage, set the maximum number of RIB next hop records or route entry records properly. When the maximum number is reached, the device can continue to record new information. The new records will overwrite the earliest records.
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 number of RIB next hop records or route entry records.
record-limit limit [ rib nib [ flush [ delete | update ] | receive [ add | delete | update ] ] ]
record-limit limit [ routing-table [ flush [ delete | update ] | notify [ delete | update ] | receive [ add | delete | update ] ] ]
By default, the maximum number of RIB next hop records or route entry records is 1000.
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 number of IPv6 RIB next hop records or route entry records.
record-limit limit [ rib nib [ flush [ delete | update ] | receive [ add | delete | update ] ] ]
record-limit limit [ routing-table [ flush [ delete | update ] | notify [ delete | update ] | receive [ add | delete | update ] ] ]
By default, the maximum number of IPv6 RIB next hop records or route entry records is 1000.
Enabling notifications for RIB
About this task
Use this feature to report critical RIB events to an NMS. For RIB event notifications to be sent correctly, you must also configure SNMP on the device. For more information about SNMP configuration, see the network management and monitoring configuration guide for the device.
Procedure (IPv4)
1. Enter system view.
system-view
2. Enable SNMP notifications for IPv4 RIB.
snmp-agent trap enable rib [ cyclic-iterate-restrain | cyclic-iterate-restrain-clear | prefix-exceed | prefix-exceed-clear | prefix-threshold-exceed | prefix-thresholdexceed-clear | public-prefix-exceed | public-prefixexceed-clear | public-prefixthreshold-exceed | public-prefixthresholdexceed-clear ] *
By default, SNMP notifications are enabled for IPv4 RIB.
Procedure (IPv6)
1. Enter system view.
system-view
2. Enable SNMP notifications for IPv6 RIB.
snmp-agent trap enable ipv6 rib [ cyclic-iterate-restrain | cyclic-iterate-restrain-clear | prefix-exceed | prefix-exceed-clear | prefix-threshold-exceed | prefix-thresholdexceed-clear | public-prefix-exceed | public-prefixexceed-clear | public-prefixthreshold-exceed | public-prefixthresholdexceed-clear ] *
By default, SNMP notifications are enabled for IPv6 RIB.
Verifying and maintaining basic IP routing (IPv4)
Displaying IPv4 routing table information
Perform display tasks in any view.
· Display routing table information.
display ip routing-table [ verbose ]
display ip routing-table all-routes
· 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 brief routing table information, including maximum number of ECMP routes, maximum number of active routes, and number of remaining active routes.
display ip routing-table summary
Displaying and clearing IPv4 routing table statistics
To display IPv4 route or route prefix statistics, execute the following command in any view:
display ip routing-table [ all-routes ] [ prefix ] statistics
To clear route statistics, execute the following commands in user view:
· reset ip routing-table statistics protocol { protocol | all }
· reset ip routing-table [ all-routes ] statistics protocol { protocol | all }
Displaying and clearing IPv4 route entry records
To display IPv4 route entry records, execute the following commands in any view:
· display ip routing-table record flush [ delete | update ] [ verbose ]
· display ip routing-table record notify [ delete | update ] [ verbose ]
· display ip routing-table record receive [ add | delete | update ] [ verbose ]
To clear IPv4 route entry records, execute the following command in user view:
reset ip routing-table record
Displaying IPv4 RIB information
Perform display tasks in any view.
· 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 [ sub-nib nib-id ] [ verbose ]
display rib nib protocol protocol [ verbose ]
· Display next hop information for direct routes.
display route-direct nib [ nib-id ] [ verbose ]
Displaying and clearing IPv4 RIB next hop records
To display IPv4 RIB next hop records, execute the following commands in any view:
· display rib nib record flush [ delete | update ] [ verbose ]
· display rib nib record receive [ add | delete | update ] [ verbose ]
To clear IPv4 RIB next hop records, execute the following command in user view:
reset rib nib record
Verifying and maintaining basic IP routing (IPv6)
Displaying IPv6 routing table information
Perform display tasks in any view.
· Display IPv6 routing table information.
display ipv6 routing-table [ verbose ]
display ipv6 routing-table all-routes
· Display information about routes to an IPv6 destination address.
display ipv6 routing-table ipv6-address [ prefix-length ] [ longer-match ] [ 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 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 brief IPv6 routing table information, including maximum number of ECMP routes, maximum number of active routes, and number of remaining active routes.
display ipv6 routing-table summary
Displaying and clearing IPv6 routing table statistics
To display IPv6 route or route prefix statistics, execute the following command in any view:
display ipv6 routing-table [ all-routes ] [ prefix ] statistics
To clear IPv6 route statistics, execute the following commands in user view:
· reset ipv6 routing-table statistics protocol { protocol | all }
· reset ipv6 routing-table [ all-routes ] statistics protocol { protocol | all }
Displaying and clearing IPv6 route entry records
To display IPv6 route entry records, execute the following commands in any view:
· display ipv6 routing-table record flush [ delete | update ] [ verbose ]
· display ipv6 routing-table record notify [ delete | update ] [ verbose ]
· display ipv6 routing-table record receive [ add | delete | update ] [ verbose ]
To clear IPv6 route entry records, execute the following command in user view:
reset ipv6 routing-table record
Displaying IPv6 RIB information
Perform display tasks in any view.
· 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 [ sub-nib 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 ]
Displaying and clearing IPv6 RIB next hop records
To display IPv6 RIB next hop records, execute the following commands in any view:
· display ipv6 rib nib record flush [ delete | update ] [ verbose ]
· display ipv6 rib nib record receive [ add | delete | update ] [ verbose ]
To clear IPv6 RIB next hop records, execute the following command in user view:
reset ipv6 rib nib record