07-Layer 3—IP Services Command Reference

HomeSupportReference GuidesCommand ReferencesH3C S5580X-EI[HI] & S5580S-EI Switch Series Command References-R1330Pxx-6W10007-Layer 3—IP Services Command Reference
08-IP forwarding basics commands
Title Size Download
08-IP forwarding basics commands 97.31 KB

Basic IP forwarding commands

display fib

Use display fib to display FIB entries.

Syntax

display fib [ vpn-instance vpn-instance-name ] [ ip-address [ mask | mask-length ] ] [ slot slot-number]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. To display the FIB entries for the public network, do not specify any VPN instance.

ip-address: Displays the FIB entry that matches the specified destination IP address.

mask: Specifies the mask for the IP address.

mask-length: Specifies the mask length for the IP address. The value range is 0 to 32.

slot slot-number: Specifies an IRF member device by its member ID. If you do not specify a member device, this command displays FIB entries for the master device.

Usage guidelines

You can use this command to view the number of FIB entries successfully issued to hardware.

If you specify an IP address without a mask or mask length, this command displays the longest matching FIB entry.

If you specify an IP address and a mask or mask length, this command displays the exactly matching FIB entry.

Examples

# Display all FIB entries of the public network.

<Sysname> display fib

Route destination count: 5

Directly-connected host count: 0

Entries issued to hardware: 5

 

Flag:

  U:Usable    G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

 

Destination/Mask   Nexthop         Flag     OutInterface/Token       Label

0.0.0.0/32         127.0.0.1       UH       InLoop0                  Null

1.1.1.0/24         192.168.126.1   USGF     M-GE0/0/0                Null

127.0.0.0/8        127.0.0.1       U        InLoop0                  Null

127.0.0.0/32       127.0.0.1       UH       InLoop0                  Null

127.0.0.1/32       127.0.0.1       UH       InLoop0                  Null

# Display the FIB entries for VPN vpn1.

<Sysname> display fib vpn-instance vpn1

Route destination count: 8

Directly-connected host count: 0

Entries issued to hardware: 5

 

Flag:

  U:Usable   G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

 

Destination/Mask   Nexthop         Flag     OutInterface/Token      Label

0.0.0.0/32         127.0.0.1       UH       InLoop0                  Null

20.20.20.0/24      20.20.20.25     U        M-GE0/0/0                Null

20.20.20.0/32      20.20.20.25     UBH      M-GE0/0/0                Null

20.20.20.25/32     127.0.0.1       UH       InLoop0                  Null

20.20.20.25/32     20.20.20.25     H        M-GE0/0/0                Null

20.20.20.255/32    20.20.20.25     UBH      M-GE0/0/0                Null

20.20.20.255/32    1000:2000:3000:4000:5000:6000:7000:8000 UBH      MGE0

/0/0                Null

# Display the FIB entries matching the destination IP address 10.2.1.1.

<Sysname> display fib 10.2.1.1

FIB entry count: 1

Entries issued to hardware: 1

 

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.1.1/32        127.0.0.1       UH       InLoop0                  Null

Table 1 Command output

Field

Description

Route destination count

Number of route destination addresses.

Directly-connected host count

Number of directly connected hosts learned by features such as ARP.

Entries issued to hardware

Number of FIB entries successfully issued to hardware.

FIB entry count

Total number of FIB entries.

Destination/Mask

Destination address and the mask length.

Nexthop

Next hop address.

Flag

Flags of routes:

·     U—Usable route.

·     G—Gateway route.

·     H—Host route.

·     B—Blackhole route.

·     D—Dynamic route.

·     S—Static route.

·     R—Relay route.

·     F—Fast reroute.

OutInterface/Token

Output interface/LSP index number.

Label

Inner label.

display fib prefix diff

Use display fib prefix diff to display the differences in FIB entries between two slots.

Syntax

display fib prefix diff [ all | [ vpn-instance vpn-instance-name ] [ ip-address [ mask | mask-length ] ] ] slot slot-number1 slot slot-number2

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

all: Specifies all FIB entries of the public network and VPN instances.

vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters without spaces.

ip-address: Compares the FIB entries that match the specified destination IPv4 address.

mask: Specifies the mask for the IPv4 address.

mask-length: Specifies the mask length for the IPv4 address. The value range is 0 to 32.

slot slot-number1 slot slot-number2: Specifies two IRF member devices by their member IDs. You must specify two different IRF member devices.

Usage guidelines

Application scenarios

Inconsistency of FIB entries between member devices might cause issues such as packet loss, packet processing delay, and packet queue overload. Use this command to display the differences in FIB entries between member devices and check for inconsistency. If inconsistency exists, execute the display current-configuration diff command in any view to display the differences that the running configuration has as compared with the next-startup configuration and identify unnecessary configuration.

Operating mechanism

You can specify a subnet to match FIB entries when specifying the ip-address argument. If you do not specify any mask or mask length, the system compares the FIB entry that has the longest match with the specified destination IPV4 address on each slot. If you specify a mask or mask length, the system compares the FIB entry that has the exact match with the specified destination IPV4 address and mask on each slot.

