Presentation is loading. Please wait.

Presentation is loading. Please wait.

Layer 2 Switch  Layer 2 Switching is hardware based.  Uses the host's Media Access Control (MAC) address.  Uses Application Specific Integrated Circuits.

Similar presentations


Presentation on theme: "Layer 2 Switch  Layer 2 Switching is hardware based.  Uses the host's Media Access Control (MAC) address.  Uses Application Specific Integrated Circuits."— Presentation transcript:

1 Layer 2 Switch  Layer 2 Switching is hardware based.  Uses the host's Media Access Control (MAC) address.  Uses Application Specific Integrated Circuits (ASIC) to build and maintain filter tables.  Break up Collision domain but don't break up Broadcast domain.  Security through VLAN implementation.  Cost effective, Low Latency, Wire Speed.  Provide dedicated bandwidth to end users.  Avoid loops using STP (Spanning Tree Protocol).

2 Functions of Layer 2 Switch Address Learning  Layer 2 switches retain, in their filter tables, the source hardware address and port interface it was received on. Forward/Filter decisions  When a frame is received, the switch looks at the destination hardware address and finds the interface it is on in the filter table. If the address is unknown, the frame is broadcast on all interfaces except the one it was received on.

3 Functions of Layer 2 Switch Loop Avoidance  If multiple connections between switches exist for redundancy, network loops can occur. Spanning Tree Protocol is used to stop loops while still allowing redundancy.

4 Switching Loops Broadcast Storms. Multiple copies of frames. Database instability. Multiple Loops

5 Broadcast Storm Send ARP request Flood broadcast through non- source ports And so on with nothing to stop it

6 Multiple Copies of Frames Send frame to B A is on port 3 Don’t know B So flood Frame arrives And again

7 Database Instability Send frame to B A is on port 1 A is on port 2 ??? A is on port 3 A is on port 1 A is on port 2

8 Spanning Tree Protocol Originally created by DEC (Compaq  HP) IEEE creates its own version called 802.1 D All CISCO switches run 802.1 D STP’s main task is to stop network loops from occurring in layer 2 network. Use Spanning tree algorithm.

9 Spanning Tree Protocol STP’s main task is to stop network loops from occurring in layer 2 network. Use Spanning tree algorithm – Create a topology database. – Search out and destroy redundant links.

10 Without Spanning Tree Not a Tree, It has loops.

11 With Spanning Tree No loops. Includes all devices.

12 Spanning Tree Algorithm The switches use this algorithm to decide which ports should be shut down. 1.Choose one switch to be “root bridge” 2.Choose a “root port” on each other switch 3.Choose a “designated port” on each segment. 4.Close down all other ports.

13 Outline of Process Root bridge Root port Designated port Not chosen Close down

14 1.Choose the Root Bridge Each switch has a bridge ID (BID) of priority value followed by MAC address Switches exchange Bridge Protocol Data Units (BPDUs) to compare bridge IDs The switch with the lowest bridge ID becomes the root bridge Administrator can set the priority to fix the selection

15 Bridge ID The bridge ID consists of bridge priority, and MAC address By default the priority is 32768 Lowest priority wins Value 1 - 65536, multiples of 4096 MAC address used if priority is the same. Better not to rely on MAC address.

16 Select Root Ports Every non-root bridge (Switch) selects a root port This is the port with the lowest cost path to the root bridge.

17 Finding the cost of Link Default port costs depend on the speed of the link. Set by IEEE. Costs may change as faster Ethernet is developed. Link speedRevised costPrevious cost 10 Gbps21 1 Gbps41 100 Mbps1910 10 Mbps100

18 What if Ports have same Cost? Use the port priority and port number. By default F0/1 has 128.1 F0/2 has 128.2

19 Passing Cost Information Each BPDU includes the cost of the path back to the root bridge. The cost is the total cost of all the links. As a switch receives a BPDU, it updates the cost by adding on the cost of the port through which the BPDU was received

20 Select Designated Port On every segment, the port with the lowest cost path to the root bridge becomes the designated port

21 Designated Port if Cost Same Choose the port on the switch with the lower bridge ID. Suppose this is switch B.

22 Close down redundant links Any port that is not a root port or a designated port is put in blocking state

23 BPDU The BPDU message is encapsulated in an Ethernet frame. The destination MAC address is 01:80:C2:00:00:00, which is a multicast address for the spanning-tree group.

24 Port Roles STP makes ports: Root ports (forwarding) Designated ports (forwarding) Non-designated ports (shut down)

25 Port States in traditional STP Blocking – receives and transmits BPDU frames. Listening - receives and transmits BPDU frames. Learning - receives and transmits BPDU frames. Learns MAC addresses. Forwarding – Fully active, forwards user data. Disabled – Administratively shut down.

26 States and Timers Blocking Loss of BPDU detected Max-age = 20 sec Blocking When link first comes up Listening Forward delay = 15 sec Learning Forward delay = 15 sec Forwarding Hello timer 2 sec for sending BPDUs. Up to 50 sec from broken link to forwarding again.

27 LAN Switching Modes Store and Forward The entire frame is copied into its buffer and computes the Cyclic Redundancy Check (CRC). Since it copies the entire frame, latency varies with frame length. If the frame has a CRC error, is too short ( 1518 bytes) it is discarded. If no error, the destination address (MAC) is looked up in the filter table and is sent to the appropriate interface. Is the default state for 5000 series switches.

28 LAN Switching Modes Cut Through Fastest switching mode as only the destination address is copied. It will then look up the address in its filter table and send the frame to the appropriate interface.

29 LAN Switching Modes Fragment Free Modified form of Cut Through switching. The switch waits for the first 64 bytes to pass before forwarding the frame. If the packet has an error, it usually occurs in the first 64 bytes of the frame. Default mode for 1900 switches.


Download ppt "Layer 2 Switch  Layer 2 Switching is hardware based.  Uses the host's Media Access Control (MAC) address.  Uses Application Specific Integrated Circuits."

Similar presentations


Ads by Google