- Table of Contents
-
- 06-Layer 3—IP Services Configuration Guide
- 00-Preface
- 01-ARP configuration
- 02-IP addressing configuration
- 03-DHCP configuration
- 04-DNS configuration
- 05-IP forwarding basics configuration
- 06-Fast forwarding configuration
- 07-Adjacency table configuration
- 08-IRDP configuration
- 09-IP performance optimization configuration
- 10-UDP helper configuration
- 11-IPv6 basics configuration
- 12-IPv6 neighbor discovery configuration
- 13-DHCPv6 configuration
- 14-IPv6 fast forwarding configuration
- 15-IPv6 transition technologies configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
05-IP forwarding basics configuration | 85.44 KB |
Contents
Configuring IP forwarding basic settings························································ 1
About FIB table······························································································································· 1
Enabling split horizon forwarding······································································································ 1
Enabling IPv4 packet forwarding on an interface with no IPv4 address configured······························ 2
Forwarding ARP packets to a remote device through a VXLAN tunnel················································ 3
Forwarding ND packets to a remote device through a VXLAN tunnel·················································· 3
Keeping the TTL or hop limit unchanged in packets passing through Layer 3 forwarding devices········· 4
Forwarding IPv4 packets with TTL 1 and a specific destination IPv4 address······································ 4
Keeping the TTL unchanged in packets passing through forwarding devices to a specific destination·· 5
Forwarding IPv6 packets with hop limit 1 and a specific destination IPv6 address······························· 5
Keeping the hop limit unchanged in packets passing through forwarding devices to a specific destination 5
Configuring IP forwarding basic display and maintenance·································································· 6
Displaying and maintaining FIB table························································································· 6
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 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, IPv6, and MPLS packets from being forwarded out of the physical interface on which they were received, avoiding network loops.
Feature and software version compatibility
Only the R5212 and later versions support this feature.
Restrictions and guidelines
You can enable this feature globally in system view or enable this feature for a specific interface in interface view. This feature takes effect on an interface if it is enabled for the interface or enabled globally.
To disable this feature, you must disable it in both system view and interface view.
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 (Layer 3/Layer 2 interface view)
1. Enter system view.
system-view
2. Enter Layer 3/Layer 2 interface view.
interface interface-type interface-number
3. Enable split horizon forwarding.
forwarding split-horizon
By default, split horizon forwarding is disabled.
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.
Restrictions and guidelines
You can configure this feature in any view in which an IPv4 address can be 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, IPv4 packet forwarding is disabled on an interface that has no IPv4 address configured.
Forwarding ARP packets to a remote device through a VXLAN tunnel
About this task
In a scenario where ARP flooding suppression is enabled, a device discards an ARP packet if the following conditions exist:
· The ARP packet uses the device's MAC address as the destination MAC address.
· The ARP packet uses another device's IPv4 address as the destination IPv4 address.
When the device is supposed to such packets to a specific VXLAN tunnel, perform this task for that device.
Make sure the specified tunnel interface is a manual created VXLAN over IPv4 tunnel.
Procedure
1. Enter system view.
system-view
2. Enable forwarding ARP packets with a specific destination address to a specific VXLAN tunnel.
forwarding arp-packet destination [ vpn-instance vpn-instance-name ] ip-address interface tunnel number
By default, the device delivers ARP packets to CPU.
Forwarding ND packets to a remote device through a VXLAN tunnel
About this task
In a scenario where ND flooding suppression is enabled, a device discards an ND packet if the following conditions exist:
· The ND packet uses the device's MAC address as the destination MAC address.
· The ND packet uses another device's IPv6 address as the destination IPv6 address.
When the device is supposed to such packets to a specific VXLAN tunnel, perform this task for that device.
Make sure the specified tunnel interface is a manual created VXLAN over IPv4 tunnel.
Procedure
1. Enter system view.
system-view
2. Enable forwarding ND packets with a specific destination address to a specific VXLAN tunnel.
forwarding nd-packet destination [ vpn-instance vpn-instance-name ] ipv6-address interface tunnel number
By default, the device delivers ND packets to CPU.
Keeping the TTL or hop limit unchanged in packets passing through Layer 3 forwarding devices
About this task
By default, upon receiving a packet, the forward device decrements the TTL or hop limit in the packet by one to avoid endless packet forwardings on the network. However, to ensure correct flow analysis for traffic division, the fields of a packet are supposed to be unchanged as many as possible before the packet reaches the data analyzer. To meet this requirement, use this feature.
Restrictions and guidelines
This feature does not take effect on Layer 3 packets in an Overlay network.
Procedure
1. Enter system view.
system-view
2. Disable the device from changing the TTL or hop limit in each incoming packet.
ip forwarding ttl-unvaried
By default, the TTL or hop limit in a packet is decremented by one when the packet passes through a forwarding device.
Forwarding IPv4 packets with TTL 1 and a specific destination IPv4 address
About this task
This feature is typically configured on a device that acts as the gateway in the following scenario:
· The device directly connects to an internal server.
· The internal server wishes to receive IPv4 packets destined for a specific IPv4 address, but it does not care about the TTL value in the packets.
Upon receiving an IPv4 packet with TTL 1, the device forwards the packet directly if the packet is destined for the specified destination IPv4 address.
Procedure
1. Enter system view.
system-view
2. Enable the device to forward IPv4 packets with TTL 1 if the packets are destined for a specific IPv4 address.
forwarding ttl-exceeded-packet destination [ vpn-instance vpn-instance-name ] ip-address
By default, the device delivers IPv4 packets to CPU.
Keeping the TTL unchanged in packets passing through forwarding devices to a specific destination
1. Enter system view.
system-view
2. Disable the device from changing the TTL in an incoming packet destined for a specific destination IPv4 address.
forwarding ttl-unvaried destination [ vpn-instance vpn-instance-name ] ip-address
By default, the device decrements the TTL in an incoming packet by one.
Forwarding IPv6 packets with hop limit 1 and a specific destination IPv6 address
About this task
This feature is typically configured on a device that acts as the gateway in the following scenario:
· The device directly connects to an internal device.
· The internal device wishes to receive IPv6 packets destined for a specific IPv6 address, but it does not care about the HopLimit value in the packets.
Upon receiving an IPv6 packet with hop limit 1, the device forwards the packet directly if the packet is destined for the specified destination IPv6 address.
Procedure
1. Enter system view.
system-view
2. Enable the device to forward IPv6 packets with hop limit 1 if the packets are destined for a specific IPv6 address.
forwarding hop-limit-exceeded destination [ vpn-instance vpn-instance-name ] ipv6-address
By default, the device delivers IPv6 packets to CPU.
Keeping the hop limit unchanged in packets passing through forwarding devices to a specific destination
1. Enter system view.
system-view
2. Disable the device from changing the hop limit in an incoming packet destined for a specific destination IPv6 address.
forwarding hop-limit-unvaried destination [ vpn-instance vpn-instance-name ] ipv6-address
By default, the device decrements the hop limit in an incoming packet by one.
Configuring IP forwarding basic display and maintenance
Displaying and maintaining FIB table
To display FIB entries, execute the following command in any view:
display fib [ vpn-instance vpn-instance-name ] [ ip-address [ mask | mask-length ] ]