port link-type

Function

The port link-type command configures a link type on an Ethernet interface.

The undo port link-type command restores the default link type.

The default link type of an interface is hybrid.

Format

port link-type access

port link-type hybrid

port link-type trunk

port link-type dot1q-tunnel

undo port link-type

Parameters

Parameter Description Value
hybrid

Configures the link type of an interface as hybrid.

-

trunk

Configures the link type of an interface as trunk.

-

dot1q-tunnel

Configures the link type of an interface as dot1q-tunnel.

-

access

Configures the link type of an interface as access.

-

Views

Layer 2 100GE interface view, Layer 2 10GE interface view, 25GE-L2 view, 400GE-L2 view, Layer 2 40GE interface view, Layer 2 50GE interface view, Eth-Trunk interface view, Layer 2 GE interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
vlan write

Usage Guidelines

Usage Scenario

Different types of interfaces can be used in different scenarios:

  • Access interfaces are used to connect user hosts on access links. These interfaces transmit Ethernet frames without tags. If a default VLAN is configured for an access interface.
  • Trunk interfaces are used to connect devices on trunk links. A trunk interface allows frames with VLAN tags to pass through.
  • Hybrid interfaces are used to connect user hosts or switching devices on access links or trunk links. A hybrid interface allows frames with or without VLAN tags to pass through.
  • Dot1q-tunnel interfaces are usually applied on carrier networks. This type of interfaces expands VLAN space by adding another 802.1Q tag to a tagged packet. In this manner, private VLAN packets can be transparently transmitted to the public network.

Precautions

The port link-type command cannot be configured on physical interfaces that are added to an Eth-Trunk.

A Layer 3 interface must be switched to a Layer 2 interface using the portswitch command. The link type of the Layer 2 interface is hybrid by default. You can run the port link-type command to modify its link type.

Example

# Configure the link type of GE 0/1/1 as trunk.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/1
[*HUAWEI-GigabitEthernet0/1/1] portswitch
[*HUAWEI-GigabitEthernet0/1/1] port link-type trunk
Copyright ? Huawei Technologies Co., Ltd.
Copyright ? Huawei Technologies Co., Ltd.
< Previous topic Next topic >