Topologies, Routing and Deadlock - PowerPoint PPT Presentation

1 / 69
About This Presentation
Title:

Topologies, Routing and Deadlock

Description:

The raw transmission rate of LANs are high, typically being in the 1-1000 Mbps range. ... Residual error ratio is the proportion of packets that are lost or garbled. ... – PowerPoint PPT presentation

Number of Views:451
Avg rating:3.0/5.0
Slides: 70
Provided by: kevinc3
Category:

less

Transcript and Presenter's Notes

Title: Topologies, Routing and Deadlock


1
Topologies, Routing and Deadlock
2
Figure Recap of speeds
Various speeds of networks
1Gb
LAN
100Mbb
BUS
10Mb
MAN
WAN
1Mb
100Kb
10Kb
EXCH
1Kb
0.1m
1m
10m
100m
1Km
10Km
100Km
1000Km
3
Speed of LANs
  • The raw transmission rate of LANs are high,
    typically being in the 1-1000 Mbps range.
  • On some LANs (eg Open System LANs) every device
    has the potential of connecting to any other
    device on the LAN.
  • Smaller LANs typically operate on a Slave/Master
    basis with slave PCs clustered around a shared
    master filestore system.

4
Network Sharing
  • A fundamental feature of many LANs is the network
    itself is shared.
  • The physical network medium is shared by many
    machines.
  • In a traditional network, each machine is usually
    wired into a switching device.
  • For example, your telephone is connected to your
    local switching office.

5
Low Error Rates/Low Cost
  • On LANs, network errors are expected to be
    relatively few when compared with larger
    networks.
  • LANs are relatively inexpensive when compared to
    the cost of the equipment that connects to it.
  • However, Each Network Interface Unit (NIU) still
    costs in the region of 80-200.

6
WAN
  • A WAN (Wide Area Network) is a network that is
    spread over multiple sites (gt30Km).
  • WANs are not limited in size (they can even cross
    the world).
  • Public facilities (such as the public switched
    telephone network) are extensively used.
  • However, this means that the rate at which data
    is sent is limited by the bandwidth of these
    facilities.

7
WAN vs. LAN
  • When comparing WANs with LANs, the main
    difference is in the data transmission rates.
  • Delay and error rate parameters are also relevant
    to some applications.
  • We can view the technical facilities offered by a
    WAN as a subset of those offered by a LAN.
  • What a WAN offers is long distance connectivity.

8
Implementation of a Computer Network
  • How easy a network is to use depends on the
    sophistication of the software provided.
  • The most basic level of netware provision is to
    only have programs designed for specific tasks
    such as file transfer.
  • More sophisticated systems incorporate network
    facilities in the operating system of the
    computer (thus network operations become a
    coherent part of the user interface).

9
The Most Sophisticated type of Software Provision
  • The highest level of refinement is to regard each
    computer as part of a single distributed
    operating system.
  • This level of sophistication allows the user to
    access files, programs, utilities and resources
    as if they were on his or her own computer.

10
Network Specifications
  • A network implies that all the computer can
    communicate with each other.
  • This requirement can be met in a number of ways
    but there are certain basic principles common in
    most networks.

11
Network Structure
  • Each host computer communicates via a Network
    Interface Unit (NIU).
  • By host computer we mean computers on which users
    can run applications.
  • The term node is often used for the intelligent
    interface that is part of each host computer (or
    sometimes for the host computer itself).
  • The term node can also be used to mean another
    computer with which the host communicates (such
    as a server or a router).

12
Network Topology
  • The term topology refers to the way in which the
    nodes of a network are connected.
  • The topology of a network will effect its
    performance (it terms of speed) and its cost
    (both short and long term).
  • Cost/resource considerations and the environment
    in which the network is to be used often
    determines the choice of topology.

13
Switching Networks/Broadcast Networks
  • We can distinguish networks by the way in which
    they transmit data.
  • WAN usually use switching networks to send data
    from source to destination nodes.
  • LANs, however, often use broadcast networks
    because they are cheaper to build and maintain.
  • Broadcast networks send all the data to all nodes
    (which must out listen for the data meant for
    them).

14
Common Topologies
  • Common topologies are
  • MESH
  • STAR
  • BUS
  • TREE
  • RING
  • BACKBONE

15
Mesh Topology
  • A mesh topology is a network in which the
    connections between nodes is random.
  • Mesh topologies include fully connected networks
    and random networks (e.g. Internet).
  • Redundant connections in random networks ensure
    that alternative routes exist for data.

Fully connected Network with 5 nodes
Random Network with 7 nodes
16
Fully Connected Networks
  • Fully connected networks are the fastest types of
    networks since each device directly connects to
    every other device.
  • There is no time delay due to switching.
  • If there are N hosts in the network, we need
    N(N-1)/2 bi-directional connections (e.g. 20
    hosts needs 190 connections).
  • This is far too many connections (most of which
    will be idle most of the time).

17
Sharing Connections
  • Without a fully connected network, connections
    between nodes must be shared.
  • One way to do this is to allow nodes to switch
    data through a random network.
  • We can view a random network as interconnecting
    star networks.
  • Data is passed through this network, via
    intermediate nodes, until it arrives at its
    destination.

18
Star Networks
  • A star network consists of a special central node
    (or hub node) to which host computers or
    terminals are connected.
  • Any host computer can connect to any other host
    computer via the hub.

19
Star Networks
  • The hub switches messages through to the
    appropriate destination.
  • The hub may also provide a translation service
    for devices with different protocols.
  • Star Networks are vulnerable, however. If the
    hub fails then the network fails.
  • Star Networks may require a lot of cabling and
    can be expensive to install.

20
Bus Networks
  • A bus network consists of a single medium
    (typically 5 pair twisted-wire cable) to which
    all the host computers are connected.
  • Packets are broadcasted on the medium to all
    nodes on the network.

21
Contention
  • The is an obvious danger that two host computers
    may attempt to use the network medium
    simultaneously.
  • This problem is called contention and is a
    problem with all Bus topologies.
  • The nodes must employ Medium Access Protocols,
    which function in conjunction with other nodes,
    to permit access only at times when the medium is
    free.

22
Tree Networks
  • A tree network (as used in LANs) is a variant of
    the Bus topology.
  • Nodes are connected in a tree structure and
    messages are broadcast across whole tree.

23
Tree Networks
  • Tree topologies have the advantage that they are
    easy to expand.
  • Furthermore, if a fault occurs, the effected
    branch can be easily isolated so that the rest of
    the network is not effected.
  • The disadvantage is that signals can be reflected
    from the ends of branches and cause interference.
    For this reason, Tree Networks are usually run
    at lower speeds.

24
Ring Topology
  • A Ring network consists of nodes connected to
    each other to forma a closed loop.
  • Nodes accept data from neighbouring nodes in the
    form of packets.

25
Ring Topology Operation
  • The NIUs (or, in some cases, the hosts
    themselves) act as repeaters for the packets
    being forwarded.
  • This means that the Ring can be expanded to any
    size (although more hops will be required to get
    the packets to their destinations).
  • One big advantage of Ring Topologies is that
    contention is avoided since each repeater knows
    if it has to forward an existing packet or is
    free to accept a new one.

26
Dealing with Contention
  • Contention is dealt with by either using a
    slotted ring system or a token-passing ring.
  • With the slotted ring system, blank fixed sized
    frames are passed around the network.
  • These frames get filled in with data as they pass
    a node that wishes to transmit.
  • The frame goes around the entire network and is
    copied by the destination node as it passes.

27
Token-Passing Ring
  • A token-passing ring is similar to a slotted ring
    except that a token frame is passed around the
    ring.
  • If a token arrives at a node, it can be
    exchanged for a data packet.
  • The data packet is sent around the entire network
    and is copied by the destination node as it
    passes.
  • When the packet comes back to the sender, the
    sender puts the token back on the network.

