220 likes | 345 Views
The Time Delay of TCP/IP and Related Protocols. Zhen Song. Motivation: why study TCP/IP. It is popular and reliable. Low cost. (Both software and hardware) Scalable. (WAN + LAN) Platform independent. (Wire/Wireless, Connection/Connectionless, Different OS, Various of hardware)
E N D
Motivation: why study TCP/IP • It is popular and reliable. • Low cost. (Both software and hardware) • Scalable. (WAN + LAN) • Platform independent. (Wire/Wireless, Connection/Connectionless, Different OS, Various of hardware) • Potential applications: LonWorks, Teleoperation.
TCP/IP stack layout applications applications applications TCP UDP Other protocols ICMP Routing IP ARP Other protocols Lan drivers Lan adapters From http://netlab1.usu.edu/pub/bsuk99/tcp.ppt Wire/fiber
TCP/IP vs. OSI OSI: Open System Interconnection
Related Protocols For most PC systems Data link: Ethernet, ISDN/ADSL/Telephone/Internet. Network: IP, ARP. Transport: TCP, UDP. Application: WWW, TELNET, FTP, SMTP, DNS. Figure from A.S. Tanenbaum “Computer Networks” 3ed Edition
Delay of The Ethernet (IEEE 802.3) • Data Link layer, Medium Access sublayer. • PerformanceIf there are k stations ready for transmit and the probability for each station transmits during a contention slot is p. The probability A that some station acquires the channel in that slot is A=k p(1-p)k-1. A is maximized when p=1/k, with A -> 1/e as k->Inf, so the mean number of slots per contention is Each slot has a duration 2t, the mean contention interval, w, is 2t/A. Assuming optimal p, the mean number of contention slots is never more than e, so w is at most .
Cont. If the mean frame takes P sec to transmit, when many stations have frames to send,Channel efficiency = • Larger frames are more efficient, but others have to wait longer before they can get access to the channel. 1024 bytes is a round off between performance and “fairness”. • The trouble maker for controller: the “mean” not “worst” case.
Channel Efficiency 1024 byte frames 512 byte frames 256 byte frames Channel efficiency 128 byte frames 64 byte frames Figure from A.S. Tanenbaum “Computer Networks” 3ed Edition Number of stations trying to send
Collision of The Ethernet • For a mean interval of 2t/A, collision happens and Binary Expenential Backoff (BEB) procedure starts. • BEB: after i collisions, a random number between 0 and 2i-1 is chosen as the number of slots to skip. The maximum number of the skipped slots is 1023. • The possibility of collision after the last round of BEB is negligible for a LAN, but significant delay might be introduced.
Go to WAN • ARP: Ethernet address (MAC) to Internet address (IP). (Defined in RFC826)Why: Every computer on the Internet has a unique IP address, which is not the address of Ethernet. So there must be a mechanism to translate between them.How: Broadcast “Who owns the IP address 129.123.85.29” Acknowledge “I have, and my MAC address is …..”Note: ARP is not routable. • The commercial implementations are optimized by various way, including ARP cache. So the delay of ARP introduced only once. • ARP is not mandatory. A system with static database does not need ARP. ARP was designed to reduce the work load of people.
IP Routing • Simple IP routingThe Netmask can judge if a specific IP is in the associate subnet. If (((their_IP ^ my_IP) & netmask) )!=0 use_gateway( ); /* not in this subnet */ else go_direct( ); /* on the same wire */ • This job would be done by the router, with unknown delay. Depends on the CPU, software, load, etc of the router.
More complex routing • The interior gateway routing protocol:OSPFRFC1247. OSPF represents Open Shortest Path First.Original Internet interior gateway protocol was a distance vector protocol (RIP) based on the Bellman-Ford algorithm. It worked well in small systems, but less well on larger ones. OSPF became a standard in 1990, and it will become the major interior gateway routing protocol soon. Unknown delay • The exterior gateway routing protocol:BGPRFC1265BGP: Border Gateway ProtocolNot just the shortest path, It considers more about politics. Traffic starting or ending at Netscape should not transit Microsoft.
Congestion Control in The Network Layer • John Nagle mode. “Congestion Control in IP/TCP” RFC896 • If there are infinite memory on the router, or the CPU of router is too slow, congestion may happen. • General principle of congestion control: using “control theory point of view”, “close loop”. • There are many algorithms, such asNagle mode, Leaky bucket, Token bucket, etc.
DNS • From domain name to IP addresswww.yahoo.com -> 126.115.102.75 -> 126.115.102.76www.sohu.com -> 61.135.131.13www.virtualhost.com -> 159.226.35.24www.anothervirtual.com -> 159.226.35.24
TCP congestion control TCP updates an estimate of the average RTT (round trip time) a by • Jacobson algorithm ,where g is a ‘gain’ (0<g<1) that should be related to the signal-to-noise ratio of m.
Measuring The Delay Is Simple Just Ping
Conclusion • Consider the worst case for either LAN, such as Ethernet, or WAN, is very difficult. • There is possibility mathematic model for the collision of the Ethernet. But some parameters for the formula cannot be calculated, rather, they are measured on the real system. Not surprisingly, different systems might have quite different delay.
Cont. • The delay is very easy to measure but hard to predict. • The more you know about the delay about other computers, the easier to predict the delay of your system. • Though it has not been proved yet, the delay, even of LAN, must be uncontrollable, if other computer involved in the same network. • High performance indicates small delay. For a reliable medium like twist par 100M Ethernet, large frames will have better performance.
Cont. • Unfortunately, control systems prefer small frame. So we should not put heavy load on the network. Efficiency theory gives us a reference on selection the working load. • At the beginning, researchers assumes the traffic of the Ethernet is Poisson, but it now appears the network traffic is self-similar (Paxson and Floyd 1994; and Willinger et al., 1997) • Internet tracking software.http://www.sane.com/http://www.deepmetrix.com/
References • Classics352 citations Wide-Area Traffic: The Failure of Poisson Modeling254 citations Self Similarity Through High-Variability: Statistical Analysis of Ethernet LAN Traffic at the Source Level 148 citations End-to-End Routing Behavior in the Internet • A good presentation Why is the internet traffic self-similar? • 30 citations Forecasting network performance to support dynamic scheduling using the network weather service • Papers on 24th Conference on Local Computer Networks17 - 20 October, 1999 Lowell, MassachusettsTime Series Models for Internet Data TrafficC. You and K. ChandraOn the Distribution of Round-Trip Delays in TCP/IP NetworksT. Élteto and S. MolnárEfficient and Accurate Ethernet SimulationJ. Wang and S. KeshavThe Worst-Case Scenario for Transmission of Synchronous Traffic in an FDDI NetworkS. Zhang and E. Lee
Cont. • Papers on frequency domain.Modeling Spectral Features in TCP trafficG. Olowoyeye, B. Kim and K. Chandra 1998Network traffic modeling using a multifractal wavelets model • Non-linear time-series models for Ethernet trafficK. Chandra, C. You, G. Olowoyeye and C. Thompson , June 1998 • Analyzing Stability in Wide-Area Network Performance • Measuring link bandwidths using a deterministic model of packet delay, • Characteristics of wide-area TCP/IP conversations,