< Home

discard

Function

The discard command discards IP packets with options, including packets with IP source-route options, record-route options, route-alert options, and time-stamp options.

The undo discard command restores the default configurations.

Format

discard { ra | rr | srr | ts }

undo discard { ra | rr | srr | ts }

Parameters

Parameter Description Value
ra

Indicates the route-alert options.

-

rr

Indicates the record-route options.

-

srr

Indicates the source-route options, which are called the source and record route (SRR) options. During packet routing, the IP address list is updated on each hop. Therefore, each hop needs to record the routes for sending the response packet along the reverse path. The SRR options are classified into the Loose Source and Record Route (LSRR) option and Strict Source and Record Route (SSRR) option.

-

ts

Indicates the time-stamp options.

-

Views

Ethernet interface view, Ethernet sub-interface view, VLANIF interface view, Tunnel interface view, Loopback interface view, Dialer interface view, Eth-trunk interface view, Eth-trunk sub-interface view, Virtual-Template interface view

Default Level

2: Configuration level

Usage Guidelines

By default, packets with options are processed by the CPU.

When a device receives a huge number of packets with options that increase the traffic loads, performance of the device is affected. The discard command is used to discard IP packets with options, which reduces pressure on CPU and improves network performance and security.

The discard command applies to only incoming packets.

Example

# Configure the device to discard the IP packets with source-route options.

<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] discard srr
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >