logo__splash
gray_bg
Trunking VLANs

In this tutorial, we are going to set up a medium sized LAN with 3 VLANS spanning
a campus network. The scenario will illustrate how you would connect multiple workgroup switches & route between VLANs. The following is a diagram illustrating how we are going to interconnect the core layer 3 switch with the 3 workgroup switches.

Config Tips:
Site Map / Legal / © Copyright 2006 enetworktutor.com

Typically, by default, the vlan1 (layer 3) interface is already in the Cisco switch configuration. In this particular design, you should administratively shut down the interface.

Make sure you assign the correct VLAN to the access ports that are cabled up to client's workstations. The default per-port setting (vlan 1) will not work in this environment.

Notice this design is slightly different then the one in tutorial 6. This is because we had one subnet / VLAN per workgroup switch. In this mode, we had end users that are connected to two different workgroup switches that need to be on the same VLAN / subnet. This means that we need to configure trunking since we
are using one dedicated uplink to the core & multiple VLANs are attached to workgroup switch 1 & 3. In addition, we configure both layer 2 VLANS & layer 3 VLAN interfaces. Here’s the configuration:

SYNTAX DESCRIPTION
layer 3 switch
conf t Enter global configuration mode
vlan 10  Creates (layer 2) VLAN 10
vlan 20 Creates (layer 2) VLAN 20
vlan 30 Creates (layer 2) VLAN 30
exit Leaves vlan-config mode
interface f0/1 Enter interface-config mode
switchport mode trunk     Changes port from access to trunk port
interface f0/2                             Enter interface-config mode
switchport access vlan 20          Assigns port to VLAN 20
interface f0/3 Enter interface-config mode
switchport mode trunk     Changes port from access to trunk port
exit Leaves inerface-config mode
interface vlan10 Creates Layer 3 VLAN interface
ip address 10.1.1.1 255.255.255.0                       Assigns IP address to interface
(gateway address for VLAN 10)
no shut Enables interface
interface vlan20 Creates layer 3 VLAN interface
ip address 10.1.2.1 255.255.255.0                       Assigns IP address to interface
(gateway address for VLAN 20)
no shut Enables interface
interface vlan30 Creates layer 3 VLAN interface
ip address 10.1.3.1 255.255.255.0                       Assigns IP address to interface
(gateway address for VLAN 30)
no shut Enables interface
   
SYNTAX DESCRIPTION
workgroup switch 1  
conf t Enter global configuration mode
vlan 10 Creates (layer 2) VLAN 10 
interface vlan10 Creates layer 3 VLAN interface
ip address 10.1.1.2 255.255.255.0                       Assigns IP address to switch for management
no shut Enables interface
interface f0/1 Enter interface-config mode
switchport mode trunk Changes port from access to trunk port
exit Return to global-config mode
ip default-gateway 10.1.1.1 Creates default route for management purposes
   
SYNTAX DESCRIPTION
workgroup switch 2  
conf t Enter global configuration mode
vlan 20 Creates (layer 2) VLAN 20
Interface vlan20 Creates layer 3 VLAN interface
ip address 10.1.2.2 255.255.255.0                       Assigns IP address to switch for management
no shut Enables interface
interface f0/1 Enter interface-config mode
switchport access vlan 20 Assigns uplink port to VLAN 20
Do the same for every user port that will be off VLAN 20
exit Return to global-config mode
ip default-gateway 10.1.2.1 Creates default route for management purposes
   
SYNTAX DESCRIPTION
workgroup switch 3  
conf t Enter global configuration mode
vlan 30 Creates (layer 2) VLAN 30
interface vlan30 Creates layer 3 VLAN interface
ip address 10.1.3.2 255.255.255.0                       Assigns IP address to switch for management
no shut Enables interface
interface f0/1 Enter interface-config mode
switchport mode trunk Changes port from access to trunk port
exit Return to global-config mode
ip default-gateway 10.1.3.1 Creates default route for management purposes