Ajoutez l'interface de couche 2 (interface de service) au VLAN et connectez-vous à l'appareil via l'interface VLANIF. Par exemple, les deux interfaces de service sont GigabitEthernet 1/0/1 et GigabitEthernet 1/0/2.
Les configurations sont les suivantes:
# Créez un VLAN et ajoutez les interfaces au VLAN. Par défaut, les interfaces appartiennent au VLAN1.
<FW> system-view [FW] vlan 2 [FW-vlan-2] quit [FW] interface GigabitEthernet 1/0/1[FW-GigabitEthernet1/0/1] portswitch [FW-GigabitEthernet1/0/1] port link-type access [FW-GigabitEthernet1/0/1] port default vlan 2 [FW-GigabitEthernet1/0/1] quit[FW] interface GigabitEthernet 1/0/2 [FW-GigabitEthernet1/0/2] portswitch[FW-GigabitEthernet1/0/1] port link-type access [FW-GigabitEthernet1/0/2] port default vlan 2 [FW-GigabitEthernet1/0/2] quit
# Configure the VLANIF interfaces.
[FW] interface vlanif 2 [FW-Vlanif2] ip address 10.1.3.1 24 [FW-Vlanif2] service-manage enable [FW-Vlanif2] service-manage ssh permit [FW-Vlanif2] service-manage https permit [FW-Vlanif2] quit[FW] firewall zone trust [FW-zone-trust] add interface vlanif 2 [FW-zone-trust] quit
# Configure a security policy from the Trust zone, where the VLANIF interfaces reside, to the Local zone.
[FW] security-policy [FW-policy-security] rule name policy_sec [FW-policy-security-rule-policy_sec] source-zone trust [FW-policy-security-rule-policy_sec] destination-zone local [FW-policy-security-rule-policy_sec] action permit [FW-policy-security-rule-policy_sec] quit[ FW-policy-security] quit
Log in to the device using 10.1.3.1 after the configurations are complete.