STEVEN R. BAGLEY PACKETS

Similar documents
Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

OSI Layer OSI Name Units Implementation Description 7 Application Data PCs Network services such as file, print,

ECE4110 Internetwork Programming. Introduction and Overview

Introduction to TCP/IP networking

file:///c:/users/hpguo/dropbox/website/teaching/fall 2017/CS4470/H...

User Datagram Protocol

Position of IP and other network-layer protocols in TCP/IP protocol suite

6.033 Lecture 12 3/16/09. Last time: network layer -- how to deliver a packet across a network of multiple links

Lecture 7: Flow Control"

Protocol Layers & Wireshark TDTS11:COMPUTER NETWORKS AND INTERNET PROTOCOLS

IP Packet Switching. Goals of Todayʼs Lecture. Simple Network: Nodes and a Link. Connectivity Links and nodes Circuit switching Packet switching

ERROR AND FLOW CONTROL. Lecture: 10 Instructor Mazhar Hussain

Goal of Today s Lecture. EE 122: Designing IP. The Internet Hourglass. Our Story So Far (Context) Our Story So Far (Context), Con t

CS4700/CS5700 Fundamentals of Computer Networks

CSE/EE 461 Lecture 13 Connections and Fragmentation. TCP Connection Management

Packet Header Formats

Networking Link Layer

Networking Technologies and Applications

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

19: Networking. Networking Hardware. Mark Handley

Internetworking Models The OSI Reference Model

Connectionless and Connection-Oriented Protocols OSI Layer 4 Common feature: Multiplexing Using. The Transmission Control Protocol (TCP)

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

INTERNET SYSTEM. Internet Protocol. Kent State University Dept. of Computer Science. CS 4/55231 Internet Engineering. Large Scale Networking

Lecture (11) OSI layer 4 protocols TCP/UDP protocols

Overview. Internetworking and Reliable Transmission. CSE 561 Lecture 3, Spring David Wetherall. Internetworking. Reliable Transmission

Transport Layer Marcos Vieira

Communications Software. CSE 123b. CSE 123b. Spring Lecture 2: Internet architecture and. Internetworking. Stefan Savage

Lecture 7: Sliding Windows. CSE 123: Computer Networks Geoff Voelker (guest lecture)

CSE 123: Computer Networks Alex C. Snoeren. HW 1 due NOW!

CSCI-GA Operating Systems. Networking. Hubertus Franke

Network Model. Why a Layered Model? All People Seem To Need Data Processing

CS 123: Lecture 12, LANs, and Ethernet. George Varghese. October 24, 2006

ECE 435 Network Engineering Lecture 15

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

Your favorite blog : (popularly known as VIJAY JOTANI S BLOG..now in facebook.join ON FB VIJAY

Lecture 11 Overview. Last Lecture. This Lecture. Next Lecture. Medium Access Control. Flow and error control Source: Sections , 23.

Goals and topics. Verkkomedian perusteet Fundamentals of Network Media T Circuit switching networks. Topics. Packet-switching networks

CS 421: COMPUTER NETWORKS SPRING FINAL May 24, minutes. Name: Student No: TOT

OSI Network Layer. Network Fundamentals Chapter 5. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Chapter 5 Network Layer

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

Introduction to Internet. Ass. Prof. J.Y. Tigli University of Nice Sophia Antipolis

416 Distributed Systems. Networks review; Day 1 of 2 Jan 5 + 8, 2018

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

EE 610 Part 2: Encapsulation and network utilities

Lecture 4: CRC & Reliable Transmission. Lecture 4 Overview. Checksum review. CRC toward a better EDC. Reliable Transmission

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

CS164 Final Exam Winter 2013

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

ECE 435 Network Engineering Lecture 10

The Network Layer. Antonio Carzaniga. April 22, Faculty of Informatics University of Lugano Antonio Carzaniga

User Datagram Protocol (UDP):

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

II. Principles of Computer Communications Network and Transport Layer

Telecom Systems Chae Y. Lee. Contents. Overview. Issues. Addressing ARP. Adapting Datagram Size Notes

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] Frequently asked questions from the previous class surveys

CS519: Computer Networks. Lecture 2: Feb 2, 2004 IP (Internet Protocol)

ECE 158A: Lecture 7. Fall 2015

Internet II. CS10 : Beauty and Joy of Computing. cs10.berkeley.edu. !!Senior Lecturer SOE Dan Garcia!!! Garcia UCB!

The MAC Address Format

Introduction to Internetworking

CSE/EE 461 The Network Layer. Application Presentation Session Transport Network Data Link Physical

Internet Networking recitation #2 IP Checksum, Fragmentation

Network Protocols. Sarah Diesburg Operating Systems CS 3430

Outline: Connecting Many Computers

NWEN 243. Networked Applications. Layer 4 TCP and UDP

TCP Strategies. Keepalive Timer. implementations do not have it as it is occasionally regarded as controversial. between source and destination

ECE 4450:427/527 - Computer Networks Spring 2017

Data Link Layer: Overview, operations

16.682: Communication Systems Engineering. Lecture 17. ARQ Protocols

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

Communication Networks

The Data Link Layer Chapter 3

