< Home

port type

Function

The port type command configures the interface type. The interface type can be Network-to-Network Interface (NNI), User-to-Network Interface (UNI), or Enhanced Network Interface (ENI).

The undo port type command cancels the configuration.

By default, the interface type is NNI.

Only the S5720-EI, S6720S-EI, and S6720-EI support this command.

Format

port type { uni | eni | nni }

undo port type

Parameters

Parameter Description Value

uni

Indicates that the interface is a user-side interface on the device.

-

eni

Indicates that the interface is connected to another switch or user.

An ENI supports all protocols that are supported by an UNI.

-

nni

Indicates that the interface is a network-side interface on the device.

An NNI supports all protocol packets.

-

Views

40GE interface view, GE interface view, XGE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Generally, protocol packets that can be sent to the CPU are controlled by an ACL. If protocol packets are sent to the device, packets received by interfaces cannot be differentiated.

If an interface is attacked and the user disables the device to send packets, packets cannot be sent from other interfaces, affecting communications of the device. If an interface is attacked and the user does not disable the device to send packets, attack packets occupy resources and valid packets cannot be sent.

For example, OSPF is enabled on an interface and OSPF packets are sent to the device. If a non-OSPF interface is attacked, attack packets will occupy resources and valid OSPF packets cannot be forwarded. As a result, OSPF negotiation becomes slow or fails.

The port type command specifies the interface types according to the interface location. Interfaces of different types support different protocols and send only the packets of the supported protocols to the CPU. This reduces the workload of the CPU and provides flexible ways to protect the CPU.

Precautions

If you run the port type command multiple times, only the latest configuration takes effect.

Follow-up Procedure

This command differentiates packets from different types of interfaces so that the attack packets are denied and valid packets are forwarded. If an attack occurs, you can run the deny command to discard packets of a specified type or run the car command to limit the rate of a specified type of protocol packets.

Example

# Configure GE0/0/1 as an NNI.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] port type nni
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >