El tipo de enlace de una interfaz puede ser acceso, troncal, híbrido o Dot1q-tunnel. Los métodos utilizados para cambiar el tipo de enlace de una interfaz en diferentes versiones son diferentes.
· En las versiones de V200R005 y posteriores, ejecute el comando port link-type {access no trunk e híbrido dot1q-túnel} y enter y ó n como se solicita. Cuando la interfaz utiliza la configuración de VLAN predeterminada, el sistema no muestra ningún mensaje. El tipo de enlace de la interfaz se cambia directamente.
· Cuando ingresa y luego presiona Enter, el dispositivo elimina automáticamente la configuración de VLAN no predeterminada de la interfaz y establece el tipo de enlace de la interfaz a la especificada.
· Cuando ingresa n luego presiona Enter, el dispositivo retiene el tipo de enlace actual y la configuración de VLAN de la interfaz.
Cambie el tipo de enlace de la interfaz a híbrido.
< HUAWEI > system-view.
[HUAWEI] interface gigabitethernet0/0 / 1
[Huawei-GigabitEthernet0/0 / 1] port link-type hybrid
Advertencia: Este comando eliminará las VLAN en este puerto. ¿Continuar? [Y/N]: Y
Info: Esta operación puede tardar unos segundos. Por favor, espera un momento... hecho.
· En versiones anteriores de V200R005 una interfaz se une a VLAN 1 por defecto, y el PVID de una interfaz es 1 de VLAN. Para cambiar el tipo de enlace de la interfaz, puede ejecutar el comando port link-type {access| trunk | hybrid | dot1q-tunnel } para cambiar el tipo de enlace.
· Cambie el tipo de enlace de la interfaz al acceso.
· < HUAWEI > system-view.
· [HUAWEI] interface gigabitethernet0/0 / 1
· [Huawei-GigabitEthernet0/0 / 1] port link-type access
[Huawei-GigabitEthernet0/0 / 1] port default vlan 10 / / Set the PVID of the interface to VLAN 10
· Cambiar el tipo de enlace de la interfaz a troncal.
· < HUAWEI > system-view.
· [HUAWEI] interface gigabitethernet0/0 / 1
· [Huawei-GigabitEthernet0/0 / 1] port link-type trunk
· [Huawei-GigabitEthernet0/0 / 1] port trunk pvid vlan 10 / / Set the PVID of the interface to VLAN 10
[Huawei-GigabitEthernet0/0 / 1] port trunk allow-pass vlan 2 10 20 / / Add la interfaz a VLAN 2, VLAN 10 y VLAN 20].
· Cambie el tipo de enlace de la interfaz a híbrido.
· < HUAWEI > system-view.
· [HUAWEI] interface gigabitethernet0/0 / 1
· [Huawei-GigabitEthernet0/0 / 1] port link-type hybrid
· [Huawei-GigabitEthernet0/0 / 1] port hybrid pvid vlan 10 / / Set the PVID of the interface to VLAN 10
· [Huawei-GigabitEthernet0/0 / 1] port hybrid untagged vlan 2 10 / / Add the interface to VLAN 2 and VLAN 10 in untagged mode.
[Huawei-GigabitEthernet0/0 / 1] port híbrid tagged vlan 20 / / Add the interface to VLAN 20 in tagged mode.
· Cambie el tipo de enlace de la interfaz al Dot1q-tunnel.
· < HUAWEI > system-view.
· [HUAWEI] interface gigabitethernet0/0 / 1
· [Huawei-GigabitEthernet0/0 / 1] port link-type dot1q-tunnel
[Huawei-GigabitEthernet0/0 / 1] port default vlan 10 / / Set the PVID of the interface to VLAN 10 La interfaz agrega VLAN 10 a todos los paquetes de datos recibidos.
· Cuando cambia el tipo de enlace de una interfaz que no utiliza la configuración de VLAN predeterminada, el sistema muestra el mensaje "Error: Please renew the default configurations."
· Es necesario restaurar la configuración predeterminada de la interfaz y luego cambiar el tipo de enlace de la interfaz.
· Restaurar la configuración de VLAN predeterminada de una interfaz de acceso o Dot1q-tunnel.
· < HUAWEI > system-view.
· [HUAWEI] interface gigabitethernet0/0 / 1
[Huawei-GigabitEthernet0/0 / 1] undo port default vlan
· Restaurar la configuración de VLAN predeterminada de una interfaz troncal.
· < HUAWEI > system-view.
· [HUAWEI] interface gigabitethernet0/0 / 1
· [Huawei-GigabitEthernet0/0 / 1] undo port trunk pvid vlan
· [Huawei-GigabitEthernet0/0 / 1] undo port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0 / 1] port trunk allow-pass vlan 1
· Restaurar la configuración predeterminada de una interfaz híbrida.
· < HUAWEI > system-view.
· [HUAWEI] interface gigabitethernet0/0 / 1
· [Huawei-GigabitEthernet0/0 / 1] undo port hybrid pvid vlan
· [Huawei-GigabitEthernet0/0 / 1] undo port hybrid vlan all
[Huawei-GigabitEthernet0/0 / 1] port hybrid untagged vlan 1