TCP/IP. IPv4 packet layout. IPv4 packet layout. Emin Gun Sirer

Similar documents
Transport Layer Protocols

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

Ethernet. Ethernet. Network Devices

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

Computer Networks UDP and TCP

Final for ECE374 05/06/13 Solution!!

IP - The Internet Protocol

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Internet Architecture and Philosophy

Network Layer: Network Layer and IP Protocol

Computer Networks. Chapter 5 Transport Protocols

Chapter 5. Transport layer protocols

8.2 The Internet Protocol

RARP: Reverse Address Resolution Protocol

Transport Layer. Chapter 3.4. Think about

Chapter 9. IP Secure

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

Overview of TCP/IP. TCP/IP and Internet

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

Network layer: Overview. Network layer functions IP Routing and forwarding

How do I get to

IP address format: Dotted decimal notation:

Networking Test 4 Study Guide

Solution of Exercise Sheet 5

NETWORK LAYER/INTERNET PROTOCOLS

Module 7 Internet And Internet Protocol Suite

Lecture Computer Networks

Protocols. Packets. What's in an IP packet

TCP Performance Management for Dummies

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

ACHILLES CERTIFICATION. SIS Module SLS 1508

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

Objectives of Lecture. Network Architecture. Protocols. Contents

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Network Programming TDC 561

Transport and Network Layer

Networks: IP and TCP. Internet Protocol

[Prof. Rupesh G Vaishnav] Page 1

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

IP addressing and forwarding Network layer

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

TCP/IP Inside the Data Center and Beyond. Dr. Joseph L White, Juniper Networks

RTP / RTCP. Announcements. Today s Lecture. RTP Info RTP (RFC 3550) I. Final Exam study guide online. Signup for project demos

TCP/IP and the Internet

Troubleshooting Tools

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Why SSL is better than IPsec for Fully Transparent Mobile Network Access

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

Network Intrusion Detection Systems. Beyond packet filtering

Configuring Flexible NetFlow

20-CS X Network Security Spring, An Introduction To. Network Security. Week 1. January 7

Chapter 11. User Datagram Protocol (UDP)

Question: 3 When using Application Intelligence, Server Time may be defined as.

What is a DoS attack?

MASTER'S THESIS. Testing as a Service for Machine to Machine Communications. Jorge Vizcaíno 2014

NetFlow/IPFIX Various Thoughts

CHAPTER 1 PRINCIPLES OF NETWORK MONITORING

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

