workng of switch

40
ELECTRONICS AND COMMUNICATION ENGG. TRAINING REPORT ON Working Of Switch COMMENCED AT ThinkNEXT PVT. LTD., MOHALI submitted in Partial fulfilment for the Award of the degree of Bechelor of Technology (B-TECH) Specialization in Networking and Hardware UNDER THE GUIDANCE OF Mr. Usman Khan Trainer ECE ThinkNEXT Technologies Pvt. Ltd., Mohali (Punjab) 1

Upload: shubham1431

Post on 16-Feb-2016

4 views

Category:

Documents


0 download

DESCRIPTION

profject report of working of switch for ece

TRANSCRIPT

Page 1: workng of switch

ELECTRONICS AND COMMUNICATION ENGG.

TRAINING REPORT

ON

Working Of Switch

COMMENCED AT

ThinkNEXT PVT. LTD., MOHALIsubmitted in Partial fulfilment for the

Award of the degree of

Bechelor of Technology (B-TECH)

Specialization inNetworking and Hardware

UNDER THE GUIDANCE OF

Mr. Usman Khan

Trainer ECE

ThinkNEXT Technologies Pvt. Ltd., Mohali (Punjab)

SUBMITTED TO: SUBMITTED BY:Er. Meenakshi Bhalla Shubham Kumar

Uni Roll No. 1325521 B-TECH 7 th semester

1

Page 2: workng of switch

DECLARATION

I hereby declare that the Training Report was submitted by me under the supervision and

guidance of Mr.Usman Khan, project guide, Shaheed Udham Singh Group of Institutions

(Tangori ) . I further declare that I am solely responsible for omission and commission of

errors if any.

(Shubham Kumar)

Signature of the student

2

Page 3: workng of switch

EXECUTIVE SUMMARY

Job satisfaction in regard to one’s feeling or state of mind in regarding of

their nature of work. Job can be influenced by variety of factors like quality of

once relationship with their supervisor, quality of physical environment in which

they work, degree of fulfillment in their work etc. Positive attitude towards job are

equivalent to job satisfaction whereas negative attitude towards job has been defined

variously from time to time. In short job satisfaction is a person’s attitude towards job.

Job satisfaction is an attitude which results from balancing & summation of many

specific likes and dislikes experienced in connection with the job- their evaluation may rest

largely upon one’s success or failure in the achievement of personal objective and upon

perceived combination of the job and combination towards these ends

This major project report was review theory and findings on the relationship between

training and development. I described the various important theoretical approaches and

proposed a survey for analysing Job satisfaction in ThinkNEXT Technologies Pvt.

Ltd.,Mohali .

PART-1 contains the profile of the company which include vision, mission, structure .

It also consists of products /services provided, Internal and external customers its linkage

with other functions, brief description of the various operations and corresponding functions.

This part is also briefs about the internship. It includes job assigned, description of the task,

importance of the functions, task performance, learning process, observations.

PART-2 totally deals with the project report. It contains objectives of the study,

topic/Problem/Issues focus in the study, study design or structure of the study, the source of

the information, the analysis tools used, Challenges faced during the study and how it was

over come, Data presentation and analysis, Conclusion and recommendations, Summary of

the report and Bibliography

3

Page 4: workng of switch

Structured questionnaire was used to gather data. The questionnaire was distributed to

employees of ThinkNEXT Technologies Pvt. Ltd., Mohali and results were obtained for the

conclusion

ACKNOWLEDGEMENT

Amongst the wide panorama of people who provided me the inspiration, guidance and

encouragement, I take this opportunity to thank those who gave me indebted assistance and

constant encouragement for completing this project.

I would like to thank Mr.Usman Khan, HR Trainer of ThinkNEXT Technologies

Pvt. Ltd., Mohali for his continuous help in completion of this project. He motivated me and

was available whenever his assistance was sought. He was actively involved throughout the

project and was also kind enough to tell me the strengths and weaknesses and how I could