Examples

# Display the differences in FIB entries between slot 0 and slot 3.

<Sysname> display fib prefix diff slot 0 slot 3

--- Slot 0 CPU 0

+++ Slot 3 CPU 0

@@ -1,19 +0,0 @@

-

-Destination/Mask:0.0.0.0/32           VNID:0x310000003        VPN:--

-Destination/Mask:10.0.0.0/24          VNID:0x710000007        VPN:--

-Destination/Mask:10.0.0.0/32          VNID:0x710000007        VPN:--

-Destination/Mask:10.0.0.1/32          VNID:0x310000003        VPN:--

-Destination/Mask:10.0.0.2/32          VNID:--                 VPN:--

-Destination/Mask:10.0.0.255/32        VNID:0x710000007        VPN:--

-Destination/Mask:30.0.0.0/24          VNID:0x17000000         VPN:--

-Destination/Mask:127.0.0.0/8          VNID:0x310000003        VPN:--

-Destination/Mask:127.0.0.0/32         VNID:0x410000004        VPN:--

-Destination/Mask:127.0.0.1/32         VNID:0x310000003        VPN:--

-Destination/Mask:127.255.255.255/32   VNID:0x410000004        VPN:--

-Destination/Mask:172.16.94.0/24       VNID:0x610000006        VPN:--

-Destination/Mask:172.16.94.0/32       VNID:0x610000006        VPN:--

-Destination/Mask:172.16.94.100/32     VNID:0x310000003        VPN:--

-Destination/Mask:172.16.94.200/32     VNID:--                 VPN:--

-Destination/Mask:172.16.94.201/32     VNID:--                 VPN:--

-Destination/Mask:172.16.94.255/32     VNID:0x610000006        VPN:--

-Destination/Mask:255.255.255.255/32   VNID:0x310000003        VPN:--

\ No newline at end of file

+Destination/Mask:192.168.100.10/24    VNID:--                 VPN:--

+Destination/Mask:192.168.100.20/24    VNID:--                 VPN:--

\ No newline at end of file

Table 2 Command output

Field

Description

--- A

+++ B

·     A—Source slot number and CPU number for comparison.

·     B—Destination slot number and CPU number for comparison.

@@ -linenumber1,number1 +linenumber2,number2 @@

·     -linenumber1,number1—Display number1 entries starting from linenumber1 on the source slot.

·     +linenumber2,number2—Display number2 entries starting from linenumber2 on the destination slot.

Destination/Mask

Destination IP address and mask length.

·     A hyphen(-) in front of this field indicates that the entry exists on the source slot but not on the destination slot.

·     A plus sign(+) in front of this field indicates that the entry exists on the destination slot but not on the source slot.

VNID

VN ID. Two hyphens (--) indicates that no VN ID exists.

VPN

VPN instance name. Two hyphens (--) indicates the public network.

No newline at end of file

No more comparison results are available.

display fib vn diff

Use display fib vn diff to display the differences in FIB VN entries between two slots.

Syntax

display fib vn diff [ id id ] slot slot-number1 slot slot-number2

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

id id: Specifies the VN entry by its VN ID.

slot slot-number1 slot slot-number2: Specifies two IRF member devices by their member IDs. You must specify two different IRF member devices.

Usage guidelines

Inconsistency of VN entries between member devices might cause issues such as packet loss, packet processing delay, and packet queue overload. Use this command to display the differences in VN entries between the member devices and check for inconsistency. If inconsistency exists, execute the display current-configuration diff command in any view to display the differences that the running configuration has as compared with the next-startup configuration and identify unnecessary configuration.

If you do not specify the id keyword, the command displays the differences in all FIB VN entries between two slots.

Examples

# Display the differences in FIB VN entries between slot 0 and slot 3.

<Sysname> display fib vn diff slot 0 slot 3

--- Slot 0 CPU 0

+++ Slot 3 CPU 0

@@ -1,19 +1,2 @@

 

-VNID:0x810000008        NextHopNum:1     Flag:U    Nexthop:[0]10.0.0.1

-VNID:0x70000001         NextHopNum:1     Flag:--   Nexthop:[0]Invalid

-VNID:0x10000000         NextHopNum:1     Flag:U    Nexthop:[0]127.0.0.1

-VNID:0x20000000         NextHopNum:1     Flag:U    Nexthop:[0]::1

-VNID:0x510000005        NextHopNum:1     Flag:U    Nexthop:[0]127.0.0.1

-VNID:0x520000005        NextHopNum:1     Flag:U    Nexthop:[0]::

-VNID:0x210000002        NextHopNum:1     Flag:--   Nexthop:[0]0.0.0.0

-VNID:0x220000002        NextHopNum:1     Flag:U    Nexthop:[0]::1

-VNID:0x710000007        NextHopNum:1     Flag:U    Nexthop:[0]10.0.0.1

-VNID:0x410000004        NextHopNum:1     Flag:U    Nexthop:[0]127.0.0.1

