Share this page : facebooktwitterlinkedinmailfacebooktwitterlinkedinmail

How to configure Vlan Trunking Protocol on Gns3


This GNS3 lab is related to VLAN Trunk Protocol, in which you have two switches Switch-1 and Switch-2 and you need to configure the Switch-2 according to following requirement:

  1. Determine and configure the gateway and last IP address on vlan-interface from subnet\27
  2. Find and configure the same VTP domain on switch-2 as on Switch-1. (Switch-1 has the domain “City-Campus”)
  3. Configure Switch-2 as VTP Client


Solution: how to configure this Lab:

You can configure this on GNS3 very easily, according to question Router and Switch-1 are already configured. You can complete this lab by creating the above topology in GNS3 and then you can download router and switch-1configurations from here, paste them on router and switch-1 respectively and complete it with following configurations:



Determine and configure the gateway and last IP address from subnet\27:

For finding the gateway and vlan IP address on Switch-1 you can use the command “show run”

Switch-1#show running-configIP gatway vlan config

From above out-put you can see that vlan-subnet on switch-1 is\27 and from subnetting you can find the valid IP addresses for this subnet:

Subnetting for Class C address
Bit# in 4thoctet 25 26 27 28 29 30 31 32
IP ranges/ increment 128 64 32 16 8 4 2 1

From above table we have the following details:

Subnet ID=

Broadcast Address=

Valid IPs= to

So we have the last IP address for given subnet.

Switch-2#config t

Switch-2(config)#int Vlan1
Switch-2(config-if)#ip address
Switch-2(config-if)#no shut

Switch-2(config)#ip default-gateway

Find and configure the same VTP domain on switch-2

For VTP domain of switch-1, you can use the “show vtp status” command on Switch-1.


switch-1# show vtp status

VTP status on switch

We have find that VTP-domain of switch-1 is “City-Campus”. For configuring the same domain you can use the following commands:

Switch-2#config t

Switch-2(config)#vtp domain City-Campus

Configure Switch-2 as VTP Client

You can set Switch02 as VTP client by using command: “vtp mode client” or “vtp client”

Real Switch Configurations if you are configuring it on GNS3
Switch-2#config tSwitch-2(config)#vtp mode clientSwitch-2(config)#vtp domain City-Campu Switch2#vlan databaseSwitch2(vlan)#vtp clientSwitch2(vlan)#vtp domain City-Campus

How to Test or Confirm lab configurations on GNs3:

Create some vlan on switch1, if your configurations are complete then it will automatically create that vlan on Switch2 as well. (Switch2 is VTP client therefore it will sync its vlan database from switch1 which is VTP server)

Switch1#vlan database

Switch1(vlan)#vlan 11


After creating vlan 11 on switch1, Show vlan-switch on switch2 should have following configurations:show vlan-switch

If you have some issue with your lab then you can download Switch2 configuration from here and can compare with your for troubleshooting.

Leave a Reply

Your email address will not be published.