This sequence diagram was generated with EventStudio System Designer (

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Computer Networks - CS132/EECS148 - Spring

IPv6 Fundamentals Ch t ap 1 er I : ntroducti ti t on I o P IPv6 Copyright Cisco Academy Yannis Xydas

Homework 3 assignment for ECE374 Posted: 03/13/15 Due: 03/27/15

First Midterm for ECE374 03/09/12 Solution!!

Network Security I: Overview

TCP in Wireless Mobile Networks

Network Layer. Introduction Datagrams and Virtual Circuits Routing Traffic Control. Data delivery from source to destination.

CS155 - Firewalls. Simon Cooper <sc@sgi.com> CS155 Firewalls 22 May 2003

Internet Protocols. Addressing & Services. Updated:

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

The Internet. Internet Technologies and Applications

Firewall Implementation

Network Security: Workshop. Dr. Anat Bremler-Barr. Assignment #2 Analyze dump files Solution Taken from

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

LESSON Networking Fundamentals. Understand TCP/IP

PART OF THE PICTURE: The TCP/IP Communications Architecture

TCP/IP Networking for Wireless Systems. Integrated Communication Systems Group Ilmenau University of Technology

A PPENDIX L TCP/IP and OSI

Network Simulation Traffic, Paths and Impairment

High Performance VPN Solutions Over Satellite Networks

Introduction to TCP/IP

Introduction to Cisco IOS Flexible NetFlow

Internet Control Protocols Reading: Chapter 3

Network Security TCP/IP Refresher

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

Access Control: Firewalls (1)

Transcription:

IP TCP/IP Emin Gun Sirer Internetworking protocol Network layer Common packet format for the Internet Specifies what packets look like Fragments long packets into shorter packets Reassembles fragments into original shape Some parts are fundamental, and some are arbitrary IPv4 is what most people use IPv6 clears up some of the messy parts, but is not yet in wide use IPv4 packet layout IPv4 packet layout Identification Flags Fragment Offset TTL Protocol Header Checksum Options Identification Flags Fragment Offset TTL Protocol Header Checksum Options 1

IP Fragmentation Networks have different maximum packet sizes Big packets are sometimes desirable less overhead Huge packets are not desirable reduced response time for others Higher level protocols (e.g. TCP or UDP) could figure out the max transfer unit and chop data into smaller packets The endpoints do not necessarily know what the MTU is on the path The route can change underneath Consequently, IP transparently fragments and reassembles packets IP Fragmentation Mechanics IP divides a long datagram into N smaller datagrams Copies the header Assigns a Fragment ID to each part Sets the More Fragments bit Receiving end puts the fragments together based on the new IP headers Throws out fragments after a certain amount of time if they have not be reassembled IP Options Source Routing: The source specifies the set of hosts that the packet should traverse Record Route: If this option appears in a packet, every router along a path attaches its own IP address to the packet Timestamp: Every router along the route attaches a timestamp to the packet Security: Packets are marked with user info, and the security classification of the person on whose behalf they travel on the network Most of these options pose security holes and are generally not implemented UDP Unreliable gramprotocol IP goes from host to host We need a way to get datagrams from one application to another How do we identify applications on the hosts? Assign port numbers E.g. port 13 belongs to the time service 2

UDP Packet Layout IP Identification TTL Protocol Flags Fragment Offset Header Checksum UDP Source Port Destination Port Length Checksum UDP adds Ports, Length and checksum UDP UDP is unreliable A UDP packet may get dropped at any time It may get duplicated A series of UDP packets may get reordered Applications need to deal with reordering, duplicate suppression, reliable delivery Some apps can ignore these effects and still function Unreliable datagrams are the bare-bones network service Good to build on, esp for multimedia applications TCP Transmission Control Protocol Reliable, ordered communication Enough applications demand reliable ordered delivery that they should not have to implement their own protocol A standard, adaptive protocol that delivers goodenough performance and deals well with congestion All web traffic travels over TCP/IP IP TCP TCP/IP Packets Identification Flags Fragment Offset TTL Protocol Header Checksum Source Port Destination Port Sequence Number Acknowledgement Number Offset ACK URG SYN FIN RST Window Checksum Urgent Pointer Options Padding 3

TCP Packets TCP Connections Each packet carries a unique ID The initial number is chosen randomly The ID is incremented by the data length Each packet carries an acknowledgement Can acknowledge a set of packets by ack ing the latest one received Reliable transport is implemented using these identifiers SYN SYN, ACK of SYN ACK of SYN TCP is connection oriented A connection is initiated with a threeway handshake Three-way handshake ensures against duplicate SYN packets Takes 3 packets, 1.5 RTT Typical TCP Usage Reliable transport SYN SYN, ACK of SYN ACK of SYN DATA DATA, ACK FIN, ACK FIN, ACK Three round-trips to set up a connection, send a data packet, receive a response, tear down connection FINs work (mostly) like SYNs to tear down connection Need to wait after a FIN for straggling packets DATA, id=17 DATA 23, ACK 17 DATA, id=18 Send timeout DATA, id=18 TCP keeps a copy of all sent, but unacknowledged packets If acknowledgement does not arrive within a send timeout period, packet is resent Send timeout adjusts to the round-trip delay 4

TCP timeouts TCP Windows What is a good timeout period? Want to improve throughput without unnecessary transmissions NewAverageRTT = (1 -?) OldAverageRTT +? LatestRTT NewAverageDev = (1 -?) OldAverageDev+? LatestDev where LatestRTT = ( ack_receive_time send_time), LatestDev = LatestRTT AverageRTT,? = 1/8, typically. Timeout = AverageRTT + 4*AverageDev Timeout is thus a function of RTT and deviation Multiple outstanding packets can increase throughput TCP Windows TCP Congestion Control DATA, id=17 DATA, id=18 DATA, id=19 DATA, id=20 ACK 17 ACK 18 ACK 19 ACK 20 Can have more than one packet in transit Especially over fat pipes, e.g. satellite connection Need to keep track of all packets within the window Need to adjust window size TCP Increases its window size as long as no packets are dropped It halves the window size when a packet drop occurs A packet drop is evident from the acknowledgements Therefore, it will slowly build up to the max bandwidth, and hover around the max It doesn t achieve the max possible though Instead, it shares the bandwidth well with other TCP connections This linear-increase, exponential backoff in the face of congestion is termed TCP-friendliness 5

TCP Window Size A B Bottleneck Link D TCP Fairness Bandwidth Max Bandwidth Time Linear increase Exponential backoff Assuming no other losses in the network except those due to bandwidth Bandwidth for Host A Bandwidth for Host B Want to share the bottleneck link fairly between two flows TCP Slow Start TCP Slow Start Linear increase takes a long time to build up a window size that matches the link bandwidth*delay Most file transactions are not long enough Consequently, TCP can spend a lot of time with small windows, never getting the chance to reach a sufficiently large window size Fix: Allow TCP to build up to a large window size initially by doubling the window size until first loss Bandwidth Max Bandwidth Time Initial phase of exponential increase Assuming no other losses in the network except those due to bandwidth 6

TCP Summary Reliable ordered message delivery Connection oriented, 3-way handshake Transmission window for better throughput Timeouts based on link parameters Congestion control Linear increase, exponential backoff Fast adaptation Exponential increase in the initial phase 7