computer networks xarxes de computadors
play

Computer Networks - Xarxes de Computadors Outline Course Syllabus - PowerPoint PPT Presentation

Grau en enginyeria informtica - Xarxes de Computadors (XC-grau) Computer Networks - Xarxes de Computadors Outline Course Syllabus Unit 1: Introduction Unit 2. IP Networks Unit 3. LANs Unit 4. TCP Unit 5. Network applications 1 Lloren


  1. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Computer Networks - Xarxes de Computadors Outline Course Syllabus Unit 1: Introduction Unit 2. IP Networks Unit 3. LANs Unit 4. TCP Unit 5. Network applications 1 Llorenç Cerdà-Alabern

  2. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP Outline UDP Protocol ARQ Protocols TCP Protocol 2 Llorenç Cerdà-Alabern

  3. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP UPD Protocol – Introduction: The Internet Transport Layer Two protocols are used at the TCP/IP transport layer: User Datagram Protocol (UDP) and Transmission Control Protocol (TCP). UDP offers a datagram service (non reliable). TCP offers a reliable service. Transport layer offers a communication channel between applications. Transport layer access points (applications) are identified by a 16 bits port numbers. TCP/UDP use the client/server paradigm: daemon ... ... client server ... ... port x1 port y1 Ephemeral port TCP/UDP TCP/UDP Well known port ( ≥ 1024) Host A Host B <1024 dst port = y1 src port = x1 dst port = x1 src port = y1 TCP/UDP header 3 Llorenç Cerdà-Alabern

  4. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP UPD Protocol – Description (RFC 768) Datagram service: same as IP. Non reliable No error recovery No ack Connectionless No flow control UDP PDU is referred to as UDP datagram. UDP does not have a Tx buffer: each application write operation generates a UDP datagram. UDP is typically used: Applications where short messages are exchanged: e.g. DHCP, DNS, RIP. Real time applications: e.g. Voice over IP, videoconferencing, stream audio/ video. These applications does not tolerate large delay variations (which would occur using an ARQ). 4 Llorenç Cerdà-Alabern

  5. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP UPD Protocol – UDP Header Fixed size of 8 bytes. The checksum is computed using (i) the header, (ii) a pseudo-header, (iii) the payload. Drawback: because of the pseudo-header, the UDP checksum needs to be updated if PAT is used. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | S o u r c e P o r t | D e s t i n a t i o n P o r t | + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | L e n g t h | C h e c k s u m | + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + UDP datagram header + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | S o u r c e A d d r e s s | + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | D e s t i n a t i o n A d d r e s s | + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | Z e r o | P r o t o c o l | U D P l e n g t h | + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + UDP pseudo-header 5 Llorenç Cerdà-Alabern

  6. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP Outline UDP Protocol ARQ Protocols TCP Protocol 6 Llorenç Cerdà-Alabern

  7. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ protocols - Introduction Automatic Repeat reQuest (ARQ) protocols build a communication channel between endpoints, adding functionalities of the type: Error detection Error recovery Flow control Basic ARQ Protocols: Stop & Wait Go Back N Selective Retransmission 7 Llorenç Cerdà-Alabern

  8. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ protocols - Introduction ARQ Ingredients Connection oriented Tx/Rx buffers Acknowledgments (ack) Acks can be piggybacked in information PDUs sent in the opposite direction. Retransmission Timeout, RTO. Sequence Numbers Layer i+1 Layer i+1 Layer i+1 Layer i+1 Write Read Write Read Write Read Layer i Layer i ARQ Layer i Layer i protocol Tx Rx Sender Receiver Sender Receiver Sender Receiver buffer buffer ack PDUs information PDUs ARQ Protocol Architecture ARQ Protocol Implementation (one way) 8 Llorenç Cerdà-Alabern

  9. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ Protocols - Assumptions We shall focus on the the transmission in one direction. We shall assume a saturated source: There is always information ready to send. We shall assume full duplex links. Protocol over a line of D m distance and v t bps bitrate. Propagation speed of v p m/s, thus, propagation delay of D / v p s. We shall refer to a generic layer, where the sender sends Information PDUs ( I k ) and the receiver sends ack PDUs ( A k ). Frames carrying I k respectively A k , are Tx using L I and L A bits, thus the Tx times are respectively: t t = L I / v t and t a = L A / v t s. v t bps bitrate line sender receiver D km distance 9 Llorenç Cerdà-Alabern

  10. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ Protocols - Stop & Wait 1.When the sender is ready: (i) allows writing from upper layer, (ii) builds I k , (iii) I k goes down to data-link layer and Tx starts. 2.When I k completely arrives to the receiver: (i) it is read by the upper layer, (ii) A k is generated, A k goes down to data-link layer and Tx starts. 3.When A k completely arrives to the sender, goto 1. I k Transmission (Tx) write write I k I k+ 1 Tx buffer I k processing time t sender sender t t t t t t t ... ... ... ... receiver t receiver t t p t a t p t p t a A k A k+ 1 A k T c processing time Rx buffer Simplified time diagram I k I k+ 1 read read T c Time diagram 10 Llorenç Cerdà-Alabern

  11. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ Protocols - Stop & Wait Retransmission Each time the sender Tx a PDU, a retransmission timeout (RTO) is started. If the information PDU do not arrives, or arrives with errors, no ack is sent. When RTO expires, the sender ReTx (retransmit) the PDU. RTO I k I k I k+ 1 sender t t t ... ... receiver t t a A k 11 Llorenç Cerdà-Alabern

  12. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ Protocols – Why sequence numbers are needed? RTO I k I k sender t ... receiver t A k I k or I k+ 1 ? Need to number information PDUs RTO I k I k I k+ 1 I k+ 2 !! sender t ... receiver t abnormally large A k A k processing time Need to number ack PDUs 12 Llorenç Cerdà-Alabern

  13. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ Protocols – Notes on computing the efficiency (channel utilization) Line bitrate ( velocitat de transmissió de la línia ): v t = 1/ t b , bps Throughput ( velocidad efectiva ) v ef = number of inf. bits / obs. time, bps Efficiency or channel utilization E = v ef / v t (times 100, in percentage) information bits line idle ... ... t t b headers observation time, T #info bits × t b = time Tx information T T E = v ef = #info bits / T = v t 1 / t b #info bits = #info bits T / t b #bits at line bitrate 13 Llorenç Cerdà-Alabern

  14. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ Protocols – Stop & Wait efficiency Assuming no errors (maximum efficiency), the Tx is periodic, with period T c . E protocol : We do not take into account headers. I k sender t t t ... ... receiver t t p t p t a A k T c 100 E protocol = t t t t 1 90 = = 80 1  2 a Efficiency, E (%) T C t t  t a  2 t p 70 60 50 t t 1  2 a , where a = t p 1 40 ≃ 30 t t  2 t p t t 20 10 0 0.5 1 1.5 2 2.5 3 a = t p / t t 14 Llorenç Cerdà-Alabern

  15. Grau en enginyeria informàtica - Xarxes de Computadors (XC-grau) Unit 4. TCP ARQ Protocols – Continuous Tx Protocols Goal: Allow high efficiency independently of propagation delay. Without errors: E = 100 % I k +2 I k +3 I k +4 I k +5 I k +1 I k +2 I k +3 I k +4 I k +5 I k Tx buffer I k +1 I k +2 I k +3 I k +4 I k I k +1 I k +2 I k +3 I k +4 I k +5 t sender ... ... receiver t A k A k +1 A k +2 A k +3 A k +4 A k +5 15 Llorenç Cerdà-Alabern

Recommend


More recommend