- Table of Contents
-
- 06-Layer 3 - IP Services Configuration Guide
- 00-Preface
- 01-ARP configuration
- 02-IP addressing configuration
- 03-DNS configuration
- 04-IP forwarding basics configuration
- 05-Fast forwarding configuration
- 06-Adjacency table configuration
- 07-IRDP configuration
- 08-IP performance optimization configuration
- 09-UDP helper configuration
- 10-IPv6 basics configuration
- 11-IPv6 fast forwarding configuration
- 12-Tunneling configuration
- 13-GRE configuration
- 14-HTTP redirect configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
04-IP forwarding basics configuration | 46.66 KB |
Contents
Configuring IP forwarding basic settings····················································· 1
About FIB table··················································································································································· 1
Saving the IP forwarding entries to a file······································································································· 1
Display and maintenance commands for FIB table····················································································· 2
Configuring load sharing··············································································· 3
About load sharing············································································································································· 3
Configuring per-flow load sharing·················································································································· 3
Enabling bandwidth-based load sharing······································································································· 3
Configuring IP forwarding basic settings
About FIB table
A device uses the FIB table to make packet forwarding decisions.
A device selects optimal routes from the routing table, and puts them into the FIB table. Each FIB entry specifies the next hop IP address and output interface for packets destined for a specific subnet or host.
For more information about the routing table, see Layer 3—IP Routing Configuration Guide.
Use the display fib command to display the FIB table. The following example displays the entire FIB table.
<Sysname> display fib
Route destination count: 4
Directly-connected host count: 0
Flag:
U:Usable G:Gateway H:Host B:Blackhole D:Dynamic S:Static
R:Relay F:FRR
Destination/Mask Nexthop Flag OutInterface/Token Label
10.2.0.0/16 10.2.1.1 U GE3/1/1 Null
10.2.1.1/32 127.0.0.1 UH InLoop0 Null
127.0.0.0/8 127.0.0.1 U InLoop0 Null
127.0.0.1/32 127.0.0.1 UH InLoop0 Null
A FIB entry includes the following items:
· Destination—Destination IP address.
· Mask—Network mask. The mask and the destination address identify the destination network. A logical AND operation between the destination address and the network mask yields the address of the destination network. For example, if the destination address is 192.168.1.40 and the mask 255.255.255.0, the address of the destination network is 192.168.1.0. A network mask includes a certain number of consecutive 1s. It can be expressed in dotted decimal format or by the number of the 1s.
· Nexthop—IP address of the next hop.
· Flag—Route flag.
· OutInterface—Output interface.
· Token—MPLS Label Switched Path index number.
· Label—Inner label.
Saving the IP forwarding entries to a file
Restrictions and guidelines
The feature automatically creates the file if you specify a nonexistent file. If the file already exists, this feature overwrites the file content.
This feature triggers one-time saving of the IP forwarding entries.
To automatically save the IP forwarding entries periodically, configure a schedule for the device to automatically run the ip forwarding-table save command. For information about scheduling a task, see Fundamentals Configuration Guide.
Procedure
To save the IP forwarding entries to a file, execute the following command in any view:
ip forwarding-table save filename filename
Display and maintenance commands for FIB table
Execute display commands in any view.
Task |
Command |
Display FIB entries. |
display fib [ vpn-instance vpn-instance-name ] [ ip-address [ mask | mask-length ] ] |
Configuring load sharing
About load sharing
If a routing protocol finds multiple equal-cost best routes to the same destination, the device forwards packets over the equal-cost routes to implement load sharing.
Configuring per-flow load sharing
About per-flow load sharing
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, IP protocol number, and ingress port.
In a complex network, when the criteria cannot distinguish flows, you can use the algorithm keyword to specify an algorithm to identify flows.
Restrictions and guidelines
For CSPEX cards (except CSPEX-1104-E) and CEPC cards, follow these guidelines:
· The cards only support the dest-ip, dest-port, src-ip, and src-port keywords. You cannot configure a load sharing mode by using the ip-pro or algorithm keywords.
· If you configure equal-cost load sharing and link-aggregation load sharing on the cards, equal-cost load sharing takes effect. For more information about link-aggregation load sharing, see Layer 2—LAN Switching Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Configure load sharing.
In standalone mode:
ip load-sharing mode per-flow [ algorithm algorithm-number | [ dest-ip | dest-port | ip-pro | src-ip | src-port ] * ] { global | slot slot-number }
In IRF mode:
ip load-sharing mode per-flow [ algorithm algorithm-number | [ dest-ip | dest-port | ip-pro | src-ip | src-port ] * ] { chassis chassis-number slot slot-number | global }
By default, the device performs per-flow load sharing based on destination IP address, source IP address, destination port, and source port.
Enabling bandwidth-based load sharing
About bandwidth-based load sharing
This feature load shares flow traffic among multiple output interfaces based on their load percentages. The device calculates the load percentage for each output interface in terms of the interface expected bandwidth.
Devices that run load sharing protocols, such as Locator/ID Separation Protocol (LISP), implement load sharing based on the ratios defined by these protocols.
Restrictions and guidelines
This feature load shares flows only from CSPEX cards (except CSPEX-1104-E) and CEPC cards.
Procedure
1. Enter system view.
system-view
2. Enable IPv4 bandwidth-based load sharing.
bandwidth-based-sharing
By default, the IPv4 bandwidth-based load sharing is disabled.
3. (Optional.) Configure the expected bandwidth of the interface.
a. Enter interface view.
interface interface-type interface-number
b. Configure the expected bandwidth of the interface.
bandwidth bandwidth
By default, the expected bandwidth is the physical bandwidth of the interface.