Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Networks 1000-Transport layer, TCP Gergely Windisch v.1.03 - 2016 spring.

Similar presentations


Presentation on theme: "Computer Networks 1000-Transport layer, TCP Gergely Windisch v.1.03 - 2016 spring."— Presentation transcript:

1 Computer Networks 1000-Transport layer, TCP Gergely Windisch windisch.gergely@nik.uni-obuda.hu v.1.03 - 2016 spring

2 Transport layer Transport layer is the layer is the one applications use to transfer data It should be reliable (as in the sender sends something that the receiver should receive and be able to use) But it uses the unreliable service provided by the network layer.

3 Transport protocol entities Addressing Connection Establishment Connection Release Error control, flow control Multiplexing

4 Addressing I can see that this message is for a service on 192.15.22.4, but where is it on the machine? port – application processes can attach themselves to these socket

5 Connection establishment Connection request -> connection accepted – packet duplication and delay can cause problems connection request comes multiple times - how do we know that most of them are duplicates and should be dropped?

6 Connection release How do we make sure that the other side closed the connection?

7 Error control Ensure that the data is delivered reliabliy

8 Flow control Let's not let the fast host flood and drown the slow one

9 Multiplexing Share several connection on just one network line

10 Send - recieve window Send window: number of segments without acknowledgement – sent/acked: segments we have received an ack for. – unacked: we have sent'em, but don't know if they arrieved – unsent: as the name suggests

11 Send - recieve window Receive window: Rcvd/ACKed/Retr - segments received, acknowledged and sent to the uppler layers

12 Sliding window animations without error – https://www.youtube.com/watch?v=zY3Sxvj8kZA with error – https://www.youtube.com/watch?v=lk27yiITOvU

13 Congestion control Congestion control is dealt with at the network and transport layers Aim – get rid of congestion – while maintaining somewhat optimal throughput

14 Congestion control - bandwith allocation Good allocation will – avoid congestion – be fair among the competing parties – quicky react to traffic changes

15 TCP / IP transport layer Two important protocols – UDP – TCP Use ports for addressing – 2 bytes -> 1-65535 – 1-1023: well known – 1024-~49000: not so well known, but can be registered – rest: uncharted backwaters

16 Port examples

17 UDP User Datagram Protocol Transfers segments Has sockets (ports + IP) Does not provide reliable data transfer

18 UDP header UDP checksum: pseudo header (IP + UDP header)

19 Uses of UDP Why have a protocol that is not good? – Short messaging – RPC – DNS – Realtime communication multimedia streaming

20 TCP Transmission Control Protocol Provides reliable, error free, in order transport between applications Uses sockets Sends segments

21 Brief TCP operation TCP sends and receives segments (transmits byte streams split into segments) Each segment has a unique sequence number. Host1 sends the segment and waits for the acknowledgement. When Host2 receives the segment it replies with another segment bearing the acknowledgement - it is the sequence number of the next segment it wants to receive. The available receive window size is also contained in the response. If the acknowledgement is not received for a certain amount of time, the segment is resent.

22 Segment Size Must fit in an IP packet (with headers) – 65515 Bytes Should fit the MTU – 1500 Byte Fragmentation is penalized, uses ICPM to discover path MTU

23 TCP segment

24 CWR: Congestion Window Reduced ECE: Explicit Congestion Notification URG ACK PSH RST SYN FIN

25 TCP Options field MSS: Maximum segment size Window scale timestamp SACK: selectie ack

26 TCP Connection establishment

27 TCP connection release Each simplex link is released independently FIN bit: no more data is to be sent – both sides send it to end the connection Timers are used to avoid waiting forever

28 TCP sliding window

29 TCP window management When window is full, sender cannot send data except for – urgent message to kill the receiving app – window probe prevent deadlock if the window advertisement is lost

30 Transfer issues Small data results in large data overhead – telnet: one character is sent - 1 byte, results in 151 Bytes transferred delayed acknowledgement (wait 500ms to ack, to see if there is data going back and do the ack there) Nagle's algorithm - send the first data, buffer the rest and send it after the first data has been acknowledged – not fit for certain uses like games

31 TCP congestion control slow start algorithm - start slow, raise speed after each ack


Download ppt "Computer Networks 1000-Transport layer, TCP Gergely Windisch v.1.03 - 2016 spring."

Similar presentations


Ads by Google