Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

download Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

of 44

Transcript of Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    1/44

    TN_SP024_E1_1

    TCP/IP Protocol and Routing Basics

    V0610

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    2/44

    Course Objectives

    TCP/IP protocol stack overview

    Commonly used equipments

    Routing principle

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    3/44

    TCP/IP Protocol

    TCP/IPTransfer Control Protocol/InternetProtocol

    Abstract layered model

    A group of protocols

    The core function is addressing , route selection (IPprotocol at network layer) and transport control (TCP,

    UDP at transport layer)

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    4/44

    Application

    layer

    TelnetFTP HTTPSMTP

    Transport

    layer

    Application layer

    Network

    Interface

    layer

    Network layer IP

    UDPTCP

    Presentation layer

    TCP/IP

    ARP Network layer

    FDDI

    RARP

    Session Layer

    Data Link Layer

    Transport Layer

    Physical Layer

    Internet Protocol stack

    DNSHTTPS SNMP

    OSI

    Ethernet WLAN

    ATMToken Ring

    TCP/IP Protocol

    TCP/IP Protocol model

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    5/44

    TCP/IP Protocol

    Basic conceptlayer Only peer layer can communicate with each other

    at different system, it means that each layer in

    sending part can only communicate with

    corresponding layer at receiving part

    Same kind of protocols must be used between

    different entities

    Data units must be encapsulated anddecapsulated when transferred between different

    layers

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    6/44

    TCP/IP Protocol

    Basic conceptencapsulation

    When information transferred downwards , the software

    at each layer is responsible to add the head information,

    this is called encapsulation

    Network

    Interface

    layer

    IP layer

    TCP layer

    Application

    layer User data

    TCP segment

    frame

    IP packet

    User data

    TCP segment

    frame

    IP packet

    bitNetwork

    Interface

    layer

    IP layer

    TCP layer

    Application

    layer

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    7/44

    TCP/IP protocol

    Transport layer protocolTCP Segment upper layer data

    Establish end to end connection

    Ensure the reliability of data transfer

    16

    Window

    16

    Check-

    sum

    16

    Urgent

    0 or 32

    Option Data...

    # Bits 616 32 416 632

    Source

    port

    Dest

    port

    Sequence

    number

    Ack

    number

    Header

    LengthReserved

    U

    R

    G

    A

    C

    K

    P

    S

    H

    R

    S

    T

    S

    Y

    N

    F

    I

    N

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    8/44

    TCP/IP Protocol

    Transport layer protocolUDP Similar function as TCP

    Simple header format

    Unreliable data transfer

    High transfer efficiency

    16

    Source

    port

    16

    Destination

    port

    16

    Length

    16

    Checksum Data

    # Bits

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    9/44

    TCP/IP Protocol

    TCP/IP addressing Each layer in TCP/IP protocol stack use its own

    addressing scheme:

    Application layer use host name

    Transport layer user port number Network layer user IP address

    Network interface layer use MAC address

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    10/44

    In the same subnet, network part of IPaddress is the same

    In different subnet, network part of IP

    address is different , router must be used to

    connect them with outside network

    TCP/IP Protocol

    IPv4 address In TCP/IP protocol, a unique IP address is assigned to

    the host to identify them.

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    11/44

    VersionHeader len Service Type Total LengthIdentification Flag Fragment offset

    TTL Protocolource IP address

    ...

    recedence D T R C Unused

    it0 4 8 16 19 24 31

    20

    bytesfixedlength

    lengthvariable

    0 1 2 3 4 5 6 7

    OptionsUpper layer data

    Destination IP addressFilling in

    TCP/IP Protocol

    IP packet header format

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    12/44

    TCP/IP Protocol

    IPv4 address

    255 255 255 255

    Dotted

    Decimal

    Maximum

    Network Host

    128

    64

    32

    168421

    11111111 11111111 11111111 11111111Binary

    1 8 9 16 17 24 25 32

    128

    64

    32

    168421

    128

    64

    32

    168421

    128

    64

    32

    168421

    32 bits

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    13/44

    1

    Class A:

    Bits:

    0NNNNNNN Host Host Host

    8 9 16 17 24 25 32

    Range (1-126)

    1

    Class B:

    Bits:

    10NNNNNN Network Host Host

    8 9 16 17 24 25 32

    Range (128-191)

    1

    Class C:

    Bits:

    110NNNNN Network Network Host

    8 9 16 17 24 25 32

    Range (192-223)1

    Class D:

    Bits:

    1110MMMM Multicast Group Multicast Group Multicast Group

    8 9 16 17 24 25 32

    Range (224-239)

    TCP/IP Protocol

    IP address classification

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    14/44

    Class A:

    Class B:

    Class C:

    Class D: Multicast

    Class E: Research

    Network Host Host Host

    Network Network Host Host

    Network Network Network Host

    8 bits 8 bits 8 bits 8 bits

    TCP/IP Protocol

    IP address classification

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    15/44

    Addressing Without Subnets

    172.16.0.0 172.17.2.0

    172.19.0.0

    172.18.0.0

    Subnet: 172.16.0.0

    Subnet mask: 255.255.0.0

    A

    B

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    16/44

    TCP/IP Protocol

    Subnet In order to solve the problem of IP address shortage

    and reduce IP address waste, subnet is adopted.

    Subnet means use several bits of the host part as the

    subnet address. Such as:

    0 Network address,7bit Host address, 16bit

    0 31

    Subnet address, 8bit

    In this way, a class A network can be divided into 256 subnets, the

    IP addresses is efficiently used.

    Please pay attention, communication between different

    subnets is the same as communication between different

    networks, router must be used.

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    17/44

    172.16.2.200

    172.16.2.2

    172.16.2.160

    172.16.2.1

    172.16.3.5

    172.16.3.100

    172.16.3.150

    172.16.3.1

    E0E1

    172.16 2 160

    Network Host

    . . Network Interface

    172.16.2.0

    172.16.3.0

    E0

    E1

    New Routing Table

    Subnet

    TCP/IP Protocol

    Subnet division

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    18/44

    Addressing With Subnets

    172.16.1.0 172.16.2.0

    172.16.3.0

    172.16.4.0A

    B

    Subnet mask: 255.255.255.0

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    19/44

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    20/44

    Address Subnet Mask Class Subnet

    172.16.2.10

    10.6.24.20

    10.30.36.12

    255.255.255.0

    255.255.240.0

    255.255.255.0

    TCP/IP Protocol

    Subnet mask exercise

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    21/44

    Address Subnet Mask Class Subnet

    172.16.2.10

    10.6.24.20

    10.30.36.12

    255.255.255.0

    255.255.240.0

    255.255.255.0

    B

    A

    A

    172.16.2.0

    10.6.16.0

    10.30.36.0

    TCP/IP Protocol

    Subnet mask exercise answer

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    22/44

    Course Objectives

    TCP/IP protocol stack Commonly used equipments

    Routing principle

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    23/44

    Hub: works at physical layer

    Send to all the

    other ports when

    receiving signal

    Connect

    equipments that

    are in the same

    segment

    PC1 PC2 PC3

    0101101 01011010101101

    Signal

    detected

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    24/44

    Switch : works at data link layer

    Forwarding

    frames according

    to MAC address Connect

    equipments that

    are in the same

    segment

    1.1.1.1

    MAC1

    1.1.1.2

    MAC2

    DATAIPMAC2

    MAC Out

    MAC1 1

    MAC2 2

    DATAIPMAC2

    1.1.1.3

    MAC3

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    25/44

    Difference between Hub and Switch

    100M 10 port HUB 100M 10 port Switch

    bandwidth100M

    Slower with

    more people

    bandwidth>100M*10*2

    No affect

    with more

    people

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    26/44

    Router: Works at network layer

    forwarding accordingto destination

    network address

    connect equipments

    that are in different

    segments

    Need to collect

    routing information(e.g:OSPF, BGP)

    NET Out

    2.0.0.0 21.0.0.0 1

    1.1.1.1

    G: 1.1.1.254

    MAC1

    2.2.2.2

    G:2.2.2.254

    MAC2

    data2.2.2.2MAC3 data2.2.2.2MAC2

    SW1:1.1.1.254

    MAC3

    SW2:2.2.2.254

    MAC4

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    27/44

    Router Switch

    Router switch has both layer two switching and layerthree routing function

    Router

    switch

    RS

    1.1.1.1/24

    G:1.1.1.254

    1.1.1.2/24

    G:1.1.1.254

    Interface fei_1/1

    ip add 1.1.1.254 255.255.255.0

    1.1.1.2/24

    G:1.1.1.254

    1.1.1.1/24

    G:1.1.1.254

    Interface vlan10ip add 1.1.1.254 255.255.255.0

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    28/44

    Comparison between Router and Router-Switch

    Router Router Switch

    CPU process packets, Distributednetwork processor can improve

    processing capabilities

    Low in port density, expensiveHigh in port density, cost

    performance high

    suitable for inner data exchange of

    large LAN, routing function is not

    as strong as router of the same level

    suitable for routing between

    different networks at network

    egress

    Switching chip and cpu together

    architecture

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    29/44

    Course Objectives

    TCP/IP protocol stack Commonly used equipments

    Routing principle

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    30/44

    Route table composition

    Example

    172.16.8.0 -- Destination network address

    255.255.255.0 -- Destination network mask

    1.1.1.1 -- Next hop address

    fei_0/1.1 -- Route learning interface and forwarding interfacestatic -- how does router learns this entry

    1 -- route priority

    0 -- Metric

    Dest Mask Gw Interface Owner pri metric

    172.16.8.0 255.255.255.0 1.1.1.1 fei_0/1.1 static 1 0

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    31/44

    Route Types

    Static route Dynamic route

    Directly

    connected route

    Default route

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    32/44

    192 168 0 1/30

    192 168 0 2/30

    10 0 0 1/24172 16 0 1/24A B

    IPv4 Routing Table:

    Dest Mask Gw Interface Owner pri metric

    10.0.0.0 255.255.255.0 10.0.0.1 fei_0/1 direct 0 0

    10.0.0.1 255.255.255.255 10.0.0.1 fei_0/1 address 0 0

    192.168.0.0 255.255.255.252 192.168.0.1 e1_1 direct 0 0

    192.168.0.1 255.255.255.255 192.168.0.1 e1_1 address 0 0

    ZXR10#

    Directly connected route

    Directly connected route

    When network address is configured and the status of the interface isvalid, the network configured on this network will appear in the routetable and associated with this interfacethe route will change with thestatus of the interface.

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    33/44

    Static route configuration

    This is a unidirectional route, there should be an

    opposite route configured on the counterpart router.

    ip route 10.0.0.0 255.0.0.0 172.16.2.2

    Stub Network

    172.16.2.1

    SO

    172.16.1.0

    B172.16.2.2NetworkB A10.0.0.0

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    34/44

    Example

    Default route configuration

    Default route is configured on the egress router in a

    stub network.

    Stub Network

    ip route 0.0.0.0 0.0.0.0 172.16.2.2

    172.16.2.1

    SO

    172.16.1.0

    B172.16.2.2

    Network A B

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    35/44

    RIPOSPF RIPOSPF

    1.0.0.0/8 2.0.0.0/8 3.0.0.0/8

    Dynamic route

    Routing protocol is a software process running on

    the router. It will exchange routing information withother routersstudying route information of

    network not directly connected and adjusting the

    route information when topology changes.

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    36/44

    RIP OSPF

    Route table

    10.0.0.0/16 fei_1/1

    Notice the comparison of routepriority must be between identical

    routes.

    10.0.0.0/16 fei_1/3

    10.0.0.0/16 fei_1/3

    Route priority

    Select the route that has the highest priority to theroute table

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    37/44

    Connected interface 0

    Static route 1

    External BGP 20

    OSPF 110

    IS-IS 115

    RIP v1, v2 120

    Internal BGP 200

    Special (For inner process) 255

    Route Source Default priority

    Default route priority

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    38/44

    Longest match principle

    10.1.1.1

    ?

    ZXR10#show ip routeIPv4 Routing Table:

    Dest Mask Gw Interface Owner pri metric

    1.0.0.0 255.0.0.0 1.1.1.1 fei_1/1.1 direct 0 0

    1.1.1.1 255.255.255.255 1.1.1.1 fei_1/1.1 address 0 0

    2.0.0.0 255.0.0.0 2.1.1.1 fei_1/1.2 direct 0 0

    2.1.1.1 255.255.255.255 2.1.1.1 fei_1/1.2 address 0 0

    3.0.0.0 255.0.0.0 3.1.1.1 fei_1/1.3 direct 0 0

    3.1.1.1 255.255.255.255 3.1.1.1 fei_1/1.3 address 0 0

    10.0.0.0 255.0.0.0 1.1.1.1 fei_1/1.1 ospf 110 10

    10.1.0.0 255.255.0.0 2.1.1.1 fei_1/1.2 static 1 010.1.1.0 255.255.255.0 3.1.1.1 fei_1/1.3 rip 120 5

    0.0.0.0 0.0.0.0 1.1.1.1 fei_1/1.1 static 0 0

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    39/44

    Communication in the same network

    Network

    A

    To router1

    Communicationrequirement

    Hub/switch

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    40/44

    Communication process

    IP address192.168.1.2

    MAC address00:20:AF:00:00:02IP address192.168.1.1

    MAC address00:20:AF:00:00:01

    Ethernet

    IP layer

    No need to consider

    higher layer protocolsEncapsulate IP

    address in

    packet and send

    to 192.168.1.2

    Ethernet

    IP layer

    Encapsulate MAC

    address in frame

    and send to MAC

    address

    00:20:AF:00:00:02

    Decapsulate

    MAC frame

    Receiving

    MAC frame

    ARP

    decapsulate

    IP packet

    Receiving

    IP packet

    A B

    Network

    Protocol

    layer

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    41/44

    Communication between different network

    Network BNetwork A

    Router

    Communication

    requirements

    Ethernet

    Router

    Ethernet

    DDN

    PPP

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    42/44

    EthernetEthernetinterface

    Communication between different network

    Ethernet

    IP layer

    MAC

    frame

    IP layer

    Serialinterface

    Ethernetinterface

    IP layer

    Network

    Protocol

    PPP packet

    IP

    packet

    IP

    packet

    Send host

    A

    Receiving

    host Brouter

    Ethernet

    PPP

    HOST A HOST B

    fei-1/1 e1_2/1.1

    Ethernet

    fei-1/1e1_2/1.1

    IP layer

    router

    PPP

    frame

    IP

    packet

    Serialinterface

    MAC

    frame

    IP

    packet

    IP

    packet

    IP

    packet

    No need to consider

    higher layer protocols

    No need to consider

    higher layer protocols

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    43/44

    IP communication process

    IP communication process basic conception: IP communication is hop by hop communication

    Source IP and destination IP address is unchanged

    Every time the packet passed a data link layer, there

    will be a new encapsulation of the packet The return path is not related to the forwarding path

  • 8/13/2019 Wcn(Ps) Bc en Zxwn Ps Protocols and Signaling Flow(Tcpip) 4 201005 45

    44/44