< Home

Configuring a NULL Interface

Context

A NULL0 interface is created automatically. The NULL0 interface is always Up and cannot forward packets. Any packets sent to the NULL0 interface are discarded. If the next hop of a static route to a network segment is a NULL interface, all the data packets destined for this network segment are discarded. Therefore, the packets that you want to filter out can be sent to the NULL0 interface directly without configuring the access control list.

For example, run the following static route configuration command to discard packets sent to the network segment of 192.168.0.0.

[HUAWEI] ip route-static 192.168.0.0 255.255.255.0 NULL 0

Pre-configuration Tasks

Before configuring a NULL interface, power on the device and perform self-check.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface null 0

    The NULL interface view is displayed.

    The NULL interface stays in Up state. It cannot forward data packets. You cannot configure an IP address for it or encapsulate it with protocols.

Verifying the Configuration

  • Run the display interface null [ 0 ] command to check the status of a null interface.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >