TCP/IP Lecture 1 - Basics

Embed Size (px)

Citation preview

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    1/27

    Introduction to communication network

    Lecture 1 - Basics

    Jens Myrup Pedersen

    Associate ProfessorAalborg University

    [email protected]

    Figures by Matija and Kardi (mst,[email protected]), and to limited extend Andrew S. Tananbum, Co

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    2/27

    The purpose of this lecture is for you to

    Understand the principles of layered packet-based network ar

    Obtain an overview of the TCP/IP protocol stack and the OSmodel, and to understand the differences between them.

    Get an understanding of connectionless and connection-orien

    protocols.

    Get to know the units used for network speeds and bandwidt

    It is highly recommended for you to take notes during the lecturfocusing on these learning points.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    3/27

    First a little about procotol stacks:

    Example of a protocol stack.

    Each layer has its ownfunctionality.

    Each layer offer services to the

    layer above.

    Transparency: A layer dont seewhat is underneath it, but virtuallyspeaks to the corresponding layerat the other machine.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    4/27

    First a little about procotol stacks:

    Typical one protocol per layer Between each layer there is a well defined functionality The layered architectures allows for:

    A modular design

    Layers can be re-used for different protocols

    Easier to change implementations (or add new protocols)

    Easier to develop applications

    Independency of the physical medium

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    5/27

    So, how does it look from a message point of A message is sent from one application to another. This is do

    packet: A sequence of bits.

    In the different layers, diffferent kinds of control information (and/or tails) are added. This control information can for examaddresses or different kinds of protocol information.

    There can also be limitations to packet sizes, so packets may b

    This also means that in addition to the mssage being sent, eacadding additional information (or overhead): How much is addlayer depends on the protocols being used.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    6/27

    Let us look at an example

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    7/27

    Connection-oriented or connection-less

    Important: connection-oriented and connection-less protocols.

    The simplest is a connection-less protocol. Here packets are simon the network, usually marked with an address, and we hope tHowever, there are no guarantees that all packets will arrive, anhas no way of telling whether this has happened.

    For a connection-oriented protocol, a connection is first set upare send, and eventually the connection is torn down. Acknowlbe used to assure the arrival of all packets, and the protocol canmechanisms for re-transmissions and re-orderings of packets thor arrive in the wrong order.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    8/27

    Connection-oriented or connection-less

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    9/27

    Two important models

    The OSI reference model, developed by ISO

    The TCP/IP Protocol stack, used in the Internet

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    10/27

    The OSI reference model

    Open Systems Interconnection, suggested by ISO Designed as it should be done. The reference-model is made prior to the standards for each 7 layers.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    11/27

    The OSI reference model

    L7: Application layerL6: Presentation layerL5: Session layerL4: Transport layerL3: Network layer

    L2: Data link layerL1: Physical layer

    In the following, lets have a look at the functionality of the differWe focus on the layers which are also used in the TCP/IP stack.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    12/27

    OSI: The physical layer

    Defines the physical transmission, e.g. voltage, frequency etc. For example: Electricity, laser, radio waves Set-up and tear-down of connections Offering services for the data link layer.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    13/27

    OSI: The data link layer

    The data link layer receives data from the network layer, whicbroken into smaller frames. The size of these frames dependsnumber of issues, for example the error rate.

    At the physical layer, transmission errors can occur of many dreasons. It can be because of disturbance due to noise, weathconditions (especially for wireless), worn equipment and many

    things. This error control is can be done in the data link layer The data link layer takes care of physical addressing, error co

    control, and Medium Access Control (MAC). The data link layer can also contains mechanisms such as slidin

    for controlling the sending speed, and thus avoid congestion. Examples: Ethernet, Token ring, PPP, HDLC, Frame Relay, ISD

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    14/27

    OSI: The network layer

    Most important functionality is routing Quality of Service can also be handled here, for example by gi

    packets a higher priority. Elements of congestion control can done.

    Gateway-functionality between different networks is also typihandled at the network layer. Yet another example of the stre

    layered protocols. Many networks use dynamic hop-by-hop routing, but source r

    static routing can also be used. Static routing is usually used osmall or very reliable network (certain multi processor system

    Examples: IP, ICMP, IGMP, X.25, CLNP, ARP, RARP, BGP, OSIPX, DDP

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    15/27

    OSI: The transport layer

    The layer between applications and network layer. Offer end-communication.

    Split and join packets before they are sent to and from the ne Decides which connection should be available for the upper la

    Connection set-up and tear-down

    Error correction can be done here

    Acknowledgements and retransmissions

    Handling out-of-order packet arrivals Some protocols such as TCP also have traffic/flow control Examples: TCP, UDP, RTP, SCTP, SPX, ATP

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    16/27

    OSI: The session layer

    Handles sessions

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    17/27

    OSI: The presentation layer

    Handles data structures

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    18/27

    OSI: The application layer

    The upper layer, which can be used directly by the user applic(such as web browsers, email clients, ssh clients etc.)

    Examples: HTTP, SMTP, SNMP, FTP, Telnet, Ssh and Scp, NFS

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    19/27

    OSI vs. TCP/IP

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    20/27

    TCP/IP

    The protocols of layer 2,3 and 4 will be treated more in-deptcoming lectures.

    In the following, a few differences to the OSI model will be higand some examples of protocol design given.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    21/27

    TCP/IP Host-to-Network

    Corresponds to layer 1+2 from the OSI model

    Among the data link layers, Ethernet is probably the most knois also possible to run IP over ATM.

    Example: Ethernet.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    22/27

    TCP/IP Internet layer

    Corresponds to the network layer of the OSI model

    IPv4 is probably the best known.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    23/27

    TCP/IP Transport layer

    Corresponds to the transport layer of the OSI model Most used/known protocols:

    TCP: Reliable, connection oriented

    UDP: Unreliable, connectionless

    These protocols will be treated in more details in coming

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    24/27

    TCP/IP Application layer

    Corresponds to session, presentation and application layer in HTTP, FTP, mail, news etc. Example: HTTP

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    25/27

    TCP/IP an overview of protocols

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    26/27

    To sum of this lecture just a few facts

    One bit is a single 0 or 1 1 byte is 8 bit 1Gbit/s = 1000Mbit/s = 1.000.000 Kbit/s = 1.000.000.000 bit/s

    If written as e.g. 1MB/s, this usually means one megabyte per should be avoided to avoid confusion..

    So: Bandwidth or throughput is often measured as bit/s (oMbit/s, Kbit/s).

    When sending data from A to B, the time it takes to transmessage depends on the bandwidth as well as the latency.

  • 7/25/2019 TCP/IP Lecture 1 - Basics

    27/27

    End of lecture

    Please dont hesitate to send questions or comment

    Jens Myrup PedersenAssociate ProfessorAalborg University

    [email protected]