- 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-VLAN configuration
- 05-Loop detection configuration
- 06-Spanning tree configuration
- 07-LLDP configuration
- 08-Layer 2 forwarding configuration
- 09-L2TP configuration
- 10-ARP configuration
- 11-IP addressing configuration
- 12-DHCP configuration
- 13-DHCP snooping configuration
- 14-DHCPv6 configuration
- 15-DHCPv6 snooping configuration
- 16-DNS configuration
- 17-HTTP configuration
- 18-IP forwarding basics configuration
- 19-Fast forwarding configuration
- 20-Adjacency table configuration
- 21-IP performance optimization configuration
- 22-IPv6 basics configuration
- 23-IPv6 neighbor discovery configuration
- 24-IPv6 fast forwarding configuration
- 25-NAT configuration
- 26-Basic IP routing configuration
- 27-Static routing configuration
- 28-RIP configuration
- 29-OSPF configuration
- 30-Policy-based routing configuration
- 31-IPv6 policy-based routing configuration
- 32-IPv6 static routing configuration
- 33-RIPng configuration
- 34-GRE configuration
- 35-IPv6 transition technologies configuration
- 36-Multicast overview
- 37-IGMP snooping configuration
- 38-MLD snooping configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
26-Basic IP routing configuration | 74.46 KB |
Contents
Enabling symmetric load sharing
Verifying and maintaining load sharing
Enabling route fast switchover
Verifying and maintaining basic IP routing (IPv4)
Displaying IPv4 routing table information
Displaying IPv4 RIB information
Displaying and clearing IPv4 routing table statistics
Verifying and maintaining basic IP routing (IPv6)
Displaying IPv6 routing table information
Displaying IPv6 RIB information
Displaying and clearing IPv6 routing table statistics
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 |
RIP |
100 |
OSPF ASE |
150 |
OSPF NSSA |
150 |
Unknown (route from an untrusted source) |
256 |
Configuring load sharing
Configuring load sharing mode
About this task
Load sharing can be implemented on a per-flow 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 ] * ] global
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
· 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 | flow-label flow-label ] } [ dest-port port-id | ip-pro protocol-id | src-port port-id ] *
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.
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 active routes and number of remaining active routes.
display ip routing-table summary
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 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 }
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 active routes and number of remaining active routes.
display ipv6 routing-table summary
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 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 }