chap6 network layer protocol

Upload: ayushi-tewari

Post on 14-Apr-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 chap6 network layer protocol

    1/34

    The Transport Layer

    Chapter 6

  • 7/30/2019 chap6 network layer protocol

    2/34

    The Transport Service

    Services Provided to the Upper Layers

    Transport Service Primitives

    Berkeley Sockets

  • 7/30/2019 chap6 network layer protocol

    3/34

    Services Provided to the Upper Layers

    The network, transport, and application layers.

  • 7/30/2019 chap6 network layer protocol

    4/34

    Transport Service Primitives

    The primitives for a simple transport service.

  • 7/30/2019 chap6 network layer protocol

    5/34

    Transport Service Primitives (2)

    The nesting of TPDUs, packets, and frames.

  • 7/30/2019 chap6 network layer protocol

    6/34

    Transport Service Primitives (3)

    A state diagram for a simple connection management scheme.

    Transitions labeled in italics are caused by packet arrivals. The

    solid lines show the client's state sequence. The dashed lines show

    the server's state sequence.

  • 7/30/2019 chap6 network layer protocol

    7/34

    Berkeley Sockets

    The socket primitives for TCP.

  • 7/30/2019 chap6 network layer protocol

    8/34

    Elements of Transport Protocols

    Addressing

    Connection Establishment

    Connection Release Flow Control and Buffering

  • 7/30/2019 chap6 network layer protocol

    9/34

    Transport Protocol

    (a) Environment of the data link layer.

    (b) Environment of the transport layer.

  • 7/30/2019 chap6 network layer protocol

    10/34

  • 7/30/2019 chap6 network layer protocol

    11/34

    Connection Establishment

    How a user process in host 1 establishes a connection

    with a time-of-day server in host 2.

  • 7/30/2019 chap6 network layer protocol

    12/34

    Connection Establishment(1)

    Packet lifetime can be restricted to a known maximum

    using one of the following techniques

    1. Restricted subnet design

    2. Putting a hop counter in each packet

    3. Time stamping each packet

  • 7/30/2019 chap6 network layer protocol

    13/34

    Connection Establishment (2)

    Three protocol scenarios for establishing a connection using athree-way handshake. CR denotes CONNECTION REQUEST.

    (a) Normal operation,

    (b) Old CONNECTION REQUEST appearing out of nowhere.

    (c) Duplicate CONNECTION REQUEST and duplicate ACK.

  • 7/30/2019 chap6 network layer protocol

    14/34

    Connection Release

    Abrupt disconnection with loss of data.

  • 7/30/2019 chap6 network layer protocol

    15/34

    Connection Release (2)

    The two-army problem.

  • 7/30/2019 chap6 network layer protocol

    16/34

    Connection Release (3)

    Four protocol scenarios for releasing a connection. (a) Normal case of a

    three-way handshake. (b) final ACK lost.

    6-14, a, b

  • 7/30/2019 chap6 network layer protocol

    17/34

    Connection Release (4)

    (c) Response lost. (d) Response lost and subsequent DRs lost.

    6-14, c,d

  • 7/30/2019 chap6 network layer protocol

    18/34

    Flow Control and Buffering

    (a) Chained fixed-size buffers. (b) Chained variable-sized buffers.

    (c) One large circular buffer per connection.

  • 7/30/2019 chap6 network layer protocol

    19/34

    The Internet Transport Protocols: UDP

    Introduction to UDP

    Remote Procedure Call

  • 7/30/2019 chap6 network layer protocol

    20/34

    Introduction to UDP

    The UDP header.

  • 7/30/2019 chap6 network layer protocol

    21/34

    Remote Procedure Call

    Steps in making a remote procedure call. The stubs are shaded.

  • 7/30/2019 chap6 network layer protocol

    22/34

    TCP Protocol

    - TCP has TCP entity- Break data into pieces not exceeding than 64KB & send as IP

    datagram

    - 16 bit port number

    - Below 1024 are well known ports

    - inetd (internet daemon)

  • 7/30/2019 chap6 network layer protocol

    23/34

    The TCP Service Model

    Some assigned ports.

    Port Protocol Use21 FTP File transfer23 Telnet Remote login

    25 SMTP E-mail69 TFTP Trivial File Transfer Protocol

    79 Finger Lookup info about a user80 HTTP World Wide Web

    110 POP-3 Remote e-mail access

    119 NNTP USENET news

  • 7/30/2019 chap6 network layer protocol

    24/34

  • 7/30/2019 chap6 network layer protocol

    25/34

    The TCP Segment Header

    TCP Header.

  • 7/30/2019 chap6 network layer protocol

    26/34

    The TCP Segment Header (2)

    The pseudoheader included in the TCP checksum.

  • 7/30/2019 chap6 network layer protocol

    27/34

    TCP Connection Establishment

    (a) TCP connection establishment in the normal case.

    (b) Call collision.

    6-31

  • 7/30/2019 chap6 network layer protocol

    28/34

    TCP Connection Release

    - Connections are full duplex

    - Send FIN to release connection

  • 7/30/2019 chap6 network layer protocol

    29/34

    TCP Transmission Policy

    Window management in TCP.

  • 7/30/2019 chap6 network layer protocol

    30/34

    TCP Transmission Policy

    - Ex. Telnet connection to interactive editor that react on every key

    stroke

    - creates 21 byte TCP segment & 41 byte IP datagram

    - Wastage of bandwidth

    - delay Ack

    - Nagle's Algorithm

    Send first byte & buffer all until outstanding byte is

    acknowledged

    Send all buffered characterStart buffering again until they are all acknowledged

  • 7/30/2019 chap6 network layer protocol

    31/34

    TCP Transmission Policy (2)

    Silly window syndrome.

  • 7/30/2019 chap6 network layer protocol

    32/34

    Clark solution

    - Prevent the receiver from sending window update for 1 byte- forced to wait until it has decent amount of space available

    - Receiver should not update window size until it can handle

    maximum size

    - Sender should not send tiny segments & wait till large data comes

  • 7/30/2019 chap6 network layer protocol

    33/34

    TCP Congestion Control

    - Do not inject the packets until old one delivered

    - Congestion can be prevented by

    Specifying suitable window size

    receiver can specify window based on it's buffer size

    problem may occur due to internal congestion within network

  • 7/30/2019 chap6 network layer protocol

    34/34

    TCP Congestion Control

    (a) A fast network feeding a low capacity receiver.

    (b) A slow network feeding a high capacity receiver