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.

Slides:



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

Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University Allon Wagner.
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 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 School of Computing Science Simon Fraser University CMPT 771/471: Internet Architecture and Protocols Link Layer Instructor: Dr. Mohamed Hefeeda.
Roadmap 1.1 What is the Internet? 1.2 Network edge 1.3 Network core 1.4 Network access and physical media 1.5 Internet structure and ISPs 1.6 Delay & loss.
5: DataLink Layer5-1 Link Layer r Link layer services r Error detection and correction r Multiple access protocols r 5.4 Link-Layer Addressing r 5.5 Ethernet.
1 Last class r Random Access Protocols m Slotted Aloha m Aloha m CSMA/CD m “Taking Turns” Protocols r Link-Layer Addressing Today r Ethernet, Hubs and.
5: DataLink Layer – Ethernet, Hubs and Switches.
Chapter 5 Link Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 22.
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:
1 CSE401N: COMPUTER NetworkS LAN address & ARP Ethernet Basics.
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.
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.
LAN Technologies. LAN technologies Data link layer so far: –services, error detection/correction, multiple access Next: LAN technologies –addressing –Ethernet.
Introduction 1 Lecture 25 Link Layer (Ethernet, Switch) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
LANs to WANs Management guide w.lilakiatsakun Text book LANs to WANs The complete management guide.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 26 Omar Meqdadi Department of Computer Science and Software Engineering.
Network LayerII-1 RSC Part II: Network Layer 4. IP in operation Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
5: DataLink Layer5-1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
1 Random Access Protocols r When node has packet to send m transmit at full channel data rate R. m no a priori coordination among nodes  two or more transmitting.
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 Chapter 5 Link Layer and LANs Part 4: Link Layer addressing Ethernet Computer Networking: A Top Down Approach 6 th edition Jim Kurose,
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
5: DataLink Layer5-1 Chapter 5 Link Layer and LANs A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students,
Chapter 5 Link Layer Link Layer5-1 Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter5_2.
Link Layer Fundamentals NWEN302 Computer Network Design.
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.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer LANs.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Link Layer5-1.
5: DataLink Layer5-1 CSMA (Carrier Sense Multiple Access) CSMA: listen before transmit: If channel sensed idle: transmit entire frame r If channel sensed.
EEC-484 Computer Networks Lecture 13 Wenbing Zhao 12/6/20151.
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.
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.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao
Net5: ARP 協定 授課教師:雲林科技大學 張慶龍 老師. IP Address/Physical Address Static Mapping  IP broadcast address maps to Ethernet broadcast address  IP Multicast Address.
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.
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.
5: DataLink Layer5-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m.
5: DataLink Layer5-1 Link-layer switches. 5: DataLink Layer5-2 Hubs … physical-layer (“dumb”) repeaters: m bits coming in one link go out all other links.
CSEN 404 Data Link Layer Amr El Mougy Lamia AlBadrawy.
4: DataLink Layer1 LAN technologies Data link layer so far: m services, error detection/correction, multiple access Next: LAN technologies m addressing.
CPSC 441: Link Layer1 Link Layer Addressing Slides originally from Carey Williamson Notes derived from “ Computer Networking: A Top Down Approach”, by.
Chapter 5 Link Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
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
Link Layer 5.1 Introduction and services
Random Access Protocols
MAC Addresses and ARP 32-bit IP address:
Hubs Hubs are essentially physical-layer repeaters:
University of Pittsburgh
ARP: Address Resolution Protocol
Mac Addressing, Ethernet, and Interconnections
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.
Chapter 5 Data Link Layer – Hub, Switch
Link Layer 5.1 Introduction and services
Presentation transcript:

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 to destination IP subnet r MAC (or LAN or physical or Ethernet) address: m function: get frame from one interface to another physically-connected interface (same network) m 48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable

5: DataLink Layer5-3 LAN Addresses and ARP Each adapter on LAN has unique LAN address Broadcast address = FF-FF-FF-FF-FF-FF = adapter 1A-2F-BB AD D7-FA-20-B0 0C-C4-11-6F-E F7-2B LAN (wired or wireless)

5: DataLink Layer5-4 LAN Address (more) r MAC address allocation administered by IEEE r Manufacturer buys portion of MAC address space (to assure uniqueness) r Analogy: m (a) MAC address: Your name m (b) IP address: Your postal address  MAC flat address ➜ portability m can move LAN card from one LAN to another r IP hierarchical address NOT portable m address depends on IP subnet to which node is attached

