1 / 27

Switching and Bridging Textbook Ch3.1 and 3.4

Switching and Bridging Textbook Ch3.1 and 3.4. Instructor: Joe McCarthy (based on Prof. Fukuda’s slides). Network Layer. Scalable Networks. Why switches? Connects two or more network segments (>2500m in Ethernet) Support large numbers of hosts (>1024 hosts in Ethernet)

Download Presentation

Switching and Bridging Textbook Ch3.1 and 3.4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Switching and BridgingTextbook Ch3.1 and 3.4 Instructor: Joe McCarthy(based on Prof. Fukuda’s slides) CSS432: Switching and Bridging

  2. Network Layer CSS432: Switching and Fowarding

  3. Scalable Networks • Why switches? • Connects two or more network segments (>2500m in Ethernet) • Support large numbers of hosts (>1024 hosts in Ethernet) • Maintain performance (> two packets through a switch) Network Switches Packet Switch Circuit Switch TDM FDM virtual Connectionless Connection Oriented Dynamic Static DTM SONET ATM IP datagrams X25 Dynamically reallocate bandwidth Frame sent over optics in synchronization with atomic/satellite clock CSS432: Switching and Bridging

  4. Three Approaches • Datagram/connectionless switching • IP • Virtual circuit/connection-oriented switching • X.25 • ATM (Asynchronous Transfer Mode) • Source routing • Connection requests in virtual circuit CSS432: Switching and Bridging

  5. Host D Host E 0 Switch 1 Host F 3 1 Switch 2 2 Host C 2 3 1 0 Host A 0 Switch 3 Host B Host G 1 3 2 Host H Datagram Switching • No connection setup phase • Each packet forwarded (routed) independently • Analogy: postal system • Each switch maintains a forwarding (routing) table Table at Switch 2 CSS432: Switching and Bridging

  6. Datagram Switching (Cont’d) • No connection setup • Pros 1: Asource can send data as soon as it is ready. • No way of knowing if a packet is delivered. • Cons 1: A source must estimate network congestion or disconnection • Each packet may take a different route. • Pros 2: No single point of failure • Cons 2: May arrive in different order CSS432: Switching and Bridging

  7. 0 Switch 1 3 1 2 Switch 2 2 3 1 5 11 0 VCI = 11 Host A VCI = 5 7 VCI = 7 0 Switch 3 1 3 VCI = 4 4 Host B 2 Virtual Circuit Switching • Explicit connection setup (and tear-down) phase • Subsequence packets follow same circuit • Analogy: phone call • Each switch maintains a VC table Switch 1 Switch 2 Question: It seems like the table needs only incoming & outgoing port pairs…. Why do we need a VCI for each? Switch 3 CSS432: Switching and Bridging

  8. Host D Host E 0 Switch 1 Host F 3 1 VCI=6 Switch 2 2 VCI=12 Host C 2 3 1 0 Host A VCI=8 VCI=11 VCI=5 0 Switch 3 Host B Host G 1 3 VCI=4 VCI=7 2 Host H VCI=4 Virtual Circuit Switching (Cont’d) • Global address information is replaced with local VCI. • Each switch has local but not global information. • To set up connection: • Each switch still needs a global view of network configuration to forward a connection request message to destination Switch 1 Switch 2 Switch 3 CSS432: Switching and Bridging

  9. Virtual Circuit Model (Cont’d) • Connection setup required • Pros 1: An opportunity to reserve resources (QoS) • Cons 1: Wait for a full RTT before sending first data packet. • Cons 2: Full address for destination still required for connection. • Packets sent along the same route • Pros 2: Each data packet contains only a VCI. • Pros 3: Flow control possible along the entire connection • Cons 3: If the connection is broken, a new one needs to be established. CSS432: Switching and Bridging

  10. Source Routing • Each packet has complete switching information from source to destination • Three ways to maintain switching information: • Rotation • Striping • Use of a pointer • Useful to send a connection setup request in VC CSS432: Switching and Bridging

  11. destination destination destination R B R R B R R B R R R B Bridges and Extended LANs • Connecting two or more LANs • Repeater / Hub • L1: Physical Layer • Forwards everything everywhere • Limitations: <= 2500m and <= 1024 nodes • Bridge (or LAN switch) • L2: Datalink Layer • Forwards frames using MAC address • Static configuration + partial dynamic configuration (Spanning Tree Protocol) • Router • L3: Network Layer • Forwards packets using IP address • Dynamic configuration CSS432: Switching and Bridging

  12. A B C Port 1 Bridge Port 2 Z X Y Learning Bridges Based on datagram switching • Do not forward frames when unnecessary • Ex. A frame sent from A to B • Maintain forwarding table Host Port A 1 B 1 C 1 X 2 Y 2 Z 2 • Learn table entries based on source address • E.g. An entry for A is registered upon receiving a frame from A • E.g. When forwarding a frame to B, don’t forward to Port 2 • Table is an optimization; need not be complete • Entries are expired after a specific period of time • Linux brctl command: makes a logical bridge with max age = 4sec CSS432: Switching and Bridging

  13. A B B3 C B5 D B7 K B2 E F B1 G H B6 B4 I J STP: Spanning Tree Protocol Y • Loops • Example: • B1 receives a frame from Node X on LAN H to Node Y on LAN C. • B1 registers an entry for Node X but not yet Node Y. • B1 forwards frame to all ports except to LAN H. • B7 receives frame 7 & forwards to LAN B • B5 forwards frame to LAN A & D. • B1 receives this frame (again) and registers an entry for X. • B1 forwards it to all ports except to LAN H & D. • Node Y eventually receives a frame. • Problem: • Duplicated frames are forwarded along loops. • Spanning Tree Algorithm • Inactivate bridge ports so that no cycle exists in extended LAN • Radia Perlman, “Mother of the Internet” • IEEE 802.1 Specification X CSS432: Switching and Bridging

  14. A B B3 C B5 D B7 K B2 E F B1 G H B6 B4 I J STP Details • Bridges exchange configuration messages (Y, d, X) • Y: the id of reigning root • d: #hops from X to Y • X: the sending bridge id • Initially, each bridge believes it is the root • When a bridge learns it is not the root, it stops generating configuration messages • When a bridge learns it is not a designated bridge for a LAN, it stops forwarding configuration messages • In steady state: • The network (tree) has exactly 1 root (only bridge generating config msgs) • Each LAN has exactly 1 designated bridge (only bridges forwarding config msgs) • If any bridge does not receive a configuration message after a period of time, it starts generating configuration messages claiming to be the root. 2 hops (1, 1, 5) 1 hop B5 < B7 (1, 1, 2) 1 hop (1, 0, 1) 1 hop (1, 0, 1) (1, 0, 1) root 1 hop 1 hop B4 < B6 CSS432: Switching and Bridging

  15. Another STP illustration • Determine • RPs (root ports) • DPs (designated ports) • BPs (blocked ports) http://en.wikipedia.org/wiki/Spanning_Tree_Protocol CSS432: Switching and Fowarding

  16. Another STP illustration • Determine • RPs (root ports) • DPs (designated ports) • BPs (blocked ports) http://en.wikipedia.org/wiki/Spanning_Tree_Protocol CSS432: Switching and Fowarding

  17. One more STP illustration http://www.cisco.com/warp/public/473/spanning_tree1.swf CSS432: Switching and Fowarding

  18. X.25 Source Routing and Virtual Circuit Switching Call request/Idle mode/call clearing Data packet 0 0 modulo group 4K channels Call request channel receive sequence send sequence Why sequence#? Sliding window Error recovery control Higher Layer Protocol 3 bits: country code 1 bit: network code 10 bits: address Data Source VCI Call request Call accept Destination VCI DTE/DCE CSS432: Switching and Bridging

  19. Cell Switching (ATM) • Connection-oriented packet-switched network • Used in both WAN and LAN settings • Packets are called cells • 5-byte header + 48-byte payload (easier to switch, high frame utilization for small data) • Commonly transmitted over SONET • Error correction • End-to-end but not at each switch (i.e., at data link layer) • Congestion control • Admission control • Leaky packet transfer CSS432: Switching and Bridging

  20. Switch Implementation • Using a workstation • Flexible control • Performance problem • Using a custom hardware • Shared/share memory-based switch • Crossbar switch • Self-routing switch (Batch Banyan switch) CSS432: Switching and Bridging

  21. Workstation Used as a Switch Workstation CPU LAN A NIC • Advantage: flexible because a workstation has a CPU. • Example • 33MHz 32bit I/O bus • 1Gbps for one way from NIC to main memory • 500Mbps for a round trip between NIC and main memory • Enough to support five 100Mbps Ethenet • What if a packet is very small like 64byes • The workstation has 500,000 packets per second (pps). • Throughput: 500,000 x 64 x 8 = 256Mbps LAN B I/O ctlr NIC LAN C NIC I/O Bus Main memory CSS432: Switching and Bridging

  22. Shared Bus/Memory-Based Switch Control processor DMA from port to port • A simple design • Shared bus or memory becomes a bottleneck. (Max. 16 bus masters) Input Port Output Port Input Port Output Port Shared bus Input Port Output Port Shared memory CSS432: Switching and Bridging

  23. Crossbar Switch • Without a collision, all inputs delivered to each output • All inputs may go to the same output which causes a collision in the output buffer. CSS432: Switching and Bridging

  24. Crossbar + Knockout Switch L = 3 Round-robin N = 4 • Knockout switch: buffers only L out of N packets, where L < N. Ex. L =8 is sufficient. 1 packet loss per million for a large N. (logarithmically in the loss rate) • Detailed explanation: http://www.laynetworks.com/Knockout%20Switch.htm Knockout Switch CSS432: Switching and Bridging

  25. Banyan Switch 0 0 001 001 000 011 000 001 1 001 • 2 x 2 switching elements interconnected in regular patterns. • Collisions occur if packets are not presented in ascending order 0 110 1 1 111 011 111 110 110 110 111 111 CSS432: Switching and Bridging

  26. Batcher Network + Banyan Switch 001 000 000 000 001 001 • Sort packets in ascending order through Batcher network • Then switch them through Banyan switch ∞ 110 110 ∞ 111 111 111 ∞ 110 ∞ CSS432: Switching and Bridging

  27. Reviews • Datagram switching • Virtual Circuit switching • Source routing • Bridges: STP and limitations • Switches: workstation-based, shared bus/memory-based, crossbar + (knockout), and (batcher network) + banyan • Exercises in Chapter 3 • Ex. 1 (vc sw) • Ex. 4 (datagram sw) • Ex. 13 (STP) • Ex. 26,32 (Switch implementation) CSS432: Switching and Bridging

More Related