improve myself to face the corporate world. Without his support the completion of this

project would be impossible.

I would also like to thank my college project guide Er Meenakshi Bhalla, Shaheed

Udham Singh Group Of Institutions (Tangori) for her valuable guidance and support.

Thanking you All

Place: Mohali

(Ramesh Singh)

4

Page 5: workng of switch

Table of Content

CHAPTER -1: COMPANY PROFILE.................................................................................6-15

CHAPTER- 2: JOB SATISFACTION.....................................................................................16

2.1 INTRODUCTION...........................................................................................................17

2.2 IMPORTANCE OF JOB SATISFACTION..............................................................18-19

2.3 CONCEPT..................................................................................................................19-20

2.4 THREE DIMENSIONS TO JOB SATISFACTION..................................................20-21

2.5 FACTORS INFLUENCING JOB SATISFACTION.................................................22-27

2.6 MODELS OF FACET SATISFACTION....................................................................27-31

2.7 NEED TO EVALUATE EMPLOYEES SATISFACTION.......................................31-35

2.8 THE IMPACT OF DISSATISFIED & SATISFIED EMPLOYEES ON THE

WORKPLACE.........................................................................................................................35

2.9 JOB SATISFACTION & PERFORMANCE………………………………….....……36

2.10 JOB SATISFACTION & PRODUCTIVITY………………………………….…...36-38

2.11 WAYS TO MEASURING JOB SATISFACTION ………….…………………….38-39

CHAPTER-3 LITERATUE REVIEW...............................................................................40-42

CHAPTER -4: RESEARCH METHODOLOGY…………………………………43-45

CHAPTER-5: ANALYSIS & INTERPRETATION..........................................................46-68

CHAPTER-6 FINDINGS……………………………………………………..………….69-70

CHAPTER-7 LIMITATION..............................................................................................71-72

CHAPTER-8 RECOMMENDATION AND CONCLUSION....................................73-75

BIBLIOGRAPHY.............................................................................................................76-77

ANNEXURE.....................................................................................................................78-83

5

Page 6: workng of switch

CHAPTER-1

COMPANY PROFILE

6

Page 7: workng of switch

ThinkNEXT Edge

Industrial Training and Certificates from Software/Electronics Company not just from an institute

Free Interview Preparation, Spoken English and Personality Development Programmes.

Opportunity to get placed in ThinkNEXT and numerous other companies. Life-Time Validity Learning and Placement Card. Part-Time/Full-Time Job Offer for each student during Training. ThinkNEXT Cloud Campus advantage not only during training, even after completion

of training for life time. One-to-one PC and Corporate Environment. Learn from Developers/Industry experts rather than Trainers/Teachers. Direct interaction with Developers/Industry Experts. Industrial training programmes are designed to make students industry-ready. Large Display LEDs in each Class-Room/Lab, Wi-Fi Labs. Guest Lectures/Seminars by Industry Experts. Every Student is provided with “Live Projects” mentored by Software/

Electronics/Industry Experts. 100% Placement assistance.

\

ThinkNEXT Cloud Campus Advantages

Each Student will have Unique User ID and Password to Login to ThinkNEXT Cloud Campus 4.0 anytime…anywhere…

View Numerous Technical, Personality Development Videos anytime…anyhere… Students will be able to download e-Books, e-Journals, Class Notes, Important Links

and other study material. ThinkNEXT Smart Campus is a step towards not only 100% placements but also

better job offers even after placements. Student Profile, Instant Technical Updates, Class Notes, Project Report Submitted,

Attendance, Performance, Notice-Board, Class Timings etc. Everything online. Communication with industry experts, Technologists through cloud Campus

anytime…anywhere.

7

Page 8: workng of switch

Regular SMSes and E-mail for Related Job Offers. Access through PCs, Laptops, Tablet PCs, Mobiles via internet.

Network Switches

A network switch is a networking device that performs transparent connection of multiple network segments with forwarding based on MAC addresses at up to the speed of the hardware.

