GoConqr has a new look! Let us know what you think.

Flashcards

Transport Layer

Eric Wojcik English 54 cards

Cards in this deck (54)

  1. 1Transport Layer>Considered core protocol of entire hierarchy, entering all the network details on how to route/handle errors and congestions
    >Do not care about physical network underneath
    >Want to know reliability from A->B, not just between hosts and apps
    >Provide reliable data transmission and cost effective data transport independant of physical network
  2. 2Transport Protocols>Ultimate goal is to provide efficient, reliable and cost effective services to users (normally to app layer)
    >Uses services provided by network layer
    >DEALS WITH TRANSPORT ENTITY [hardware/software within transport layer, located in OS kernel of host in lib packages or NIC] <- is responsible for sending TPDU
  3. 3Services ProvidedConnectionless SYS: UDP (do not need to plan route)
    Connection orient SYS: TCP (request/accept connections; transmit/receive data; relaease connection)
  4. 4WHY USE TRANSPORT LAYERTransport Layer is ENTITY on user machine while network layer runs on routers.
    >Makes possible for transport services to be more reliable than underlying services
  5. 5Transport Protocol Elements- T.L primitives can be implemented by T.P used between two entities
    -Data Link deals with node to node while transport deals with vast different geological areas.
    Protocols deal with:
    -Addressing
    -Flow Control & Buffering
    -Multiplexing
    -Connection establishment and release
  6. 6TSAP Transport Service Access Points aka how can TSAP of a particular APP on a remote host be determined?Used to know which app (server) a remote host is connected to
    Initial Connection Protocol: special process server acts as proxy to listen to set of heavily used servers at the same time - server direct them to ports.
    Directory Server: E.g. Name server. Remote users can connect to well known TSAP ports to resolve symbolic service. Client breaks connection with directory server and makes a new connection to required service on TSAP port supplied. Server shows where correct port is.
  7. 7Connection Establishment I>Address now determined so establish connect
    >Try send CR 'connection request' and wait for CA 'connect accept'
    ISSUE: network can lose, store and duplicate packets. To overcome problem restrict packet life-time: use a sequence number, time stamp each packet and put hop counter on each.
  8. 8Connection Establishment IINEED to guarantee packet is dead, same as ACKS;
    -Use time T (small multiplier of true max packet life), ensures ACKS will also disappear after a period of time. Wait for time T so all know ACK is gone
  9. 9Connection Establishment IIIMETHOD of doing this:
    -Equip host with binary counter that runs even when the host is down. Part of counter used as initial sequence.
    -Start connection with unique number and ensure that two identically numbered TPDU's never used at same time.
    -Once both transport entities agree on SIN, any sliding window can be used for flow control
  10. 10Connection Establishment IVWhat if host crashes?
    Solution 1) Request a transport entity to be idle for 7 seconds, however T might be too large
    Solution 2) Ensure whatever num used before cannot be used again for time T
  11. 11Connection Establishment V [Three Way Handshake]>Host A sends CR TPDU (SYN) to remote host B. CR TPDU will specify initial sequence number.
    >Host B accepts CR, replies with ACK TPDU (SYN/ACK packet) and specifies sequence number for reverse channel connection
    >Host A responds with first TPDU which acks sequences number chosen by host
  12. 12Connection Establishment VI {Duplicate CR}If remote host B receives duplicate CR, will reply with an ACK that will be rejected by original host.
    Solution: I remote host B received duplicate CR followed by an ACK, initial seq number ack as incorrect and connection will be abandoned
  13. 13Connection ReleaseAsym release: Can be used to issue a disconnect which is abrupt and can result in loss of data
    Sym release: Direction of connection is closed separately. Common protocol in which one side request for DIS and other responds. Not fool proof as half connections can occur
  14. 14Connection Release II {SOLUTION}Three Way Handshake:
    >Host A initiates disconnect by sending DR and TPDU starts timer
    >Host B responds by sending back TPDU and starts timer too
    >Host A receives DR TPDU and sends back ACK TPDU and releases the conenction
  15. 15Connection Release II {Problems with three way}>If ACK TPDU is lost
    >If second DR is lost
    >When initial DR and N transmissions are all lost - half open connection
  16. 16Flow Control and BufferingSimilar to data link layer - use sliding or other schemes; window has a few lines while host has numerous connections
  17. 17Buffering MethodsChained fixed sized buffers:
    -Most TPDUS nearly the same size
    Chained Variable sized buffers:
    -TPDUs have wide variation in size
    Large Circular Buffers;
    Utilises memory well (provided al the connections are heavily loaded otherwise will have poor connection if light loaded)
  18. 18Trade off between source buffering and destination bufferingDepends on what traffic is carried by connection
    -LOW bandwidth and bursty traffic: buffer at sender
    -HIGH bandwidth and burst traffic: buffer at sender
    Dynamic Buffer Management:
    -General way is to decouple buffering from ACK with variable sized windows
    >> SOLUTION: mechanism based on subnets carrying capacity rather than receivers buffering capacity
  19. 19Multiplexing:Upward multiplexing - all transport connections on one network address
    Downward multiplexing - opening multiple network connections (via a virtual circuit) and distributed the traffic among them
  20. 20Crash Recovery (Network):Recovery involves:
    NETWORK CRASH SIMPLE
    -For datagram service network layer:: transport entities expect lost TPDUs all the time and know how to cope
    -For connection-oriented network layer:: loss of virtual circuit is handled by establishing a new one and probing the remote transport entity for TPDU’s received and not received
  21. 21Crash Recovery (Host) IDifficult
    -For hosts:: after reboot tables and params are reinitialised. TO recover previous status:
    Server (receiver) might broadcast all TPDU to all other hosts, announcing it had just been rebooted and requests that its clients(sender) inform it of the status of all open connections. Each client can be in two states:
    s0 = no TPDUs
    s1 = TPDUs
  22. 22Crash Recovery (Host) IIServer programmed in two ways:
    Sends ACK first (A)
    Write to app process first (W)
    Client programmed four ways:
    always retransmit last TPDU
    never transmit last TPDU
    retransmit only in state s0
    retransmit only in state s1
  23. 23UDP User Datagram ProtocolThis is a connectionless protocol primarily for establishing low latency, loss tolerating connections.
    Transmits segments consisting of 8 byte header followed by payload.
    Does not use flow or error control, or retransmission upon bad payload
  24. 24UDP ExampleEspecially useful in client-server situation e.g. an application that uses UDP is Domain Name System.
    Find IP address of remote host found by:
    Passing symbolic address to resolver library function - sends UDP segment to DNS which looks up name and return IP address to resolver. Doesn’t matter too much if a request doesn’t make it - can just send another request and try again.
  25. 25TCP Service ModelComplete TCP address consists of: IP address and a port number (TSAP)
    Does not support multi-casting or broadcasting
    Connections are: full duplex and point to point; byte stream
    Port numbers:
    [0-123] well known
    [1024-49151] registered ports
    [48512-655335] dynamic/private ports
  26. 26Port Examples21 FTP file transfer
    23 Telnet
    25 SMTP email
    69 TFTP trivial file transfer
    79 Finger look up info about user
    80 HTTP world wide web
    110 POP-3 Remote email access
    119 NNTP USERNET news
  27. 27Sending TCP aka Passing DataWhen app passes data to TCP, TCP may send immediately or buffer it (in order to collect large amount and send at once):::
    -PUSH flag - used by apps to force data out
    -URGENT flag - used by app to cause TCP to stop accumulating data and transmit everything it has for connection immediately. When URGENT received, receiving app stops what it was doing to read the urgent data.
  28. 28TCP ProtocolFeatures:
    Every byte on TCP connection has 32 bit sequence numbers [a different one used for ACK]
    TCP entities called Segments = 20 byte field header with 0 or more data bytes.
    Limits seg size:
    1) Seg size + TCP header must fit into IP payload, 2) Must fit into MTU
  29. 29Properties of Header ISource/dest port - 16 bit
    Seg number - first byte in segment. If SYN is set, this field is initial sequence numbers, the first data octet is ISN+1 used to number segments and manage order of segments
    Ack number - sequence number of next data octet in TCP entity
    Urgent pointer - points to last octet in sequence of urgent data
    Checksum - error detection code, checks the header and data
    Window size - flow control
  30. 30Properties of Header IIOne bit flags:
    URG: urgent point field
    ACK: acknowledgement field
    PSH: push func, tcp user can require TCP to send all outstanding data
    RST: reset the connection
    SYN: synchronise sequence numbers, used to establish connections
    FIN: no more data from sender used to release connections
  31. 31TCP Connection EstablishmentConnection established via three way handshake
    1) sender waits for incoming connection, executes LISTEN AND ACCEPT primitives
    2) client executes CONNECT primitives that provide [IP address, port num, max TCP seg size willing to accept]
    3) CONNECT primitive sends a TCP segment with SYN on and ACK off, waits for response
    4) Server transport entity checks if there is a process that has done a listen
    IF listen= no, reply with RST bit to reject
    IF listen = yes, some process listening so either accept or reject
  32. 32TCP Connection ReleaseTCP connections are full duplex aka need to be released independently
    Four segments: 1) FIN bit set at each end, 2) ACK set at each end
    To avoid two army problem:
    If response to FIN not forthcoming within 2 max packet lifetimes:
    -sender of FIN released connect
    -other side will notice nobody is listening and time out
  33. 33TCP Transmission Policy (Flow Control)Receiving entities will advertise a window segment that can receive and buffer
    Each entity can adjust window size of other sender dynamically using sets window field
    [in terms of flow control] seq number refers to byte sequence instead of packet (seg) sequences
  34. 34WINDOW ADVERTISEMENT-Each entity implements flow control using a credit mechanism called WINDOW ADVERTISEMENT
    —>credit specifies max num of bytes the entity sending the seg can receive and buffer
  35. 35Credit Allocation Scheme:Each header includes three fields:
    SN Sequence num
    AN ACK num
    W Window
    Steps:
    TCP seg sends seg w/ sea num of first octet in seg
    >dest TCP seg entity B will ACK with AN = i, w=j
    >octets up to and including i-1 are ACKED
    >next expected octet num is j
    >source TCP, A, has credit to send additional octet j
    >seq number i through i+j-1
  36. 36Effects of Window Size IW = Window Size
    R = Data rate bps at TCP source to given connection
    D = prop delay in seconds
    2D = ACK to arrive to A, during this time source can transmit total 2RD bits
  37. 37Effects of Window Size IISource window = W until ACk is received
    IF W>RD/4; s= 1
    IF W
  38. 38Send PolicyW/O PUSH and closed transmission window, sending TCP entity is free to transmit data at own discretion. Depends on performance considerations.
    [If infreq+ large] low overheads but slow propagation
    [If freq + small] quick response, high overhead, silly window syndrome
  39. 39Silly Window SyndromeWhen receiver is only able to accept a few bytes at a time, or when sender transmits in small segments repeatedly
  40. 40Accept Policy[In order] discard those out of order
    [In window] accept all frames within window
  41. 41Delivery PolicyArriving data is stored in a data buffer
    If PUSH flag set = data and data in delivery buffer are submitted to dest user in a RECEIVE command
    If PUSH not set = TCP may wait to avoid excess interrupts
    If URG set = user is signalled that urgent data is present
  42. 42Retransmit PolicyTCP maintains queue of segments that have been sent but not ACKed
    Strategies:
    -On transmission timer for entire list
    -If ACK received seg removed and timer reset
    -If timer expires, first seg in queue is retransmitted
    -Batch which retransmits all segments in queue
  43. 43ACK policyImmediate
    Cumulative (wait for outbound segments)
  44. 44TCP Congestion ControlCONGESTION - when load on network is more than it can handle - leads to reduced throughput, longer response times. Most congestion controller handled by TCP. To deal with it, cannot inject new packets with SIN until another leaves.
    TCP dynamically manipulate window size via detecting congestion
  45. 45Preventing CongestionAfter connection established, window is selected. Receiver can specify window size based on buffer size. DIS: due to overflow at receiving end, will not occur
  46. 46Solution [to preventing congestion downfall]Ultimately congestion can be controlled by limiting total amount of data in network -
    FOR data link, the sliding window protocol allowed a way for receiver to pace sender
    FOR transport - use same pacing effect. Rate at which TCP sends data is controlled by rate of incoming ACKs, once any initial credit is used up. Rate of ACK arrival is dependent on RTT.
  47. 47TCP segment pacing IThickness to pipe is proportional to data rate
    Lower speed links create bottle necks
    Segment represented by rectangle areas - spread out if data rate is low
    Wider spacing preserved at dest even though data rate on final link is high, therefore the segment spacing at the receiver is: Pr = Pb
  48. 48TCP segment pacing II[In steady state]
    Senders segment rate = arrival rate of ACKS, determined by slowest link in path
    [Sending TCP entity auto sense and regulates flow] - self clocking
  49. 49Congestion ControlNetwork solution is to realised that two potential problems exist: network capacity, receiver capacity. Important techniques:
    Slow start
    Dynamic Window sizing on congestion
  50. 50Slow Start IEach sender maintains two windows
    >aWND - window receiver has granted = min{credit, cWND}
    >cWND - congestion window
    >credit - amount of unused credit granted in most recent ACK in segments
  51. 51Slow Start IIAfter connection established
    -Sender intialises CWND size to max+seg, sends one max seg instead.
    -If sender ACKED before timeout, cWMD increases to two MAX seg size and two sets are sent
    -CWND grows exponentially, until receiver window is reached or timeout occurs
  52. 52Dynamic Window SizeAN internet congestion control algorithm
    If congestion causes timeout, cut back flow and then ramp up slowly
    When timeout occurs:
    ssthresh = slow start threshold
    set ssthresh = cWnd/2
    set Cwd = 1 and perform slow start until CWND = SSTHRESH
    -From then on linear grow, increase CWND by 1 (segment) after every ACK until receivers window is reached timeout occur
  53. 53TCP managementTCP uses multiple users to do its work
    Determine round trip between sending segment and receiving its ACK is tricky - even if RTT is known, deciding time out is difficult
  54. 54Exponential BackoffWhat RCT value should use when retransmit segment?
    TCP source increases RTO value each time and the same segment is retransmitted. After first retransmission, wait for a larger time before second retransmission.

Information

Description
Flashcards on Transport Layer, created by Eric Wojcik on 14/06/2018.
Created by
Eric Wojcik
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?