28
Removing Packets/Frames
  • A frame, or packet, will circulate around the
    network until removed.
  • In some networks it is the destination node that
    removes it.
  • In other networks it is the sender that removes
    it.
  • The advantage of getting the sender to remove the
    frame is that it allows data to be broadcast to
    any number of nodes.

29
Housekeeping
  • If, for some reason, a frame is not removed by
    the sender it will circulate forever and reduced
    the efficiency of the Ring network.
  • This is not a problem with Bus networks since
    terminators (or Head Ends) absorb unwanted
    packets.
  • Devices called monitors are responsible for
    housekeeping by marking frames as they pass. If
    a marked frame comes back round to the monitor,
    it is then removed.

30
Backbone Network
  • A backbone network connects many smaller networks
    via devices called bridges.
  • This type of network is easy to expand and
    isolates local traffic.

31
Transmission of Data
  • A network implies that we wish to transmit data
    from one node to other nodes.
  • In switched networks, we can use four switching
    methods
  • Circuit Switching (e.g. POTS technology)
  • Message Switching
  • Packet Switching
  • Virtual Circuits (e.g. ATM technology)

32
Circuit Switching
  • We have already seen circuit switching in POTS
    and it is the same in computer networks.
  • A connection from node A to node B is established
    and the full bandwidth of that connection is
    available for communication.
  • The connection remains in place for the duration
    of the computer conversation.

33
Time Sequence Diagram for Circuit Switching
  • We can use a time sequence diagram to see the
    order of events in circuit switching.

34
Message Switching
  • Message switching sends complete messages from
    node to node until they reach their destination.
  • Because messages are of variable length, they
    time delay for delivery is variable.
  • This makes message switching unsuitable for
    interactive traffic.
  • Large messages can also cause congestion and
    overflow switches with small memory.

35
Time Sequence Diagram for Message Switching
  • The events in message switching occur as follows

36
Packet Switching
  • Packet switching is similar to message switching
    except that the messages are broken up into small
    datagrams called packets (about 1Kbyte in
    length).
  • Because packets are smaller than messages, they
    do not suffer the same delays as messages do.
  • This makes packet switching better for
    interactive traffic.

37
Time Sequence Diagram for Packet Switching
  • The time delay between sending first packet and
    its delivery is much less.

38
Virtual Circuit
  • A Virtual Circuit is similar to packet switching
    with the exception that all the packets follow
    the same route.
  • The route, or virtual circuit, is established in
    a similar way as a connection of a circuit
    switched network.
  • The difference is that connections are shared
    between many virtual circuits.

39
Time Sequence Diagram for Virtual Circuit (LLC-2)
40
Network Control
  • In a switched network, we need to have mechanisms
    for controlling the movement of data.
  • There are three main aspects to Network Control
  • Routing
  • Flow Control
  • Error Control

41
Routing
  • Routing is the process of directing data around
    the network.
  • Ideally we want to direct as much data from the
    source to the destination with the minimum delay.
  • How well this can be done depends a great deal on
    the topology of the network .
  • In a simple network (such as a star topology)
    there is little difficulty.

42
Routing in a Mesh Network
  • Routing becomes complicated in a random mesh
    network (as widely used in WANs).
  • One widely used method uses routing tables to
    decide the best direction to send data.

43
Routing Packets (or Frames)
  • Packets (or Frames) enter the network with a
    destination address field and a source address
    field.
  • At each node, the destination address is used to
    look up an entry in a routing table.
  • The routing table tells the node which is the
    preferred direction to send the data.
  • A alternative direction is usually also provided
    in case the first is unavailable.

44
Routing Tables
  • The routing tables obviously need to be filled
    in.
  • There are a number of approaches for doing this.
  • There are two basic classes of routing algorithm
  • shortest-path algorithms try to find the least
    cost path between source and destination.
  • bifurated routing algorithms attempt to evenly
    spread out the load across the entire network.

45
Effects of Routing on Quality of Service (QOS)
  • Routing effects two Quality of Service (QOS)
    parameters transit delay and throughput.
  • Networks are often described in terms of common
    qualitative and quantitative parameters known
    collectively as QOS parameters.
  • QOS parameters are worth a brief discussion in
    themselves.

46
Quality of Service
  • There are 8 parameters commonly used to describe
    networks (typically WANs).
  • Connection establishment delay is the time it
    takes between a request for a connection from
    host A to host B and receiving confirmation.
  • Connection establishment failure probability is
    the chance that a connection is not confirmed
    within a reasonable time.
  • Throughput is the amount of user data (usually in
    bytes) successfully transmitted from A to B every
    second.

47
Quality of Service
  • Transit delay is the time between sending data
    and it being received by the destination host.
  • Residual error ratio is the proportion of packets
    that are lost or garbled.
  • Protection is how easy it is for a third party to
    listen to or corrupt data in the network.
  • Priority is if it is possible to earmark some
    connections as having a greater priority than
    others.
  • Resilience is the probability that a connection
    is terminated due to congestion or network faults.

48
Quality of Service for LANs
  • Although LANs can use the same parameters for
    Quality of Service, their small size and general
    reliability means that greater emphasis is placed
    on parameters such as priority.

49
Measuring Throughput and Transit Delay
  • We can measure throughput and transit delay by
    examining acknowledgements sent back to the
    source host from the destination host (this is
    called feedback).
  • The number of acknowledgements received back in a
    second will tell us the throughput and the
    difference in the time fields of the packet (or
    frame) and the acknowledgement tells us the
    transit delay.

50
Feedback in Flow Control
  • To avoid congesting various parts of the network,
    the number of packets offered to any sub-net
    should match its throughput.
  • Feedback can be used to dynamically control the
    number of packets (or frames) given to the
    sub-net. This is flow control.

51
Transit Delay vs. Throughput
  • Ideally we want the throughput to equal the
    offered load. Excessive offered loads result in
    a portion of the packets (or frames) being
    rejected (either discarded or sent via an
    alternative route).
  • Achieving maximum throughput in a network often
    comes at the cost of greater transit delay. Flow
    control is usually designed to find a balance
    between them.

52
Effects of Good Routing
  • While precise balance between throughput and
    transit delay is determined by flow control, the
    effects of good routing within a network are to
    improve throughput and reduce transit delay.

53
Deterministic Routing
  • If the routing tables used by the nodes are
    fixed, then the routing method is known as fixed
    routing or deterministic routing.
  • Here routing tables are change only occasionally
    (typically when there has been a change to the
    network).
  • Any modifications to the tables are usually
    managed centrally or from regional centres.
  • There is an advantage to this since routes can be
    assigned to users as they log on.

54
Adaptive Routing
  • An improved scheme is to use traffic flow data on
    neighbouring nodes in order to dynamically decide
    the best route to send packets (or frames).
  • This approach reduces the chance of packets being
    rejected.
  • The snag is that the traffic flow data itself has
    to be transmitted and this traffic reduces the
    amount of user data that can be sent.

55
Isolated Adaptive Routing
  • Despite the snag adaptive routing is used in many
    WANs. One form of adaptive routing measures
    queue sizes and (together with a weight) chooses
    to use alternative routes on a probabilistic
    basis.
  • The ratio of(W1E1)(W2E2)is used.

56
Distributed Adaptive Routing
  • A different algorithm is used in ARPANET. Here
    the object is to find the path of least delay
    under the prevailing conditions.
  • The average delay for each of the neighbouring
    nodes is measured and, every 10 seconds, this
    information in propagated to other nodes.
  • In this way, a dynamic database is formed of the
    current fastest route in the local area of the
    network.

57
Distributed Adaptive Routing
  • The delay incurred as a result of the updating
    process can be considerable.
  • If one packet is used by each node during each
    time period to update its routing table, then the
    cost can very high.
  • In earlier versions of ARPANET, updates were
    performed every 0.67 seconds. This used up about
    50 of the network capacity.
  • Now they are performed every 10 seconds only when
    there are significant changes.

