Computer Networks Lect 10 & 11

download Computer Networks Lect 10 & 11

of 24

Transcript of Computer Networks Lect 10 & 11

  • 8/12/2019 Computer Networks Lect 10 & 11

    1/24

    Computer Networks

    Lecture 10 & 11

  • 8/12/2019 Computer Networks Lect 10 & 11

    2/24

    Network LayerMain Functions:

    responsible for transmission of data packets from source to destination.

    through cloud of nodes by switched communication networks.

    A

    E

    B

  • 8/12/2019 Computer Networks Lect 10 & 11

    3/24

    3 ways to achieve this goal:

    1. Switching technique.

    2. Routing.

    3. Flow | Error Control.

    Issues for Network Layer:

    1. Switching technique

    Circuit Switching Packet Switching

    Virtual Circuit Datagram

  • 8/12/2019 Computer Networks Lect 10 & 11

    4/24

    2. Routing technique:

    how to forward packets? (packet forwarding techniques)

    how to calculate from source to destination? (Routing techniques)

    3. Traffic Control:

    Congestion control.

    Rate control.

    4. Naming & Addressing:

    how to find the name & address of network node?

    5. Internetworking:

    how to interconnect heterogeneous networks?

  • 8/12/2019 Computer Networks Lect 10 & 11

    5/24

    Communication Service Classes

    1. Connectionless Services:

    Tx & Rx treats each transmitted message (packet) as an independent unit.

    2. Connection _ Oriented Services:

    Tx & Rx see data as traveling in logical connection(pipe).

    these two services can be reliable(ensure that there is no error & data is received

    correctly) or unreliable.

    but the reliability of the connection oriented is higher than the connection less.

  • 8/12/2019 Computer Networks Lect 10 & 11

    6/24

    Switching technique

    describe how data are processed & forwarded in a network

    a. Circuit Switching:

    there is a dedicated path between sender & receiver.

    this path is established from network nodes & is called traditionally circuit.

    the whole bandwidth is dedicated to the circuit for the lifetime of theconnection.

    the capacity (bandwidth) unused by the circuit cant be used by other

    circuits.

    Disadvantage:

    lost resources(bandwidth)due to dedicated line.

    Advantages:

    no delay in transmission of data.

    reliable transmission of data.

    no overheads.

  • 8/12/2019 Computer Networks Lect 10 & 11

    7/24

    Stages:

    1. Circuit Establishment.

    2. Data Transfer.

    3. Circuit Termination.

    Applications:

    telephone networks.

    ISDN.

    A

    5

    764

    1 2 3

    E

    D

    C

    B

  • 8/12/2019 Computer Networks Lect 10 & 11

    8/24

    channel cant be used except by the two communicating nodes.

    link can have more than one channel.

    data entering the network from a station are routed to the destination by being

    switched from node to node.

  • 8/12/2019 Computer Networks Lect 10 & 11

    9/24

    Timing Diagram

    A 4 5 3 D

    0

    t1

    tt2

    t3

    Propagation

    delay

    Circuit

    termination

    Transmission

    time

  • 8/12/2019 Computer Networks Lect 10 & 11

    10/24

    b. Packet Switching:

    1. Datagram:

    Idea:

    concerned with data that are not time sensitive.

    data is treated as packets, each packet can take different path.

    receiver is responsible for packet rearranging.

    each packet has a complete transmission information.

    the path of the packet is chosen by the routing technique.

    each packet is treated independently with no reference to packets that havegone before.

  • 8/12/2019 Computer Networks Lect 10 & 11

    11/24

    Timing Diagram

    Advantage:

    no dedicated path (saving bandwidth).

    Disadvantage:

    Transmission Delay.

    Unreliable transmission.

    Large Overheads.

  • 8/12/2019 Computer Networks Lect 10 & 11

    12/24

    2. Virtual Circuits:

    hybrid technique between datagram & circuit switching.

    all data is transmitted as packets.

    all packets from one packet stream are sent along pre-established path

    (virtual-circuit).there is a guarantee in sequence delivery of packets.

    packets from different virtual circuits may be interleaved.

    Stages:

    a. Virtual circuit establishment.

    b. Data transfer.

    c. Virtual circuit termination.

    Applications:

    1. X25 packet switching.

    2. ATM(Asynchronous Transfer Mode)

  • 8/12/2019 Computer Networks Lect 10 & 11

    13/24

    Timing Diagram

    Tx Rx

  • 8/12/2019 Computer Networks Lect 10 & 11

    14/24

  • 8/12/2019 Computer Networks Lect 10 & 11

    15/24

    To Via Next Hop

    M Y

    D N

    L X

    Routing Table at node V:

    Routing Algorithm

    How does it work?

    When a packet with the destination node arrives at an increasing link:

    1. The router looks up the routing table.

    2. The routing table look up yields the address of the next node( next hop).

    3. The packet is transmitted onto the outgoing link that goes to the next node.

    Advantage:

    Router doesnt need to know about end-to-end flow(route).

    Disadvantage:

    Size of the routing table can grow very large.

  • 8/12/2019 Computer Networks Lect 10 & 11

    16/24

    2. Packet Forwarding for Virtual Circuit:

    Recall that in virtual circuit network, the rout is setup in the virtual circuit

    establishment phase.

    During the setup, each router assign a virtual circuit number to the virtual circuit.

    The virtual circuit number can be different for each hop.virtual circuit number is written in the packet header.

    Example:

    W V

    X

    DN2

    4

    13

    From Vc# To Vc#

    W 2 N 3

    W 2 X 4

    Routing Table at node V:

    Routing table is

    established with the

    establishment of the

    Virtual Circuit.

  • 8/12/2019 Computer Networks Lect 10 & 11

    17/24

    How does it work?

    when a packet with virtual circuit (Vcin) arrives from router (Nin):

    1. The router looks up the routing table for an entry with the entry (Vcin , Nin).2. The routing table look up yields (Vcout, Nout).

    3. The router updates the virtual circuit number of the header to the

    number(Vcout) & (Vcout) transmits the packet to Nout.

    Advantage:

    small routing table ( number of entries= number of Vcircuits).

    Disadvantage:

    changing the route is a complicated process.

    the routing table changes for each virtual circuit.

  • 8/12/2019 Computer Networks Lect 10 & 11

    18/24

    Routing Algorithm

    Objective:

    to calculate good routes ( in datagram & virtual circuits)

    in order to make a good routing algorithm, it must satisfy the following criteria

    -Correctness

    -Simplicity: (time simplicity)

    -Stability: are techniques that have a reasonable reaction with changing

    conditions.

    -Optimality: it is impossible to satisfy everything at the same time, so we

    use trade off between the available parameters.

    -Robustness: the ability of the network to deliver packets via some route

    in facing localized failure & overloads.

    -Efficiency

    -Fairness

  • 8/12/2019 Computer Networks Lect 10 & 11

    19/24

    Elements of Routing Algorithm:

    1. Optimization Criteria:

    -Number of hops: must be small.-Delay: must be small.

    -Cost: must be small.

    -Throughput: must increase.

    ( throughput: number of successful transmitted packet)

    2. Decision Time:

    1. One per session:

    In case of virtual circuits at setup time of virtual circuits.

    2. One per packet:

    In case of datagram

  • 8/12/2019 Computer Networks Lect 10 & 11

    20/24

    3. Decision place:

    which node/nodes in the network are responsible for the routing decision?

    1. Centralized routing (Central node is responsible for making decision)

    2. Source routing (Transmitting node is responsible for making decision)

    3. Distributed routing( Each node is responsible for making decision)

    4. Network Information Source:

    1. None Flooding & Random.

    2. Local/adjacent node distributed

    3. All nodes Centralized.

    5. Network Information Update Time:

    1. Continuous.

    2. Periodic.

    3. Topology change.

    4. Major node change.

  • 8/12/2019 Computer Networks Lect 10 & 11

    21/24

    Routing Strategies:

    1. Fixed Routing Strategy:

    A single permanent route is configured for each source destination pair ofnodes in the network ex: least cost routing algorithm.

    How does it work?

    From node

    1 2 3 4 5 6

    1 _ 1 5 2 4 5

    2 2 _ 5 2 4 5

    3 4 3 _ 2 3 5

    4 4 4 5 _ 4 5

    5 4 4 5 5 _ 5

    6 4 4 5 5 6 _

    To

    no

    de

  • 8/12/2019 Computer Networks Lect 10 & 11

    22/24

    routing table for each node can be developed & stored at each node

    Destination Next hop

    1 5

    2 5

    4 5

    5 5

    6 5

    Node: 3

    Destination Next hop

    2 2

    3 4

    4 4

    5 4

    6 4

    Node: 1

    Destination Next hop

    1 1

    3 3

    4 4

    5 4

    6 4

    Node: 2

  • 8/12/2019 Computer Networks Lect 10 & 11

    23/24

    2. Flooding Routing Strategy

    Advantages:

    -Simple Strategy.-doesnt require network information

    Disadvantage

    - Overheads

    How does it work?

    -a packet is sent by a source node to each of its neighbors.

    -at each node, an incoming packet is retransmitted on all outgoing links except forthe link on which it is received.

    -to prevent packet growth is to remember the identity of each packet( include hop

    count feed with each packet)

  • 8/12/2019 Computer Networks Lect 10 & 11

    24/24