CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. **Slides are attributed to J. F. Kurose

Similar documents
Link Layer and LANs. CMPS 4750/6750: Computer Networks

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Principles behind data link layer services:

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CS 3516: Advanced Computer Networks

Link layer: introduction

Principles behind data link layer services

Principles behind data link layer services:

Principles behind data link layer services:

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

CC451 Computer Networks

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Chapter 6 The Link Layer and LANs

Broadcast Links, Addressing and Media Access Control. Link Layer B. Link and Physical Layers. MAC Addresses

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

CSCD 330 Network Programming Spring 2017

The Link Layer and LANs: Ethernet and Swiches

Summary of MAC protocols

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

CSC 4900 Computer Networks: Link Layer (2)

Lecture 20: Link Layer

Chapter 4. DataLink Layer. Reference: Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Chapter 5 Link Layer and LANs

CSCD 330 Network Programming Winter 2016

Medium Access Protocols

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Chapter 5 Link Layer and LANs

CS 455/555 Intro to Networks and Communications. Link Layer Addressing, Ethernet, and a Day in the Life of a Web Request

Master Course Computer Networks IN2097

Module 10 Data Link Layer CS655! 10-1!

Chapter 6 The Link Layer and LANs

Lecture 9 Ethernet and other Link Layer protocols

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

Chapter 5 Data Link Layer

Chapter 5 Link Layer. Down Approach. Computer Networking: A Top. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Master Course Computer Networks IN2097

Lecture 19. Principles behind data link layer services Framing Multiple access protocols

CSCI Computer Networks Spring 2017

CS 457 Lecture 11 More IP Networking. Fall 2011

CSCI Computer Networks Fall 2016

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Chapter 6 The Link Layer and LANs

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Chapter V: Link Layer

Chapter 6 The Link Layer and LANs

Data Communication & Computer Networks Week # 13

CSEN 503 Introduction to Communication Networks. Mervat AbuElkheir Hana Medhat Ayman Dayf. ** Slides are attributed to J. F.

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 18

CSCD 330 Network Programming Winter Lecture 17b Link Layer Protocols Who is this? Reading: Chapter 5

Chapter 5 Link Layer. Link Layer 5-1

Link Layer: CSMA/CD, MAC addresses, ARP

Chapter 6 The Link Layer and LANs

Reminder: Datalink Functions Computer Networking. Datalink Architectures

SC250 Computer Networking I. Link Layer. Prof. Matthias Grossglauser LCA/I&C.

Chapter 5: DataLink Layer

Module 4 Data Link Layer CS655! 4-1!

Chapter V: Link Layer

CS 3516: Computer Networks

Chapter 5: Link layer

CS118 Discussion 1A, Week 9. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.

INTRODUCTION, SERVICES. Data-link layer has responsibility of transferring datagram from one node to physically adjacent node over a link

Chapter 5: Link layer

Topic 2a. Ch 6: The Link Layer and LANs. Computer Networking: A Top Down Approach

Link layer, LANs: outline. Chapter 5-2 Link Layer. MAC addresses (more) MAC addresses

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

Unit C - Network Addressing Objectives Purpose of an IP Address and Subnet Mask Purpose of an IP Address and Subnet Mask

LINK LAYER AND LANS 1

Data Link Layer: Multi Access Protocols

Link Layer and Ethernet

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

Link Layer and Ethernet

Chapter 5: The Data Link Layer

transferring datagram from one node data-link layer has responsibility of to adjacent node over a link 5-1 TDTS06 Computer networks

ECE 158A: Lecture 13. Fall 2015

Project 3a is out! Goal: implement a basic network firewall. l We give you the VM & framework. l You implement the firewall logic.

Homework 4 assignment for ECE374 Posted: 04/06/15 Due: 04/13/15

Chapter 6 The Data Link layer

Internet protocol stack

Cisco Interconnecting Cisco Networking Devices Part 1.

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Link Layer: Introduction. Chapter 5 Link Layer & LANS. Link layer: context. Link Layer Services

Chapter 5 Link Layer. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Computer Networks Principles LAN - Ethernet

Chapter 6 The Link Layer and LANs

Random Access. 1. Aloha. 2. Slotted Aloha 3. CSMA 4. CSMA/CD

Chapter 6 The Link Layer and LANs

Chapter 6 The Link Layer and LANs

The Link Layer and LANs. Chapter 6: Link layer and LANs

Computer Communication Networks Link

Midterm Review. Topics. Review: Network. Review: Network. Layers & Protocols. Review: Network WAN. Midterm Review EECS 122 EECS 122

Midterm Review EECS 122. University of California Berkeley

CSMA/CD (Collision Detection)

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Transcription:

CSEN 503 Introduction to Communication Networks Mervat AbuElkheir Hana Medhat Ayman Dayf **Slides are attributed to J. F. Kurose