A network switch is a small hardware device that joins multiple computers together within one local area network (LAN).Ethernet switch devices were commonly used on home networks before home routers became popular; broadband routers integrate Ethernet switches directly into the unit as one of their many functions. High-performance network switches are still widely used in corporate networks and data centers.

8

Page 9: workng of switch

Role of switches in a network

Switches may operate at one or more layers of the OSI model, including the data link and network layers. A device that operates simultaneously at more than one of these layers is known as a multilayer switch.

In switches intended for commercial use, built-in or modular interfaces make it possible to connect different types of networks, including Ethernet, Fibre Channel, ATM, ITU-T G.hn and 802.11. This connectivity can be at any of the layers mentioned. While layer-2 functionality is adequate for bandwidth-shifting within one technology, interconnecting technologies such as Ethernet and token ring is easier at layer 3.

Devices that interconnect at layer 3 are traditionally called routers, so layer-3 switches can also be regarded as (relatively primitive) routers.

Where there is a need for a great deal of analysis of network performance and security, switches may be connected between WAN routers as places for analytic modules. Some vendors provide firewall, network intrusion detection,[5] and performance analysis modules that can plug into switch ports. Some of these functions may be on combined modules.

In other cases, the switch is used to create a mirror image of data that can go to an external device. Since most switch port mirroring provides only one mirrored stream, network hubs can be useful for fanning out data to several read-only analyzers, such as intrusion detection systems and packet sniffers.

9

Page 10: workng of switch

Switching

SWITCHING It is a technology that alleviate congestion in ethernet,LAN etc.by reducing traffic and increasing switches , and are designed to work with existing cable infrastructure for that they can be installed w minimal disruption of existing networks. Often they replace share hubs.

Switching Process The performance characteristics of a switch are determined to a large extent by how packets are processed. The newer switches now use ASICs (Application Specific Integrated Circuits) for high speed hardware switching of packets. This results in much faster performance than packets processed in software on the route processor with multilayer switches and routers. While most of the packet forwarding occurs in ASICs, there is some network traffic such as encrypted packets that must be processed in software.

ControlPlane

Data Plane

Management Plane

Data Plane

The switch data plane is where forwarding of packets occur. The forwarding of packets is done after a decision has been made at the Supervisor Engine PFC or line

10

Page 11: workng of switch

card DFC. The PFC and DFC modules forward packets in hardware ASICs. The PFC forwarding engine on the Supervisor Engine does Layer 2 and Layer 3 lookups before deciding how to forward the packet. Line cards with a DFC installed make Layer 2 and Layer 3forwarding decisions at the line card and send the packet across the switch fabric to the destination line card. From there, the packet is forwarded out the specific switch egress port. Note that when describing the “processing and forwarding of packets “ what that refers to is the switch or router examining Layer 2 and Layer 3 packet header information (addressing etc.) and rewriting the packet before forwarding it.

Control Plane

The switch has a control plane where specific network control packets are processed for managing network activity. The switch Supervisor Engine is comprised of a route processor on the MSFC card where the routing table is built. The route processor must handle certain control packets such as routing advertisements, keepalives, ICMP, ARP requests and packets destined to the local IP addresses of the router. In addition there is a switch processor that builds a CAM table for Layer 2 packet processing. The switch processor manages control packets such as BPDU, CDP, VTP, IGMP, PAgP, LACP and UDLD. The processing of control packets causes increased switch Supervisor Engine (CPU) utilization.

Management Plane

The management plane is where all network management traffic is processed. This includes packets from management protocols such as Telnet, SSH, SNMP, NTP and TFTP. The route processor also manages some of this traffic along with some control plane traffic. In addition the management plane manages the switch passwords and coordinates traffic between the management, control plane and data plane.

11

Page 12: workng of switch

Types of Switching Techniques

There are basically three types of switching methods are made available. Out of three methods, circuit switching and packet switching are commonly used but the message switching has been opposed out in the general communication procedure but is still used in the networking application.

