Configuring an Ethernet subinterface on the firewall

0

Configure the Layer 3 Ethernet subinterface as follows:
1. Run the system-view command to access the system view.
2. Run the interface interface-type interface-number.subinterface-number command to access the Ethernet subinterface view.
3. Run the ip address ip-address { mask | mask-length } [ sub ] command to configure the IP address of the Ethernet subinterface.
4. Run the vlan-type dot1q vlan-id command to configure the encapsulation type for the Ethernet subinterface and associate a VLAN ID with the subinterface.

Configure the Layer 2 Ethernet subinterface as follows:
1. Run the system-view command to access the system view.
2. Run the interface interface-type interface-number command to enter the interface view.
3. Run the portswitch command to configure a Layer 3 Ethernet interface to work in Layer 2 mode.
4. Run the quit command to return to the system view.
5. Run the interface interface-type interface-number.subinterface-number command to create a subinterface and access the subinterface view.
6. Run the vlan-type dot1q vlan-id command to configure the encapsulation type for the subinterface and associate a VLAN ID with the subinterface.
7. Run the portswitch command to configure the subinterface as a Layer 2 subinterface.

Other related questions:
Why does an Ethernet sub-interface fail to forward packets
The arp broadcast enable command is not executed on this subinterface.

Method used to configure the router-on-a-stick on USG firewalls

The router-on-a-stick can address the limited physical interface resources issue. By configuring multiple subinterfaces, corresponding to different VLANs, for a physical interface, a physical interface can enable different VLANs to communicate with each other. For example, you can configure the router-on-a-stick on the USG2000, USG5000, and USG6000 as follows: [USG] interface GigabitEthernet1/0/3.1//Configure subinterface 1. [USG-GigabitEthernet1/0/3.1] vlan-type dot1q 10//Terminate VLAN 10. [USG-GigabitEthernet1/0/3.1] ip address 10.3.1.1 255.255.255.0//Configure the IP address for the subinterface. [USG-GigabitEthernet1/0/3.1] quit [USG] interface GigabitEthernet1/0/3.2//Configure subinterface 2. [USG-GigabitEthernet1/0/3.2] vlan-type dot1q 20//Terminate VLAN 20. [USG-GigabitEthernet1/0/3.2] ip address 10.3.1.1 255.255.255.0//Configure the IP address for the subinterface.


Method used to configure VLAN communications through L3 subinterfaces on USG firewalls
To enable different VLANs to communicate with each other, you can connect different VLANs to different interfaces of an L3 device. In this way, a router can exchange data between different VLANs. However, this method wastes limited physical interface resources of the device. The Ethernet subinterfaces can be used to address this issue. Currently, the Ethernet subinterfaces can be configured for the Ethernet interfaces and Eth-Trunk interfaces. By configuring multiple subinterfaces, corresponding to different VLANs, for a physical interface, a physical interface can enable different VLANs to communicate with each other. The method for enabling VLANs to communicate with each other through L3 subinterfaces is only applicable to the scenario in which hosts in each VLAN are in different network segments. If hosts in a VLAN are in the same network segment, you can configure L2 subinterfaces to enable VLANs to communicate with each other. To configure VLAN communications through L3 subinterfaces, perform the following steps: 1. Run the system-view command to enter the system view. 2. Run the interface interface-type interface-number.subinterface-number command to create a subinterface and enter the subinterface view. 3. Run the vlan-type dot1q vlan-id command to configure the encryption type and associated VLAN ID for the subinterface. 4. Run the ip address ip-address { mask | mask-length } [ sub ] command to configure the IP address for the subinterface. The IP addresses of the subinterface and the main interface can be in the same network segment, but the subnet masks of the subinterface and the main interface must different.

DHCP configuration for USG subinterfaces
The USG2000, USG5000, and USG6000 subinterfaces support the DHCP function.

Method used to configure VLAN communications through L2 subinterfaces on USG firewalls
You can configure subinterfaces for L2 Ethernet interface and L2 Eth-Trunk interface. The system can forward traffic between different VLANs by terminating the VLAN at the subinterface. You can configure the VLAN communications through L2 subinterfaces as follows: 1. Run the system-view command to enter the system view. 2. Switch the L3 Ethernet interface mode to the L2 Ethernet interface mode. a. Run the interface interface-type interface-number command to enter the interface view. b. Run the portswitch command to switch the L3 Ethernet interface mode to L2 Ethernet interface mode. c. Run the quit command to return to the system view. 3. Create an L2 subinterface. a. Run the interface interface-type interface-number.subinterface-number command to create a subinterface and enter the subinterface view. b. Run the vlan-type dot1q vlan-id command to configure the encryption type and the homed VLAN ID for the subinterface. Traffic of subinterfaces of a physical port is distinguished based on VLANs. Each subinterface receives or forwards packets of only the homed VLAN. c. Run the portswitch command to set the subinterface to an L2 subinterface. d. Run the quit command to return to the system view. e. Repeat the preceding steps to create multiple L2 subinterfaces. 4. Add all L2 subinterfaces created in step 3 to the same VLAN, so that VLANs connected to these subinterfaces can communicate with each other. a. Run the vlan vlan-id command to create a VLAN and enter the VLAN view. b. Run the port interface-type interface-number.subinterface-number command to add L2 subinterfaces created in step 3 to the same VLAN. By adding these subinterfaces to the same VLAN, these interfaces, belonging to different VLANs, can communicate with each other.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top