1-2 Link Layer

Link Layer: Introduction Some terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links wired links wireless links LANs layer-2 packet is a frame, encapsulates datagram data-link layer has responsibility of transferring datagram from one node to adjacent node over a link

Link Layer Functions 1-4 Framing Medium Access Control (MAC) Reliable delivery Flow control Error detection and correction

IP Address vs. MAC Address 5-5 32-bit IP address: network-layer address used to get datagram to destination IP subnet MAC (or LAN or physical or Ethernet) address: function: get frame from one interface to another physicallyconnected interface (same network) 48 bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable Each network card (adapter) has a permanent unique MAC address (a.k.a hardware address, physical address, LAN address) represented in hexadecimal notation 5: DataLink Layer

IP Address vs. MAC Address 5-6 IP Address xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 223 191 056 008 MAC Address xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx 1C 22 F3 D1 42 A9 5: DataLink Layer

LAN Addresses and ARP 5-7 Each adapter on LAN has unique LAN address 1A-2F-BB-76-09-AD Broadcast address = FF-FF-FF-FF-FF-FF 71-65-F7-2B-08-53 LAN (wired or wireless) 58-23-D7-FA-20-B0 = adapter 0C-C4-11-6F-E3-98 5: DataLink Layer

LAN Address (more) 5-8 MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) analogy: (a) MAC address: like Social Security Number, SIN (b) IP address: like postal address MAC flat address portability can move LAN card from one LAN to another IP hierarchical address NOT portable address depends on IP subnet to which node is attached 5: DataLink Layer

MACs in Frame 1-9 Starting at A, given IP datagram addressed to B: look up net. address of B, find B on same net. as A link layer send datagram to B inside link-layer frame

ARP: Address Resolution Protocol 5-10 Each IP node (host, router) on LAN has ARP table 137.196.7.78 1A-2F-BB-76-09-AD ARP table: IP/MAC address mappings for some LAN nodes < IP address; MAC address; TTL> 137.196.7.23 71-65-F7-2B-08-53 LAN 137.196.7.14 58-23-D7-FA-20-B0 TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) 137.196.7.88 0C-C4-11-6F-E3-98

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

Addressing: routing to another LAN 5-12 walkthrough: send datagram from A to B via R assume A knows B s IP address 74-29-9C-E8-FF-55 A 88-B2-2F-54-1A-0F 193.154.112.111 LAN E6-E9-00-17-BB-4B 1A-23-F9-CD-06-9B 222.182.191.007 193.154.112.110 LAN 222.182.191.008 222.182.191.009 B 193.154.112.112 49-BD-D2-C7-56-2A CC-49-DE-D0-AB-7D two ARP tables in router R, one for each IP network (LAN) 5: DataLink Layer

5-13 A creates IP datagram with source A, destination B A uses ARP to get R s MAC address for 111.111.111.110 A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram A s NIC sends frame R s NIC receives frame R removes IP datagram from Ethernet frame, sees its destined to B R uses ARP to get B s MAC address R creates frame containing A-to-B IP datagram sends to B 74-29-9C-E8-FF-55 A 111.111.111.111 E6-E9-00-17-BB-4B 1A-23-F9-CD-06-9B 88-B2-2F-54-1A-0F 222.222.222.221 111.111.111.112 CC-49-DE-D0-AB-7D 222.222.222.220 111.111.111.110 R 5: DataLink Layer 222.222.222.222 B 49-BD-D2-C7-56-2A

Switches and Routers 1-14 Larger networks require routers as they have better traffic isolation and can find better routes Routers Switches Traffic Isolation Yes Yes Plug and Play No Yes Optimal Routing Yes No

Multiple Access for Radio Channels 1-15 Wireless radio is a broadcast link Link divided to channels with separate frequencies Hosts compete for channel access If more than one host attempts to use the same channel at one time to transmit information, collision occurs Collision signals in the same frequency range are jammed Receiver cannot interpret signal

Multiple Access for Radio Channels 1-16 Protocols are designed to avoid collisions Design a way to give one host exclusive access to channel at a given time Protocols are designed to either: Detect and resolve collision after it happens Or prevent collision from happening

Multiple Access Radio Channels 1-17 Contention-based Methods Host may use the shared channel to transmit message at any time, hoping that no other hosts will transmit at the same time But other hosts may decide to use the shared channel at the exact same time! Protocol needs to provide a mechanism for retransmitting collided messages Random access protocols allow an host to retransmit a collided message only after a random delay

Multiple Access Pure ALOHA 1-18 Developed in the 70s @ University of Hawaii Each MS generates packets, all with fixed transmission length T If host is trying to send/resend a packet, it cannot generate a new packet