1) Circuit Switching2) Packet Switching3) Message Switching

1.Circuit Switching

Circuit Switching is generally used in the public networks. It come into existence for handling voice traffic in addition to digital data. How ever digital data handling by the use of circuit switching methods are proved to be inefficient. The network for Circuit Switching is shown in figure.

12

Page 13: workng of switch

Here the network connection allows the electrical current and the associated voice with it to flow in between the two respective users. The end to end communication was established during the duration of call.

In circuit switching the routing decision is made when the path is set up across the given network. After the link has been sets in between the sender and the receiver then the information is forwarded continuously over the provided link.

In Circuit Switching a dedicated link/path is established across the sender and the receiver which is maintained for the entire duration of conversation.

2. Packet   Switching In Packet Switching, messages are broken up into packets and each of which includes a header  with source, destination and intermediate node address information. Individual Packets in packet switching technique take different routes to reach their respective

13

Page 14: workng of switch

destination. Independent routing of packets is done in this case for following reasons:

1. Bandwidth is reduces by the splitting of data onto different routes for a busy circuit.

2. For a certain link in the network, the link goes down during transmission the the remaining packet can be sent through the another route.

The major advantage of Packet switching is that they they are used for performing data rate conversion.

When traversing the network switches, routers or the other network nodes then the packets are buffered in the queue, resulting in variable delay and throughput depending on the network’s capacity and the traffic load on network.

Packet switching contrasts with another principal networking paradigm, circuit switching, a method which sets up a limited number of dedicated connections of constant bit rate and constant delay between nodes for exclusive use during the communication session.

 In cases where traffic fees are charged, for example in cellular communication, packet switching is characterized by a fee per unit of information transmitted.

14

Page 15: workng of switch

3.Message SwitchingIn case of Message Switching it is not necessary to established a dedicated path in between any two communication devices. Here each message is treated as an independent unit and includes its own destination source address by its own. Each complete message is then transmitted from one device to another through internetwork.

Message Switching Data Network

Each intermediate device receive the message and store it until the nest device is ready to receive it and then this message is forwarded to the next device. For this reason a message switching network is sometimes called as Store and Forward Switching.

Message switches can be programmed with the information about the most efficient route as well as information regarding to the near switches that can be used for forwarding the present message to their required destination.

15

Page 16: workng of switch

The storing and Forwarding introduces the concept of delay. For this reasons this switching is not recommended for real time applications like voice and video.

Switching Functionality

To understand how switches and routers should be chosen and placed in a network design, you should first understand how to take advantage of data communication at different layers. The OSI model separates data communication into seven layers, as shown in Table 2-2. Each layer has a specific function and a specific protocol so that two devices can exchange data on the same layer. A protocol data unit (PDU) is the generic name for a block of data that a layer on one device exchanges with the same layer on a peer device. A PDU is encapsulated in a layer’s protocol before it is made available to a lower-level layer or unencapsulated before being handed to a higher-level layer.

Layer 2 Switching

Layer 2 switches are frequently installed in the enterprise for high-speed connectivity between end stations at the data link layer. Layer 3 switches are a relatively new phenomenon, made popular by (among others) the trade press. This article details some of the issues in the evolution of Layer 2 and Layer 3 switches. We hypothesize that that the technology is evolutionary and has its origins in earlier products.

Layer 2 SwitchesBridging technology has been around since the 1980s (and maybe even earlier). Bridging involves segmentation of local-area networks (LANs) at the Layer 2 level. A multiport bridge typically learns about the Media Access Control (MAC) addresses on

16

Page 17: workng of switch

each of its ports and transparently passes MAC frames destined to those ports. These bridges also ensure that frames destined for MAC addresses that lie on the same port as the originating station are not forwarded to the other ports. For the sake of this discussion, we consider only Ethernet LANs.

