Tutorial 1 (1)

download Tutorial 1 (1)

of 19

description

lan

Transcript of Tutorial 1 (1)

  • E&CE 418: Tutorial 1E&CE 418: Tutorial 1

    Instructor: Prof. Xuemin (Sherman) ShenTA Ni ZhTA: Ning Zhang

    Email: [email protected] Hours: Tue 1:00pm-3:00pm or by appointmentOffice Hours: Tue 1:00pm 3:00pm or by appointment

    1

  • RoadmapRoadmap

    OSI Model TCP/IP protocol suiteTCP/IP protocol suite Data encapsulation and transmission Communication at each layer Network protocol analyzer Network protocol analyzer

    2

  • OSI Model

    Layers Description

    7 Application Allows user access to network provide services to users7 Application Allows useraccesstonetwork,provideservicestousers.

    6 Presentation Datarepresentation,encryptionanddecryption, etc

    5 Session Setupconnection,login,etc(startand endconversation)

    4 Transport Reliable transmissionofpacketsfromsourcetodestination(endtoend).

    3 Network Routing:guidesthepacket fromsourcetodestination

    2 Data Link Reliable transmissionfromnodetonode

    1 Physical Transmits raw bit stream over channel1 Physical Transmitsrawbitstreamoverchannel

    3

  • OSI ModelLayers Dataunit

    Application Datapp ca o a a

    Presentation Data

    Session Data

    Transport Segments

    Network Packet/Datagramg

    Data Link Frame

    Physical Bit

    Data encapsulation and decapsulationp pa) Header and trailer attached at each layer aim to perform certain functions at each layer.b) Headers are added while a packet is going down the stack at each layer. c) Each protocol on the different layer has its own format

    4

    c) Each protocol on the different layer has its own format.

  • TCP/IP Model

    Application7

    Presentation6

    S i5

    Application5

    Session5

    Transport4 Transport4

    Network3

    Data Link2

    Internet3

    Data Link2 DataLink2

    Physical1

    Data Link2

    Physical1Host to network

    OSI Model Layers TCP/IP Protocol Suite

    The application layer in TCP/IP is equivalent to the combined session

    5

    The application layer in TCP/IP is equivalent to the combined session, presentation, and application layers in the OSI model.

  • TCP/IP Protocol SuiteApplication layer : responsible for providing services to the user.

    e.g., FTP, SMTP, Http, etcg , , , p,Transport layer : responsible for the delivery of application data from

    source to destination. e.g., TCP(reliable delivery), UDP.I t t l ibl f th d li f i di id l k t fInternet layer : responsible for the delivery of individual packets from

    the source host to the destination host. Main functions: forwarding and routing. e.g., IP, etcforwarding and routing. e.g., IP, etc

    Data link layer: responsible for hop-to-hop (node-to-node) deliveryMajor duties: framing, flow control, error control, access control . e.g., Ethernet, 802.11(Wireless lan), etc

    Physical layer : responsible for movements of individual bits from one hop (node) to the next over a physical medium(node) to the next over a physical medium. It maps incoming bits from the data link layer into signals appropriate to the channel.

    6

  • Data encapsulation and transmissionsource

    applicationdata datatransportinternet

    linkTCPHn data

    segment Htpacket

    TCPIPMAC data

    TCP data

    IP

    framephysical

    linkphysical

    TCPIPMAC data

    p y

    switch

    destinationapplication

    internetlink HtH Mdata data

    TCPHn data

    TCPIPMAC dataIP

    applicationtransportinternet

    link

    linkphysical

    HtHn M

    routerTCPHn data

    segment Htpacket

    TCPIPMAC data

    data dataTCP data

    IP

    frame

    TCPM

    7

    linkphysical

    routerTCPIPMAC dataframe

  • Communication at each layerCommunication at each layer

    Application Application Application protocol

    TCP

    IP

    TCP

    IP

    TCP protocol

    IP protocol IP protocolIP IP IP protocol

    Data LinkNetwork Access

    DataLink

    Data Link

    Data Link

    Data Link

    Data Link

    DataLink

    DataLink

    8

  • Communication at application layerA B

    Transport Transport

    ApplicationApplication Source Destination DataD HeaderHLegend

    Data linkData link

    R1 R3 R4

    NetworkNetwork

    Transport Transport

    Physical Physical

    Data linkData link

    MessageD5 D5

    g

    9

    D5 D5MessageThe unit of communication at the application layer is a message.

  • Communication at transport layerThe port number is used in the transport layer header to indicate to which application that piece of data is associated.Sequence numbers are assigned in the header of each packet to reassemble th t i t th i i l dthe segments into the original order.

    10

  • Communication at transport layerA

    R1 R3 R4

    B

    NetworkNetwork

    Transport TransportSource Destination DataD HeaderHLegend

    Ph i l Ph i l

    Data linkData link

    NetworkNetwork

    Physical Physical

    SegmentD4 H4

    D4 H4

    11

    SegmentD4 H4

    The unit of communication at the transport layer is a segment.

  • Communication at the internet layer Networklayerreceivethedatafromthetransportlayer,ie.,thesegment,andaddIPheadertocreatethepacket/datagram.Network layer provides services to guide/direct the packet to the destination host.Networklayerprovidesservicestoguide/directthepackettothedestinationhost.

    12

  • Communication at the internet layer

    A R1 R3 R4 BNetworkNetwork

    Source Destination DataD HeaderHLegend

    Physical Physical

    Data linkData link

    Physical Physical

    DatagramD3 H3

    DatagramD3 H3

    Th i f i i h i l i d / k13

    gThe unit of communication at the internet layer is a datagram/packet.The IP address of source and destination never change in transmission.

  • Communication at the data link layer

    DataLinklayerprotocolsgovernshowtoformataframeforuseondifferentmedia(e.g.,copper,fiber,andwirelessnetworkmedia.).Differentprotocolsmaybeinusefordifferentmedia.(ethernet frame,802.11wirelessframe,etc)

    14

  • Communication at the data link layer

    AData linkData link

    R1 R3 R4 BSource Destination DataD HeaderHLegend

    Physical Physical

    Link 1 Link 3 Link 5 Link 6

    D2 H2Frame

    FrameD2

    H2

    Th i f i i

    FrameD2 H2

    FrameD2 H2

    At each hop along the path an intermediary device accepts frames from one

    The unit of communication at the data link layer is a frame.

    15

    At each hop along the path, an intermediary device accepts frames from one medium, decapsulates the frame and then forwards the packets in a new frame.

  • Communication at the physical layer

    The Physical layer controls how data is transmitted on the communication mediamedia.

    The role of the Physical layer is to encode the binary digits that represent Data Li k l f i t i l d t t it d i th i lLink layer frames into signals and to transmit and receive these signals across the physical media - copper wires, optical fiber, and wireless - that connect network devices.

    It is also the job of the Physical layer to retrieve these individual signals from the media, restore them to their bit representations, and pass the bits up to the Data Link layer as a complete frame.

    16

  • Communication at the physical layer

    A R1 R3 R4 B

    Source DestinationLegend

    APhysical

    layerPhysical

    layer

    R1 R3 R4 B

    Link 3 Link 5 Link 6Link 1

    011 ... 101

    011 ... 101

    011 ... 101 011 ... 101

    Th i f i i h h i l l i bi

    17

    The unit of communication at the physical layer is a bit.

  • Network protocol analyzerNetwork protocol analyzer

    Wireshark is the world's foremost network protocol analyzer. It p ylets you capture and interactively browse the traffic running on a computer network.p

    Lets use Wireshark to analyze the frames and understand how the layers work in real life.y

    18

  • SummarySummary

    LayeringLayering TCP/IP protocol suite Data encapsulation (head, trailer) Communication at each layery

    hop by hop: physical layer, data link layer end to end: application layer transport layerend to end: application layer, transport layer

    19