Pure ALOHA - Protocol 1-19 1. When host has a packet to send, it sends it right away 2. If sender host detects data from another host, it concludes that a collision has occurred 3. If collision occurs, packet is retransmitted after random delay

Slotted ALOHA 1-20 Proposed to improve the throughput of Pure ALOHA Use slotted time with slot size equal to packet transmission duration Improves Pure ALOHA by reducing the length of the vulnerable period to a single slot But synchronization of time slots between hosts is crucial

Slotted ALOHA Protocol 1-21 If host has a packet to send, it waits until the beginning of the next slot before it sends the packet Transmission will be successful if and only if exactly one packet is scheduled for current slot Full collision; no partial collisions What does partial collision mean?

Carrier Sense Multiple Access/Collision 1-22 Detection Improve throughput of ALOHA and slotted ALOHA Support high-speed communications Attempt to prevent collisions! Listen to channel before transmit to check if other hosts are using it

CSMA/CD 1-23 1. When MS has packet to send, it senses channel 2. If channel is busy, host waits until channel becomes idle 3. If channel is idle, host transmits packet immediately 4. If collision is detected during transmission, host aborts transmission and attempts retransmit after random time period

A Day in the Life of a Webpage Request GUC 68.85.2.0/24 DNS Server 68.87.71.226 Bob 00:16:D3:23:63:8A ISP 68.80.0.0/13 00:22:6B:45:1F:1B 68.85.2.1 Bob wishes to retrieve a page from www.google.com Bob has just booted up the computer www.google.com 68.233.169.105 Google 68.233.160.0/19

A Day in the Life of a Webpage Request 68 67 0.0.0.0 255.255.255.255 00:16:D3:23:63:8A FF:FF:FF:FF:FF:FF GUC 68.85.2.0/24 DNS Server 68.87.71.226 Bob 00:16:D3:23:63:8A ISP 68.80.0.0/13 00:22:6B:45:1F:1B 68.85.2.1 Yiaddr: 68.85.2.101 67 68 68.85.2.1 255.255.255.255 00:22:6B:45:1F:1B 00:16:D3:23:63:8A DHCP ACK also includes IP of default gateway (router in this case) and DNS server www.google.com 68.233.169.105 Google 68.233.160.0/19 25

A Day in the Life of a Webpage Request ARP Query 68.85.2.101 68.85.2.1 00:16:D3:23:63:8A FF:FF:FF:FF:FF:FF GUC 68.85.2.0/24 DNS Server 68.87.71.226 Bob 00:16:D3:23:63:8A 68.85.2.101 ISP 68.80.0.0/13 00:22:6B:45:1F:1B 68.85.2.1 ARP Reply 68.85.2.1 68.85.2.101 00:22:6B:45:1F:1B 00:16:D3:23:63:8A Before sending a DNS query, Bob must first discover the MAC address of the router through ARP www.google.com 68.233.169.105 Google 68.233.160.0/19 26

A Day in the Life of a Webpage Request DNS query: www.google.com 61334 53 68.85.2.101 68.87.71.226 00:16:D3:23:63:8A 00:22:6B:45:1F:1B GUC 68.85.2.0/24 DNS reply: 68.233.169.105 53 61334 68.87.71.226 68.85.2.101 MAC of DNS MAC of default R DNS Server 68.87.71.226 Bob 00:16:D3:23:63:8A 68.85.2.101 ISP 68.80.0.0/13 00:22:6B:45:1F:1B 68.85.2.1 To send HTTP request, Bob s browser has to create a TCP socket. Thus, it needs the IP address of www.google.com www.google.com 68.233.169.105 Google 68.233.160.0/19 27

A Day in the Life of a Webpage Request 52122 80 68.85.2.101 68.233.169.105 00:16:D3:23:63:8A 00:22:6B:45:1F:1B GUC 68.85.2.0/24 DNS Server 68.87.71.226 Bob 00:16:D3:23:63:8A 68.85.2.101 ISP 68.80.0.0/13 00:22:6B:45:1F:1B 68.85.2.1 To establish TCP connection, TCP SYN packet is sent 80 52122 68.233.169.105 68.85.2.101 www.google.com 68.233.169.105 Google 68.233.160.0/19 MAC of web server MAC of default R 28

A Day in the Life of a Webpage Request HTTP Request: google search 52122 80 68.85.2.101 68.233.169.105 00:16:D3:23:63:8A 00:22:6B:45:1F:1B GUC 68.85.2.0/24 DNS Server 68.87.71.226 Bob 00:16:D3:23:63:8A 68.85.2.101 ISP 68.80.0.0/13 00:22:6B:45:1F:1B 68.85.2.1 Finally HTTP request can be sent HTTP Reply: search results 80 52122 68.233.169.105 68.85.2.101 www.google.com 68.233.169.105 Google 68.233.160.0/19 MAC of web server MAC of default R 29