Interface

interface <iface>.<sub>

Create a subinterface for router-on-a-stick (inter-VLAN routing).

Works on: RouterMode: config

Example

R1(config)# int gi0/0.10
R1(config-subif)# encapsulation dot1Q 10
R1(config-subif)# ip address 10.10.10.1 255.255.255.0
Run this command live

Don't just read it — type interface <iface>.<sub> in a real network simulator in your browser and watch it take effect. No install, no account needed to start.

Open the lab

Frequently asked

What does the "interface <iface>.<sub>" command do?

Create a subinterface for router-on-a-stick (inter-VLAN routing).

Example of "interface <iface>.<sub>"

R1(config)# int gi0/0.10 R1(config-subif)# encapsulation dot1Q 10 R1(config-subif)# ip address 10.10.10.1 255.255.255.0

More Interface commands

← Back to the full command reference

interface <iface>.<sub> — network CLI command reference · NetForge-AI