How to configure vlan, stp, dtp step by step guide
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

How to configure vlan, stp, dtp step by step guide

  • 4,978 views
Uploaded on

How to Configure VLAN, STP, DTP Step by Step Guide

How to Configure VLAN, STP, DTP Step by Step Guide

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,978
On Slideshare
4,978
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
652
Comments
0
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. How to Configure VLAN, STP, DTPStep by Step Guide?In this tutorial we will demonstrate that how can youConfigure Access or Trunk linksCreate VLANAssign VLAN membershipConfigure Intra VLAN routingConfigure VTP ServerMake VTP ClientsShow STP StaticConfigure DTP portTo complete these labs either creates a topology as shown in figure or downloadsthis file and loads it in packet tracer
  • 2. TaskYou are the administrator at router-switch.comhave two department sales andmanagement. You have given three pc for sales and three pc in management. Youcreated two VLAN. VLAN 10 for sales and VLAN20 for management. For backuppurpose you have interconnected switch with one extra connection. You have onerouter for intera VLAN communications.Lets start configuration first assign IP address to all pcsTo assign IP address double click on pc and select ip configurations from desktop taband give ip address as shown in table given aboveVLAN Trunking ProtocolConfigure VTP ServerWe will first create a VTP Server so it can automatically propagate VLAN informationto other switch. Double click on Switch1 and select CLI. Set hostname to S1 andcreate VTP domain name example and set password to vinita (Remember passwordis case sensitive).Switch 1Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S1S1(config)#vtp mode server
  • 3. Device mode already VTP SERVER.S1(config)#vtp domain exampleChanging VTP domain name from NULL to exampleS1(config)#vtp password vinitaSetting device VLAN database password to vinitaConfigure VTP clientsOnce you have created a VTP domain. Configure remaining Switch to Client mode.Switch 2Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S2S2(config)#vtp mode clientSetting device to VTP CLIENT mode.S2(config)#vtp domain exampleChanging VTP domain name from NULL to exampleS2(config)#vtp password vinitaSetting device VLAN database password to vinitaS2(config)#Switch 3Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S3S3(config)#vtp mode clientSetting device to VTP CLIENT mode.S3(config)#vtp domain exampleChanging VTP domain name from NULL to exampleS3(config)#vtp password vinitaSetting device VLAN database password to vinitaS3(config)#Dynamic Trunking ProtocolConfigure DTP portAll Switch ports remain by default in access mode. Access port can not transfer thetrunk frame. Change mode to trunk on all the port those are used to interconnectthe switchesSwitch 1S1(config)#interface fastEthernet 0/24S1(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24,changed state to down
  • 4. %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24,changed state to upS1(config-if)#exitS1(config)#interface gigabitEthernet 1/1S1(config-if)#switchport mode trunkS1(config-if)#exitS1(config)#interface gigabitEthernet 1/2S1(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/2,changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/2,changed state to upS1(config-if)#exitS1(config)#Switch 2S2(config)#interface gigabitEthernet 1/1S2(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1,changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1,changed state to upS2(config-if)#exitS2(config)#interface gigabitEthernet 1/2S2(config-if)#switchport mode trunkS2(config-if)#exitS2(config)#interface fastEthernet 0/23S2(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23,changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/23,changed state to upS2(config-if)#exitS2(config)#interface fastEthernet 0/24S2(config-if)#switchport mode trunkS2(config-if)#exitSwitch 3S3(config)#interface fastEthernet 0/24S3(config-if)#switchport mode trunkS3(config-if)#exitS3(config)#interface gigabitEthernet 1/1S3(config-if)#switchport mode trunkS3(config-if)#exit
  • 5. Virtual LAN (VLAN)Create VLANAfter VTP server configuration it’s time to organize VLAN. We need only to createVLAN on VTP server and reset will be done by VTP Server automatically.Switch 1S1(config)#vlan 10S1(config-vlan)#exitS1(config)#vlan 20S1(config-vlan)#exitS1(config)#As we have already configure VTP server in our network so we dont need to createVLAN on S2 or S3. We need only to associate VLAN with port.Assign VLAN membershipSwitch 1S1(config)#interface fastEthernet 0/1S1(config-if)#switchport access vlan 10S1(config-if)#interface fastEthernet 0/2S1(config-if)#switchport access vlan 20Switch 2S2(config)#interface fastEthernet 0/1S2(config-if)#switchport access vlan 10S2(config-if)#interface fastEthernet 0/2S2(config-if)#switchport access vlan 20Switch 3S3(config)#interface fastEthernet 0/1S3(config-if)#switchport access vlan 10S3(config-if)#interface fastEthernet 0/2S3(config-if)#switchport access vlan 20Now we have two working vlan. To test connectivity do ping form 10.0.0.2 to 10.0.0.3and 10.0.0.4. if you get successfully replay then you have successfully created VLANand VTP server.Spanning-Tree ProtocolIn this configuration STP will block these ports F0/24 of S1 , F0/23 and F0/24 of S2and F0/24 of S3 to avoid loop at layer to two. Verify those ports blocked due to STPfunctions
  • 6. Verify STP portsSwitch 2S2#show spanning-tree activeVLAN0001Spanning tree enabled protocol ieeeRoot ID Priority 32769Address 0002.174D.7794Cost 4Port 26(GigabitEthernet1/2)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 32768 sys-id-ext 1)Address 00D0.FF08.82E1Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 20Interface Role Sts Cost Prio.Nbr Type---------------- ---- --- --------- -------- ---------------------------Fa0/1 Desg FWD 19 128.1 P2pFa0/2 Desg FWD 19 128.2 P2pFa0/23 Desg FWD 19 128.23 P2pFa0/24 Altn BLK 19 128.24 P2pGi1/1 Desg FWD 4 128.25 P2pGi1/2 Root FWD 4 128.26 P2p[Output is omitted]S2#You can test STP protocols status on S1 and S3 also withshow spanning-tree active commandRouter on StickAt this point of configuration you have two successfully running VLAN but they willnot connect each other. To make intra VLAN communications we need to configurerouter . To do this double click on router and select CLI.Configure intra VLANRouterRouter>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface fastEthernet 0/0Router(config-if)#no ip addressRouter(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface fastEthernet 0/0.10
  • 7. Router(config-subif)#encapsulation dot1Q 10Router(config-subif)#ip address 10.0.0.1 255.0.0.0Router(config-subif)#exitRouter(config)#interface fastEthernet 0/0.20Router(config-subif)#encapsulation dot1Q 20Router(config-subif)#ip address 20.0.0.1 255.0.0.0Router(config-subif)#exitTo test connectivity between different vlan do ping form any pc to all reaming pc. itshould be ping successfully. If you have error download this configured topology andcross check that where you have committed mistake.Configured VLAN VTP STP topologyVLAN VTP Server STP DTP command reference sheetSwitch(config)#vlan 10Creates VLAN 10 and enters VLAN configuration mode for furtherdefinitions.Switch(config-vlan)#nameSalesAssigns a name to the VLAN. The length of the name can be from 1to 32 characters.Switch(config-vlan)#exitApplies changes, increases the revision number by 1, and returns toglobal configuration mode.Switch(config)#interfacefastethernet 0/1Moves to interface configuration modeSwitch(config-if)#switchportmode accessSets the port to access modeSwitch(config-if)#switchportaccess vlan 10Assigns this port to VLAN 10Switch#showvlan Displays VLAN informationSwitch#showvlan brief Displays VLAN information in briefSwitch#showvlan id 10 Displays information about VLAN 10 onlySwitch#showvlan namesalesDisplays information about VLAN named sales onlySwitch#show interfacesvlan xDisplays interface characteristics for the specified VLANSwitch#deleteflash:vlan.datDelete filename [vlan.dat]?Delete flash:vlan.dat?[confirm]Removes the entire VLAN database from flash.Make sure there is no space between the colon (:) and thecharacters vlan.dat. You can potentially erase the entire contents ofthe flash with this command if the syntax is not correct. Make sure
  • 8. Switch# you read the output from the switch. If you need to cancel,press ctrl+c to escape back to privileged mode:Switch(config)#interfacefastethernet 0/5Moves to interface configuration mode.Switch(config-if)#noswitchport access vlan 5Removes port from VLAN 5 and reassigns it to VLAN 1—the defaultVLAN.Switch(config-if)#exit Moves to global configuration mode.Switch(config)#no vlan 5 Removes VLAN 5 from the VLAN database.Switch#copyrunning-configstartupconfigSaves the configuration in NVRAMSwitch(config-if)#switchport mode trunkPuts the interface into permanent trunking mode and negotiates toconvert the link into a trunk link.Switch(config)#vtp modeserverChanges the switch to VTP server mode.Switch(config)#vtp modeclientChanges the switch to VTP client mode.Switch(config)#vtp modetransparentChanges the switch to VTP transparent mode.Switch(config)#no vtp mode Returns the switch to the default VTP server mode.Switch(config)#vtp domaindomain-nameConfigures the VTP domain name. The name can be from 1 to 32characters long.Switch(config)#vtppassword passwordConfigures a VTP password.Switch(config)#vtp pruning Enables VTP pruningSwitch#showvtp status Displays general information about VTP configurationSwitch#showvtp counters Displays the VTP counters for the switchMore Related Topics:Video to Show Private VLANs & Configure PVLANs on A Cisco SwitchHow to Configure Spanning Tree Protocol (STP) on Catalyst Switches?How the Root Bridge and Ports are Chosen?Root Port Selection on a SwitchSTP (Spanning Tree Protocol) Path Selection