Networking Technologies by Johnny Bandin
Networking Knowledge
Networking Knowledge
  • Cisco Networking Fundamentals
  • VLANs Knowledge
    • Creating and Assigning VLANs
    • Creating Trunks
    • Creating SVIs
  • etherchannel overview
    • Etherchannel Layer 2 LACP Configuration
    • Etherchannel Layer 3 LACP Configuration
  • DHCP Overview
    • DHCP Configuration
  • Layer 2 Security
    • Blackhole VLAN Configuration
    • Port Security
    • BPDUGuard and Root Guard
    • DHCP Snooping Configuration
    • Dynamic ARP Inspection
  • Key Chains
  • ACLs
    • Standard ACLs
    • Extended and Named ACLs
  • EIGRP
    • EIGRP Named Mode
    • EIGRP Authentication, Passive-Interface, Summarization
    • EIGRP Stub Routing, Leak-Maps
Powered by GitBook
On this page
  • In this guide we will cover how to create a static trunk between switches and filter the VLANs across the link.
  • Configuration
  • Filtering VLANs on trunk ports
  • Verification
  1. VLANs Knowledge

Creating Trunks

PreviousCreating and Assigning VLANsNextCreating SVIs

Last updated 2 years ago

In this guide we will cover how to create a static trunk between switches and filter the VLANs across the link.

  • We must create a static trunk on Ethernet0/3 between SW1 and SW2.

Configuration

  • To create a trunk, we must go into the sub-configuration mode of ETH 0/3

SW1#conf t # This command puts us in Global Config mode

SW1(config)#interface ethernet 0/3 # This command puts us into the interface sub-configuration mode

SW1(config-if)#switchport trunk encapsulation dot1q # This command will set the trunk to use the IEEE 802.1q Encapsulation standard

SW1(config-if)#switchport mode trunk # This command will statically set the interface to trunking mode.

  • The complete configuration for both switches is shown below

Filtering VLANs on trunk ports

  • To filter the VLANs and add or remove the VLANs allowed across a trunk, we use the commands below.

SW1(config-if)#switchport trunk allowed vlan 1,10,20,30 # This command will only VLANs 1,10,20,30 across the trunk

SW1(config-if)#switchport trunk allows [add | remove] vlan 40 # This command allows you to add or remove VLANs from the trunk port.

  • The complete configuration is shown below

Verification

  • The following commands will show and verify the trunks, how they formed and what VLANs are allowed across the trunks.

SW1#show interface trunk # This command will show us the active trunks on our switch.

Creating a static trunk on our SW1
Creating a static trunk on our SW1
Filtering the VLANs allowed across a trunk
Show interface trunk command on SW1
Page cover image