Sess1bc Networking Review

  • Upload
    -

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

  • 8/8/2019 Sess1bc Networking Review

    1/61

    Session 1b: Introductory

    TCP/IP Networking(An Example)

    1

    Objective

    This lecture illustrates the interactions of the protocols of the TCP/IPprotocol suite with the help of an example.

    The example intents to motivate the study of the TCP/IP protocols.

  • 8/8/2019 Sess1bc Networking Review

    2/61

    Review: TCP/IP Based Networks

    Internet is based on TCP/IP

    TCP/IP is a suite of protocols

    IP is Internet protocol at the network layer level

    TCP is connection-oriented transport protocol

    and ensures end-to-end connection

    UDP is connectionless transport protocol andprovides datagram service

    E-mail, WWW, FTP, Telnet: TCP/IP

    Network mgmt. (SNMP): UDP/IP ICMP: part of TCP/IP suite

  • 8/8/2019 Sess1bc Networking Review

    3/61

    TCP/IP Based Networks (cont.)

    (Protocols used in Network Management)

    SNMP(v1, v2, v3)

    Simple Network Management Protocol ICMP

    Internet Control Message Protocol

    Ping , traceroute (or tracert)

    ARP/RARP Address Resolution Protocol/ (Reverse ARP)

    TCP Socket

    Telnet/SSH

    HTTP+XML

  • 8/8/2019 Sess1bc Networking Review

    4/61

    TCP/IP Suite and OSI Reference Model

    Application

    Layer

    ApplicationLayer

    Presentation

    LayerSessionLayer

    TransportTransportLa er

    The TCP/IP protocol stack does notdefine the lower layers of a completeprotocol stack

    4

    NetworkLayer

    (Data) LinkLayer

    PhysicalLayer

    NetworkLayer

    OSIReference

    Model

    (Data) LinkLayer

    TCP/IP Suite

  • 8/8/2019 Sess1bc Networking Review

    5/61

    Application protocol

    IP is the highest layer protocol which is implemented at both

    routers and hosts

    5

  • 8/8/2019 Sess1bc Networking Review

    6/61

    IP: The waist of the hourglass IP is the waist of the

    hourglass of the Internet

    protocol architecture

    -

    Applications

    HTTP FTP SMTP

    TCP UDP

    6

    Multiple lower-layer protocols

    Only one protocol at the network

    layer.

    IP

    Data link layerprotocols

    Physical layerprotocols

  • 8/8/2019 Sess1bc Networking Review

    7/61

    Client

    ApplicationApplication

    Message (Frame)

    Data Communication Network

    tat on

    Mobile Client

    Station

    Station

    Router

    Mobile Client

    Station

    Access

    Line

    Trunk

    Line

    Switch

    Switch

    Switch

    Trunk

    Line

    Outside

    World

  • 8/8/2019 Sess1bc Networking Review

    8/61

    Internet/internet

    LAN

    LAN

    LAN

    LAN

    WAN

    LAN

    : router

  • 8/8/2019 Sess1bc Networking Review

    9/61

    HTTP Request and HTTP response Web browser runs an HTTP client program

    Web server runs an HTTP server program HTTP client sends an HTTP request to HTTP server

    HTTP server responds with HTTP response

    9

    HTTP client

    Argon

    HTTP server

    Neon

    HTTP request

    HTTP response

  • 8/8/2019 Sess1bc Networking Review

    10/61

    A simple TCP/IP Example A user on host argon.tcpip-lab.edu (Argon) makes a web

    access to URL

    http://Neon. tcpip-lab.edu/index.html.

    - -

    10

    What actually happens in the network?

    . .

    ("Argon")

    . .

    ("Neon")

    Web request

    Web page

    Web client Web server

  • 8/8/2019 Sess1bc Networking Review

    11/61

    HTTP Request

    GET /example.html HTTP/1.1

    Accept: image/gif, */*

    Accept-Language: en-us

    11

    Accept-Encoding: gzip, deflateUser-Agent: Mozilla/4.0

    Host: 192.168.123.144

    Connection: Keep-Alive

  • 8/8/2019 Sess1bc Networking Review

    12/61

    HTTP ResponseHTTP/1.1 200 OK

    Date: Sat, 25 May 2002 21:10:32 GMT

    Server: Apache/1.3.19 (Unix)

    Last-Modified: Sat, 25 May 2002 20:51:33 GMT

    ETag: "56497-51-3ceff955"

    Accept-Ranges: bytes

    Content-Length: 81

    Keep-Alive: timeout=15, max=100

    12

    Connection: Keep-Alive

    Content-Type: text/html

    Internet Lab

    Click here for theInternet Lab webpage.

    Q: How does the HTTP request get from Argon to Neon?

  • 8/8/2019 Sess1bc Networking Review

    13/61

    From HTTP to TCP To send request, HTTP client program establishes an TCP

    connection to the HTTP server Neon.

    The HTTP server at Neon has a TCP server running

    13

    HTTP client

    TCP client

    Argon

    HTTP server

    TCP server

    Neon

    HTTP request / HTTP response

    TCP connection

  • 8/8/2019 Sess1bc Networking Review

    14/61

    Resolving hostnames and port

    numbers Since TCP does not work with hostnames and also would not

    know how to find the HTTP server program at Neon, two

    things must happen:

    -

    14

    . . .

    into a 32-bit IP address.

    2. The HTTP server at Neon must be identified by a

    16-bit port number.

  • 8/8/2019 Sess1bc Networking Review

    15/61

    Translating a hostname into an IP

    address The translation of the hostname neon.tcpip-lab.edu into an IP

    address is done via a database lookup

    HTTP client DNS Server

    neon.tcpip-lab.edu

    128.143.71.21

    15

    The distributed database used is called the Domain NameSystem (DNS)

    All machines on the Internet have an IP address:argon.tcpip-lab.edu 128.143.137.144neon.tcpip-lab.edu 128.143.71.21

    argon.tcpip-lab.edu 128.143.136.15

  • 8/8/2019 Sess1bc Networking Review

    16/61

    Finding the port number Note: Most services on the Internet are reachable via well-

    known ports. E.g. All HTTP servers on the Internet can be

    reached at port number 80. So: Argon simply knows the port number of the HTTP

    server at a remote machine.

    16

    On most Unix systems, the well-known ports are listed in afile with name /etc/services. The well-known port numbersof some of the most popular services are:

    ftp 21 finger 79

    telnet 23 http 80smtp 25 nntp 119

  • 8/8/2019 Sess1bc Networking Review

    17/61

    Requesting a TCP Connection The HTTP client at argon.tcpip-lab.edu requests the TCP client to establish

    a connection to port 80 of the machine with address 128.141.71.21

    argon.tcpip-lab.edu

    17

    c ent

    TCP client

    Establish a TCP connectionto port 80 of 128.143.71.21

  • 8/8/2019 Sess1bc Networking Review

    18/61

    Invoking the IP Protocol The TCP client atArgon sends a

    request to establish a connection

    to port 80 at Neon

    TCP client

    argon.tcpip-lab.edu

    18

    module to send an IP datagramto 128.143.71.21

    (The data portion of the IP datagram contains

    the request to open a connection)

    IP

    128.143.71.21

  • 8/8/2019 Sess1bc Networking Review

    19/61

    Sending the IP datagram to an IP

    router Argon (128.143.137.144) can deliver the IP datagram directly to

    Neon (128.143.71.21), only if it is on the same local network

    (subnet)

    ButArgon and Neon are not on the same local network

    19

    (Q: How doesArgon know this?)

    So,Argon sends the IP datagram to its default gateway

    The default gateway is an IP router The default gateway forArgon is Router137.tcpip-lab.edu

    (128.143.137.1).

  • 8/8/2019 Sess1bc Networking Review

    20/61

    The route from Argon to Neonneon.tcpip-lab.edu

    "Neon"

    128.143.71.21

    argon.tcpip-lab.edu

    "Argon"128.143.137.144

    router137.tcpip-lab.edu

    "Router137"

    128.143.137.1

    router71.tcpip-lab.edu

    "Router71"

    128.143.71.1

    20

    Note that the gateway has a different name for each of its interfaces.

    Ethernet NetworkEthernet Network

    Router

  • 8/8/2019 Sess1bc Networking Review

    21/61

    Finding the MAC address of the gateway

    To send an IP datagram to Router137,Argon puts the IP

    datagram in an Ethernet frame, and transmits the frame.

    However, Ethernet uses different addresses, so-called Media

    Access Control (MAC) addresses (also called: physical

    21

    Therefore,Argon must first translate the IP address

    128.143.137.1 into a MAC address.

    The translation of addressed is performed via the Address

    Resolution Protocol (ARP)

  • 8/8/2019 Sess1bc Networking Review

    22/61

    Address resolution with ARP

    ARP message: What is the MAC

    address of 128.143.137.1?

    ARP message: IP address 128.143.137.1belongs to MAC address 00:e0:f9:23:a8:20

    22

    argon.tcpip-lab.edu

    128.143.137.144

    00:a0:24:71:e4:44

    router137.tcpip-lab.edu

    128.143.137.1

    00:e0:f9:23:a8:20

  • 8/8/2019 Sess1bc Networking Review

    23/61

    Invoking the device driver The IP module at Argon, tells its Ethernet device driver to send

    an Ethernet frame to address 00:e0:f9:23:a8:20

    argon.tcpip-lab.edu

    23

    IP module

    Ethernet

    Send an Ethernet frameto 00:e0:f9:23:a8:20

  • 8/8/2019 Sess1bc Networking Review

    24/61

    Sending an Ethernet frame The Ethernet device driver ofArgon sends the Ethernet frame

    to the Ethernet network interface card (NIC)

    The NIC sends the frame onto the wire

    24

    argon.tcpip-lab.edu128.143.137.144

    00:a0:24:71:e4:44

    IP Datagram for Neon

    router137.tcpip-lab.edu128.143.137.1

    00:e0:f9:23:a8:20

  • 8/8/2019 Sess1bc Networking Review

    25/61

    Forwarding the IP datagram The IP router receives the Ethernet frame at interface 128.143.137.1,

    recovers the IP datagram and determines that the IP datagram should

    be forwarded to the interface with name 128.143.71.1 The IP router determines that it can deliver the IP datagram directly

    25

    neon.tcpip-lab.edu"Neon"

    128.143.71.21

    argon.tcpip-lab.edu"Argon"

    128.143.137.144

    router137.tcpip-lab.edu

    "Router137"

    128.143.137.1

    router71.tcpip-lab.edu

    "Router71"

    128.143.71.1

    Ethernet NetworkEthernet Network

    Router

  • 8/8/2019 Sess1bc Networking Review

    26/61

    Another lookup of a MAC address The rouer needs to find the MAC address ofNeon.

    Again, ARP is invoked, to translate the IP address ofNeon

    (128.143.71.21) into the MAC address of neon

    (00:20:af:03:98:28).

    26

    address of 128.143.71.21?

    ARP message: IP address 128.143.71.21belongs to MAC address 00:20:af:03:98:28

    neon.tcpip-lab.edu

    128.143.71.21

    00:20:af:03:98:28

    router71.tcpip-lab.edu

    128.143.71.1

  • 8/8/2019 Sess1bc Networking Review

    27/61

    Invoking the device driver at the router

    The IP protocol at Router71, tells its Ethernet device driver

    to send an Ethernet frame to address 00:20:af:03:98:28

    router71.tcpip-lab.edu

    27

    mo u e

    Ethernet

    Send a frame to00:20:af:03:98:28

  • 8/8/2019 Sess1bc Networking Review

    28/61

    Sending another Ethernet frame The Ethernet device driver ofRouter71 sends the Ethernet

    frame to the Ethernet NIC, which transmits the frame onto

    the wire.

    28

    IP Datagram for Neon

    neon.tcpip-lab.edu

    128.143.71.21

    00:20:af:03:98:28

    router71.tcpip-lab.edu

    128.143.71.1

  • 8/8/2019 Sess1bc Networking Review

    29/61

    Data has arrived at Neon Neon receives the Ethernet frame

    The payload of the Ethernet frame is an IP

    datagram which is passed to the IP protocol.

    The payload of the IP datagram is a TCPNeon.cerf.edu

    29

    Note: Since the TCP segment is a connection request (SYN),

    the TCP protocol does not pass data to the HTTP program

    for this packet. Instead, the TCP protocol at neon will

    respond with a SYN segment toArgon.

    TCP server

    IP module

    Ethernet

  • 8/8/2019 Sess1bc Networking Review

    30/61

    Wrapping-up the example So far, Neon has only obtained a single packet

    Much more work is required to establish an actual TCP

    connection and the transfer of the HTTP Request

    The exam le was sim lified in several wa s:

    30

    No transmission errorsThe routebetweenArgon and Neon is short(only one IP router)

    Argon knew how to contact the DNS server (without

    routing or address resolution) .

  • 8/8/2019 Sess1bc Networking Review

    31/61

    How many packets were really sent?

    tcpdump: listening on fxp0

    16:54:51.340712 128.143.137.144.1555 > 128.143.137.11.53: 1+ A? neon.cs. (25)

    16:54:51.341749 128.143.137.11.53 > 128.143.137.144.1555: 1 NXDomain* 0/1/0 (98) (DF)

    16:54:51.342539 128.143.137.144.1556 > 128.143.137.11.53: 2+ (41)

    16:54:51.343436 128.143.137.11.53 > 128.143.137.144.1556: 2 NXDomain* 0/1/0 (109) (DF)

    16:54:51.344147 128.143.137.144.1557 > 128.143.137.11.53: 3+ (38)

    16:54:51.345220 128.143.137.11.53 > 128.143.137.144.1557: 3* 1/1/2 (122) (DF)

    16:54:51.350996 arp who-has 128.143.137.1 tell 128.143.137.144

    31

    16:54:51.351614 arp reply 128.143.137.1 is-at 0:e0:f9:23:a8:20

    16:54:51.351712 128.143.137.144.1558 > 128.143.71.21.21: S 607568:607568(0) win 8192

    (DF)

    16:54:51.352895 128.143.71.21.80 > 128.143.137.144.1558: S 3964010655:3964010655(0)

    ack 607569 win 17520 (DF)

    16:54:51.353007 128.143.137.144.1558 > 128.143.71.21.80: . ack 1 win 8760 (DF)

    16:54:51.365603 128.143.71.21.80 > 128.143.137.144.1558: P 1:60(59)

    ack 1 win 17520 (DF) [tos 0x10]

    16:54:51.507399 128.143.137.144.1558 > 128.143.71.21.80: . ack 60 win 8701 (DF)

  • 8/8/2019 Sess1bc Networking Review

    32/61

    Session 1c: Review of Important

    Networking Concepts

    32

    Objective (Introductory material).

    This module uses the example from the previous module

    to review important networking concepts: protocolarchitecture, protocol layers, encapsulation, demultiplexing,

    network abstractions.

  • 8/8/2019 Sess1bc Networking Review

    33/61

    Networking Concepts Protocol Architecture

    Protocol Layers

    33

    Encapsulation

    Network Abstractions

  • 8/8/2019 Sess1bc Networking Review

    34/61

    Sending a packet from Argon to Neon

    34

  • 8/8/2019 Sess1bc Networking Review

    35/61

    Sending a packet from Argon to NeonDNS: The IP address of

    neon.tcpip-lab.edu is

    128.143.71.21

    ARP: What is the MACaddress of 128.143.137.1?

    DNS: What is the IP address

    of neon.tcpip-lab.edu?ARP: The MAC address of

    128.143.137.1 is 00:e0:f9:23:a8:20

    128.143.71.21 is not on my local network.

    Therefore, I need to send the packet to mydefault gateway with address 128.143.137.1128.143.71.21 is on my local network.

    Therefore, I can send the packet directly.

    ARP: The MAC address of128.143.137.1 is 00:20:af:03:98:28

    ARP: What is the MACaddress of 128.143.71.21?

    35

    frame

    frame

  • 8/8/2019 Sess1bc Networking Review

    36/61

    Communications Architecture

    The complexity of the communication task is reducedby using

    multiple protocol layers: Each protocol is implemented independently

    36

    Protocols are grouped in a hierarchy

    A structured set of protocols is called a communications

    architecture or protocol suite

  • 8/8/2019 Sess1bc Networking Review

    37/61

    TCP/IP Protocol Suite

    The TCP/IP protocol suite is

    the protocol architecture of theInternet

    Application

    Transport

    Operating system

    User-level programs

    37

    e su e as our ayers:

    Application, Transport, Network,and Data Link Layer

    End systems (hosts)implement all four layers.

    Gateways (Routers) only havethe bottom two layers.

    Data Link

    Data Link

    Media AccessControl (MAC)

    Sublayer inLocal AreaNetworks

  • 8/8/2019 Sess1bc Networking Review

    38/61

    Functions of the Layers Data Link Layer:

    Service: Reliable transfer offrames over a link

    Media Access Control on a LAN Functions: Framing, media access control, error checking

    Network Layer:

    38

    Functions: Routing, addressing Transport Layer:

    Service: Delivery of data between hosts Functions: Connection establishment/termination, error

    control, flow control Application Layer:

    Service: Application specific (delivery of email, retrieval ofHTML documents, reliable transfer of file)

    Functions: Application specific

  • 8/8/2019 Sess1bc Networking Review

    39/61

    TCP/IP Suite and OSI Reference Model

    ApplicationLayer

    ApplicationLayer

    Presentation

    Layer

    SessionLayer

    TransportTransportLa er

    The TCP/IP protocol stack does notdefine the lower layers of a completeprotocol stack

    39

    NetworkLayer

    (Data) LinkLayer

    Physical

    Layer

    NetworkLayer

    OSIReference

    Model

    (Data) LinkLayer

    TCP/IP Suite

  • 8/8/2019 Sess1bc Networking Review

    40/61

    Assignment of Protocols to Layers

    Routing Protocols

    ApplicationLayer

    Transport

    LayerTCP UDP

    SNMPFTP DNSHTTPping

    applicationTelnet

    40

    Network

    LayerPIM

    OSPF

    RIP

    Data Link

    Layer

    IP

    ARP Ethernet

    NetworkInterface

    ICMP

    IGMP

    DHCP

  • 8/8/2019 Sess1bc Networking Review

    41/61

    Layered CommunicationsLayered CommunicationsLayered CommunicationsLayered Communications An entity of a particular layer can only communicate with:

    1. a peer layer entity using a common protocol (Peer

    Protocol)2. adjacent layers to provide services and to receive

    services

    41

    N+1 LayerEntity

    N+1 LayerEntity

    N+1 Layer ProtocolN+1 Layer

    N-1 LayerEntity

    N-1 LayerEntity

    N-1 Layer ProtocolN-1 Layer

    N LayerEntity

    N LayerEntity

    N Layer ProtocolN Layer

    layer N+1/Ninterface

    layer N/N-1interface

  • 8/8/2019 Sess1bc Networking Review

    42/61

    Service PrimitivesCommunication services are invoked via function calls. The functions

    are called service primitives

    N+1 LayerN+1 LayerN+1 LayerN+1 Layer

    EntitEntitEntitEntit

    N+1 LayerN+1 LayerN+1 LayerN+1 Layer

    EntitEntitEntitEntit

    N+1 Layer Peer ProtocolN+1 Layer Peer ProtocolN+1 Layer Peer ProtocolN+1 Layer Peer Protocol

    42

    N LayerN LayerN LayerN Layer

    EntityEntityEntityEntity

    N LayerN LayerN LayerN Layer

    EntityEntityEntityEntity

    RequestRequestRequestRequest

    DeliveryDeliveryDeliveryDelivery

    IndicateIndicateIndicateIndicate

    DeliveryDeliveryDeliveryDelivery

  • 8/8/2019 Sess1bc Networking Review

    43/61

    Service PrimitivesRecall: A layer N+1 entity sees the lower layers only as a service

    provider

    N+1 LayerN+1 LayerN+1 LayerN+1 Layer

    EntitEntitEntitEntit

    N+1 LayerN+1 LayerN+1 LayerN+1 Layer

    EntitEntitEntitEntit

    N+1 Layer Peer ProtocolN+1 Layer Peer ProtocolN+1 Layer Peer ProtocolN+1 Layer Peer Protocol

    43

    Service ProviderService ProviderService ProviderService Provider

    RequestRequestRequestRequest

    DeliveryDeliveryDeliveryDelivery

    IndicateIndicateIndicateIndicate

    DeliveryDeliveryDeliveryDelivery

  • 8/8/2019 Sess1bc Networking Review

    44/61

    Service Access Points A service user accesses services of the service provider at

    Service Access Points (SAPs)

    A SAP has an address that uniquely identifies where the

    service can be accessed

    44

    Layer-NEntity

    N Layer

    Layer- N-1Entity

    N-1Layer

    layer N/N-1

    service interface

    Layer

    N-1SAP

  • 8/8/2019 Sess1bc Networking Review

    45/61

    Exchange of Data Assume a layer-N entity at A wants to send data to a layer-N

    peer entity to B

    The unit of data sent between peer entities is called a Protocol Data Unit(PDU)

    For now, let us think of a PDU as a single packet

    45

    What actually happens: Layer N passes the PDU to one of As SAPs at layer N-1

    The layer N-1 entity (at A) then constructs its own PDU which it sends to thelayer N-1 entity at B

    Note: PDU at layer N-1 = Header + PDU at layer N

    N Layer

    Entity PDU(at layer N)N Layer

    EntityAAAA BBBB

  • 8/8/2019 Sess1bc Networking Review

    46/61

    Exchange of Data

    Layer-NEntity

    When passed to the SAP, the PDUis called a Service Data Unit(SDU)

    - = - -

    Layer-NEntity

    AAAA BBBB

    46

    Layer- N-1Entity

    SAPs

    control

    N PDUcontrolHeader

    (of layer N-1)N PDU

    PDU of Layer-N-1

    Layer- N-1Entity

  • 8/8/2019 Sess1bc Networking Review

    47/61

    Layers in the Example

    47

  • 8/8/2019 Sess1bc Networking Review

    48/61

    Layers in the ExampleSend HTTP Requestto neon

    Establish a connection to 128.143.71.21 atport 80Open TCP connection to

    128.143.71.21 port 80IP datagram is a TCP

    48

    Send a datagram (which contains a connection

    request) to 128.143.71.21Send IP datagram to128.143.71.21

    Send the datagram to 128.143.137.1

    Send Ethernet frameto 00:e0:f9:23:a8:20

    Send Ethernet frameto 00:20:af:03:98:28

    Send IP data-gram to

    128.143.71.21

    Send the datagramto 128.143.7.21

    Frame is an IPdatagram

    Frame is an IPdatagram

    segmen or por

  • 8/8/2019 Sess1bc Networking Review

    49/61

    Layers and Services Service provided by TCP to HTTP:

    reliable transmission of data over a logical connection

    Service provided by IP to TCP:

    unreliable transmission of IP datagrams across an IP network

    49

    erv ce prov e y erne o :

    transmission of a frame across an Ethernet segment

    Other services: DNS: translation between domain names and IP addresses

    ARP: Translation between IP addresses and MAC addresses

  • 8/8/2019 Sess1bc Networking Review

    50/61

    Encapsulation and Demultiplexing

  • 8/8/2019 Sess1bc Networking Review

    51/61

    Encapsulation and Demultiplexing

    in our Example Let us look in detail at the Ethernet framebetween

    Argon and the Router, which contains the TCP

    connection request to Neon.

    This is the frame in hexadecimal notation.

    51

    00e0 f923 a820 00a0 2471 e444 0800

    4500 002c 9d08 4000 8006 8bff 808f

    8990 808f 4715 065b 0050 0009 465b

    0000 0000 6002 2000 598e 0000 020405b4

  • 8/8/2019 Sess1bc Networking Review

    52/61

    Encapsulation and Demultiplexing

    6 bytes

    52

    Application dataTCP HeaderIP HeaderEthernet Header Ethernet Trailer

    Ethernet frame

    est nat on a ress

    source address

    type CRC

    4 bytes

    Encapsulation and Demultiplexing:

  • 8/8/2019 Sess1bc Networking Review

    53/61

    Encapsulation and Demultiplexing:

    Ethernet Header

    00:e0:f9:23:a8:20

    6 bytes

    53

    0:a0:24:71:e4:44

    0x0800 CRC

    4 bytes

    Application dataTCP HeaderIP HeaderEthernet Header Ethernet Trailer

    Ethernet frame

    Encapsulation and Demultiplexing:

  • 8/8/2019 Sess1bc Networking Review

    54/61

    Encapsulation and Demultiplexing:

    IP Header (1/2)IP Header (1/2)IP Header (1/2)IP Header (1/2)

    DS ECNversion

    (4 bits)

    header

    length

    Total Length (in bytes)

    (16 bits)

    Identification (16 bits)flags

    (3 bits)Fragment Offset (13 bits)

    TTL Time-to-Live(8 bits)

    Protocol(8 bits)

    Header Checksum (16 bits)

    32 bits

    54

    Application dataTCP HeaderEthernet Header Ethernet Trailer

    Ethernet frame

    IP Header

    Source IP address (32 bits)

    Destination IP address (32 bits)

    Encapsulation and Demultiplexing:

  • 8/8/2019 Sess1bc Networking Review

    55/61

    Encapsulation and Demultiplexing:

    IP Header (2/2)IP Header (2/2)IP Header (2/2)IP Header (2/2)

    0x0 0x00x4 0x5 4410

    9d08 0102

    00000000000002

    12810

    0x06 8bff

    32 bits

    55

    Application dataTCP HeaderEthernet Header Ethernet Trailer

    Ethernet frame

    IP Header

    128.143.137.144

    128.143.71.21

    Encapsulation and Demultiplexing:

  • 8/8/2019 Sess1bc Networking Review

    56/61

    p p g

    TCP Header (1/2)TCP Header (1/2)TCP Header (1/2)TCP Header (1/2)

    Sequence number (32 bits)

    Source Port Number Destination Port Number

    Acknowledgement number (32 bits)

    32 bits

    56

    window sizelength

    0 Flags

    TCP checksum urgent pointer

    length Max. segment sizeoptiontype

    Application dataEthernet Header Ethernet Trailer

    Ethernet frame

    IP Header TCP Header

    Option:maximumsegment size

    Encapsulation and Demultiplexing:

  • 8/8/2019 Sess1bc Networking Review

    57/61

    p p g

    TCP Header (2/2)

    60783510

    162710

    8010

    010

    32 bits

    57

    819210

    610

    0000002 0000102

    0x598e 00002

    410

    146010

    210

    Application dataEthernet Header Ethernet Trailer

    Ethernet frame

    IP Header TCP Header

    Encapsulation and Demultiplexing:

  • 8/8/2019 Sess1bc Networking Review

    58/61

    p p g

    Application data

    58

    Application dataEthernet Header Ethernet Trailer

    Ethernet frame

    IP Header TCP Header

    No Application Data

    in this frame

  • 8/8/2019 Sess1bc Networking Review

    59/61

    Different Views of NetworkingDifferent Views of NetworkingDifferent Views of NetworkingDifferent Views of Networking Different Layers of the protocol stack have a different view of the

    network. This is HTTPs and TCPs view of the network.

    Argon

    128.143.137.144

    HTTP

    Neon

    128.143.71.21

    HTTP

    59

    c en

    TCP client

    server

    TCP server

    IP Network

    server

    TCP server

  • 8/8/2019 Sess1bc Networking Review

    60/61

  • 8/8/2019 Sess1bc Networking Review

    61/61

    Network View of Ethernet Ethernets view of the network

    Argon

    (128.143.137.144)

    Router137

    61

    (128.143.137.1)

    Ethernet Network