The port link-type command sets the link type of an interface.
The undo port link-type command restores the default link type of an interface.
By default, the link type of an interface on the S2720-EI, S5720I-SI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5730S-EI, S5730-SI, S6720-LI, S6720S-LI, S6720S-SI, and S6720-SI is negotiation-auto, and the link type of an interface on other models is negotiation-desirable.
Only the S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S support VE interfaces. You can configure the link type for a VE interface only after the VE interface is switched to Layer 2 mode using the portswitch command. The default link type is hybrid.
port link-type { access | dot1q-tunnel | hybrid | trunk | negotiation-desirable | negotiation-auto }
undo port link-type
Parameter |
Description |
Value |
---|---|---|
access |
Sets the link type of an interface to access. |
- |
dot1q-tunnel |
Sets the link type of an interface to QinQ. |
- |
hybrid |
Sets the link type of an interface to hybrid. |
- |
trunk |
Sets the link type of an interface to trunk. |
- |
negotiation-desirable |
Sets LNP negotiation mode for a Layer 2 Ethernet interface to negotiation-desirable. NOTE:
This parameter is not supported in the VE interface view. |
- |
negotiation-auto |
Sets the LNP negotiation mode for a Layer 2 Ethernet interface to negotiation-auto. NOTE:
This parameter is not supported in the VE interface view. |
- |
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, MultiGE interface view, VE interface view, Eth-Trunk interface view, port group view
Usage Scenario
Access, hybrid, trunk, and dot1q-tunnel link types are statically configured, and the LNP negotiation mode of negotiation-desirable or negotiation-auto is dynamically negotiated. The interface where negotiation-desirable or negotiation-auto is configured is negotiated as the access or trunk interface.
Local LNP Negotiation Mode |
Remote Link Type or LNP Negotiation Mode |
Locally Negotiated Link Type |
Remotely Negotiated Link Type |
Link Type When Negotiation Fails |
---|---|---|---|---|
negotiation-desirable/negotiation-auto |
Access (negotiate on) |
Access |
Access |
Access |
Hybrid (negotiate on) |
Trunk |
Hybrid |
Access |
|
Dot1q-tunnel (negotiate on) |
Access |
Dot1q-tunnel |
Access |
|
Trunk (negotiate on) |
Trunk |
Trunk |
Access |
|
LNP negotiation not supported or negotiate off |
Access |
N/A |
Access |
|
negotiation-desirable |
negotiation-desirable |
Trunk |
Trunk |
Access |
negotiation-desirable |
negotiation-desirable |
Trunk |
Trunk |
Access |
negotiation-auto |
negotiation-desirable |
Access |
Access |
Access |
negotiate on: LNP negotiation is enabled. negotiate off: LNP negotiation is disabled. N/A: The link type is uncertain.
Prerequisites
LNP has been enabled.
Follow-up Procedure
Add the interface to VLANs.
Precautions
This command is invalid on a member interface of an Eth-Trunk.
Starting from V200R005C00, the default link type of an interface is not hybrid. Before upgrading the device of an earlier version of V200R005C00 to V200R005C00 or later, the port link-type hybrid command configuration is generated.
If you run the port link-type command multiple times in the same interface view, only the latest configuration takes effect.
If the two ends of an Eth-Trunk link have different numbers of member interfaces, LNP negotiation may fail.
Before changing the link type of an interface, you do not need to restore the default VLAN configuration. However, if the link type of the interface is changed, the VLAN configuration of the interface is deleted. Exercise caution when you perform this configuration.
Dot1q-tunnel interfaces do not support the voice VLAN function.
On the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S, after the port link-type dot1q-tunnel command is run on an interface, IP packets cannot be forwarded on the interface.
If the device works in VBST mode, changing the link type of an interface may cause a loop on the network, resulting in a traffic storm. If the link type of an interface must be changed, disable the interfaces on both ends and then change the link type of these interfaces.