5: DataLink Layer5-5 ARP: Address Resolution Protocol r Each IP node (host, router) on LAN has ARP table r ARP table: IP/MAC address mappings for some LAN nodes m TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) Question: how to determine MAC address of B knowing B’s IP address? 1A-2F-BB AD D7-FA-20-B0 0C-C4-11-6F-E F7-2B LAN

5: DataLink Layer5-6 ARP protocol: Same LAN (network) r A wants to send datagram to B, and B’s MAC address not in A’s ARP table. r A broadcasts ARP query packet, containing B's IP address m dest MAC address = FF- FF-FF-FF-FF-FF m all machines on LAN receive ARP query r B receives ARP packet, replies to A with its (B's) MAC address m frame sent to A’s MAC address (unicast) r A caches (saves) IP-to- MAC address pair in its ARP table until information becomes old (times out) m soft state: information that times out (goes away) unless refreshed r ARP is “plug-and-play”: m nodes create their ARP tables without intervention from net administrator

5: DataLink Layer5-7 Addressing: routing to another LAN R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D A C-E8-FF B2-2F-54-1A-0F B BD-D2-C7-56-2A walkthrough: send datagram from A to B via R assume A knows B’s IP address r two ARP tables in router R, one for each IP network (LAN)

5: DataLink Layer5-8 r A creates IP datagram with source A, destination B r A uses ARP to get R’s MAC address for r A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram r A’s NIC sends frame r R’s NIC receives frame r R removes IP datagram from Ethernet frame, sees its destined to B r R uses ARP to get B’s MAC address r R creates frame containing A-to-B IP datagram sends to B R 1A-23-F9-CD-06-9B E6-E BB-4B CC-49-DE-D0-AB-7D A C-E8-FF B2-2F-54-1A-0F B BD-D2-C7-56-2A This is a really important example – make sure you understand how this works!

Ethernet 9

5: DataLink Layer5-10 Ethernet “dominant” wired LAN technology: r cheap $0-10 for NIC r first widely used LAN technology r simpler, cheaper than token LANs and ATM r kept up with speed race: 10 Mbps – 100 Gbps Metcalfe’s Ethernet sketch

5: DataLink Layer5-11 Star topology r Bus topology popular through mid 90s m all nodes in same collision domain (can collide with each other) r Today: star topology prevails m active switch in center m each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) switch bus: coaxial cable star

5: DataLink Layer5-12 Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble: 8 bytes m 7 bytes with pattern followed by one byte with pattern m used to synchronize receiver, sender clock rates

5: DataLink Layer5-13 Ethernet Frame Structure (more) r Addresses: 6 bytes m if adapter receives frame with matching destination address, or with broadcast address (eg ARP packet), it passes data in frame to network layer protocol m otherwise, adapter discards frame r Type: 2 bytes m indicates higher layer protocol (mostly IP but others possible, e.g., Novell IPX, AppleTalk) r CRC: 4 bytes m checked at receiver, if error is detected, frame is dropped

5: DataLink Layer5-14 Ethernet: Unreliable, connectionless r connectionless: No handshaking between sending and receiving NICs r unreliable: receiving NIC doesn’t send acks or nacks to sending NIC m stream of datagrams passed to network layer can have gaps (missing datagrams) m gaps will be filled if app is using TCP m otherwise, app will see gaps r Ethernet’s MAC protocol: unslotted CSMA/CD

5: DataLink Layer5-15 Ethernet CSMA/CD algorithm 1. NIC receives datagram from network layer, creates frame 2. If NIC senses channel idle, starts frame transmission If NIC senses channel busy, waits until channel idle, then transmits 3. If NIC transmits entire frame without detecting another transmission, NIC is done with frame ! 4. If NIC detects another transmission while transmitting, aborts and sends jam signal 5. After aborting, NIC enters exponential backoff: after mth collision, NIC chooses K at random from {0,1,2,…,2 m -1}. NIC waits K·512 bit times, returns to Step 2

5: DataLink Layer5-16 Ethernet’s CSMA/CD (more) Jam Signal: make sure all other transmitters are aware of collision; 48 bits Bit time: 0.1 microsec for 10 Mbps Ethernet ; for K=1023, wait time is about 50 msec Exponential Backoff: r Goal: adapt retransmission attempts to estimated current load m heavy load: random wait will be longer r first collision: choose K from {0,1}; delay is K· 512 bit transmission times r after second collision: choose K from {0,1,2,3}… r after ten collisions, choose K from {0,1,2,3,4,…,1023}

