Site Tools


vlans

Table of Contents

VLANs

  • On a router, if a physical interface is configured with many VLANs, then sub-interfaces have to be used. Additionally, the switchport port must be a trunk. An access port will not work, I tested this.
    • Router(config)#** interface g0/0.100**
    • Router(config-subif)#** encapsulation dot1q 100**
    • Router(config-subif)#** ip address 100.1.1.1 255.255.255.0**
    • Switch(config)#** interface g1/0/1**
    • Switch(config-if)#** switchport trunk encapsulation dot1q**
    • Switch(config-if)#** switchport mode trunk**
    • Switch(config-if)#** switchport trunk allowed vlan 100**
  • A single vlan doesn't need to belong to a dot1q trunk to work.
    • Router(config)#** interface g0/1**
    • Router(config-if)#** ip address 200.1.1.1 255.255.255.0**
    • Switch(config)#** interface g1/0/2**
    • Switch(config-if)#** switchport mode access**
    • Switch(config-if)#** switchport access vlan 200**
vlans.txt · Last modified: by 127.0.0.1