Links Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in CS 104

Slides:



Advertisements
Similar presentations
Ethernet “dominant” LAN technology: cheap $20 for 100Mbs!
Advertisements

Review r Error Detection: CRC r Multiple access protocols m Slotted ALOHA m CSMA/CD r Homework 3 out r Project 3 out, link state only. Some slides are.
5: DataLink Layer5-1 Mac Addressing, Ethernet, and Interconnections.
1 Links Reading: Chapter 2 COS 461: Computer Networks Spring 2006 (MW 1:30-2:50 in Friend 109) Jennifer Rexford Teaching Assistant: Mike Wawrzoniak
The ALOHA Protocol “Free for all”: whenever station has a frame to send, it does so. –Station listens for maximum RTT for an ACK. –If no ACK after a specified.
1 Ethernet EECS 489 Computer Networks Z. Morley Mao Wednesday Feb 21, 2007 Acknowledgement: Some slides taken.
5: DataLink Layer5-1 MAC Addresses and ARP r 32-bit IP address: m network-layer address m used to get datagram to destination IP subnet r MAC (or LAN or.
5: DataLink Layer5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Ethernet.
5-1 Data Link Layer r What is Data Link Layer? r Multiple access protocols r Link-layer Addressing r Ethernet.
1 Announcement r Homework #3 was due last night r Homework #4 is out.
1 Computer Networks Local Area Networks. 2 A LAN is a network: –provides Connectivity of computers, mainframes, storage devices, etc. –spans limited geographical.
Local Area Networks: Ethernet, Switching COS 461: Computer Networks Spring 2011 Mike Freedman
EE 122: Ethernet and Ion Stoica September 18, 2002 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
MAC Addresses and ARP 32-bit IP address: –network-layer address –used to get datagram to destination IP subnet MAC (or LAN or physical or Ethernet) address:
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
5-1 Data Link Layer r Today, we will study the data link layer… r This is the last layer in the network protocol stack we will study in this class…
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
16 – CSMA/CD - ARP Network Layer4-1. 5: DataLink Layer5-2 CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit.
IP Address 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to
Review r Error Detection: CRC r Multiple access protocols m Slotted ALOHA m CSMA/CD r LAN addresses and ARP r Ethernet Some slides are in courtesy of J.
Introduction 1 Lecture 25 Link Layer (Ethernet, Switch) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
DataLink Layer1 Ethernet Technologies: 10Base2 10: 10Mbps; 2: 200 meters (actual is 185m) max distance between any two nodes without repeaters thin coaxial.
Connecting LANs, Backbone Networks, and Virtual LANs
Link Layer Zeinab Movahedi Some slides are from Computer networks course thought by Jennifer Rexford at Princeton University.
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 26 Omar Meqdadi Department of Computer Science and Software Engineering.
5: DataLink Layer5-1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
Lecture 17 Ethernet r Widely deployed because: m First LAN technology m Simpler and less expensive than token LANs and ATM m Kept up with the speed race:
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
LAN Technologies MAC protocols used in LANs, to control access to the channel Token Rings: IEEE (IBM token ring), for computer room, or department.
5: DataLink Layer5-1 Ethernet “dominant” wired LAN technology: r cheap $20 for 100Mbs! r first widely used LAN technology r Simpler, cheaper than token.
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
1 Computer Communication & Networks Lecture 13 Datalink Layer: Local Area Network Waleed Ejaz
Network Technologies Chapter 2. Approaches to Network Communication Connection-Oriented –Circuit-switched –A dedicated connection (circuit) is formed.
Module 8: Ethernet Switching
Link Layer: MAC Ilam University Dr. Mozafar Bag-Mohammadi.
CCNA 3 Week 4 Switching Concepts. Copyright © 2005 University of Bolton Introduction Lan design has moved away from using shared media, hubs and repeaters.
Review: –Ethernet What is the MAC protocol in Ethernet? –CSMA/CD –Binary exponential backoff Is there any relationship between the minimum frame size and.
Data Link Layer Moving Frames. Link Layer Protocols: ethernet, wireless, Token Ring and PPP Has node-to-node job of moving network layer.
5: DataLink Layer5-1 Link Layer r 5.1 Introduction and services r 5.2 Error detection and correction r 5.3Multiple access protocols r 5.4 Link-Layer Addressing.
5: DataLink Layer5-1 CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit entire frame r If channel sensed.
CS 1652 Jack Lange University of Pittsburgh 1. 5: DataLink Layer5-2 MAC Addresses and ARP r 32-bit IP address: m network-layer address m used to get datagram.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Connecting Devices CORPORATE INSTITUTE OF SCIENCE & TECHNOLOGY, BHOPAL Department of Electronics and.
Chapter 11 Extending LANs 1. Distance limitations of LANs 2. Connecting multiple LANs together 3. Repeaters 4. Bridges 5. Filtering frame 6. Bridged network.
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Ch 5. The Link Layer and Local Area Networks Myungchul Kim
EE 122: Lecture 6 Ion Stoica September 13, 2001 (* this talk is based in part on the on-line slides of J. Kurose & K. Rose)
1 Ethernet “dominant” LAN technology: cheap $20 for 100Mbs! first widely used LAN technology Simpler, cheaper than token LANs and ATM Kept up with speed.
1 Multiple Access: Ethernet Section Point-to-Point vs. Broadcast Media Point-to-point –PPP for dial-up access –Point-to-point link between Ethernet.
Computer Communication and Networking Lecture # 4 by Zainab Malik 1.
5: DataLink Layer5-1 Hubs Hubs are essentially physical-layer repeaters: m bits coming from one link go out all other links m at the same rate m no frame.
Links Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
5-1 Last time □ Multiple access protocols ♦ Channel partitioning MAC protocols TDMA, FDMA ♦ Random access MAC protocols Slotted Aloha, Pure Aloha, CSMA,
Link Layer 5.1 Introduction and services
Computer Communication Networks
Hubs Hubs are essentially physical-layer repeaters:
University of Pittsburgh
CS 457 – Lecture 6 Ethernet Spring 2012.
Data Link Issues Relates to Lab 2.
Mac Addressing, Ethernet, and Interconnections
Hubs Hubs are essentially physical-layer repeaters:
Data Link Issues Relates to Lab 2.
Links Jennifer Rexford COS 461: Computer Networks
CS4470 Computer Networking Protocols
Protocol layering and data
18: Ethernet, Hubs, Bridges, Switches
Protocol layering and data
LAN Addresses and ARP IP address: drives the packet to destination network LAN (or MAC or Physical) address: drives the packet to the destination node’s.
Link Layer 5.1 Introduction and services
Presentation transcript:

Links Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in CS 104

Protocol Layers 2 HTTP TCP IP Ethernet interface HTTP TCP IP Ethernet interface IP Ethernet interface Ethernet interface SONET interface SONET interface host router HTTP message TCP segment IP packet Ethernet frame SONET frame

Link = Medium + Adapters 3

What is a Link? 4 Communication MediumNetwork Adapter

Broadcast Links: Shared Media 5

Adaptors Communicating Sending side – Encapsulates packet in a frame – Adds error checking bits, flow control, etc. Receiving side – Looks for errors, flow control, etc. – Extracts datagram and passes to receiving node 6 sending node frame receiving node packet frame adapter link layer protocol packet

Link-Layer Services Encoding – Represent the 0s and 1s Framing – Encapsulate packet into frame, adding header/trailer Error detection – Receiver detecting errors with checksums Error correction – Receiver optionally correcting errors Flow control – Pacing between sending and receiving nodes 7

Addresses 8

Medium Access Control Address Identify the sending and receiving adapter – Unique identifier for each network adapter – Identifies the intended receiver(s) of the frame – … and the sender who sent the frame 9

Medium Access Control Address MAC address (e.g., C A9) – Numerical address used within a link – Unique, hard-coded in the adapter when it is built – Flat name space of 48 bits Hierarchical allocation: Global uniqueness! – Blocks: assigned to vendors (e.g., Dell) by the IEEE – Adapters: assigned by the vendor from its block Broadcast address (i.e., FF-FF-FF-FF-FF-FF) – Send the frame to all adapters 10

As an Aside: Promiscuous Mode Normal adapter: receives frames sent to – The local MAC address – Broadcast address FF-FF-FF-FF-FF-FF Promiscuous mode – Receive everything, independent of destination MAC Useful for packet sniffing – Network monitoring – E.g., wireshark, tcpdump 11

Why Not Just Use IP Addresses? Links can support any network protocol – Not just for IP (e.g., IPX, Appletalk, X.25, …) – Different addresses on different kinds of links An adapter may move to a new location – So, cannot simply assign a static IP address – Instead, must reconfigure the adapter’s IP address Must identify the adapter during bootstrap – Need to talk to the adapter to assign it an IP address 12

Who Am I: Acquiring an IP Address 13 ???? DHCP server Dynamic Host Configuration Protocol (DHCP) – Broadcast “I need an IP address, please!” – Response “You can have IP address ” F7-2B A-2F-BB AD 0C-C4-11-6F-E

Who Are You: Discovering the Receiver Address Resolution Protocol (ARP) – Broadcast “who has IP address ?” – Response “0C-C4-11-6F-E3-98 has !” F7-2B C-C4-11-6F-E

Sharing the Medium 15

Collisions Single shared broadcast channel – Avoid having multiple nodes speaking at once – Otherwise, collisions lead to garbled data F7-2B A-2F-BB AD 0C-C4-11-6F-E3-98

Multi-Access Protocol Divide the channel into pieces – In time – In frequency Take turns – Pass a token for the right to transmit Punt – Let collisions happen – … and detect and recover from them 17

Like Human Conversation… Carrier sense – Listen before speaking – …and don’t interrupt! Collision detection – Detect simultaneous talking – … and shut up! Random access – Wait for a random period of time – … before trying to talk again! 18

Carrier Sense Multiple Access Listen for other senders – Then transmit your data Collisions can still occur – Propagation delay – Wasted transmission 19

CSMA/CD Collision Detection Detect collision – Abort transmission – Jam the link Wait random time – Transmit again Hard in wireless – Must receive data while transmitting 20

Comparing the Three Approaches Channel partitioning is (a) Efficient/fair at high load, inefficient at low load (b) Inefficient at high load, efficient/fair at low load “Taking turns” (a) Inefficient at high load (b) Efficient at all loads (c) Robust to failures Random access (a) Inefficient at low load (b) Efficient at all load (c) Robust to failures 21

Comparing the Three Approaches Channel partitioning is (a) Efficient/fair at high load, inefficient at low load (b) Inefficient at high load, efficient/fair at low load “Taking turns” (a) Inefficient at high load (b) Efficient at all loads (c) Robust to failures Random access (a) Inefficient at low load (b) Efficient at all load (c) Robust to failures 22

Ethernet 23

Ethernet Dominant wired LAN technology First widely used LAN technology Kept up with speed race: 10 Mbps – 40 Gbps Metcalfe’s Ethernet sketch 24

Ethernet Uses CSMA/CD Carrier Sense: wait for link to be idle – Channel idle: start transmitting – Channel busy: wait until idle Collision Detection: listen while transmitting – No collision: transmission is complete – Collision: abort transmission, and send jam signal Random Access: exponential back-off – After collision, wait random time before trying again – After m th collision, choose K randomly from {0, …, 2 m -1} – … and wait for K*512 bit times before trying again 25

Limitations on Ethernet Length Latency depends on physical length of link – Time to propagate a packet from one end to other Suppose A sends a packet at time t – And B sees an idle line at a time just before t+d – … so B happily starts transmitting a packet B detects a collision, and sends jamming signal – But A doesn’t see collision till t+2d latency d A B 26

Limitations on Ethernet Length A needs to wait for time 2d to detect collision – So, A should keep transmitting during this period – … and keep an eye out for a possible collision Imposes restrictions on Ethernet – Maximum length of the wire: 2500 meters – Minimum length of the packet: 512 bits (64 bytes) latency d A B 27

Ethernet Frame Structure Sending adapter encapsulates packet in frame Preamble: synchronization – Seven bytes with pattern , followed by one byte with pattern – Used to synchronize receiver, sender clock rates 28

Ethernet Frame Structure Addresses: source and destination MAC addresses – Adaptor passes frame to network-level protocol If destination is local MAC address or broadcast address – Otherwise, adapter discards frame Type: indicates the higher layer protocol – Usually IP – But also Novell IPX, AppleTalk, … CRC: cyclic redundancy check – Checked at receiver – If error is detected, the frame is simply dropped 29

Unreliable, Connectionless Service Connectionless – No handshaking between send and receive adapter Unreliable – Receiving adapter doesn’t send ACKs or NACKs – Packets passed to network layer can have gaps – Gaps can be filled by transport protocol (e.g., TCP) – Otherwise, the application will see the gaps 30

Hubs and Switches 31

Physical Layer: Repeaters Distance limitation in local-area networks – Electrical signal becomes weaker as it travels – Imposes a limit on the length of a LAN Repeaters join LANs together – Analog electronic device – Continuously monitors electrical signals – Transmits an amplified copy 32

Physical Layer: Hubs Joins multiple input lines electrically – Designed to hold multiple line cards – Do not necessarily amplify the signal Very similar to repeaters – Also operates at the physical layer hub 33

Limitations of Repeaters and Hubs One large shared link – Each bit is sent everywhere – So, aggregate throughput is limited Cannot support multiple LAN technologies – Does not buffer or interpret frames – Can’t interconnect between different rates/formats Limitations on maximum nodes and distances – Shared medium imposes length limits – E.g., cannot go beyond 2500 meters on Ethernet 34

Link Layer: Bridges Connects two or more LANs at the link layer – Extracts destination address from the frame – Looks up the destination in a table – Forwards the frame to the appropriate segment Each segment can carry its own traffic host Bridge 35

Link Layer: Switches Typically connects individual computers – A switch is essentially the same as a bridge – … though typically used to connect hosts Supports concurrent communication – Host A can talk to C, while B talks to D switch A B C D 36

Bridges/Switches: Traffic Isolation Switch filters packets – Frame only forwarded to the necessary segments – Segments can support separate transmissions hub switch/bridge segment 37

Switches vs. Hubs Compared to hubs, Ethernet switches support (a) Larger geographic span (b) Similar span (c) Smaller span Compared to hubs, switches provides (a) Higher load on links (b) Less privacy (c) Heterogenous communication technologies 38

Switches vs. Hubs Compared to hubs, Ethernet switches support (a) Larger geographic span (b) Similar span (c) Smaller span Compared to hubs, switches provides (a) Higher load on links (b) Less privacy (c) Heterogenous communication technologies 39

Self Learning: Building the Table When a frame arrives – Inspect the source MAC address – Associate the address with the incoming interface – Store the mapping in the switch table – Use a timer to eventually forget the mapping A B C D Switch learns how to reach A. 40

Self Learning: Handling Misses When frame arrives with unfamiliar destination – Forward the frame out all of the interfaces – … except for the one where the frame arrived – Hopefully, this case won’t happen very often! A B C D When in doubt, shout! 41

Summary: Multiple Layers Different devices switch different things – Network layer: packets (routers) – Link layer: frames (bridges and switches) – Physical layer: electrical signals (repeaters and hubs) Application Transport Router Bridge, switch Repeater, hub Frame header Packet header TCP header User data 42

Conclusion Links – Connect two or more network adapters – … each with a unique address – … over a shared communication medium Coming next – Friday: Socket Programming “How To” – Monday: Network layer (IP) Get started – On assignment #0 on socket programming 43