Configuring a Sub-interface
A sub-interface is a virtual interface configured on a physical interface to allow users who belong to different VLANs to communicate with each other.
Configuring an Ethernet Sub-interface
Context
Generally, each physical interface is configured with one main IP address. When Layer 3 devices connect to Layer 2 devices in different VLANs through a Layer 3 Ethernet interface, the main IP address of the Layer 3 physical interface cannot support communication between different VLANs.
Sub-IP addresses or sub-interfaces can be configured on the Layer 3 Ethernet interface to solve the issue. Sub-IP addresses are valid only when the main IP address is valid. Sub-interfaces share the physical configuration of the main interface but have independent link layer and network layer configurations. Therefore, sub-interfaces can function independently of the main interface. Sub-interfaces are created on the Ethernet interface that connects Layer 3 devices to Layer 2 devices in different VLANs to ensure commutation between different VLANs.
Pre-configuration Tasks
Before configuring an Ethernet sub-interface, complete the following tasks:
Correctly connecting the physical interface of the sub-interface
Configuring a Layer 3 main interface
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number.subinterface-number
The Ethernet sub-interface view is displayed.
subinterface-number specifies the number of an Ethernet sub-interface.
A sub-interface cannot be created on an Eth-Trunk member interface.
- Configure an IP address for the Ethernet sub-interface.
Configure an IPv4 address for the Ethernet sub-interface.
Run ip address ip-address { mask | mask-length } [ sub ]
An IP address is configured for the Ethernet sub-interface.
If you need to configure a secondary IP address for the Ethernet sub-interface, specify the sub parameter.
Configure an IPv6 address for the Ethernet sub-interface.
For the detailed configuration, see Configuring IPv6 Addresses for Interfaces in the NetEngine AR Configuration Guide - IP Service - Basic IPv6 Configurations.
- Configure an Ethernet sub-interface
for termination.
For the detailed configuration, see the NetEngine AR Configuration Guide - Ethernet Switching Configuration Guide- VLAN Termination Configuration.
Configuring an Eth-Trunk Sub-interface
Context
Sub-interfaces can be configured on a Layer 3 Eth-Trunk interface. When Layer 3 devices connect to Layer 2 devices in different VLANs through the Layer 3 Eth-Trunk interface, sub-interfaces must be configured on the Eth-Trunk interface to identify packets from different VLANs and to enable users in different VLANs to communicate with each other.
Pre-Configuration
Before configuring an Eth-Trunk sub-interface, complete the following tasks:
- Using physical links to connect devices correctly
Procedure
- Run system-view
The system view is displayed.
- Run interface eth-trunk trunk-id
A Layer 2 Eth-Trunk interface is created.
- Run undo portswitch
A Layer 3 Eth-Trunk interface is configured.
- Run quit
The system view is displayed.
- Run interface eth-trunk trunk-id.subnumber
A sub-interface is created for the Layer 3 Eth-Trunk interface.
subnumber specifies the number of an Eth-Trunk sub-interface.
- Configure an IP address for the Eth-Trunk sub-interface.
Configure an IPv4 address for the Eth-Trunk sub-interface.
Run ip address ip-address { mask | mask-length } [ sub ]
An IP address is configured for the Eth-Trunk sub-interface.
If you need to configure a secondary IP address for the Eth-Trunk sub-interface, specify the sub parameter.
Configure an IPv6 address for the Eth-Trunk sub-interface.
For the detailed configuration, see Configuring IPv6 Addresses for Interfaces in the NetEngine AR Configuration Guide - IP Service - Basic IPv6 Configurations.
Configuring a PON Sub-interface
Context
AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4, and AR617VW-LTE4EA do not support the PON sub-interfaces.
Sub-interfaces can be configured on a PON interface. To ensure that the PON interface can identify different VLAN packets and users in different VLANs can communicate, create mapping between sub-interfaces and VLANs on the connected PON interface.
Pre-configuration Tasks
Before configuring a PON sub-interface, complete the following tasks:
Correctly connecting the physical interface of the sub-interface
Configuring the physical interface
Procedure
- Run system-view
The system view is displayed.
- Run interface pon interface-number.subinterface-number
The PON sub-interface view is displayed.
The subinterface-number parameter specifies the number of a PON sub-interface.
- Configure an IP address for the PON sub-interface.
Configure an IPv4 address for the PON sub-interface.
Run ip address ip-address { mask | mask-length } [ sub ]
An IP address is configured for the PON sub-interface.
If you need to configure a secondary IP address for the PON sub-interface, specify the sub parameter.
Configure an IPv6 address for the PON sub-interface.
For the detailed configuration, see Configuring IPv6 Addresses for Interfaces in the NetEngine AR Configuration Guide - IP Service - Basic IPv6 Configurations.
Configuring ATM Sub-interfaces
Context
AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4, and AR617VW-LTE4EA do not support the ATM sub-interfaces.
Configuring ATM sub-interfaces implements P2MP connections on ATM links.
Procedure
- Run system-view
The system view is displayed.
- Run interface atm interface-number.subnumber [ p2mp | p2p ]
An ATM sub-interface is configured.
subnumber specifies the number of the ATM Sub-interface. The number ranges from 1 to 1024.
The default type of an ATM sub-interface is P2MP.
- Configuring ATM Sub-interfaces
For details about ATM sub-interface configuration, refer to ATM Configuration in the NetEngine AR Configuration Guide - WAN.
Configuring MFR Sub-interfaces
Context
AR611W, AR611W-LTE4CN, AR617VW, AR617VW-LTE4, and AR617VW-LTE4EA do not support the MFR sub-interfaces.
Configuring MFR sub-interfaces implements P2MP connections on FR links.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run link-protocol fr [ ietf | nonstandard ]
The link layer protocol of the interface is configured as FR.
- Run quit
Return to the system view.
- Run interface interface-type interface-number.subnumber [ p2mp | p2p ]
An MFR sub-interface is configured.
subnumber is the number of the sub-interface. The value ranges from 1 to 1024.
The default type of an MFR sub-interface is P2MP.
- Run ip address ip-address { mask | mask-length } [ sub ]
An IP address is assigned to the FR sub-interface.
- Configuring MFR Sub-interfaces.
The items described below can be configured on an MFR sub-interface:
Frame Relay address mapping different from the main interface
IP address which is not in the same network segment as the main interface
Virtual circuit of the sub-interface
For details about MFR sub-interface configuration, refer to FR Configuration in the NetEngine AR Configuration Guide - WAN.
Configuring a Layer 2 Sub-interface
Context
On a VXLAN network, you need to configure VXLAN service access points on a VXLAN network edge node. You can configure Layer 2 sub-interfaces to implement access service configuration on service access points.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number.subinterface-number mode l2
A Layer 2 sub-interface is created and the Layer 2 sub-interface view is displayed.
By default, no Layer 2 sub-interface is created.
- Configure the Layer 2 sub-interface.
For details about Layer 2 sub-interface configuration, see NetEngine AR Configuration Guide - VXLAN.