IPv4 tagged subinterface Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode.Section link
enable
configure terminal
interface [INTERFACE]
no shutdown
exit
interface [INTERFACE].[SUBINTERFACE-ID]
encapsulation dot1Q [VLAN-ID]
ip address [IP-ADDRESS][SUBNET-MASK]
exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[SUBINTERFACE-ID]
Local subinterface suffix, commonly matching its VLAN ID.
[VLAN-ID]
VLAN identifier.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
Peer configuration — Connected switch
Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.
Shared: VLAN-ID
Include the tagged VLAN in the allowed list; omit encapsulation selection only on fixed 802.1Q switches.
IPv6 tagged subinterface Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode.Section link
enable
configure terminal
ipv6 unicast-routing
interface [INTERFACE]
no shutdown
exit
interface [INTERFACE].[SUBINTERFACE-ID]
encapsulation dot1Q [VLAN-ID]
ipv6 address [IPV6-ADDRESS]/[PREFIX-LENGTH]
exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[SUBINTERFACE-ID]
Local subinterface suffix, commonly matching its VLAN ID.
[VLAN-ID]
VLAN identifier.
[IPV6-ADDRESS]
Local IPv6 interface address without the prefix length.
[PREFIX-LENGTH]
IPv6 prefix length without slash.
Peer configuration — Connected switch
Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.
Shared: VLAN-ID
Include the tagged VLAN in the allowed list; omit encapsulation selection only on fixed 802.1Q switches.
Start in privileged EXEC; block enters and exits configuration mode.Section link
Match the switch-side native VLAN.
enable
configure terminal
interface [INTERFACE]
no shutdown
exit
interface [INTERFACE].[SUBINTERFACE-ID]
encapsulation dot1Q [NATIVE-VLAN] native
ip address [IP-ADDRESS][SUBNET-MASK]
exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[SUBINTERFACE-ID]
Local subinterface suffix, commonly matching its VLAN ID.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[IP-ADDRESS]
Local IPv4 interface address.
[SUBNET-MASK]
IPv4 dotted-decimal subnet mask.
Peer configuration — Connected switch
Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.
Shared: NATIVE-VLAN
Include the tagged VLAN in the allowed list; omit encapsulation selection only on fixed 802.1Q switches.