Layer 2 switches effectively provide the same functionality. They are similar to multiport bridges in that they learn and forward frames on each port. The major difference is the involvement of hardware that ensures that multiple switching paths inside the switch can be active at the same time. For example, consider Figure 1, which details a four-port switch with stations A on port 1, B on port 2, C on port 3 and D on port 4. Assume that A desires to communicate with B, and C desires to communicate with D. In a single CPU bridge, this forwarding would typically be done in software, where the CPU would pick up frames from each of the ports sequentially and forward them to appropriate output ports. This process is highly inefficient in a scenario like the one indicated previously, where the traffic between A and B has no relation to the traffic between C and D.

Figure 1: Layer 2 switch with External Router for Inter-VLAN traffic and connecting to the internet

Enter hardware-based Layer 2 switching. Layer 2 switches with their hardware support are able to forward such frames in parallel so that A and B and C and D can have simultaneous conversations. The parallel-ism has many advantages. Assume that A and B are NetBIOS stations, while C and D are Internet Protocol (IP) stations. There may be no rea-son for the communication between A and C and A and D. Layer 2 switching allows this coexistence without sacrificing efficiency.

Devices that forward frames at Layer 2 involve the following functions:

17

Page 18: workng of switch

• MAC addresses are learned from the source addresses of incoming frames.

• A table of MAC addresses and their associated bridge/switch ports is built and

maintained.• Broadcast and multicast frames are flooded out to all ports.• Frames destined to unknown locations are flooded out to all ports.• Bridges and switches communicate with each other using the Spanning-Tree Protocol to eliminate bridging loops.

Characteristics

Layer 2 switches themselves act as IP end nodes for Simple Network Management Protocol (SNMP) management, Telnet, and Web based management. Such management functionality involves the presence of an IP stack on the router along with User Datagram Protocol (UDP), Transmission Control Protocol (TCP), Telnet, and SNMP functions. The switches themselves have a MAC address so that they can be addressed as a Layer 2 end node while also providing transparent switch functions.

Layer 2 switching does not, in general, involve changing the MAC frame. However, there are situations when switches change the MAC frame. The IEEE 802.1Q Committee is working on a VLAN standard that involves? Tagging? a MAC frame with the VLAN it belongs to; this tagging process involves changing the MAC frame.

Configuration Example for Layer 2 Switching

The following example shows how to add a static MAC address and how to modify the default global aging time for MAC addresses:

switch# configure terminal

18

Page 19: workng of switch

switch(config)# mac address-table static 0000.0000.1234 vlan 10 interface ethernet 2/15switch(config)# mac address-table aging-time 120

Layer 3 switches

► A Layer 3 switch is a high-performance device for network routing. It is relatively new term, was conceived as a technology to improve on the performance of routers used in large local area networks (LANs).

► It can support the same routing protocols as network routers do. Both inspect incoming packets and make dynamic routing decisions based on the source and destination addresses inside.

19

Page 20: workng of switch

Characteristic

► It is designed to handle high-performance LAN traffic, so Layer 3 switch can be placed anywhere within a network core or backbone, easily and cost-effectively replacing the traditional backbone router.

► The switches run routing protocols, such as open shortest path first (OSPF) or routing information protocol (RIP), to communicate with other Layer 3 switches or routers and to build their routing/forwarding tables. These tables are looked up to determine the route for an incoming packet

► a Layer 3 switch can reprogram the hardware dynamically with the current Layer 3 routing information. This is what allows much faster packet processing.

Devices involved in Layer 3 switching perform the following functions:

Packets are forwarded at Layer 3 just as a router would do. Packets are switched using specialized hardware ASICs for high-speed

and low latency. Packets can be forwarded with security control and Quality of Service

(QoS) using Layer 3 address information. Layer 3 switches are designed to examine and forward packets in high-

speed LAN environments. Whereas, a router might impose a bottleneck to forwarding throughput, a Layer 3 switch can be placed anywhere in the network.

Advantage:-

The benefits of Layer 3 switching

20

Page 21: workng of switch

