< Home

Configuring a Null Interface

Context

The Null interface is like the null devices supported by some operating systems. All packets, which are sent to the Null interface, are dropped. The system creates a Null interface NULL0.

Since all packets sent to the Null interface are dropped, you can directly send packets to be filtered out to the Null interface. In this case, you may not configure a security policy.

For example, using the following command will discard all packets that are sent to the 192.168.0.1 network segment.

[sysname] ip route-static 192.168.0.1 255.255.0.0 null 0

Procedure

  1. Access the system view.

    system-view

  2. Access the null interface view.

    interface NULL 0

    The null interface remains in the Up state all the time. It cannot forward data packet. You can neither configure an IP address for it nor encapsulate it with protocols.

Follow-up Procedure

After null interfaces are configured, you need to check whether the configuration is correct. In addition, you can view statistics about null interfaces.

Run the display interface null [ 0 ] command to check the status of a null interface.

Example

<sysname> display interface null 0
NULL0 current state : UP
Line protocol current state :UP (spoofing)
Description: NULL0 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
Physical is NULL DEV
    Last 300 seconds input rate 0 bits/sec, 0 packets/sec
    Last 300 seconds output rate 0 bits/sec, 0 packets/sec
    Realtime 2 seconds input rate 0 bits/sec, 0 packets/sec
    Realtime 2 seconds output rate 0 bits/sec, 0 packets/sec
    Input: 0 packets,0 bytes,
           0 unicast,0 broadcast,0 multicast
           0 errors,0 drops,
    Output:0 packets,0 bytes,
          0 unicast,0 broadcast,0 multicast
          0 errors,0 drops
   Input bandwidth utilization  : 0.00%
    Output bandwidth utilization : 0.00%
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >