Sting: a TCP-based Network Measurement Tool Stefan Savage Jianxuan Xu.

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

TCP Vegas: New Techniques for Congestion Detection and Control.
Transmission Control Protocol (TCP)
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
NS-2 TCP-Linux David Wei and Pei Cao. Outline Motivation Motivation Code structure of NS-2 TCP-Linux agent Code structure of NS-2 TCP-Linux agent Design.
- Reliable Stream Transport Service
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
CSEE W4140 Networking Laboratory Lecture 7: TCP flow control and congestion control Jong Yul Kim
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CSEE W4140 Networking Laboratory Lecture 7: TCP congestion control Jong Yul Kim
TDC375 Winter 03/04 John Kristoff - DePaul University 1 Network Protocols Transmission Control Protocol (TCP)
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #8 Explicit Congestion Notification (RFC 3168) Limited Transmit.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Process-to-Process Delivery:
The Transport Layer.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
TFRC: TCP Friendly Rate Control using TCP Equation Based Congestion Model CS 218 W 2003 Oct 29, 2003.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
CSE 461 University of Washington1 Topic How TCP implements AIMD, part 1 – “Slow start” is a component of the AI portion of AIMD Slow-start.
ECE453 – Introduction to Computer Networks Lecture 14 – Transport Layer (I)
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
MaxNet NetLab Presentation Hailey Lam Outline MaxNet as an alternative to TCP Linux implementation of MaxNet Demonstration of fairness, quick.
HighSpeed TCP for High Bandwidth-Delay Product Networks Raj Kettimuthu.
Networking Fundamentals. Basics Network – collection of nodes and links that cooperate for communication Nodes – computer systems –Internal (routers,
Copyright © Lopamudra Roychoudhuri
1 TCP - Part II Relates to Lab 5. This is an extended module that covers TCP data transport, and flow control, congestion control, and error control in.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
TCP Behavior Inference Tool Jitendra Padhye, Sally Floyd Presented by Songjie Wei.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
TCP OVER ADHOC NETWORK. TCP Basics TCP (Transmission Control Protocol) was designed to provide reliable end-to-end delivery of data over unreliable networks.
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
Development of a QoE Model Himadeepa Karlapudi 03/07/03.
TCP continued. Discussion – TCP Throughput TCP will most likely generate the saw tooth type of traffic. – A rough estimate is that the congestion window.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
28/09/2016 Congestion Control Ian McDonald (with many other WAND members)
Other Methods of Dealing with Congestion
The Transport Layer Implementation Services Functions Protocols
Chapter 9: Transport Layer
Master’s Project Presentation
Instructor Materials Chapter 9: Transport Layer
Internet Networking recitation #9
Introduction to Networks
Reddy Mainampati Udit Parikh Alex Kardomateas
TCP Vegas: New Techniques for Congestion Detection and Avoidance
TCP.
TCP.
Lecture 19 – TCP Performance
Process-to-Process Delivery:
Other Methods of Dealing with Congestion
Other Methods of Dealing with Congestion
Internet Networking recitation #10
Process-to-Process Delivery: UDP, TCP
TCP flow and congestion control
Computer Networks Protocols
Presentation transcript:

Sting: a TCP-based Network Measurement Tool Stefan Savage Jianxuan Xu

Measurement & Analysis  The Internet is supremely hard to measure –VERY heterogeneous –VERY large –Heisenberg effects The Heisenberg effect describes a system in which the observation or measurement of an event changes the event.  Still… lots of efforts to measure and understand traffic dynamics, routing, user characteristics, etc…  Understanding wide-area network characteristics is critical for evaluating the performance of Internet applications.

Measurement & Analysis  ICMP-based tools (e.g. ping,traceroute) --Can’t measure one-way loss  Measurement infrastructures (e.g. NIMI) --Require cooperation from remote endpoints

Features  Measures one-way packet loss rates  TCP-based measurement traffic (not filtered)  Only uses the TCP algorithm  Target only needs to run a TCP service, such as a web server, Does not require remote cooperation

Basic approach  Send selected TCP packets to remote host  Analyze TCP behavior to deduce which packets were lost in each direction

Deducing losses in a TCP transfer  What we know How many data packets we sent How many acknowledgements we received  What we need to know How many data packets were received? Remote host’s TCP MUST know How many acknowledgements were sent? Easy, if one ACK is sent for each data packet (ACK parity)

How TCP reveals packet loss  Data packets ordered by seq#  ACK packets specify next seq# expected

Basic loss deduction algorithm Forward Loss  Data Seeding: –Source sends in-sequence TCP data packets to target, each of which will be a loss sample  Hole-filling: –Sends TCP data packet with sequence number one greater than the last seeding packet –If target ACKs this new packet, no loss –Else, each ACK indicates missing packets –Should be reliable, the retransmissions must be made in Hole-filling

Data Seeding phase for i = 1 to nfor each ack received send packet w/seq #i ackReceived++ dataSent++ wait for long time

Hole Filling Phase lastACK := 0for each ack received w/ack #j while lastAck = 0 lastAck = MAX(lastAck,j) send packet w/seq # n+1 while lastAck < n + 1 dataLlost++ retransPkt := lastAck while lastAck = retransPkt send packet w/seq# retransPkt dataReceveid := dataSent – dataLost ackSent := dataReceived

Example

Basic loss deduction algorithm Reverse Loss  Data Seeding: –Skip first sequence number, ensuring out-of-sequence data (Fast Retransmit) –Receiver will immediately acknowledge each data packet received –Measure lost ACKs  Hole-filling: –Transmit first sequence number –Continue as before

Guaranteeing ACK parity  How do we know one ACK is sent for each data packet received?  Exploit TCP’s fast retransmit algorithm TCP must send an immediate ACK for each out-of-order packet it receives  Send all data packets out-of-order Skip first sequence number Don’t count first “hole” in hole filling phase

Sending Large Bursts Large packets can overflow receiver buffer Mitigate by overlapping sequence numbers

Delaying connection termination  Some Web servers/firewalls terminate connections abruptly by sending RST  Solutions: Format data packets as valid HTTP request Set advertised receiver window to 0 bytes

Sting implementation details  Raw sockets to send TCP datagrams  Packet filter (libpcap) to get responses  Currently runs on Tru64 and FreeBSD

Last-generation user interface # sting –c 100 –f poisson –m –p 80 Source = Target = :80 dataSent = 100 dataReceived = 98 acksSent= 98 acksReceived = 97 Forward drop rate = Reverse drop rate =

Forward Loss Results

Reverse Loss Results

“ Popular ” Web Servers

Random Web Servers

Result  Loss rates increase during business hours, and then decrease  Forward and reverse loss rates vary independently  On average, with popular web servers, the reverse loss rate is more than 10 times greater than the forward loss rate

Conclusions  TCP protocol features can be leveraged for non- standard purposes  Packet loss is highly asymmetric  Ongoing work: Using TCP to estimate one-way queuing delays, bottleneck bandwidths, propagation delay and server load

Useful or Useless  Purpose of the Network Measurement –Diagnose current problem –Design future service  Real Time data needed for Network Control  Data sample –Event driven –fixed Interval

Research Goal  Implement new TCP congestion control algorithm with fuzzy logic control.  Develop, test and debug it in Linux  Performance Evaluation

Traditional protocol hacking  Directly modify the kernel source  Migrate protocol stack and related stuff to user space  Simulate the algorithm with NS-2

Kernel Hacking  Insert and modify the algorithm in kernel source directly  Example –Vegas, Westwood+ and BIC implementation within Linux kernel before version

Kernel Hacking  Pros –Welcome to the Real World –Less overhead  Cons –Not easy to develop, trace, debug and maintenance –Incompatible with difference kernel version

User space migration  Move all protocol stack and related stuff to user space  Can gain the total control of variable status  Example –Sting

User space migration  Pros –High flexibility in protocol hacking –Can use general debug method tools, e.g. gdb  Cons –A large and thorny project for migrating protocol stack to user space –Incompatible with difference kernel version –Large overhead

Simulation  Algorithm is implemented base on a virtual testbed  Virtual experiment can be held easily  Usually use NS-2 as simulator  E.g. Research of FAST TCP,HighSpeed TCP

Simulation  Pros –Quick implementation of algorithm –Low cost in experiment –Easy in data statistic  Cons –Result is too idealistic –Need further development for final product

Traditional methods are not suitable  Source code modification and user space migration required a well understanding of kernel architecture  NS-2 is not as realistic as testing on top of PlanetLab  All of them are kernel version dependent

My new approach  Combine the use of pluggable congestion control algorithm and Kernel Hacking  Implementation of new control algorithm within a single kernel module

Pluggable congestion control module  Starting from version , a new method of TCP congestion control hacking was published  New algorithms can be written as modules file, insert to kernel during run time as like as general I/O drivers  BIC,Cubic, HighSpeed, H-TCP, Hybla, Scalable, Vegas and Westwood+ are all implemented as module already

Pluggable congestion control module  A congestion control mechanism can be registered through function in tcp_cong.c  The functions used by the congestion control mechanism are registered via passing a tcp_congestion_ops struct to tcp_register_congestion_control.  As a minimum name, ssthresh, cong_avoid and min_cwnd must be valid.

Pluggable congestion control module  The method that is used to determine which congestion control mechanism is determined by the sysctl net.ipv4.tcp_congestion_contrl.  The default congestion control will be the last one registered (LIFO)  newReno will be built as build-in supporting and always available  A particular default value can be set by using sysctl

Pluggable congestion control module  tcp_congestion_ops sturct provide the below function entry points: –init –release –ssthresh –min_cwnd –cong_avoid –rtt_sample –set_state –cwnd_event –undo_cwnd –pkts_acked –get_info

Pluggable congestion control module  All algorithm related code are packed within a single module file  A standardized framework can be followed  Codes required for implement an algorithm are greatly reduced. For example, newReno uses 77 lines where BIC uses 335 lines  The module will be compatible unless the framework changes

Kernel Hacking Still Needed  Raw, Accurate, Real time Data needed for control algorithm –Packet Loss Rate –Bandwidth Estimation –RTT –(tcp vegas----rtt,westwood—be….)

PLR Calculation in Linux Kernel  tcp_input.c is the core of the implementation of the TCP protocol –handle incoming packets and acks, –identify duplicate acks and packet losses, –adjust congestion window accordingly

PLR Calculation in Linux Kernel  Two types of events are incurred due to congestion: one is retransmission Timeout(rto), and the other is Packet-Loss.  The Timeout event is checked by tcp_head_timedout(),  The Packet-Loss event is checked by tcp_mark_head_lost function.

PLR Calculation in Linux Kernel  the TCP's congestion avoidance (CA) phase is decomposed into five states (defined in the ca_state filed of the tcp_opt data structure). –TCP_CA_OPEN –TCP_CA_Disorder –TCP_CA_CWR –TCP_CA_Recovery –TCP_CA_Loss

PLR Calculation in Linux Kernel The process of the state machine is implemented in function tcp_fastretrans_alert():Processing dubious ack event

PLR Calculation in Linux Kernel  ( tcp_update_scoreboard ) tcp_update_scoreboard –This function will mark all the packets which were not sacked (till the maximum seq number sacked) as lost packets. Also the packets which have waited for the acks to arrive for interval equivalent to retransmission time are marked as lost packets. The accounting for lost, sacked and left packets is also done in this function.

PLR Calculation in Linux Kernel  left_out = sacked_out + lost_out;  sacked_out : Packets, which arrived to receiver out of order and hence not ACKed. With SACKs this number is simply amount of SACKed data. Even without SACKs it is easy to give pretty reliable estimate of this number, counting duplicate ACKs.  lost_out : Packets lost by network. TCP has no explicit "loss notification" feedback from network (for now).It means that this number can be only _guessed_. Actually, it is the heuristics to predict lossage that distinguishes different algorithms.