ECE 650 Systems Programming & Engineering. Spring 2018

Multiple unconnected networks

Your Name: Your student ID number:

Configuring IP Services

COMP/ELEC 429/556 Introduction to Computer Networks

Goals for Today s Class. EE 122: Networks & Protocols. What Global (non-digital) Communication Network Do You Use Every Day?

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

Introduction to Networks and the Internet

I. INTRODUCTION. each station (i.e., computer, telephone, etc.) directly connected to all other stations

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Reliable Transport I: Concepts and TCP Protocol

Chapter 5 OSI Network Layer

The Transport Layer: TCP & Reliable Data Transfer

cs144 Midterm Review Fall 2010

Lecture 9: Internetworking

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 8

Introduction to Information Science and Technology 2017 Networking II. Sören Schwertfeger 师泽仁

The data link layer has a number of specific functions it can carry out. These functions include. Figure 2-1. Relationship between packets and frames.

precise rules that govern communication between two parties TCP/IP: the basic Internet protocols IP: Internet protocol (bottom level)

UNIT V. Computer Networks [10MCA32] 1

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

CS457 Transport Protocols. CS 457 Fall 2014

Lecture 11: Fragmentation & Addressing. CSE 123: Computer Networks Stefan Savage

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

Transcription:

STEVEN R. BAGLEY PACKETS

INTRODUCTION Talked about how data is split into packets Allows it to be multiplexed onto the network with data from other machines But exactly how is it split into packets and what do they look like

PACKET SIZE How much data do you carry in a packet? Too little and your network is primarily carrying packet headers Too large and you increase latency

LATENCY Latency is the time taken for a packet to get from one computer to another Related to the speed (or bandwidth) of a network but not the same Can have high-speed networks that have a high-latency Once the packets start arriving the data comes in very quickly But takes a (relatively) long time for the packets to start arriving Sometimes low-latency can be more important than high-speed, particularly for interactive applications High lat

PACKET SIZE AND LATENCY One factor determining latency then is the time the previous packet takes to send The packet is the unit of transmission on a network Next packet cannot be sent until the current one has finished sending As the packet size increases, so does this length of time Increases the potential delay before the next packet can be sent Give example from my 14k4 modem

ETHERNET PACKET SIZE Maximum packet size of 1500 bytes (plus headers) Minimum packet size of 46 bytes (plus headers) Packet Header is 14 bytes (plus 64-bits of preamble) And 4 bytes of error detection at the end Total packet length varies between 64 1514 bytes (plus 8 bytes) Between 67.65% and 98.30% of the network traffic is data Lots of small packets is a very inefficient

ETHERNET PACKET PREAMBLE DEST. SOURCE ADDRESS ADDRESS FRAME TYPE 8 6 6 2 46 1500 4 DATA CRC Sizes are in bytes

ETHERNET PACKET PREAMBLE DEST. SOURCE ADDRESS ADDRESS FRAME TYPE 8 6 6 2 46 1500 4 DATA CRC Sizes are in bytes

ETHERNET PACKET PREAMBLE DEST. SOURCE ADDRESS ADDRESS FRAME TYPE 8 6 6 2 46 1500 4 DATA CRC Preamble 64-bits of alternating 1s and 0s Allows the receiver to lock onto the packet Sizes are in bytes

ETHERNET PACKET PREAMBLE DEST. SOURCE ADDRESS ADDRESS FRAME TYPE 8 6 6 2 46 1500 4 DATA CRC Destination and Source addresses The 48-bit MAC address of the respective machines Note, special MAC address can be used to designate a broadcast packet Broadcast packets are sent to ALL machines Broadcast packet are all ones

ETHERNET PACKET PREAMBLE DEST. SOURCE ADDRESS ADDRESS FRAME TYPE 8 6 6 2 46 1500 4 DATA CRC Frame type identifies what is in the packet Just a number Type numbers are standardised so that equipment from different vendors can interoperate Frames carrying IP packets have the type 0x0800 for instance

ETHERNET PACKET PREAMBLE DEST. SOURCE ADDRESS ADDRESS FRAME TYPE 8 6 6 2 46 1500 4 Data is literally just that the bits you want to send No size field, but packets can vary in length How do we know how big the packet is? Remember the ethernet line is silent after a packet is sent So if carrier disappears, it must be the end of the packet Required to transmit 96-bits of idle line between packets Know the format of the packet so know which bits are data DATA CRC Can anyone spot anything missing from this?

ETHERNET PACKET PREAMBLE DEST. SOURCE ADDRESS ADDRESS FRAME TYPE 8 6 6 2 46 1500 4 Data is literally just that the bits you want to send No size field, but packets can vary in length How do we know how big the packet is? Remember the ethernet line is silent after a packet is sent So if carrier disappears, it must be the end of the packet Required to transmit 96-bits of idle line between packets Know the format of the packet so know which bits are data DATA CRC If carrier drops for any other reason the CRC won t match

ETHERNET PACKET PREAMBLE DEST. SOURCE ADDRESS ADDRESS FRAME TYPE 8 6 6 2 46 1500 4 DATA CRC CRC Cyclic Redundancy Check A number created from the packet Receiver regenerates the same number if they don t match, packet must have been corrupted Enables error detection Error detection, but not correction

