You are on page 1of 32

Switching, VTP and DTP

M Clements
Introduction

 Switch ports - types


 IOS Switch options
 VLAN Trunking Protocol (VTP) review
 Dynamic Trunking Protocol (DTP)
 1/2 way feedback forms

2 ASNT
Switch ports
 Layer 2-only interfaces associated with a physical
port on the switch
 Belong to one or more VLANs.
 Can be access ports or a trunk ports
 Dynamic Trunking Protocol (DTP) can negotiate with
the port on the other end of the link
 Used for managing the physical interface and
associated Layer 2 protocols
 Configure switch ports by using the switchport
interface configuration commands.

3 ASNT
Access Ports

 Belong to and carry the traffic of only one VLAN


(unless it is configured as a voice VLAN port)
 Traffic is received and sent in native formats with no
VLAN tagging
 Traffic arriving on an access port is assumed to
belong to the VLAN assigned to the port
 If an access port receives a tagged packet (IEEE
802.1Q tagged), the packet is dropped, and the
source address is not learned

4 ASNT
Trunk Ports

 A trunk is a point-to-point link between one or more


Ethernet switch interfaces and another networking
device such as a router or a switch
 Ethernet trunks carry the traffic of multiple VLANs
over a single link
 Can extend VLANs across an entire network
 The Catalyst 2960 switch supports IEEE 802.1Q
encapsulation

5 ASNT
Static and dynamic access ports
 Static access ports are manually assigned to a VLAN (or
through a RADIUS server for use with IEEE 802.1x.)
 VLAN membership of dynamic access ports is learned through
incoming packets (Not available in Packet Tracer)
 By default, a dynamic access port is not a member of any
VLAN
 Forwarding to and from the port enabled only when VLAN
membership of the port is discovered
 Dynamic access ports assigned to a VLAN by a VLAN
Membership Policy Server (VMPS)
 The VMPS can be a Catalyst 6500 series switch; the Catalyst
2960 switch cannot be a VMPS server

6 ASNT
IOS switch options
 Open Packet Tracer, configure terminal
 Access the interfaces of the switch

Switch(config-if)#?
cdp Global CDP configuration subcommands
description Interface specific description
duplex Configure duplex operation
mac-address Manually set interface MAC address
shutdown Shutdown the selected interface
speed Configure speed operation
switchport Set switching mode characteristics

7 ASNT
What are the options for switchport ?

 Use Packet Tracer to find these options


Switch(config-if)#sw ?
access Set access mode characteristics of the
interface
mode Set trunking mode of the interface
native Set trunking native characteristics when
interface is in trunking mode
nonegotiate Device will not engage in negotiation
protocol on this interface
port-security Security related command (see link)
trunk Set trunking characteristics of the
interface
voice Voice appliance attributes
8 ASNT
Where to begin?

 A decent labelled diagram


 Show the VLANs and desired ports
 Give names to VLANs
 Show the Trunks
 Show the Access ports

9 ASNT
VTP

 Manages addition, deletion, and renaming of VLANs


on a network-wide basis
 VTP reduces administration in a switched network
 If a new VLAN is configured on one VTP server, the
VLAN is distributed through all switches in the
domain
 Reduces the need to configure the same VLAN
everywhere
 VTP carries VLAN information to all switches in a
VTP domain

10 ASNT
11 ASNT
VTP setup

 Need to create a VTP domain – e.g. engineering


 Set this on all switches
 Choose server, client or transparent for the
switches
 Only one server per domain
 Client accepts VTP information
 Transparent merely passes this VLAN information
on without acting on it

12 ASNT
Practical Work Caveat

 ALWAYS save your work on both the


switches and within Packet Tracer
 Save regularly
 Don’t be surprised if the PC reboots while
using Packet Tracer
 If you save regularly, your loss will be
minimal

13 ASNT
For you to try
 Set up 2 x 2960 switches using Packet Tracer
 Type show interface switchport
 Scroll to the gigabit interfaces and examine the
output for Gigabit Ethernet 1/1 – copy the output
 Connect the Gigabit Ethernet 1/1 interfaces between
both switches
 What type of cable should be used?
 Enter configuration mode
 Type vtp ?
 What options are there?

14 ASNT
Setting VTP details

