05-Layer 3—IP Services Command Reference

HomeSupportReference GuidesCommand ReferencesH3C S9827 & S9857 Switch Series Command References-R932x-6W10005-Layer 3—IP Services Command Reference
04-IP forwarding basics commands
Title Size Download
04-IP forwarding basics commands 69.17 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 ] ]

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.

Usage guidelines

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

 

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

 

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

 

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.

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.

forwarding split-horizon

Use forwarding split-horizon to enable split horizon forwarding.

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

Syntax

forwarding split-horizon

undo forwarding split-horizon

Default

Split horizon forwarding is disabled.

Views

System view

Layer 2 Ethernet interface view

Layer 3 Ethernet interface view

Predefined user roles

network-admin

Usage guidelines

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

When you use the forwarding split-horizon command, following these restrictions and guidelines:

·     To enable split horizon forwarding globally, use this command in system view.

·     To enable split horizon forwarding on a per-interface basis, use this command in interface view.

·     Split horizon forwarding takes effect on an interface as long as it is enabled globally or on the interface.

·     To disable split horizon forwarding on an interface, disable this feature in both system view and interface view.

Examples

# Enable split horizon forwarding.

<Sysname> system-view

[Sysname] forwarding split-horizon

ip forwarding

Use ip forwarding to enable IPv4 packet forwarding on an interface that has no IPv4 address configured.

Use undo ip forwarding to disable IPv4 packet forwarding on an interface that has no IPv4 address configured.

Syntax

ip forwarding

undo ip forwarding

Default

If an interface has no IPv4 address configured, it cannot forward IPv4 packets.

Views

Interface view

Predefined user roles

network-admin

Usage guidelines

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 resolve this issue, execute this command on the interface. This feature allows the interface to forward IPv4 packets even though the interface has no IPv4 address configured.

Examples

# Enable IPv4 packet forwarding on VLAN-interface 1 that has no IPv4 address configured.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] ip forwarding

packet-drop statistics enable

Use packet-drop statistics enable to enable packet-drop statistics collection on interfaces.

Use undo packet-drop statistics enable to disable packet-drop statistics collection on interfaces.

Syntax

packet-drop statistics enable [ in-acl | out-acl | in-checksum | out-checksum | in-illegal-interface | in-l2-mtu | out-l2-mtu | in-l3-header-ipv4 | in-l3-header-ipv6 | in-l3-mtu | in-l3-nexthop | in-l3-rib-ipv4 | in-l3-rib-ipv6 | in-l3-ttl | in-stp-block | out-stp-block | in-same-interface | in-storm-suppression | in-vlan-mismatch | out-vlan-mismatch ] *

undo packet-drop statistics enable [ in-acl | out-acl | in-checksum | out-checksum | in-illegal-interface | in-l2-mtu | out-l2-mtu | in-l3-header-ipv4 | in-l3-header-ipv6 | in-l3-mtu | in-l3-nexthop | in-l3-rib-ipv4 | in-l3-rib-ipv6 | in-l3-ttl | in-stp-block | out-stp-block | in-same-interface | in-storm-suppression | in-vlan-mismatch | out-vlan-mismatch ] *

Default

The device does not count packet drops on interfaces.

Views

System view

Predefined user roles

network-admin

Parameters

in-acl: Specifies incoming packets dropped by ACL.

out-acl: Specifies outgoing packets dropped by ACL.

in-checksum: Specifies incoming packets dropped because of parity check failures.

out-checksum: Specifies outgoing packets dropped because of parity check failures.

in-illegal-interface: Specifies incoming packets dropped because no egress interface was found or the egress interface was illegal.

in-l2-mtu: Specifies incoming packets dropped because of Layer 2 MTU exceeding.

out-l2-mtu: Specifies outgoing packets dropped because of Layer 2 MTU exceeding.

in-l3-header-ipv4: Specifies incoming IPv4 packets dropped because of invalid Layer 3 headers, for example, invalid checksum.

in-l3-header-ipv6: Specifies incoming IPv6 packets dropped because of invalid Layer 3 headers, for example, invalid checksum.

in-l3-mtu: Specifies incoming packets dropped because of Layer 3 MTU exceeding.

in-l3-nexthop: Specifies incoming packets dropped because the next-hop action is Drop.

in-l3-ttl: Specifies incoming packets dropped because their TTLs are less than 1.

in-l3-rib-ipv4: Specifies incoming IPv4 packets dropped because no route was found or the action in the routing table is drop.

in-l3-rib-ipv6: Specifies incoming IPv6 packets dropped because no route was found or the action in the routing table is drop.

in-same-interface: Specifies incoming packets dropped because the ingress interface is the same as the egress one.

in-stp-block: Specifies incoming packets dropped because of spanning tree port blocking.

out-stp-block: Specifies outgoing packets dropped because of spanning tree port blocking.

in-storm-suppression: Specifies incoming packets dropped because of broadcast, multicast, or unknown unicast suppression.

in-vlan-mismatch: Specifies incoming packets dropped because of VLAN mismatch.

out-vlan-mismatch: Specifies outgoing packets dropped because of VLAN mismatch.

Usage guidelines

This feature takes effect on only physical interfaces.

After you enable this feature, the device collects statistics on specific packet drops on interfaces and reports the statistics to the collector through gRPC.

Examples

# Enable the device to collect statistics on incoming packets dropped because of Layer 2 MTU exceeding.

<Sysname> system-view

[Sysname] packet-drop statistics enable in-l2-mtu

 

  • 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
新华三官网