IP PACKETS IP packets are similar Again, have a header associated with data Packet (including headers) can be variable size up to 65535 bytes But IP packets have to be carried inside other packets, e.g. Ethernet In reality, the size of the carrying packet will usually define the packet size On Ethernet, IP packet maximum size is usually 1500 bytes Maximum size of IP packet known as the Maximum Transmission Unit

IPv4 PACKET VERSION IHL DSCP TOTAL LENGTH IDENTIFICATION FLAGS FRAGMENTATION OFFSET TIME TO LIVE PROTOCOL HEADER CHECKSUM SOURCE ADDRESS DESTINATION ADDRESS OPTIONS (+ PADDING) DATA (VARIABLE) More complicated, than ethernet but similar concepts (Address, protocol type etc.) Header contains the length of the packet (Total Length in bytes) and the length of the header (IHL in multiples of 32 bit words)

FRAGMENTATION IP packets (unlikely ethernet) will be passed between different networks These networks are heterogenous and so may have different packet sizes Going from a network with a small packet size to one with a large size is not a problem (though less efficient) Going the other way is not possible IP allows packets to be fragmented split into smaller chunks

FRAGMENTATION When fragmented, the data in an IP packet is split into chunks Each chunk is a multiple of 8-bytes long Those new chunks are then sent as IP packets across the other network Identification field used to identify the packet Fragment offset used to specify where the data goes Receiver puts the fragments back together to regenerate the original packet

PATH MTU DISCOVERY IPv6 takes a different approach (also available on IPv4) Does not allow packets to be fragmented Rather it finds out what the largest packet size allowed on that path between two machines Then uses that as its MTU for sending packets

RELIABILITY IP is not a reliable network protocol Rather its classed as a best-effort network Higher level protocols are built on top of IP to provide a reliable connection Not always desirable, can increase latency Do it s best to get the data there but won t guarantee it Interactive applications can work better without latency

TRANSMISSION CONTROL PROTOCOL TCP is the main protocol used on the Internet to provide reliable, end-to-end, virtual connection Connection-oriented protocol Connection explicitly opened and closed between two machines Allows multiple connections between the same two machines Introduces the concept of a port Connection is made between a source port on one machine and a destination port on the other end-to-end because its between two machines like a piece of wire, virtual because its produced entirely in software If the source IP +source port AND destination IP + destination Port match then the connection is for the connection

TRANSMISSION CONTROL PROTOCOL TCP is built entirely on top of IP with its own 20 byte header Needs to solve several problems Out-of-order delivery Packet Loss Not going to look at the header in detail, but contains things like port numbers, sequence numbers etc

OUT OF ORDER DELIVERY IP does not guarantee packets arrive in the order you send them TCP solves the problem of out-of-order delivery by giving every packet a sequence number Can reorder the packets into the right order based on the sequence number might take different routing paths

PACKET LOSS IP does not guarantee to deliver a packet so TCP needs to ensure a packet is received Does this by retransmitting lost packets If no acknowledgement is received, after a certain time period Packet resent And repeat similar to Aloha

PACKET LOSS EVENTS AT HOST A EVENTS AT HOST B SEND PACKET 1 RECEIVE ACK 1 SEND PACKET 2 RECEIVE ACK 1 SEND PACKET 3 RECEIVE PACKET 1 SEND ACK 1 RECEIVE PACKET 2 SEND ACK 2 PACKET LOST A RETRANSMISSION TIMER EXPIRES RESEND PACKET 3 RECEIVE ACK 3 SEND PACKET 4 RECEIVE PACKET 3 SEND ACK 3 RECEIVE PACKET 4 SEND ACK 4 B TIME TIME

PACKET LOSS How long should it wait before retransmission? Depends on how much traffic is on the Internet at that point between the machines TCP has an adaptive transmission time monitors the time between sending the packet and receiving the ACK back Adjusts the time appropriately

WINDOWING Problem with this approach is it slows transmission Sender must wait for ACK before sending next packet Network idle during this time TCP uses a window approach Rather than sending just one packet, TCP will send multiple packets up to a certain window size When it receives an ACK, it can then send some more packets

WINDOWING EVENTS AT HOST A EVENTS AT HOST B SEND PACKET 1 SEND PACKET 2 SEND PACKET 3 RECEIVE ACK 1, SEND PACKET 4 RECEIVE ACK 2, SEND PACKET 5 RECEIVE ACK 3, SEND PACKET 6 RECEIVE PACKET 1, SEND ACK 1 RECEIVE PACKET 2, SEND ACK 2 RECEIVE PACKET 3, SEND ACK 3 RECEIVE PACKET 4, SEND ACK 4 RECEIVE PACKET 5, SEND ACK 5 RECEIVE PACKET 6, SEND ACK 6 A B TIME TIME Notice how we get much better utilisation of the network with this approach With the right window size, you can get almost full network utilisation

TCP WINDOWING TCP allows the receiver to tell the client how much space is free Sender can then adaptively adjust the sending of packets to keep the window full But not overload it