- Table of Contents
-
- 06-Layer 3—IP Services Configuration Guide
- 00-Preface
- 01-ARP configuration
- 02-IP addressing configuration
- 03-DHCP configuration
- 04-IP forwarding basics configuration
- 05-IP performance optimization configuration
- 06-IPv6 basics configuration
- 07-IPv6 neighbor discovery configuration
- 08-DHCPv6 configuration
- 09-IPv6 transition technologies configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
04-IP forwarding basics configuration | 66.54 KB |
Contents
Configuring IP forwarding basic settings························································ 1
About FIB table······························································································································· 1
Enabling split horizon forwarding······································································································ 1
Enabling packet-drop statistics collection on interfaces····································································· 2
Enabling IPv4 packet forwarding on an interface with no IPv4 address configured······························ 3
Displaying and maintaining FIB table································································································ 4
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
Destination count: 4 FIB entry count: 4
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 GE1/0/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.
Enabling split horizon forwarding
About this task
This feature prevents IPv4 and IPv6 packets from being forwarded out of the physical interface on which they were received, avoiding network loops.
Restrictions and guidelines
You can configure split horizon forwarding in system view or interface view. The configuration in system view takes effect globally and the configuration in interface view takes effect only on the interface. To disable split horizon forwarding, you must disable it in both system view and interface view.
This feature is available only on physical interfaces. Logical interfaces, including virtual interfaces and aggregate interfaces, do not support this feature.
In VXLAN networking, enabling split horizon forwarding globally (forwarding split-horizon) might lead to network disconnection. You can configure this feature under the AC port.
When you enable horizontal splitting in system view, port isolation will apply to Layer 3 packets. For information on port isolation, see Layer 2 — WAN Switching Configuration Guide.
Procedure (system view)
1. Enter system view.
system-view
2. Enable split horizon forwarding.
forwarding split-horizon
By default, split horizon forwarding is disabled.
Procedure (interface view)
1. Enter system view.
system-view
2. Enter Layer 2 or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Enable split horizon forwarding.
forwarding split-horizon
By default, split horizon forwarding is disabled.
Enabling packet-drop statistics collection on interfaces
About this task
This feature enables the device to collect statistics on specific packet drops on interfaces and report the statistics to the collector through gRPC.
Restrictions and guidelines
This feature takes effect on only physical interfaces.
For the S9825 series switches, when both the in-illegal-interface and in-vlan-mismatch keywords are specified, the packet count recorded by the in-illegal-interface keyword includes the packet count recorded by the in-vlan-mismatch keyword.
If you use the broadcast-suppression, multicast-suppression, or unicast-suppression command to specify the ratio or kbps parameter, the in-storm-suppression parameter specified by this command does not take effect. Instead, it will be cumulatively counted in the incoming direction packets discarded due to ACL filtering. For more information about broadcast-suppression, multicast-suppression, or unicast-suppression, see Interface Management Command Reference.
When both the in-l3-ttle and in-acl keywords are specified, the packet count recorded by the in-acl keyword includes the packet count recorded by the in-l3-ttle keyword.
When you specify parameters other than in-l2-mtu on the S9855 series switches using this command and perform the following tasks, the current packet loss count will not be reset:
· Execute the reset counters interface command on the device.
· Change the port rate on an active Ethernet interface, causing a change in port speed.
· Switch between Layer 2 and Layer 3 working modes on an active Ethernet interface.
· Execute the shutdown command on an active Ethernet interface.
When you use this command and specify any parameter on the S9825, or use this command and specify the in-l2-mtu parameter on the S9855, executing the shutdown command on an active Ethernet interface will not reset the current packet loss count. The following operations will reset the current packet loss count:
· Execute the reset counters interface command on the device.
· Change the port rate on an active Ethernet interface, causing a change in port speed.
· Switch between Layer 2 and Layer 3 working modes on an active Ethernet interface.
For more information about the reset counters interface and shutdown commands, see Interface Management Command Reference.
Restrictions and guidelines
For the S9855 series switches, the in-l3-header-ipv4 and in-l3-nexthop keywords are not supported.
For the S9825 series switches, the out-acl, out-l2-mtu, out-vlan-mismatch, and in-storm-suppression keywords are not supported.
Procedure
1. Enter system view.
system-view
2. Enable the device to collect statistics on packets dropped on interfaces.
packet-drop statistics enable [ in-acl | out-acl | in-illegal-interface | in-l2-mtu | out-l2-mtu | in-l3-header-ipv4 | in-l3-nexthop | in-l3-ttl | in-stp-block | out-stp-block | in-same-interface | in-storm-suppression | in-vlan-mismatch | out-vlan-mismatch ] *
By default, the device does not count packet drops on interfaces.
Enabling IPv4 packet forwarding on an interface with no IPv4 address configured
About this task
On a device that supports both IPv4 and IPv6, the next hop of an IPv4 packet might be an IPv4 address or an IPv6 address. If the output interface has no IPv4 address configured, the interface cannot forward the IPv4 packet. To solve this problem, enable this feature on the interface. This feature allows the interface to forward IPv4 packets even though the interface has no IPv4 address configured.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable IPv4 packet forwarding on an interface that has no IPv4 address configured.
ip forwarding
By default, the IPv4 packet forwarding is disabled on the interface that has no IPv4 address configured.
Displaying and maintaining FIB table
Perform all display tasks in any view.
display fib [ vpn-instance vpn-instance-name ] [ ip-address [ mask | mask-length ] ]