-VNID:0x420000004        NextHopNum:1     Flag:U    Nexthop:[0]::

-VNID:0x110000001        NextHopNum:1     Flag:U    Nexthop:[0]127.0.0.1

-VNID:0x120000001        NextHopNum:1     Flag:U    Nexthop:[0]::

-VNID:0x610000006        NextHopNum:1     Flag:U    Nexthop:[0]172.16.94.100

-VNID:0x17000000         NextHopNum:2     Flag:--   Nexthop:[0]172.16.94.200

-VNID:0x17000000         NextHopNum:2     Flag:--   Nexthop:[1]172.16.94.201

-VNID:0x310000003        NextHopNum:1     Flag:--   Nexthop:[0]0.0.0.0

-VNID:0x320000003        NextHopNum:1     Flag:U    Nexthop:[0]::

\ No newline at end of file

+VNID:0x70000001         NextHopNum:1     Flag:--   Nexthop:[0]Invalid

\ No newline at end of file

Table 3 Command output

Field

Description

--- A

+++ B

·     A—Source slot number and CPU number for comparison.

·     B—Destination slot number and CPU number for comparison.

@@ -linenumber1,number1 +linenumber2,number2 @@

·     -linenumber1,number1—Display number1 entries starting from linenumber1 on the source slot.

·     +linenumber2,number2—Display number2 entries starting from linenumber2 on the destination slot.

VNID

Virtual next hop ID.

NextHopNum

Total number of next hops.

Nexthop

Next hop information in the [Number]IP format:

·     Number—Next hop index number, starting from 0.

·     IP—Next hop IPv4 or IPv6 address.

Flag

Flag bit value:

·     U—The next hop takes effect.

·     --—The next hop does not take effect.

No newline at end of file

No more comparison results are available.

forwarding split-horizon

Use forwarding split-horizon to enable split horizon forwarding.

Use undo forwarding split-horizon to disable split horizon forwarding.

 

 

NOTE:

Only the S5580X-HI series switches support this command.

 

Syntax

forwarding split-horizon

undo forwarding split-horizon

Default

Split horizon forwarding is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature prevents IPv4, IPv6, and MPLS packets from being forwarded out of the physical interface on which they were received, avoiding network loops.

Examples

# Enable split horizon forwarding.

<Sysname> system-view

[Sysname] forwarding split-horizon

forwarding vxlan-packet inner-protocol

Use forwarding vxlan-packet inner-protocol to enable hardware forwarding for specific packets received from VXLAN tunnels.

Use undo forwarding vxlan-packet inner-protocol to restore the default.

Syntax

forwarding vxlan-packet inner-protocol { ipv4 | ipv6 } *

undo forwarding vxlan-packet inner-protocol [ ipv4 | ipv6 ]

 

Default

Packets received from VXLAN tunnels are delivered to the CPU for processing.

Views

System view

Predefined user roles

network-admin

Parameters

ipv4: Specifies IPv4 packets.

ipv6: Specifies IPv6 packets.

Usage guidelines

 

By default, the device forwards packets received from VXLAN tunnels to the CPU for processing when acting as a VTEP in a distributed EVPN gateway network. If a large number of packets are received, packet loss might occur because of software rate limit, which might cause service exceptions on downlink devices.

To resolve this issue, you can enable the device to forward specific packets received from VXLAN tunnels in hardware without delivering them to the CPU.

Examples

# Enable hardware forwarding for IPv4 packets received from VXLAN tunnels.

<Sysname> system-view

[Sysname] forwarding vxlan-packet inner-protocol ipv4

ip forwarding apply vpn-peer-id enable

Use ip forwarding apply vpn-peer-id enable to enable the VPN peer-based processing.

Use undo ip forwarding apply vpn-peer-id enable to disable the VPN peer-based processing.

Syntax

ip forwarding apply vpn-peer-id enable

undo ip forwarding apply vpn-peer-id enable

Default

The VPN peer-based processing is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature enables the device to use the VPN peer ID of the routing information in the FIB table to process packets.

This command must be used together with the apply vpn-peer-id command. For more information about the command, see routing policy commands in Layer 3—IP Routing Command Reference.

Examples

# Enable the VPN peer-based processing.

<Sysname> system-view

[Sysname] ip forwarding apply vpn-peer-id enable

snmp-agent trap enable fib

Use snmp-agent trap enable fib to enable SNMP notifications for FIB events.

Use undo snmp-agent trap enable fib to disable SNMP notifications for FIB events.

Syntax

snmp-agent trap enable fib

undo snmp-agent trap enable fib

Default

SNMP notifications for FIB events are enabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

This feature enables the FIB module to generate SNMP notifications for critical FIB events. The SNMP notifications are sent to the SNMP module. For the SNMP notifications to be sent correctly, you must also configure SNMP. For more information about SNMP configuration, see Network Management and Monitoring Configuration Guide.

Examples

# Disable SNMP notifications for FIB events.

<Sysname> system-view

[Sysname] undo snmp-agent trap enable fib

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网