120 likes | 217 Views
Internet and Intranet Protocols and Applications. The Internet: Delay, Errors, Detection February, 2002 Joseph Conron Computer Science Department New York University jconron@cs.nyu.edu. Internet: Congestion and Reliability. Definition of reliable communication
E N D
Internet and Intranet Protocols and Applications The Internet: Delay, Errors, Detection February, 2002 Joseph Conron Computer Science Department New York University jconron@cs.nyu.edu
Internet:Congestion and Reliability • Definition of reliable communication • Packets are delivered without modification. • Packets are delivered in order. • Packets are delivered exactly once. • Packets are delivered within some maximum time. • The sender and receiver(s) agree.
Internet:RTT and Delay • Round Trip Time (RTT) • the time measured from send of request to receipt of response (from application view, this is called response time). Good Idea –keep average RTT small! • Sources of Delay • Processing delay • Queuing delay • Transmission Delay • Propagation delay
Internet:Delay • Processing delay • Time to process packet header and determine disposition • Queuing delay • Time packet waits on a queue prior to transmission onto the link • Transmission delay • Time for all bits of packet to be transmitted = L/R where L is packet size in bits and R is transmit rate in bits/sec. • Propagation delay • Time from first bit is “on the wire” until bit is seen at the receiver = d/s where d is link distance (meters) and s is propagation speed of link (2*108 to 3*108 meters/sec)
Internet: How big are these delays? • Example • NY to CA, T1 Link (1.54*106 bps), no routers • d = 5*106 m, s = 3*108 m/sec • So, propagation delay = 1.67*10-2 sec = 16.7 msec • What is absolute minimum RTT? • For 1024 byte IP packet: • Td = 8*1024/(1.54*106 ) = 5.3 msec • So, to send 1 packet and get 1 packet in response takes AT LEAST 44 msec! And that’s with a direct link – no routers!
Internet:detecting trouble • Routers can drop packets (why?) • But how do packets get out of order? • How are they duplicated? • How can they be corrupted? • And most importantly, how can we detect this?
Internet:blame it on congestion! • Routers can drop packets because: • They have no resources (memory) to process packet • The packet time-to-live (TTL) has expired (no route to host) • Hhow do packets get out of order? • Packets n and n+1 take different routes • Path for packet n is more congested than path for packet n+1, hence n+1 packet arrives before packet n
Internet:how do duplicates occur! • Well, we can only blame congestion indirectly. Suppose sender times out waiting for ACK for packet n? • Suppose receiver actually got first packet n and sent ACK, but ACK is dropped due to congestion. • Sender resends packet n! • Receiver sees it as a duplicate! • Can the ACK be duplicated?
Internet:packet corruption • How can packets be corrupted? • Typically caused by a transient failure within the transmission medium, but relatively rare these days. • Can a software bug cause corruption? • What about an intruder (malicious tamper)?
Internet: sender/receiver agreement • Sender wants to know that receiver has the packet) • Most common technique: positive acknowledgment. • TCP uses positive ack in sliding window mechanism.
Error detection mechanisms • Sequence numbers • Defines order (for all n, n-1 before n) • Implies packet existence ( if receiver gets packet n+1, then there must be a packet n) • Detects duplicates (if all packets up to n have been received, then any packet < n is a duplicate) • Timers • Using our knowledge of delays and the application, we can set time limits for responses.
Error detection mechanisms • Detecting corruption • Check sums • CRC (Cyclic Redundancy Check) • Reed Solomon Codes • FEC (Forward Error Correction) • Message Digests