1 / 74

Link Layer

Link Layer. w / much credit to Cisco CCNA and Rick Graziani (Cabrillo). Administrativia. How are the labs going? Telnet - ing into Linux as root In / etc / pam.d / remote comment out line “ auth required pam_securetty.so ” Run “service xinetd restart”

mea
Télécharger la présentation

Link Layer

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. Link Layer w/ much credit to Cisco CCNA and Rick Graziani (Cabrillo)

  2. Administrativia • How are the labs going? • Telnet-ing into Linux as root • In /etc/pam.d/remote comment out line “auth required pam_securetty.so” • Run “service xinetdrestart” • NMO position… Software Development for Cisco Advanced Services • “Extract information from data gathered from Cisco devices, Apply analytics to the extracted information and present it in a format for end user consumption” • Good networking background with programming and database skills, and good knowledge of search techniques. • This week • Single Segment Network lab due Friday • Next week • Link Layer quiz Thursday, 4/18 • Static Routing lab due Wednesday, 4/17 • Project proposal due Tuesday 4/30 CE 151 - Advanced Networks

  3. Recall… • IP designed to interconnect diverse networks • Local Area Networks • Packet radio networks • Satellite networks • Anything else people might dream up (cup and string!) • Communication across a set of Interconnected Networks (an InterNet!) • While making minimal assumptions about the networks • IP distilled from monolithic TCP due to insight that reliability was… • …to be implemented in the hosts (due to minimal assumptions of networks) • …not a service needed by all network applications • We now study the requirements of a subnet in the Internet Architecture • This is the Link Layer CE 151 - Advanced Networks

  4. Role of Link Layer • Internet is composed of “subnets” • Subnets are composed of “channels” • The Link Layer manages communication across a subnet • Framing • Sharing channels that compose the subnet (“media access control”) • Routing across the subnet • Examples • Ethernet, 802.11, ATM, etc. • Following focuses on Ethernet as the classic subnet technology… • …it is everywhere, and serves as a de-facto reference for the link layer CE 151 - Advanced Networks

  5. Review • The Internet is composed of subnets. • Subnets are composed of channels. • The Link Layer manages communication across a subnet: • Framing, • Sharing channels that compose the subnet (“media access control”), • Routing across the subnet. CE 151 - Advanced Networks

  6. Ethernet • Media Access Control • Original Ethernet – CSMA/CD • Repeaters, hubs, bridges, and switches • Routing • Selective Forwarding • Spanning Tree Protocol (STP) • VLANs CE 151 - Advanced Networks

  7. Original Ethernet – Shared Bus Abbreviated MAC Addresses 1111 2222 3333 nnnn • When an Ethernet frame is sent all devices on the “bus” receive it. • What do they do with it? 3333 1111 CE 151 - Advanced Networks

  8. Original Ethernet – Shared Bus Abbreviated MAC Addresses 1111 2222 3333 nnnn • When information (frame) is transmitted, every PC/NIC on the shared media copies part of the transmitted frame to see if the destination address matches the address of the NIC. • If there is a match, the rest of the frame is copied • If there is NOT a match the rest of the frame is ignored. Hey, that’s me! Nope Nope 3333 1111 CE 151 - Advanced Networks

  9. Original Ethernet – Shared Bus Abbreviated MAC Addresses 1111 2222 3333 nnnn • What happens when multiple computers try to transmit at the same time? 3333 1111 CE 151 - Advanced Networks

  10. Original Ethernet – Shared Bus Collision! Abbreviated MAC Addresses 1111 2222 3333 nnnn X CE 151 - Advanced Networks

  11. CSMA/CD • CSMA/CD “Let everyone have access whenever they want and we will work it out somehow.” CE 151 - Advanced Networks

  12. CSMA/CD Carrier Sense Multiple Access/Collision Detection • Listen for transmission (“carrier”). • If no transmission is sensed, transmit data immediately. • Monitor channel for collision. Stations sense the collision by being unable to deliver the entire frame. (This is why there are minimum frame lengths, cable distance and speed limitations. This includes the 5-4-3 rule.) • If collision detected, transmit a jamming signal. • Back off a random, exponentially increasing amount of time. • Go back to Step 1. CE 151 - Advanced Networks

  13. S R CSMA/CD - Minimum Frame Size • Remember, for CSMA/CD to work, minimum transmission time must be twice maximum propagation time. • Before sending last bit of frame, sending station must detect collision. • Frame transmission time must be twice maximum propagation time. • Minimum frame size determines maximum LAN size. • Minimum Ethernet frame size (called slot time): 512 bits (64 bytes) CE 151 - Advanced Networks

  14. CSMA/CD – Slot Time • For Ethernet and Fast Ethernet is 512 bits • 2800m @ 10Mbps • 205m @ 100Mbps (10baseT cabling limit is 100m) • After 512bits sender assumes no collision • Minimum payload of 46bytes (368bits) • 512 – 48 (Src) – 48 (Dst) – 16 (Type) – 32 (FCS) • Why maximum frame size? CE 151 - Advanced Networks

  15. Collision Domain • Collision Domain: a set of ports interconnected at the physical layer (are a part of the same “signal timing domain”). • “Simultaneous” transmissions will result in a collision. • Bandwidth is shared by all stations in the domain. • Transmission is half-duplex. • Wikipedia: A logical network segment where data packets can "collide" with one another for being sent on a shared medium. • Only implemented in Ethernet (10Mb) and Fast Ethernet (100Mb) CE 151 - Advanced Networks

  16. Original Ethernet • CSMA/CD • Shared collision domains • Problems • Channel length limitations far short of slot time • Only one station can transmit at a time • Shared collision domain (CSMA/CD) limited to 50-60% bandwidth utilization CE 151 - Advanced Networks

  17. Channel Length Limitations • Channel technologies had limited range • Original Ethernet (10Mbps) – 1980 to 1995 • 500 meters for 10base5 • 200 meters for 10base2 (really 185 meters) • 100 meters for 10baseT • Fast Ethernet (100Mbps) – 1995 to 1998 • 100 meters for 100baseTX • Far short of slot times • 2800m for Ethernet • 205m for Fast Ethernet • Solution was repeaters, hubs, and the 5/4/3 rule CE 151 - Advanced Networks

  18. Review • Collision Domain • A logical network segment where data packets can "collide" with one another for being sent on a shared medium… simultaneous transmissions will result in a collision. • Bandwidth is shared by all stations in the domain. • Transmission is half-duplex. • Original Ethernet (10Mbps) and Fast Ethernet (100Mbps) • CSMA/CD • Shared collision domains • Problems • 500m & 100m segment limitations vs. 2500m & 205m slot times • Only one station can transmit at a time • Inefficient use of bandwidth - shared collision domain (CSMA/CD) limited to 50-60% bandwidth utilization CE 151 - Advanced Networks

  19. Repeaters • Repeaters are Layer 1 devices used to combat attenuation. • They do NOT look at Layer 2 (MAC, Ethernet) or Layer 3 (IP) addresses. • CSMA/CD. • Repeaters: • take in weakened signals • clean them up or regenerate them • send them on their way along the network • Repeaters • Increase the distance a LAN can reach • Introduce delay CE 151 - Advanced Networks

  20. 5/4/3 Rule • Enforce slot time limit on Ethernet subnet in presence of repeaters. • “The rule mandates that between any two nodes on the network, there can only be a maximum of five segments, connected through four repeaters, or concentrators, and only three of the five segments may contain user connections.” Webopedia.com • Alternatively, specified algorithms for custom network configurations CE 151 - Advanced Networks

  21. 5/4/3 Rule • Ethernet and IEEE 802.3 implement a rule, known as the 5-4-3 rule, for the number of repeaters and segments on shared access Ethernet backbones in a tree topology. The 5-4-3 rule divides the network into two types of physical segments: populated (user) segments, and unpopulated (link) segments. User segments have users' systems connected to them. Link segments are used to connect the network's repeaters together. The rule mandates that between any two nodes on the network, there can only be a maximum of five segments, connected through four repeaters, or concentrators, and only three of the five segments may contain user connections. • The Ethernet protocol requires that a signal sent out over the LAN reach every part of the network within a specified length of time. The 5-4-3 rule ensures this. Each repeater that a signal goes through adds a small amount of time to the process, so the rule is designed to minimize transmission times of the signals. • The 5-4-3 rule -- which was created when Ethernet, 10Base5, and 10Base2 were the only types of Ethernet network available -- only applies to shared-access Ethernet backbones. A switched Ethernet network should be exempt from the 5-4-3 rule because each switch has a buffer to temporarily store data and all nodes can access a switched Ethernet LAN simultaneously. CE 151 - Advanced Networks

  22. Hubs • Hub is a repeater with more than 2 ports. • Layer 1 device. • Signals receved on one port are regenerated and sent out all other. • CSMA/CD. • Hubs were also called • Ethernet concentrators • Multiport repeaters CE 151 - Advanced Networks

  23. Review • Repeaters and hubs • Physical layer - regenerate signal • Solve • Range limitation - extend range (5/4/3 rule for 10Mbps) to support full slot time • Remaining problems • Only one station can transmit at a time • Inefficient use of bandwidth - shared collision domain (CSMA/CD) limited to 50-60% bandwidth utilization CE 151 - Advanced Networks

  24. Transmitting via a hub 3333 1111 • The hub will flood it out all ports (except for the incoming port)… of all interconnected hubs in the subnet! 1111 2222 Nope 5555 Nope 3333 For me! 4444 Nope CE 151 - Advanced Networks

  25. Transmitting via a hub 2222 1111 • The hub will flood it out all ports (except for the incoming port)… of all interconnected hubs in the subnet! • This may result in wasted bandwidth! 1111 2222 For me! 5555 Wasted bandwidth Nope 3333 Nope 4444 Nope CE 151 - Advanced Networks

  26. Transmitting via a hub 2222 1111 • The hub will flood it out all ports (except for the incoming port)… of all interconnected hubs in the subnet! • This may result in wasted bandwidth! • Or collisions when stations transmit at the same time. 1111 2222 Collision X 5555 4444 3333 3333 4444 CE 151 - Advanced Networks

  27. Original Ethernet – Partial Solution • Problem: only one station can transmit at a time. • Solution: Buffering and selective forwarding • Introduce a device that • Buffers frames • Only forwards on interfaces it needs to • More efficient use of bandwidth • Allows simultaneous transmissions • Splits a collision domain • Called a bridge CE 151 - Advanced Networks

  28. Bridges • A bridge is a Layer 2 device • Collects frames. • Selectively forwards frames through the network. • CSMA/CD on each interface • Bridges segment collision domains! • Don’t forward collision signals. • Bridges do not restrict broadcast or multicast traffic. • Therefore broadcast domains are not affected. • Bridges implement selective forwarding by • Learning the MAC address of all devices on connected segments. • Builds a bridging table and forwards frames based on this table. • Result is fewer collisions and therefore improved bandwidth utilization. CE 151 - Advanced Networks

  29. Broadcast Domain • Broadcast Domain: a set of ports interconnected at the link layer. • A broadcastwill reach all stations in the domain. • Equivalent to (defines) a subnetin the Internet Architecture. • Wikipedia: a logical division of a computer network, in which all nodes can reach each other by broadcast at the data link layer. • Bridges allow a broadcast domain to be segmented into many collision domains; however… • …shared collision domains (CSMA/CD) are limited to at most 50-60% utilization of the channel • Elimination of shared collision domains enables 100% channel utilization. • To eliminate CSMA/CD requires eliminating the sharing of a medium • Accomplish this by moving from half-duplex to full-duplex communication CE 151 - Advanced Networks

  30. Review • Broadcast Domain • A logical division of a computer network, in which all nodes can reach each other by broadcast at the data link layer. • Equivalent to (defines) a “subnet” in the Internet Architecture. • Bridges • Link layer – buffer frames • Selective forwarding • Multiple collision domains per broadcast domain • Solves • Multiple stations can transmit at the same time • Remaining problem • Shared collision domain (CSMA/CD) limited to 50-60% bandwidth utilization CE 151 - Advanced Networks

  31. Duplex Transmissions • Half-duplex Transmission: Either way, but only one way at a time. • Two way street, but only one way at a time • Full-duplex Transmission: Both ways at the same time. • Two way street CE 151 - Advanced Networks

  32. Half-Duplex • In half-duplex transmission only one end can send at a time. • CSMA/CD transmissions are, by definition, half-duplex. • All ports in a collision domain must be in half-duplex mode • Original Ethernet is half-duplex. Half-duplex CE 151 - Advanced Networks

  33. Full-Duplex • In full-duplex transmission both ends can send simultaneously. • CSMA/CD is not needed for full-duplex transmission. • Full-duplex Ethernet specified in IEEE 802.3x in March 1997 • Original (half-duplex) Ethernet usually can only use 50%-60% of the available 10 Mbps of bandwidth due to collisions. • Full-duplex Ethernet offers 100% of the bandwidth in both directions. CE 151 - Advanced Networks

  34. Switches • Latest step in evolution of link layer. • A full-duplex bridge • Operates at link layer on frames. • Selective forwarding. • Full-duplex transmission. • Potentially no CSMA/CD! • Multiple devices on a switch can communicate simultaneously. • Benefits of a switch • Fewer (potentially no!) collisions. • Improved (potentially 100%!) bandwidth utilization. CE 151 - Advanced Networks

  35. Full-Duplex Ethernet • IEEE 802.3x full-duplex standard requires: • The medium must have independent transmit and receive data paths that can operate simultaneously. • There are exactly two stations connected with a full-duplex point-to-point link. • There is no CSMA/CD multiple access algorithm, since there is no contention for a shared medium. • Both stations on the LAN are capable of, and have been configured to use, the full-duplex mode of operation. • Handling carrier detection and collision detect • In half-duplex a station will not transmit if carrier is detected, and will abort if a collision is detected. • In full-duplex a station ignores the carrier sense and collision detect signals. CE 151 - Advanced Networks

  36. Review • Switches • Full duplex • No CSMA/CD • Solves • Limit of 50-60% bandwidth utilization… allows up to 100% bandwidth utilization CE 151 - Advanced Networks

  37. Summary of Devices • Repeaters and hubs • Forward bits within a collision domain using regeneration. • Physical layer. • Forward regenerated bits. • Half-duplex, CSMA/CD transmission. • Single collision domain. • Bridges • Divide collision domains using buffering. • Link layer. • Selectively forward frames. • Half-duplex, CSMA/CD transmission. • Collision domain per port. • Switches • Eliminate collision domains using full-duplex channels. • Link layer. • Selectively forward frames • Full duplex transmission over dedicated medium. • Collision domain per port. CE 151 - Advanced Networks

  38. Summary of Devices • Switches provide the opportunity to • Eliminate distance limitations (subnets span the whole campus) • All stations can transmit simultaneously (limit is switch buffering) • No CSMA/CD so full channel bandwidth can be used CE 151 - Advanced Networks

  39. Cut-through Switching • Store-and-forward – The entire frame is received before any forwarding takes place. • CRC Check done • Cut-through – The frame is forwarded before the entire frame is received. • Decreases the latency of the transmission, but also reduces error detection. CE 151 - Advanced Networks

  40. Cut-through Switching • Cut-through Fast-forward – Offers the lowest level of latency. • Fast-forward switching immediately forwards a packet after reading the destination address. • There may be times when packets are relayed with errors. • Although this occurs infrequently and the destination network adapter will discard the faulty packet upon receipt. CE 151 - Advanced Networks

  41. Cut-through Switching • Cut-through Fragment-free– Fragment-free switching filters out collision fragments before forwarding begins. • Collision fragments are the majority of packet errors. • Collision fragments must be smaller than 64 bytes (512 bits… slot time). • Greater than 64 bytes is a valid packet and is usually received without error. • Fragment-free switching confirms not a collision fragment before forwarding. CE 151 - Advanced Networks

  42. Routers vs. Switches • Routers - forward packets between broadcast domains. • Network layer • Forward packets • Interconnect broadcast domains • Until early 1990s: most LANs were interconnected by routers • Since mid1990s: LAN switches replace most routers CE 151 - Advanced Networks

  43. Internet A Routed Enterprise Network Router Hub FDDI FDDI CE 151 - Advanced Networks

  44. Internet A Switched Enterprise Network Router Switch CE 151 - Advanced Networks

  45. Switches/Bridges versus Routers • Performance • Ease of administration Routers • Each host’s IP address must be configured • If network is reconfigured, IP addresses may need to be reassigned • Routing done via RIP or OSPF • Each router manipulates packet header (e.g., reduces TTL field) Switches/Bridges • MAC addresses are hardwired • No network configuration needed • No routing protocol needed (sort of) • learning bridge algorithm • spanning tree algorithm • Bridges do not manipulate frames CE 151 - Advanced Networks

  46. Challenges of Link Layer Switching • Problem: selective forwarding • Solution: address learning • Problem: one broadcast domain per switch. • Solution: Virtual LANs (VLANs) • Problem: loops in the topology. • Solution: spanning-tree protocol (STP) CE 151 - Advanced Networks

  47. Challenges of Link Layer Switching • Problem: selective forwarding • Solution: address learning • Problem: one broadcast domain per switch. • Solution: Virtual LANs (VLANs) • Problem: loops in the topology. • Solution: spanning-tree protocol (STP) CE 151 - Advanced Networks

  48. Selective Forwarding How do switches/bridges allow multiple simultaneous transmissions?

  49. Address Learning: Learn Source Address Source Address Table PortSource MAC Add.PortSource MAC Add. 1 1111 3333 1111 • A switch has a source address table (or MAC Address Table) in cache (RAM) where it stores a source MAC address after it learns about them. • How does it learn source MAC addresses? • When a frame enters a switch, the switch first checks if the source address (1111) is in it’s source address table. • If it is, it resets the timer. • If it is NOT in the table it adds it, with the port number. switch 1111 3333 Abbreviated MAC addresses 2222 4444 CE 151 - Advanced Networks

  50. Address Learning: Filter or Flood Source Address Table PortSource MAC Add.PortSource MAC Add. 1 1111 3333 1111 • The switch then examines the source address table for the destination MAC address. • If it finds a match, it forwards the frame by only sending it out that port. • If there is not a match if floods it out all ports. • In this scenario, the switch will flood the frame out all other ports, because the destination address is not in the source address table. switch 1111 3333 Abbreviated MAC addresses 2222 4444 CE 151 - Advanced Networks

More Related