The benefits of layer 3 switching include the following:

► Hardware-based packet forwarding

► High-performance packet switching

► High-speed scalability

► Low latency

► Lower per-port cost

► Flow accounting

► Security

► Quality of service

In such situations you can use you Ethernet port on Layer 3 switch and

make it as Routed Port which will hold an IP address and will work as a

router. The configuration is very same as configuring a router’s Ethernet

port with one little extra command which makes the switch port into routed

port.

Routed Ports: A routed port acts very much like its name implies. It is a

physical port on the switch that has no VLAN information. In place of VLAN

information, it has Layer 3 information, such as IP addresses. A routed port

functions just like an interface on a router. A routed port cannot contain

VLAN sub inter faces and requires the EMI software to be installed on the

switch.

21

Page 22: workng of switch

Configuration of Layer 3 Switching

SW1(config)#interface fast 0/1

SW1(config-if)#no switchport

SW1(config-if)#no shut02:19:27: %LINEPROTO-5-UPDOWN: Line protocol on

Interface FastEthernet0/1, changed state to down

02:19:30: %LINEPROTO-5-UPDOWN: Line protocol on Interface

FastEthernet0/1, changed state to up

SW1(config-if)#ip address 150.150.150.2 255.255.255.0 

VLAN

► A virtual LAN, is a method of creating independent logical networks within a physical network. Several VLANs can co-exist within such a network. This helps in reducing the broadcast domain and aids in network administration by

22

Page 23: workng of switch

separating logical segments of a LAN (like company departments) that should not exchange data using a LAN

'

Configuration Example for VLANs

switch# configure terminal

switch(config)# vlan 10

23

Page 24: workng of switch

switch(config-vlan)# name test

switch(config-vlan)# state active

switch(config-vlan)# no shutdown

switch(config-vlan)# exit

switch(config)#

Step-by-Step Instructions

Complete these steps to configure a switch to perform interVLAN routing.

1. Enable routing on the switch by using the ip routing command. Even if IP routing was previously enabled, this step ensures that it is activated.

Switch(config)#ip routing

Note: If the switch does not accept the ip routing command, upgrade to either SMI image Cisco IOS Software Release12.1(11)EA1 or later, or an EMI image, and repeat this step. See the Prerequisites section for more information.

Tip: Check the show running-configuration . Verify whether ip routing is enabled. The command, if enabled, appears towards the top of the output.

hostname Switch!!ip subnet-zeroip routing!vtp domain Ciscovtp mode transparent

2. Make note of the VLANs that you want to route between. In this example, you want to route traffic between VLANs 2, 3 and 10.

3. Use the show vlan command to verify that the VLANs exist in the VLAN database. If they do not exist, add them on the switch. This is an example of adding VLANs 2, 3, and 10 to the switch VLAN database

Switch#vlan databaseSwitch(vlan)#vlan 2VLAN 2 added: Name: VLAN0002Switch(vlan)#vlan 3

24

Page 25: workng of switch

VLAN 3 added: Name: VLAN0003Switch(vlan)#vlan 10VLAN 10 added: Name: VLAN0010Switch(vlan)#exitAPPLY completed.Exiting....

Tip: You can use VLAN Trunking Protocol (VTP) to propagate these VLANs to other switches. Refer to Understanding and Configuring VLAN Trunk Protocol (VTP).

4. Determine the IP addresses you want to assign to the VLAN interface on the switch. For the switch to be able to route between the VLANs, the VLAN interfaces must be configured with an IP address. When the switch receives a packet destined for another subnet/VLAN, the switch looks at the routing table to determine where to forward the packet. The packet is then passed to the VLAN interface of the destination. It is in turn sent to the port where the end device is attached.

5. Configure the VLAN interfaces with the IP address identified in step 4.

Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface Vlan2Switch(config-if)#ip address 10.1.2.1 255.255.255.0Switch(config-if)#no shutdown

Repeat this process for all VLANs identified in step 1.

