One Upon A Time Computer Networks IST 228\Ch2\Layer2 Switching One Upon A Time Computer Networks
The First Switched Network IST 228\Ch2\Layer2 Switching The First Switched Network
Layer-2 Switching Advantages: Limitations: IST 228\Ch2\Layer2 Switching Layer-2 Switching Advantages: Hardware based (Uses the MAC address from the host’s NIC card) Not software devices Fast and efficiency Increases the bandwidth for each user Limitations: Does not break up broadcast domains Make sure users spend 80% of time on the local segment
Address Learning WWW:0200.3333.3333 PC:0200.2222.2222 IST 228\Ch2\Layer2 Switching Address Learning WWW:0200.3333.3333 PC:0200.2222.2222 DNS:0200.1111.1111 E01 E02 E03 DMAC:FFFF.FFFF.FFF SMAC: 0200.222.2222 1 ARP (DNS) 0200.2222.2222 E01 DMAC:0200.2222.2222 SMAC: 0200.1111.1111 2 ARP 0200.2222.2222 E01 0200.1111.1111 E03 DMAC: 0200.1111.1111 SMAC: 0200.2222.2222 3 ARP Request The following list provides some additional insights relating to the steps shown in Figure 4-8: The PC is preconfigured with the IP address of the DNS. The PC notices that the DNS IP address is in the same subnet as its own IP address; therefore, the PC sends an ARP broadcast hoping to learn the DNS's MAC address. The DNS replies to the ARP request with its MAC address, 0200.2222.2222. The PC requests name resolution for the Web server by sending a packet with the destination IP address of the DNS. The DNS returns the IP address of the Web server to the PC in the DNS reply. The PC does not know the Web server's MAC address, so it sends an ARP broadcast to learn the MAC address. Because it is a MAC broadcast, the switch forwards the frame on all ports. The Web server replies to the ARP, stating that its MAC address is 0200.3333.3333. The PC can now connect to the Web server. The two ARP broadcasts (Steps 1 and 5) are sent out all switch ports because switches and bridges do not perform the broadcast firewall function that a router performs. After the switching table (often called the address table) is built, the switch forwards unicasts only out of the appropriate ports. In other words, frames sent from the client to the Web server, and vice versa (which are unicasts), are never sent out port E2. The switch network has created three separate Ethernet segments, as compared to the transparent bridge network in Figure 4-7, which creates two LAN segments. Each segment is called a collision domain because frames sent by any device on that DMAC: 0200.2222.2222 SMAC: 0200.1111.1111 4 ARP DMAC: FFFF.FFFF.FFFF SMAC: 0200.1111.1111 5 ARP (web) DMAC: 0200.1111.1111 SMAC: 0200.3333.3333 6 0200.2222.2222 E01 0200.1111.1111 E03 0200.3333.3333 E02
Forward/Filter Decisions IST 228\Ch2\Layer2 Switching Forward/Filter Decisions When a frame arrives: Case 1: DMAC is known and in the database Case 2: DMAC is not listed Case 3: It is a broadcast
IST 228\Ch2\Layer2 Switching Loop Avoidance Redundant links are use between switches/bridges to increase survivability Disadvantages: Broadcast storms Trashing the MAC table
Spanning Tree Protocol (STP) IST 228\Ch2\Layer2 Switching Spanning Tree Protocol (STP) STP is used to avoid networks loops on layer-2 networks (bridges and switches) STP is a bridge protocol that make sure that transmission takes place over a spanning tree topology Spanning tree terms: Root Bridge: the bridge with the best bridge ID all decision in the network are made on this bridge Bridge ID: lowest bridge ID becomes the root bridge
Bridge Protocol Data Unit (BPDU) Root Port IST 228\Ch2\Layer2 Switching Nonroot Bridge Bridge Protocol Data Unit (BPDU) Root Port The link directly connected to the root bridge, or the shortest path to the root bridge Designated/Nondesignated port Port cost Forwarding port send and receives all data Blocked port does not participate in frame forwarding
Spanning-Tree Operations IST 228\Ch2\Layer2 Switching Spanning-Tree Operations Selecting the root bridge Selecting the designated port Port States Blocking Listening Learning Forwarding Disabled
Example: Find The Root Bridge and Root Ports IST 228\Ch2\Layer2 Switching Example: Find The Root Bridge and Root Ports