58
Flooding
  • We can dispense with a formal systematic routing
    algorithm altogether by using flooding or random
    routing techniques.
  • In flooding, every packet is sent down every
    connection to a node except the one on which the
    packet was received.
  • This ensures that the data gets through to every
    node and will arrive in the shortest time.
  • This type of routing produces an excessive amount
    of traffic, however.

59
Random Routing
  • In random routing, the choice of output path is
    any path on which the packet (or frame) did not
    arrive.
  • The choice is made randomly and so ensures that
    traffic is evenly spread across the network.
  • The only problem is that the packet may take a
    long time to find the destination node.

60
Flow Control and Congestion
  • Flow Control simply means the methods used to
    keep network traffic moving.
  • This means taking measures to avoid sending
    packets (or frames) towards bottlenecks in the
    network.
  • If more traffic offered to part of the network
    that it can handle, then buffers in it will
    overflow and packets will be lost.
  • Congestion is when part of a network has so many
    packets, none of them can move at all!

61
Flow Control and Transit Delays
  • Flow control is often used on host machines to
    hold back the transmission of packets until the
    network is able to accept them without risking
    congestion or overflow.
  • This keeps the traffic on the network down but
    does not reduce the transit delay since the delay
    is simply shifted to the host machine rather than
    the network.
  • The only way to avoid dissatisfaction is to
    ensure there is sufficient network capacity.

62
Keeping Users Out
  • Another way to avoid overflowing the network is
    to prevent user from logging in when the network
    is near to full capacity.
  • This approach tends only to cause another type of
    dissatisfaction.
  • When delays do become to long, things just get
    worse
  • packets (or frames) get discarded
  • the timers on hosts run out and they retransmit.

63
A Brief Word about Timers
  • In many data link protocols, the source host
    expects to receive acknowledgements (ACK or NAK
    signals) from the destination host when packets
    (or frames) arrive.
  • If this does not happen within a certain time
    then the source host assumes that the packet was
    lost or corrupted in transit and retransmits the
    packet.
  • Note ACK means that the packet was received
    intact and NAK means that it was not (please
    retransmit the packet).

64
Time Sequence Diagrams for Timer
ACK (or NAK) arrives back in time
ACK (or NAK) does not arrive back
65
Buffer Overflow
  • Consider a situation where two sessions are
    passing packets through the same node.
  • Node 3 will temporarily store the packets it
    receives in its buffers.

66
Buffer Overflow
  • Imagine now that the buffer is full. The node
    will only be able to accept a new packet once it
    has sent an old one.
  • Now imagine that one of the incoming links is 10
    times faster than the other one (not an uncommon
    situation).
  • Every time a space is made in the butter, the
    node is 10 times more likely to accept a new
    packet from the faster link.

67
Connection Blocked by Buffer Overflow
  • The effect is to almost block the other
    connection since most of its packets will be
    rejected by the central node.
  • This problem can be overcome by using more
    complex nodes that have separate buffers for all
    the incoming links and sends packets out with
    equal priority (say by using a round-robin
    selection from each buffer).

68
Deadlock
  • Another problem that can cause congestion in a
    network is that of deadlock.
  • Imagine two nodes, P and Q, are transmitting
    packets to one another.
  • Now imagine that both their buffers are full.
  • Both are unable to receive packets so no packets
    move.

69
Finally..Overcoming Deadlock
  • This is a simple example of deadlock. There may
    be many nodes involved (typically in cycles)
    where each is unable to transmit packets to the
    next.
  • We can overcome this by having separate buffers
    for different priority packets.
  • The more links a packet travels over, the greater
    its priority.
  • Deadlocks do not occur because it is unlikely
    that packets will overflow all the buffers.
  • If a packet gets a priority greater than n-1 then
    the packet is discarded (it is assumed to have
    travelled in a loop). This also ensures that a
    deadlock cannot occur.
  • Another (less certain method) is to allow
    deadlocks to occur and regularly discard very old
    packets to try to clear them.
Write a Comment
User Comments (0)
About PowerShow.com