6. Configure the interface to the default router. In this scenario you have a Layer 3 FastEthernet port.

Switch(config)#interface FastEthernet 0/1Switch(config-if)#no switchportSwitch(config-if)#ip address 200.1.1.1 255.255.255.0Switch(config-if)#no shutdown

The no switchport command makes the interface Layer 3 capable. The IP address is in the same subnet as the default router.

Note: This step can be omitted if the switch reaches the default router through a VLAN. In its place, configure an IP address for that VLAN interface.

7. Configure the default route for the switch.

25

Page 26: workng of switch

Switch(config)#ip route 0.0.0.0 0.0.0.0 200.1.1.2

From the diagram in the Task section, note that the IP address of the default router is 200.1.1.2. If the switch receives a packet for a network not in the routing table, it forwards it to the default gateway for further processing. From the switch, verify that you can ping the default router.

Note: The ip default-gateway command is used to specify the default gateway when routing is not enabled. However, in this case, routing is enabled (from step 1). Therefore, the ip default-gateway command is unnecessary.

8. Configure your end devices to use the respective Catalyst 3550 VLAN interface as their default gateway. For example, devices in VLAN 2 should use the interface VLAN 2 IP address as its default gateway. Refer to the appropriate client configuration guide for more information on how to designate the default gateway.

9. (Optional) When you implement Inter-VLAN routing, you can also isolate some VLANs from being routed. Refer to theIsolation Between Two Layer 3 VLANs section of Creating Ethernet VLANs on Catalyst Switches for more information.

Switching Protocole:-

Spanning Tree Protocol

When designing a switched network, one of the biggest issues that must be dealt with is loop prevention. If a loop were to develop in a switched network, the amount of

26

Page 27: workng of switch

traffic that could be passed between switches would quickly utilize the entire bandwidth available within each of the switches affected. One method to prevent loops is to only provide a single path between switches and ensure that there is no path redundancy across the entire switched network. While this may work in small deployments, when dealing with switched networks that are a bit larger the deployment of redundancy is a required element.

To be able to deal with these potential loops that could be caused by these redundant paths the Spanning Tree Protocol (STP) can be deployed. STP is tasked with preventing loops throughout the switched network. It does this by temporarily blocking redundant paths between switches; in this case, if the primary forwarding path is disrupted, this blocking would be removed allowing traffic to be passed. This article takes a look at some of the based STP concepts and reviews the configuration required to deploy STP on a switch.

The first thing to point out is that this article focuses on the original version of STP that is covered in IEEE 802.1D; some of the material about the newer Rapid STP (RSTP-IEEE 802.1w) will also be briefly discussed.

The basic function of STP is to provide a loop free switched network; this is done by creating a topology of all participating STP switches. The best loop free path through the switched network is then determined from this topology information. The initial step taken by each STP is to elect a root switch; the root switch is used as a central point in a switched network to determine the best route through the switched network. Initially, all switches act as if they are the root switch and do this until they receive traffic from another superior switch (as determined by switch priority); this is referred to as a root switch election.

Another thing that must be understood is that multiple root switches can exist in the network depending on what STP mode is being used. By default, on Cisco switching equipment, each VLAN has its own STP instance and a root switch is elected for each VLAN; this mode is called Per VLAN Spanning Tree Plus (PVST+). If implementing RSTP, Rapid PVST+ is used.

Sp anning Tree Protocol Port Roles

Once the root switch is elected, each of the ports is given a role depending on its place within the STP topology; the available port roles when using 802.1D spanning tree are shown below:

Root—The port given this role is the selected best path to reach the root switch

27

Page 28: workng of switch

Designated—The port given this role is selected with the best path to a specific switched segment; there is only one designated port per switched segment.

Alternate—The port given this role is selected as a backup to the root port; if the root port should have a problem, this port would take over the root port role.

Backup—The port given this role is selected as a back to the designated port; if the designated port should have a problem this port would take over the designated port role.

