This topic describes how to configure 802.1Q VLAN subinterfaces on the Cisco 8000 Series Router by setting the Layer 2 encapsulation and assigning an IP address to the subinterface.
Use this procedure to configure 802.1Q VLAN subinterfaces. To remove these subinterfaces, see Remove an 802.1Q VLAN subinterface.
You can programmatically configure and retrieve the VLAN interfaces and subinterfaces parameters using
openconfig-vlan.yangOpenConfig data model. To get started with using data models, see the Programmability Configuration Guide for Cisco 8000 Series Routers.The OpenConfig VLAN data model uses structured
vlan/matchcontainers to represent VLAN matching. Thevlan-idleaf supports only a single VLAN value and does not represent VLAN lists or ranges. See the OpenConfig model documentation for details.
Procedure
| 1. | Enter global configuration mode. Example:
|
|
| 2. | Enter subinterface configuration mode and specify the interface type, location, and subinterface number. Example:
|
|
| 3. | Set the Layer 2 encapsulation of the interface. Example:
|
|
| 4. | Assign an IP address and subnet mask to the subinterface. Example:
|
|
| 5. | Save the configuration. Example:
Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session. When you issue the end command, the system prompts you to commit changes. |
|
| 6. | Verify the configuration using the show interfaces command. Example:
|