cc notes lecture 02

Upload: ghulam-shabbir

Post on 04-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 CC Notes Lecture 02

    1/57

    Computer Communication &

    Networks

    Lecture # 02

    Course Instructor:

    Engr. Sana Ziafat

  • 7/29/2019 CC Notes Lecture 02

    2/57

    Layering & Protocol Stacks

  • 7/29/2019 CC Notes Lecture 02

    3/57

    Reference Models

    OSI reference model

    TCP/IP

  • 7/29/2019 CC Notes Lecture 02

    4/57

    OSI Reference model

    Open System Interconnection

    7 layers

    1. Crate a layer when different abstraction is needed

    2. Each layer performs a well define function

    3. Functions of the layers chosen taking internationally

    standardized protocols

    4. Number of layers large enough to avoid

    complexity

  • 7/29/2019 CC Notes Lecture 02

    5/57

    Seven layers of the OSI model

  • 7/29/2019 CC Notes Lecture 02

    6/57

    Exchange using OSI Model

  • 7/29/2019 CC Notes Lecture 02

    7/57

    Peer-to-peer Processes Layer x on one machine communicates with layer x on

    another machine - called Peer-to-Peer Processes. Interfaces between Layers

    Each interface defines what information and services alayer must provide for the layer above it.

    Well defined interfaces and layer functions providemodularity to a network

    Organizations of the layers

    Network support layers : Layers 1, 2, 3

    User support layer : Layer 5, 6, 7

    It allows interoperability among unrelated softwaresystems

    Transport layer (Layer 4) : links the two subgroups

  • 7/29/2019 CC Notes Lecture 02

    8/57

    The interaction between layers in the OSI model

  • 7/29/2019 CC Notes Lecture 02

    9/57

    OSI Layers

  • 7/29/2019 CC Notes Lecture 02

    10/57

    Physical layer

    Transporting bits from one end node to the next- type of the transmission media (twisted-pair, coax, optical fiber, air)

    - bit representation (voltage levels of logical values)- data rate (speed)

    - synchronization of bits (time synchronization)

    - deals with the optical, mechanical and electrical features

    - transmission modes ( half duplex, full duplex)

    physical

    connection

  • 7/29/2019 CC Notes Lecture 02

    11/57

    The physical layer is responsible for movements ofindividual bits from one hop (node) to the next.

    Note

  • 7/29/2019 CC Notes Lecture 02

    12/57

    Protocols:

    - Modems

    - Optical Cables, Connectors

    Network Devices:

    - Hubs, Repeaters, and Amplifier.

  • 7/29/2019 CC Notes Lecture 02

    13/57

    Data Link layer

    Transporting frames from one end node to the next one

    logical

    connection

    -framing - physical addressing

    - flow control - error control

    - access control

  • 7/29/2019 CC Notes Lecture 02

    14/57

    Data Link layer- hop-to-hop delivery-

  • 7/29/2019 CC Notes Lecture 02

    15/57

    Data Link layer- example-

  • 7/29/2019 CC Notes Lecture 02

    16/57

    The data link layer is responsible for movingframes from one hop (node) to the next.

    Note

  • 7/29/2019 CC Notes Lecture 02

    17/57

    Network Devices:

    -Bridge, Switch, ISDN Router, Intelligent

    Hub, NIC, Advanced Cable Tester

  • 7/29/2019 CC Notes Lecture 02

    18/57

    Protocols: Logical Link Control error correction and flow control manages link control and defines SAPs

    Media Access Control controls the type of media being used:802.3 CSMA/CD (Ethernet)

    802.4 Token Bus (ARCnet)802.5 Token Ring802.12 Demand Priority

  • 7/29/2019 CC Notes Lecture 02

    19/57

    Network Layer The network layer is responsible for

    the delivery of individual packets fromthe source host to the destination host.

  • 7/29/2019 CC Notes Lecture 02

    20/57

    20

    Network layer

    End-to-End packet delivery From the original source to a destination

    Needed when 2 devices are attached to

    different networks What is the network definition here?

    Main duties:1. Logical addressing

    2. Routing

    3. Switching

    4. Congestion control and QoS

    Not a message

  • 7/29/2019 CC Notes Lecture 02

    21/57

    21

    Source to destination delivery

    Data Link

    Network

    layer

  • 7/29/2019 CC Notes Lecture 02

    22/57

    22

    Network layer- example -

    Network layer addresses

    Data Link layer addresses

  • 7/29/2019 CC Notes Lecture 02

    23/57

    23

    The network layer is responsible for thedelivery of individual packets from

    the source host to the destination host.

    Note

  • 7/29/2019 CC Notes Lecture 02

    24/57

    Router works as the post office and network layer

    stamps the letters (data) for the specific

    destinations.

    Protocols: These protocols work on the network

    layer IP, ICMP, ARP, RIP, OSI, IPX and OSPF.

    Network Devices: Network devices including Router,Frame Relay device and ATM switch devices work

    on the network layer.

  • 7/29/2019 CC Notes Lecture 02

    25/57

    25

    Transport layer

    Process-to-Process delivery of the entire message From the original source to a destination

    Needed when several processes (running programs)

    active at the same time

    Main tasks: Port addressing

    Segmentation and reassembly Congestion control

    Flow control

    Error control

  • 7/29/2019 CC Notes Lecture 02

    26/57

    Transport LayerThe transport layer is responsible for the delivery

    of a message from one process to another.

  • 7/29/2019 CC Notes Lecture 02

    27/57

    27

    Transport Layer

  • 7/29/2019 CC Notes Lecture 02

    28/57

    28

    Transport layer-an example of a reliable delivery -

  • 7/29/2019 CC Notes Lecture 02

    29/57

    29

    The transport layer is responsible for the deliveryof a message from one process to another.

    Note

  • 7/29/2019 CC Notes Lecture 02

    30/57

    Protocols: These protocols work on the

    transport layerTCP, UDP, SPX, NETBIOS,

    ATP and NWLINK.

    Network Devices: The Brouter, Gateway andCable tester work on the transport layer.

  • 7/29/2019 CC Notes Lecture 02

    31/57

    31

    The session layer is responsible for dialogcontrol and synchronization.

    Note

  • 7/29/2019 CC Notes Lecture 02

    32/57

    Session Layer The session layer is responsible for

    dialog control and synchronization.

  • 7/29/2019 CC Notes Lecture 02

    33/57

    Presentation Layer

  • 7/29/2019 CC Notes Lecture 02

    34/57

    Presentation layer is a best layer for

    cryptography.

  • 7/29/2019 CC Notes Lecture 02

    35/57

    35

    The presentation layer is responsible for translation,compression, and encryption.

    Note

  • 7/29/2019 CC Notes Lecture 02

    36/57

    Application Layer The application layer is responsible

    for providing services to the user.

  • 7/29/2019 CC Notes Lecture 02

    37/57

    Services provided by Application layer:

    - File transfer, Access

    - Mail services

  • 7/29/2019 CC Notes Lecture 02

    38/57

    38

    Application layer

    Enables user to access the network Provides services to a user

    E-mail

    Remote file access and transfer (Telnet, FTP) Access to WWW (HTTP)

  • 7/29/2019 CC Notes Lecture 02

    39/57

    39

    The application layer is responsible forproviding services to the user.

    Note

  • 7/29/2019 CC Notes Lecture 02

    40/57

    Protocols: FTP, DNS, SNMP, SMTP,

    FINGER, TELNET, TFTP, BOOTP and SMB

    protocol are operated on the application

    layer.

    Network Devices: Gateway network device is

    operated on the application layer.

  • 7/29/2019 CC Notes Lecture 02

    41/57

    41

    OSI Reference Model

    A convenient aid for remembering the OSIlayer names is to use the first letter ofeach word in the phrase:

    All People Seem To Need Data Processing

  • 7/29/2019 CC Notes Lecture 02

    42/57

    42

    Summary of layers and protocols

    Low-level protocols define the electrical and physical standards

    to be observed, bit- and byte-ordering and the transmission and

    error detection and correction of the bit stream

    High-level protocols deal with the data formatting, including the

    syntax of messages, the terminal to computer dialogue,

    character sets, sequencing of messages

  • 7/29/2019 CC Notes Lecture 02

    43/57

    43

    TCP/IP Protocol

  • 7/29/2019 CC Notes Lecture 02

    44/57

    44

    TCP/IP Vs OSI Model

  • 7/29/2019 CC Notes Lecture 02

    45/57

    45

    Four Level of Addresses

  • 7/29/2019 CC Notes Lecture 02

    46/57

    46

    Relationship of Layers & Addresses in TCP/IP

  • 7/29/2019 CC Notes Lecture 02

    47/57

    47

    The physical addresses will change from hop to hop,but the logical addresses usually remain the same.

    Note

    E l 2 1

  • 7/29/2019 CC Notes Lecture 02

    48/57

    In Figure 2.19 a node with physical address 10 sends aframe to a node with physical address 87. The two nodes

    are connected by a link (bus topology LAN). As the

    figure shows, the computer with physical address 10 is

    the sender, and the computer with physical address 87is

    the receiver.

    Example 2.1

  • 7/29/2019 CC Notes Lecture 02

    49/57

    Figure 2.19 Physical addresses

    E l 2 2

  • 7/29/2019 CC Notes Lecture 02

    50/57

    As we will see in later lectures, most local-area networksuse a 48-bit (6-byte) physical address written as 12

    hexadecimal digits; every byte (2 hexadecimal digits) is

    separated by a colon, as shown below:

    Example 2.2

    07:01:02:01:2C:4B

    A 6-byte (12 hexadecimal digits) physical address.

    E l 2 3

  • 7/29/2019 CC Notes Lecture 02

    51/57

    Figure 2.20 shows a part of an internet with two routersconnecting three LANs. Each device (computer or

    router) has a pair of addresses (logical and physical) for

    each connection. In this case, each computer is

    connected to only one link and therefore has only one

    pair of addresses. Each router, however, is connected to

    three networks (only two are shown in the figure). So

    each router has three pairs of addresses, one for eachconnection.

    Example 2.3

  • 7/29/2019 CC Notes Lecture 02

    52/57

    Figure 2.20 IP addresses

    Example 2 4

  • 7/29/2019 CC Notes Lecture 02

    53/57

    Figure 2.21 shows two computers communicating via theInternet. The sending computer is running three

    processes at this time with port addresses a, b, and c. The

    receiving computer is running two processes at this time

    with port addresses j and k. Process a in the sendingcomputer needs to communicate with process j in the

    receiving computer. Note that although physical

    addresses change from hop to hop, logical and port

    addresses remain the same from the source to

    destination.

    Example 2.4

  • 7/29/2019 CC Notes Lecture 02

    54/57

    Figure 2.21 Port addresses

    Example 2 5

  • 7/29/2019 CC Notes Lecture 02

    55/57

    Example 2.5

    As we will see in later chapters, a port address is a 16-bitaddress represented by one decimal number as shown.

    753

    A 16-bit port address represented

    as one single number.

  • 7/29/2019 CC Notes Lecture 02

    56/57

    56

    Readings

    Chapter 2 (B. A Forouzan)

    Section 2.2,2.3, 2.4, 2.5

    A

  • 7/29/2019 CC Notes Lecture 02

    57/57

    Q & A