On both switches
 Switch(config)#vtp domain engineering
 Rename 1 switch ‘server’, the other as ‘client’
 On server: #vtp mode server
 What message is displayed?
 On client: #vtp mode client
 Save this work

15 ASNT
Set switch ports as trunks

 For each switch:


 Enter the gigabit interface
 switchport mode trunk

16 ASNT
Check the changes

 On client and server return to priv exec and


type show interface switchport
 Scroll to the gigabit interface 1/1
 Check for changes
 On each switch, type show vlan brief
 What VLANs currently exist on server?
 What VLANs currently exist on client?

17 ASNT
Add VLANs to ‘server’ switch

 Enter configuration mode


 Type: interface Fa0/1
 (config-if)#switchport access vlan 10
 Add vlan 20 to Fa0/2
 Save your configuration on the switch and within
Packet Tracer
 Issue the show vlan brief command on both
switches

18 ASNT
Examine the output
Switch#sh vlan brief

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 (output
omitted)

 Which switches know about VLANs 10 and 20?


 How did ‘client’ learn this information?
 Save this work in Packet Tracer

19 ASNT
Let’s build on this work

 Now repeat the previous work but add two more


switches (see over for initial diagram)
 Configure the 3rd as transparent
 Configure the 4th as client
 Make sure they are all in the same VTP domain
 Add several VLANs to ‘server’ ports
 Observe the propagation of VLAN information
 Which switches did not receive VLAN information?
 Why?

20 ASNT
Hardware setup

21 ASNT
Practical debrief

 Be sure you have completed and understood


the previous slides before continuing
 It is essential that you finish the steps before
going onwards

22 ASNT
Dynamic Trunking Protocol

 DTP is a Cisco-only protocol – proprietary


 Allows trunk to be dynamically established between
2 switches
 Not all switches support DTP
 Don’t use with non-Cisco hardware – turn off
 Set one end of trunk using :
switchport mode trunk
 Set opposite end using :
switchport mode dynamic auto|desirable

23 ASNT
auto or desirable?

 desirable makes the interface actively


attempt to convert the link to a trunk link
 Interface becomes a trunk interface if the
neighbouring interface is set to trunk,
desirable, or auto mode
 This is the default mode for all Ethernet
interfaces. If the neighbouring interface is set
to the access or non-negotiate mode, the
link will become a non-trunking link

24 ASNT
auto

 auto makes the interface willing to convert


the link to a trunk link if the neighbouring
interface is set to trunk or desirable mode
 Otherwise, the link will become a non-
trunking link

25 ASNT
For you to try

 Set up 2 x 2960 switches using Packet


Tracer
 Connect the Gigabit Ethernet 1/1 interfaces
 Check the status of the GE interfaces on
both ends
 show interface switchport
 Look at the information shown in the output
 Save this work

26 ASNT
For you to answer

 What is the Administrative Trunking


Encapsulation?
 What is the Operational Mode?
 Which Trunking VLANs are enabled?
 What is VLAN pruning?
 Is trunking set up?

27 ASNT
VLAN Pruning

 VTP can prune unneeded VLANs from trunk


links
 VTP maintains a map of VLANs and switches
 Enables traffic to be directed only to those
switches known to have ports on the
intended VLAN
 This enables more efficient use of trunk
bandwidth.

28 ASNT
Continuing the practical

 Now set one GE interface to trunk


 Set the other to auto
 Check the status of the GE interfaces on
both ends
 show interface switchport
 Look at the information shown in the output
 Which switches have trunk ports?
 What VLANs are they trunking?
29 ASNT
Extra practical work

 Now set both GE interfaces to auto


 Examine the status as before
 Try setting interfaces as desirable
 Does trunking operate now?
 Set 2 VLANs on one switch when trunking is
operational
 Has this propagated to the other switch?
 Why or why not?
 What could be done to propagate this information?

30 ASNT
Conclusion

 Switch ports can be of 2 types


 VTP can save much admin work by
propagating VLANs between switches
 DTP can set trunking ports automatically

31 ASNT
References
 http://www.cisco.com/en/US/products/ps6406/products_configuration_guide_ch
apter09186a00808752ee.html
 http://krypton.fhda.edu/~mmurphy/cnet-54c/references/DTP-CCNA3.pdf
 http://en.wikipedia.org/wiki/VTP
 http://en.wikipedia.org/wiki/Image:VTP.gif

32 ASNT

You might also like