5: DataLink Layer5-17 CSMA/CD efficiency r t prop = max prop delay between 2 nodes in LAN r t trans = time to transmit max-size frame r efficiency goes to 1 m as t prop goes to 0 r better performance than ALOHA: and simple, cheap, decentralized !

5: DataLink Layer Ethernet Standards: Link & Physical Layers r many different Ethernet standards m common MAC protocol and frame format m different speeds: 2 Mbps, 10 Mbps, 100 Mbps, 1Gbps, 10Gbps m different physical layer media: fiber, cable application transport network link physical MAC protocol and frame format 100BASE-TX 100BASE-T4 100BASE-FX 100BASE-T2 100BASE-SX 100BASE-BX fiber physical layer copper (twisted pair) physical layer

5: DataLink Layer5-19 Manchester encoding r used in 10BaseT r each bit has a transition r allows clocks in sending and receiving nodes to synchronize to each other m no need for a centralized, global clock among nodes clock

Link-layer Switches 20

5: DataLink Layer5-21 Hubs … physical-layer (“dumb”) repeaters: m bits coming in one link go out all other links at same rate m all nodes connected to hub can collide with one another m no frame buffering m no CSMA/CD at hub: host NICs detect collisions twisted pair hub

5: DataLink Layer5-22 Switch r Link-layer device: smarter than hubs, take active role m Store and forward Ethernet frames m examine incoming frame’s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment r Transparent m hosts are unaware of presence of switches r Plug-and-play, self-learning m switches do not need to be configured

5: DataLink Layer5-23 Switch: allows multiple simultaneous transmissions r Hosts have dedicated, direct connection to switch r Switches buffer packets r Ethernet protocol used on each incoming link, but no collisions; full duplex m each link is its own collision domain r Switching: A-to-A’ and B- to-B’ simultaneously, without collisions m not possible with dumb hub A A’ B B’ C C’ switch with six interfaces (1,2,3,4,5,6)

5: DataLink Layer5-24 Switch Table r Q: how does switch know that A’ reachable via interface 4, B’ reachable via interface 5? r A: each switch has a switch table, each entry: m (MAC address of host, interface to reach host, time stamp) r looks like a routing table! r Q: how are entries created, maintained in switch table? m something like a routing protocol? A A’ B B’ C C’ switch with six interfaces (1,2,3,4,5,6)

5: DataLink Layer5-25 Switch: self-learning r switch learns which hosts can be reached through which interfaces m when frame received, switch “learns” location of sender: incoming LAN segment m records sender/location pair in switch table A A’ B B’ C C’ A A’ Source: A Dest: A’ MAC addr interface TTL Switch table (initially empty) A 1 60

5: DataLink Layer5-26 Self-learning, forwarding: example A A’ B B’ C C’ A A’ Source: A Dest: A’ MAC addr interface TTL Switch table (initially empty) A 1 60 A A’ r frame destination unknown: flood A’ A r destination A location known: A’ 4 60 selective send

5: DataLink Layer5-27 Interconnecting switches r switches can be connected together A B r Q: sending from A to G - how does S 1 know to forward frame destined to F via S 4 and S 3 ? r A: self learning! (works exactly the same as in single-switch case!) S1S1 C D E F S2S2 S4S4 S3S3 H I G

5: DataLink Layer5-28 Switches vs. Routers r both store-and-forward devices m routers: network layer devices (examine network layer headers) m switches are link layer devices r routers maintain routing tables, implement routing algorithms r switches maintain switch tables, implement filtering, learning algorithms

5: DataLink Layer5-29 Institutional network to external network router IP subnet mail server web server

5: DataLink Layer5-30 Switch: frame filtering/forwarding When frame received: 1. Record link associated with sending host 2. Look up switch table using MAC dest address 3. if entry found for destination then { if dest on segment from which frame arrived then drop the frame else forward the frame on interface indicated } else flood forward on all but the interface on which the frame arrived

5: DataLink Layer5-31 Self-learning multi-switch example Suppose C sends frame to I, I responds to C A B S1S1 C D E F S2S2 S4S4 S3S3 H I G 1 2