Creating an Eth-Trunk Sub-interface
To transmit both Layer 2 and Layer 3 services over the same physical link, create a sub-interface on a Layer 2 Eth-Trunk.
Context
If Layer 2 switching devices belong to different VLANs, and hosts in the VLANs need to communicate with each other, you need to create sub-interfaces on the Eth-Trunk connecting a Layer 3 device to a Layer 2 switching device, bind a VLAN to each sub-interface, and configure an IP address for each sub-interface.
After the configuration is complete, hosts in the VLANs can use these sub-interfaces to communicate with each other. Eth-Trunk sub-interfaces can be configured to terminate Dot1q and QinQ VLAN tags.
After Layer 2 Eth-Trunk sub-interfaces are configured, the Eth-Trunk provides Layer 2 functions and the sub-interfaces provide Layer 3 functions.
Procedure
- Run:
system-view
The system view is displayed.
- Run:
interface eth-trunk trunk-id
An Eth-Trunk is created and the Eth-Trunk interface view is displayed.
- Run:
quit
The system view is displayed.
- Run:
interface eth-trunk trunk-id.subnumber
An Eth-Trunk sub-interface is created.
subnumber specifies the number of a sub-interface. The value ranges from 1 to 4096.
Only the E series, X series, and SC series cards on the S12700 support sub-interface configuration. For details about the cards, see Cards in the Hardware Description.
- Only hybrid and trunk interfaces on the preceding series of cards support Layer 2 sub-interface configuration.
After you run the undo portswitch command to switch Layer 2 interfaces on the preceding series of cards into Layer 3 interfaces, you can configure Layer 3 sub-interfaces on the interfaces.
The SA series cards do not support sub-interface configuration and cannot forward IP traffic to sub-interfaces on other cards.
You are advised to add a member interface to an Eth-Trunk and then configure an Eth-Trunk sub-interface. The Eth-Trunk sub-interface can be successfully configured only when the card on which the member interface locates supports sub-interface configuration.
- VLAN termination sub-interfaces cannot be created on a VCMP client.
- Run:
ip address ip-address { mask | mask-length } [ sub ]
An IP address is configured for the sub-interface.
When configuring multiple IP addresses for an Eth-Trunk sub-interface, use the sub keyword to indicate the IP addresses configured after the first one.