Once the best path is calculated and each of the ports has been given a role, all ports with the alternate or backup STP roles will be blocked to prevent loops.

Spanning Tree Protocol Interface States

Each of the ports on a switch that are enabled participates in STP; each of these ports goes through a process of interface states before they are allowed to forward traffic. The sequence of 802.1D interface states is shown in Figure 1.

Figure 1 

As shown in Figure 1, there are five different states that a port can be in, described below:

Blocking State—Ports that are in the blocking state do not forward traffic; they simply listen to the network to ensure that they should continue to block traffic. Should the state of the switched network change, the port could transition to listening state. All ports start in blocking state after initial switch initialization.

Listening State—Ports that are in the listening state do not forward traffic. While in this state, the port will only listen to traffic as they did when in blocking state. This is the first state that comes after the blocking state after the port is set to start frame forwarding. The default time in the listening state is 15 seconds.

28

Page 29: workng of switch

Learning State—Ports that are in the learning state do not forward traffic; while in this state the port will listen to traffic and begin to learn addresses from the connected devices on a segment. The default time in the learning state is 15 seconds.

Forwarding State—Ports that are in the forwarding state forward traffic as well as continue to learn addresses from the segment.

Disabled State—Ports that are in the disabled state do not forward traffic or listen to the network traffic.

When implementing the RSTP, the time that a port takes to transition and the method used to transition has changed. This provides the ability for a switched network to begin forwarding traffic sooner without unneeded delays; these delays are a common complaint about the 802.1D version of STP.

Spanning Tree Protocol Configuration

By default, STP is enabled on VLAN 1 and all newly created VLAN’s; because of this there are no commands required to enabled STP on a newly initialized switch. If for some reason an older switch has STP disabled on a specific VLAN, the commands shown in Table 1 are used to re-enable STP.

Table   1 : Enabling STP

Step 1 Enter privileged mode. router>enable

Step 2 Enter global configuration mode.

router#configure terminal

Step 3 Enable STP on a VLAN. router(config)#spanning-tree vlan vlan-id

Step 4 Exit configuration mode. router(config)#end

When initially setting up STP, it is best to determine which of the switches on the network will become the root switch. While it is possible for the network to determine this by itself, the election will simply come down to a question of who has the lowest MAC address. By default, each switch begins with a priority of 32768; this priority is then combined with the MAC address of the switch to create the bridge ID. During a root switch election, the switch with the lowest bridge ID will be elected the root switch.

The commands to determine the root switch are shown in Table 2.

29

Page 30: workng of switch

Table   2 : Root Switch Selection

Step 1 Enter privileged mode. router>enable

Step 2 Enter global configuration mode.

router#configure terminal

Step 3Set the switch to become the root switch.

This command determines the switch priority required to make the switch root and changes the switch priority to this number.

router(config)#spanning-tree vlan vlan-id root primary

Step 3Set the switch to become the secondary root switch.

This command changes the priority of the switch to 28672.

router(config)#spanning-tree vlan vlan-id root secondary

Step 3Set the switch priority, as the default switch priority is 32768 any value less then this will make the switch root.

It is recommended that this command not be used in favor of the earlier commands.

router(config)#spanning-tree vlan vlan-idpriority priority

Step 4 Exit configuration mode router(config)#end

If the default Spanning Tree mode needs to be changed from the default of PVST+, use the commands shown in Table 3.

Table   3 : Spanning Tree Mode

Step 1 Enter privileged mode. router>enable

Step 2 Enter global configuration mode.

router#configure terminal

30

Page 31: workng of switch

Step 3 Configure the Spanning Tree mode to use.

router(config)#spanning-tree mode {pvst |rapid-pvst}

Step 4 Exit configuration mode. router(config)#end

Summary

STP is one of those protocols that are used by most people without them even knowing that it exists, but without it modern switched networks could not operate. Hopefully the contents of this article have been able to introduce the concepts used by STP to eliminate switch loops and how STP can be configured to get the best performance out of the network.

31