2 Tcpip Basis

Embed Size (px)

Citation preview

  • 7/27/2019 2 Tcpip Basis

    1/37

    T

    HUAWEI TECHNOLOGIES CO., LTD. All rights reserved

    www.huawei.com

    TCP/IP Basis

  • 7/27/2019 2 Tcpip Basis

    2/37

    T

    HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 2

    The communication is realized via

    TCP/IP protocol stack between The

    computers with different model, different

    manufacturer and different OS. This

    course will introduce the architecture of

    TCP/IP protocol stack, the function of

    each layer and data encapsulation.

  • 7/27/2019 2 Tcpip Basis

    3/37

    T

    HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 3

    Upon completion of this course, you will be

    able to :

    Know architecture of OSI RM

    Master architecture TCP/IP and

    the function of each layer

    Understand the process of TCP/IP

    data encapsulation

  • 7/27/2019 2 Tcpip Basis

    4/37

    T

    HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 4

    Chapter 1 TCP/IP Protocol Stack

    Chapter 2 Data Encapsulation of

    TCP/IP Protocol Stack

    Chapter 3 Case analysis

  • 7/27/2019 2 Tcpip Basis

    5/37

    T

    HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 5

    OSI Reference Model

    OSI RM: Open System Interconnection Reference Model

    OSI RM has the following advantages

    To predigest pertinent network operation

    To provide compatibility and standard interface between devices

    To accelerate standardization working

    Structure is separable

    Easy to realize and maintenance

  • 7/27/2019 2 Tcpip Basis

    6/37

    T

    HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 6

    OSI Reference Model

    1

    2

    3

    4

    5

    6

    7

    Low Layers: In charge of data

    transmission in network.

    High Layers: In charge of data

    transmission between hosts.

    Application layer

    Presentation layer

    Session layer

    Transport layer

    Network layer

    Data link layer

    Physical layer

  • 7/27/2019 2 Tcpip Basis

    7/37T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 7

    Functions of the Seven Layers

    Application layer

    Presentation layer

    Session layer

    Transport layer

    Network layer

    Data link layer

    Physical layer1

    2

    3

    4

    5

    6

    7Provide communications

    between applications

    Deal with data format problems

    Establish, maintain and manage sessions

    Establish, maintain and

    manage end to end connection

    Addressing and routing

    Provide link medium accessand link management

    Bit flow transmission

  • 7/27/2019 2 Tcpip Basis

    8/37T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 8

    TCP/IP model

    TCP/IP

    7

    6

    5

    4

    3

    2

    1

    Application layer

    Presentation layer

    Session layer

    Transport layer

    Network layer

    Data link layer

    Physical layer

    5

    4

    3

    2

    1

    Application layer

    Transport layer

    Network layer

    Data link layer

    Physical layer

    OSI

    VS

  • 7/27/2019 2 Tcpip Basis

    9/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 9

    TCP/IP Protocol Stack

    Application layer

    Transport layer

    Network layer

    Data link layer

    Provide application program

    network interfaces

    Establish terminal to

    terminal connection

    Addressing and

    route selecting

    Physical media access

    Binary data flow transmissionPhysical layer

    HTTP, Telnet, FTP

    TFTP, Ping

    TCP/UDP

    IP

    Ethernet, 802.3, PPP

    Interfaces, wires

  • 7/27/2019 2 Tcpip Basis

    10/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 10

    Communication between Layers of TCP/IP

    Model and Data Encapsulation

    Segment

    Packet

    Frame

    BitPhysical layer

    Transport layer

    Network layer

    Data link layer

    Application

    layer

    0101110101001000010

    Upper layerdata

    Upper layer

    dataTCP header

    Upper layer

    dataIP header

    FCSUpper layer

    dataLLC header

    FCSUpper layerdata

    MAC header

    Host A PDU

  • 7/27/2019 2 Tcpip Basis

    11/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 11

    Data De-encapsulation

    0101110101001000010

    Upper layer data

    Upper layer data

    TCP+ upper layer data

    IP+TCP+ upper layer data

    LLC header+ IP+TCP+ upper layer data

    Host B

    Physical

    layer

    Network

    layer

    Data link

    layer

    Transportlayer

    Application

    layer

  • 7/27/2019 2 Tcpip Basis

    12/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 12

    The Function of Physical Layer

    Define medium type, interface type, sign type

    criterion of requirement for electric, engine, flow and function

    when physical link is activation, maintenance and shutdown

    between the terminal system.

    Criterion of character such as voltages, data rate, maximum

    transmission distance and physical connector.

    LAN WAN

    8

    0

    2

    .

    4

    8

    0

    2

    .

    5

    F

    D

    D

    IV.35

    V.24

    G.703

    EIA/TIA-232

    8

    0

    2

    .

    3

    Physical

    (Bits,signals,

    clocking)

  • 7/27/2019 2 Tcpip Basis

    13/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 13

    Physical layer medium and device

    Physical layer medium

    Coaxial cable

    Twisted-pair

    Fiber

    Wireless radio

    Physical layer device

    Repeaters, HUB

  • 7/27/2019 2 Tcpip Basis

    14/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 14

    The Function of Data Link Layer

    LLC sub-layer

    MAC sub-layer

    MAC Sub-layer : Media Access Control Sub-Layer

    Appoint that how to transmit data packet via physical line and

    communicate with physical layer

    LLC Sub-layer: Logic Link Control Sub-layer

    Distinguish protocol types, encapsulate the data and transmit via

    network

    Application layer

    Transport layer

    Network layer

    Data link layer

    Physical layer

  • 7/27/2019 2 Tcpip Basis

    15/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 15

    Protocols of Data Link Layer

    LAN WAN

    8

    0

    2

    .

    4

    8

    0

    2

    .

    5

    F

    D

    D

    I

    802.2 LLCFrame

    Relay PPP

    V.35

    Dial

    onDemand

    SDLC HDLC

    V.24

    G.703

    EIA/TIA-232

    8

    0

    2

    .

    3

    Data link layer LAN, WAN protocol

    Physical

    (Bits,signals,

    clocking)

    Data Link

    (Frames)

    Data link layer device

    Ethernet switch

  • 7/27/2019 2 Tcpip Basis

    16/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 16

    Data Link Layer Address

    MAC address is composed of 48 bits. The vendor ID of Huawei

    products is 0x00e0fc.

    00e0.fc01.2345

    24 bits 24 bits

    00e0.fc01.2345

    Rom

    Ram

    Vender Code Serial Number

  • 7/27/2019 2 Tcpip Basis

    17/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 17

    The Function and Device of Network Layer

    Network layer

    Data link layer

    Physical layer

    Network layer

    Data link layer

    Physical layer

    Network layer

    Data link layer

    Physical layer

    B

    Router A Router B Router C

    A

    CD

    EApplication layer

    Transport layer

    Network layer

    Data link layer

    Physical layer

    Function

    Data forwarding in the different networkDevice

    Router, layer 3 swtich

    Host A

    Host B

  • 7/27/2019 2 Tcpip Basis

    18/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 18

    Protocols of Network Layer

    Protocols of Network layer

    8

    0

    2

    .

    4

    8

    0

    2

    .

    5

    F

    DD

    I

    802.2 LLCFrame

    RelayPPP

    V.35

    Dial

    on

    Demand

    SDLC HDLC

    V.24

    G.703

    EIA/TIA-232

    8

    0

    2

    .

    3

    IP/ICMP/ARP/RARP

    Physical(Bits,

    signals,clocking)

    Data Link

    (Frames)

    Network

    (Packets)

  • 7/27/2019 2 Tcpip Basis

    19/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 19

    Network Address

    IP Address

    Network address identifies a device in the network layer

    uniquely

    Network address include two parts

    Network ID

    Host ID

    Host IDNetwork ID

    8.2.4810.

  • 7/27/2019 2 Tcpip Basis

    20/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 20

    The Function of Transport Layer

    Segment upper layer data

    Set up end to end connection

    Transmit data from end to end

    ensure the reliability of the data

    transmission

  • 7/27/2019 2 Tcpip Basis

    21/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 21

    Protocols of Transport Layer

    Physical

    (Bits,signals,

    clocking)

    Data Link

    (Frames)

    80

    2

    .

    4

    80

    2

    .

    5

    F

    D

    D

    I

    802.2 LLCFrame

    RelayPPP

    V.35

    Dial

    on

    Demand

    SDLC HDLC

    V.24

    G.703

    EIA/TIA-232

    80

    2

    .

    3

    Network(Packets)IP

    Transport

    (Segments)UDPTCP

  • 7/27/2019 2 Tcpip Basis

    22/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 22

    Main Protocols of Transport Layer

    TCP

    Connection-oriented

    Reliable

    Suit the application with

    high reliability

    High cost

    UDP

    Connectionless

    Trustless

    Suit the application that

    concerns transmission

    efficiency

    Reliability depends on

    application

  • 7/27/2019 2 Tcpip Basis

    23/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 23

    The Function of Application Layer

    Provide user interfaces and deal with specify applications

    Provide data encryption, decryption, compression

    and decompression.

    Specify the standards of data presentation.

  • 7/27/2019 2 Tcpip Basis

    24/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 24

    Protocols of Application Layer

    Physical

    (Bits,signals,

    clocking)

    Data Link

    (Frames) 80

    2

    .

    4

    8

    0

    2

    .

    5

    F

    D

    D

    I

    802.2 LLCFrame

    Relay PPP

    V.35

    Dial

    onDemand

    SDLC HDLC

    V.24

    G.703 EIA/TIA-232

    8

    0

    2

    .

    3

    Network

    (Packets)IP

    Transport

    (Segments)UDPTCP

    Application

    (Data)TFTP SNMP RIP DNS Radius

    FTP TELNET HTTP

    SMTP/POP3 DNS

  • 7/27/2019 2 Tcpip Basis

    25/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 25

    Chapter 1 Internet Connection of

    TCP/IP

    Chapter 2 Data Encapsulation of

    TCP/IP Protocol Stack

    Chapter 3 Case Analysis

  • 7/27/2019 2 Tcpip Basis

    26/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 26

    The Encapsulation Process of TCP/IP Protocol Stack

    User dataApp header

    User dataTCP headerIP header

    TCP Segment

    IP Packet

    46-1500 bytes

    14B 20-64B 20-60B 4B

    Ethernet Frame

    Application

    TCP

    IP

    Application drive

    user data

    User dataTCP header

    Ethernet traileruser dataTCP headerIP headerEthernet header

  • 7/27/2019 2 Tcpip Basis

    27/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 27

    TCP Segment

    16b 16b 32b 32b 64b

    Source

    Port

    Dest.

    Port...Seq Num Ack Num Option

    14B 20-60B 20B-60B 4B

    Ethernet Frame

    Ethernet trailerUser dataTCP headerIP headerEthernet header

  • 7/27/2019 2 Tcpip Basis

    28/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 28

    IP Packet

    versionMessage

    length Service type Total length

    identification Flag Chip offset

    Time to live protocol Message header checksum

    Source IP address

    Destination IP address

    IP options

    0 15 16 31

    20B

    Fixed

    message

    header

    14B 20-60B 20B-60B 4B

    Ethernet trailerUser dataTCP headerIP headerEthernet header

  • 7/27/2019 2 Tcpip Basis

    29/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 29

    Issue of IP Fragment

    Fragment principle: comparing with data length and MTU, if the former islarger than the latter, fragment is needed.

    HostHost

    MTU MTU

    Fragment on sending end

    Fragment on the middle routers

    IP

    packet

  • 7/27/2019 2 Tcpip Basis

    30/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 30

    Ethernet Frame

    Ethernet_II

    Length/Type value meaning

    Length/T > 1500

    Length/T

  • 7/27/2019 2 Tcpip Basis

    31/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 31

    Chapter 1 Internet Connection of

    TCP/IP

    Chapter 2 Data Encapsulation in

    TCP/IP Protocol Stack

    Chapter 3 Case Analysis

  • 7/27/2019 2 Tcpip Basis

    32/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 32

    Case Analysis (1)

  • 7/27/2019 2 Tcpip Basis

    33/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 33

    Case Analysis (2)

    Source

    MAC

    Destination

    MAC

    Type

  • 7/27/2019 2 Tcpip Basis

    34/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 34

    Case Analysis (3)

    Source IP DestinationIP

  • 7/27/2019 2 Tcpip Basis

    35/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 35

    Case Analysis (4)

    Source port

    Destination port

  • 7/27/2019 2 Tcpip Basis

    36/37

    T HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 36

    Summary

    What layers does OSI RM divide into?

    Whats the function of each layer of

    TCP/IP protocol stack?

    whats the process of message

    encapsulation and de-encapsulation in

    TCP/IP protocol stack?

    Whats the difference between MAC

    address and IP address?

  • 7/27/2019 2 Tcpip Basis

    37/37

    TThank You

    www.huawei.com