Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 5565 Network Architecture and Protocols

Similar presentations


Presentation on theme: "CS 5565 Network Architecture and Protocols"— Presentation transcript:

1 CS 5565 Network Architecture and Protocols
Lecture 23 Godmar Back

2 Announcements Project 2B due in 2 parts: Extra Credit Opportunities:
Apr 29 and May 6 Extra Credit Opportunities: Expand simulator (and your implementation) to introduce multiple link failures and link resurrection Additional, requiring reading posted Andersen et al [SIGCOMM’08]: Accountable Internet Protocol (AIP) Casado et al [HotNets’08]: Rethinking Packet Forwarding Hardware CS 5565 Spring 2009 7/4/2018

3 Error Detection & Correction
Data Link Layer Error Detection & Correction

4 Error Detection EDC= Error Detection and Correction bits (redundancy)
D = Data protected by error checking, may include header fields Error detection not 100% reliable! protocol may miss some errors, but rarely larger EDC field yields better detection and correction CS 5565 Spring 2009 7/4/2018

5 Coding Theory Coding Theory is the study of codes and their properties
Error Detection Codes: CRC, Parity, Checksums Error Correction Codes: FEC – Forward Error Correction: Hamming, Reed Solomon General guidelines to evaluate effectiveness of codes Minimum distance of codes Burst-detecting capabilities Probability that random string is accepted as error free CS 5565 Spring 2009 7/4/2018

6 Parity Checking Two Dimensional Bit Parity: Single Bit Parity:
Detect single bit errors Two Dimensional Bit Parity: Detect and correct single bit errors Odd Parity: odd number of 1’s, including parity bit Parity works well if single random bit flips – does not handle burst errors well 2D Parity can be used to correct single bit error CS 5565 Spring 2009 7/4/2018

7 Hamming Codes (1) Hamming Distance between codes: Suppose you encode
Number of bits you have to change to transform one code word to another Suppose you encode 0 as 000 1 as 111 Source: CS 5565 Spring 2009 7/4/2018

8 Hamming Codes (2) Correct 1-bit error Hamming Rule d+p+1 ≤ 2p
Detect 2-bit error Hamming Rule d+p+1 ≤ 2p d – number of data bits p – number of parity bits (d+p, d) code Example d = 7, p = 4 12 ≤ 2^4 (11, 7) code CS 5565 Spring 2009 7/4/2018

9 Internet Checksum RFC 1071: used for UDP/TCP segments & IP header
treat segment contents as sequence of 16-bit integers checksum: 1’s complement sum of segment contents 1’s complement sum: carry wraps around and is added, if any somewhat higher probability to declare segments correct for real data with many zeros [Partridge 95] CS 5565 Spring 2009 7/4/2018

10 Internet Checksum (2) u_short cksum(u_short *buf, int count) {
register u_long sum = 0; while (count--) { sum += *buf++; if (sum & 0xFFFF0000) { /* carry, so wrap around */ sum &= 0xFFFF; sum++; } return ~(sum & 0xFFFF); CS 5565 Spring 2009 7/4/2018

11 Checksumming: Cyclic Redundancy Check
view data bits, D, as a binary number choose r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that <D,R> exactly divisible by G (modulo 2) receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits widely used in practice (ATM, HDLC) CS 5565 Spring 2009 7/4/2018

12 CRC Example Want: D.2r XOR R = nG equivalently: D.2r = nG XOR R
if we divide D.2r by G, want remainder R D.2r G R = remainder[ ] CS 5565 Spring 2009 7/4/2018

13 CRC (cont’d) Formulation often as polynomials over algebraic field {0, 1}, e.g. G = x3 + 1 D = x5 + x3 + x2 + x CRC-32 IEEE polynomial x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 detects all burst errors up to 32bits detects all burst errors of odd length CS 5565 Spring 2009 7/4/2018

14 Multiple Access Protocols & Link Layer Addressing

15 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: used to get datagram from one interface to another physically-connected interface (same network) 48 bit MAC address (for most LANs) burned in the adapter ROM MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) CS 5565 Spring 2009 7/4/2018

16 Each adapter on LAN has unique LAN address
LAN Addresses and ARP Each adapter on LAN has unique LAN address 1A-2F-BB AD 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 71-65-F7-2B-08-53 LAN (wired or wireless) Broadcast address = FF-FF-FF-FF-FF-FF = adapter CS 5565 Spring 2009 7/4/2018

17 ARP: Address Resolution Protocol
Question: how to determine MAC address of B knowing B’s IP address? Each IP node (Host, Router) on LAN has ARP table ARP Table: IP/MAC address mappings for some LAN nodes < IP address; MAC address; TTL> TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) 1A-2F-BB AD 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 71-65-F7-2B-08-53 LAN CS 5565 Spring 2009 7/4/2018

18 ARP Protocol ARP is “plug-and-play”:
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 CS 5565 Spring 2009 7/4/2018

19 Interaction of ARP and Routing
Send datagram from A to B via R A R B Two ARP tables in router R, one for each IP network (LAN) CS 5565 Spring 2009 7/4/2018

20 Proxy ARP Default Gateway LAN Point-To-Point Link, e.g. dialup with subnet /30 Upstream Internet 58-23-D7-FA-20-B0 uses /24 answers ARP requests for See arp(8), “arp –s … pub” Forwards IP datagrams along uses as default gateway CS 5565 Spring 2009 7/4/2018

21 DHCP Dynamic Host Configuration Protocol Uses MAC-level broadcast
Precursors: RARP – Reverse ARP, bootp Uses MAC-level broadcast DHCP Discovery (“what DHCP servers are out there and who can give me an IP address?”) DHCP Offer (“you may use this address”) May be more than one DHCP Request (“I’d like to use this address”) DHCP Ack (“please do”) DHCP relay agents for larger networks. CS 5565 Spring 2009 7/4/2018


Download ppt "CS 5565 Network Architecture and Protocols"

Similar presentations


Ads by Google