Network Protocol Architecture

Embed Size (px)

Citation preview

  • 8/7/2019 Network Protocol Architecture

    1/19

    Network Protocol Architecture

  • 8/7/2019 Network Protocol Architecture

    2/19

    Layered Protocols for Networking

    Applicationlayer

    Presentationlayer

    Session

    layer

    Transportlayer

    Networklayer

    Data linklayer

    Applicationlayer

    Transportlayer

    Physicallayer

    Networklayer

    Link layer

    ISO/OSI Reference Model TCP/IP Model

    Physical layer

  • 8/7/2019 Network Protocol Architecture

    3/19

    Why Layers?

    Divide and conquer: easier to design

    Mix and match: e.g., IP over wireless link Changes isolated

  • 8/7/2019 Network Protocol Architecture

    4/19

    What each layer does

    Physical: bits (0/1), voltages, wires, pins

    Data Link: framing, error detection Network: addressing, routing

    Transport: end-to-end delivery, congestion

    and flow control

    Application: specific to application need

  • 8/7/2019 Network Protocol Architecture

    5/19

    The IP Hourglass

    IP

    TCP, UDP

    HTTP, FTP, NNTP, SMTP,telnet, ...

    coax, twisted pair, fiber,wireless, ...

    Ethernet,

    FDDI, SONET

    Physical Layer

    Data Link Layer

    Network Layer

    Transport Layer

    Application Layer

    Spanning layer

  • 8/7/2019 Network Protocol Architecture

    6/19

    Some Protocols in TCP/IP Suite

  • 8/7/2019 Network Protocol Architecture

    7/19

    TCP/IP Model

    Appl

    Trans

    port

    Net

    work

    Link

    Net

    work

    Link

    Net

    work

    Link

    Appl

    Trans

    port

    Net

    work

    Link

    Host A Host BRouter 1 Router 2

    end-to-end

    point-to-point

    point-to-point

    end-to-end

  • 8/7/2019 Network Protocol Architecture

    8/19

    Message Flow

    Appl

    Trans

    port

    Net

    work

    Link

    Net

    work

    Link

    Net

    work

    Link

    Appl

    Trans

    port

    Net

    work

    Link

    Host A Host BRouter 1 Router 2

  • 8/7/2019 Network Protocol Architecture

    9/19

    Encapsulation

    Appl

    Trans

    port

    Net

    work

    Link

    Net

    work

    Link

    Net

    work

    Link

    Appl

    Trans

    port

    Net

    work

    Link

    Host A Host BRouter 1 Router 2

    Data

    Data

    Data

    Data

  • 8/7/2019 Network Protocol Architecture

    10/19

    Example

    HTTP

    TCP

    IP

    Link

    IP

    Link

    IP

    Link

    HTTP

    TCP

    IP

    Link

    Host A Host BRouter 1 Router 2

    Data

    Data

    Data

    HTTP header

    TCP header

    IP header

    Data

    TCP payload

    IP payload

    Frame payload

    Frame header

    Frame trailer

  • 8/7/2019 Network Protocol Architecture

    11/19

    Protocol Techniques

    For bit corruption

    Parity

    Checksum

    CRC

    For out-of-order delivery

    Sequence numbers

    Duplication

    Sequence numbers

  • 8/7/2019 Network Protocol Architecture

    12/19

    Protocol Techniques

    (continued)

    For lost packets

    Positive acknowledge and retransmission

    For replay (excessive delay)

    Unique message ID

    For data overrun

    Flow control

  • 8/7/2019 Network Protocol Architecture

    13/19

    Flow Control

    Needed because

    Sending computer system faster than receiving computer

    Sending application faster than receiving application

    Related to buffering

    Two forms

    Stop-and-go

    Sliding window

  • 8/7/2019 Network Protocol Architecture

    14/19

    Stop-And-Go Flow Control

    Sending side

    Transmits one packet

    Waits for signal from receiver

    Receiving side

    Receives and consumes packet

    Transmits signal to sender

    Inefficient

  • 8/7/2019 Network Protocol Architecture

    15/19

    Sliding Window Flow Control

    Receiving side

    Establishes multiple buffers and informs sender

    Sending side

    Transmits packets for all available buffers

    Only waits if no signal arrives before transmission

    completes

    Receiving side

    Sends signals as packets arrive

  • 8/7/2019 Network Protocol Architecture

    16/19

    Illustration Of Sliding

    Window On Sending Side

    123456789101112

    123456789101112

    123456789101112

    window

    window

    window

    (a)

    (b)

    (c)

    already acknowledgedstill unsent

    Window tells how many packets can be sent

    Window moves as acknowledgements arrive

  • 8/7/2019 Network Protocol Architecture

    17/19

    Performance

    Stop-and-go

    Slow

    Useful only in special cases

    Sliding window

    Fast

    Needed in high-speed network

  • 8/7/2019 Network Protocol Architecture

    18/19

    Comparison Of Flow Control

    computer 1 computer 2 computer 1 computer 2

    send

    packet

    sendpacket

    sendpacket

    sendpacket

    sendack

    sendack

    sendack

    sendack

    done

    sendfourpackets

    sendfouracks

    done

    (a) (b)

  • 8/7/2019 Network Protocol Architecture

    19/19

    Why Sliding Window?

    Simultaneously

    Increase throughput

    Control flow

    Speedup

    Tw = min (B, Tg W)

    where

    * B is underlying hardware bandwidth,

    * Tw is sliding window throughput

    * Tg is stop-and-go throughput

    * W is the window size