The Network Layer and Routing - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

The Network Layer and Routing

Description:

Multicast routing: For each group, prune the spanning tree as much ... A pruned spanning tree for each group at each node (as root) requires large memory space. ... – PowerPoint PPT presentation

Number of Views:65
Avg rating:3.0/5.0
Slides: 43
Provided by: www3I6
Category:

less

Transcript and Presenter's Notes

Title: The Network Layer and Routing


1
The Network Layerand Routing
  • Chapter 5

2
Network Layer Design Isues
  • Store-and-Forward Packet Switching
  • Services Provided to the Transport Layer
  • Implementation of Connectionless Service
  • Implementation of Connection-Oriented Service
  • Comparison of Virtual-Circuit and Datagram
    Subnets

3
Store-and-Forward Packet Switching
  • The environment of the network layer protocols.

fig 5-1
4
Implementation of Connectionless Service
Routing within a datagram subnet. (destined for,
outgoing line)
5
Implementation of Connection-Oriented Service
Routing within a VC subnet (incoming, connection
id) (outgoing, connection id)
6
Comparison of Virtual-Circuit and Datagram Subnets
5-4
7
Routing Algorithms
  • The Optimality Principle
  • Shortest Path Routing
  • Flooding
  • Distance Vector Routing
  • Link State Routing
  • Hierarchical Routing
  • Broadcast Routing
  • Multicast Routing
  • Routing for Mobile Hosts
  • Routing in Ad Hoc Networks

8
Routing Algorithms (2)
  • Conflict between fairness and optimality.

9
The Optimality Principle
F-gtA-gtB best path gtA-gtB best path Optimal routes
from all sources to a destination form a tree
rooted at the destination
  • (a) A subnet. (b) A sink tree for router B.

10
Shortest path routing
  • Distance metric
  • Number of hops
  • Geographic distance
  • Mean queue and transmission delay
  • Cost
  • Bandwidth
  • Combination of above

11
Shortest Path Routing (Dijkstra)
  • The first 5 steps used in computing the shortest
    path from A to D. The arrows indicate the
    working node.

12
Shortest path routing (static)
  • Initialization
  • Generic step (Repeat N-1 times)

13
Flooding (static)
  • Send out a packet on every (outgoing) line except
    the incoming line.
  • Hop counter decrements at each hop
  • Discard packet when hop counter is zero
  • Do not flood a second time (record the seq. no.
    of a flooded packet)
  • Selective flooding (correct direction)

14
Distance vector routing (Bellman Ford)(dynamic)
  • Intialization
  • Generic step (until distances do not change)

15
Distance Vector Routing
  • (a) A subnet. (b) Input from A, I, H, K, and the
    new
  • routing table for J.

16
Distance Vector Routing (2)
A comes up Good new spreads fast
A goes down Bad news spreads slow
The count-to-infinity problem. No way to tell if
a nodes neighbors best path runs through the
node itself
17
Centralized implementationof Dijkstras or
Bellman Ford
  • Set up a specialized node called RCC (Routing
    Central Center)
  • Send to RCC for every (i,j)
  • Compute for every and every
    destination.
  • Send back to for every
    destination.

18
Link State Routing
  • A way to implement Dijkstras algorithm
    (distributed)
  • Each router must do the following
  • Discover its neighbors, learn their network
    address.
  • Measure the delay or cost to each of its
    neighbors.
  • Construct a packet telling all it has just
    learned.
  • Send this packet to all other routers.
  • Compute the shortest path to every other router.

19
Learning about the Neighbors
After boot up send a HELLO packet to each
outgoing line
  • (a) Nine routers and a LAN. (b) A graph model of
    (a).

20
Measuring Line Cost
Measure delay as half the roundtrip time for an
ECHO packet between two nodes Can factor in
traffic load by starting timer at the rear of
queue. If traffic is factored in by everyone then
better performance is obtained, but oscillations
can occur. ExTraffic on C-F and E-I oscillates.
  • A subnet in which the East and West parts are
    connected by two lines.

21
Building Link State Packets
  • When to build?
  • Periodically
  • When something significant occurs (neighbor goes
    down)
  • (a) A subnet. (b) The link state packets for
    this subnet.

22
Distributing the link state packets
  • Flooding
  • Each router records the (source, seq. no.)
  • Only flood and record packets from a source with
    higher seq.no. than previously recorded.
  • Sequence numbers or router records of them can
    get corrupt.
  • Include age after seq. no. and decrement it per
    second. Discard packets with age zero.

23
Distributing the Link State Packets
  • The packet buffer for router B in the previous
    slide

24
Hierarchical Routing
  • Smaller tables, not necessarily optimal paths

25
Broadcast routing
  • Broadcast Send a packet to all routes
    simultaneously
  • Send a distinct packet to each destination
  • Flooding Each node copies the packet to all
    outgoing lines
  • Multidestination routing Copy on outgoing line
    if it is the best route to at least one
    destination, include in each packet those
    destinations that use the line. (Destination set
    is hierarchically partitioned)
  • Sink tree/spanning tree Copy on all the spanning
    tree lines except the one packet arrived from.
  • Reverse path forwarding Copy on all outgoing
    lines if incoming line is on the best route to
    source (therefore packet is the first copy).
  • The last three methods are BW efficient.

26
Broadcast Routing
Reverse path forwarding. (a) A subnet. (b) a
Sink tree. (c) The tree built by reverse path
forwarding.
27
Reverse path forwarding
  • No need to compute/know the entire spanning tree
  • Only the best path to each destination (source)
    needs to be known
  • If a packet arrives from a source on an incoming
    line other than the best path to that source it
    is discarded (possibly a duplicate)

28
Multicast (Çogagönderim) routing
  • Multicast Send to a group whose size is
    numerically large, but small compared to the
    network as a whole.
  • Ex Application run by distributed processes.
  • Process keeps its host up to date about group
    membership which, in turn, informs routers.
  • Multicast routing For each group, prune the
    spanning tree as much as possible (remove all
    lines that dont go to group members) to cover
    the hosts of that group.

29
Multicast Routing
(a) A network. (b) A spanning tree for the
leftmost router. (c) A multicast tree for
group 1. (d) A multicast tree for group 2.
30
Minimum spanning tree (Kruskal)
  • Initially, each node is placed in a set.
  • Iteratively, sets that have minimum distance
    between them are merged until there is a single
    set. The minimum distance links (between merged
    sets) are recorded.
  • Ex (1,2),(2,3),
  • (4,5), (6,7), (1,4),
  • (4,7)

31
Multicast routing
  • Link state routing
  • Compute the spanning tree at each node, prune the
    spanning tree starting at the end of each path.
  • Distance vector routing
  • Basic algorithm is reverse path forwarding
  • A router with no hosts interested in a particular
    group or no connections to other routers responds
    with a PRUNE message to a multicast message
  • A router with no hosts interested in a particular
    group and multicast messages on all its lines
    responds with a PRUNE message

32
Multicast routing
  • A pruned spanning tree for each group at each
    node (as root) requires large memory space.
  • Core based tree Host sends to a single root node
    which does the multicasting

33
Routing for Mobile Hosts
  • A WAN to which LANs, MANs, and wireless cells are
    attached.

34
Mobile Hosts
  • Migratory (Sistem degistiren)
  • Move around and use the network when physically
    connected
  • Roaming (Dolasan)
  • Cellular
  • Move around , compute and maintain connections on
    the run.

35
Mobile host registration
  • Each mobile host (gezgin terminal) registers with
    foreign agent (uzak üstlenici) whose area it
    falls into
  • Either the foreign agent announces its existence
    or the host looks for one using broadcast
    messages
  • Mobile host gives the foreign agent its home
    address, DLL address and security info
  • Foreign agent contacts hosts home agent and
    informs it of the presence of the host, along
    with its own network address and security info
  • If security info is valid and recent (timestamp)
    the home agent tells foreign agent to proceed
  • Upon receipt of ack, foreign agent makes entry in
    its tables and informs host that registration is
    successful

36
Routing for Mobile Hosts (2)
  • First packet is redirected. Sender is informed by
    home so that subsequent packets are directly sent
    to the foreign agent.

Sender
Home agent
Foreign agent mobile host
37
Routing in Ad Hoc Networks
  • -No fixed router (base station), router and host
    are on the same mobile machine and network is a
    set of machines that communicate with their
    neighbors.
  • -Dynamic topology, validity of paths change
    spontaneously.
  • Possibilities when the routers are mobile
  • Military vehicles on battlefield.
  • No infrastructure.
  • A fleet of ships at sea.
  • All moving all the time
  • Emergency works at earthquake .
  • The infrastructure destroyed.
  • A gathering of people with notebook computers.
  • In an area lacking 802.11.

38
On Demand Route Discovery (AODV)
Graph of nodes (routerhost). Connected by a line
only if two nodes communicate directly (not
necessarily in each others range)
  • (a) Range of A's broadcast.
  • (b) After B and D have received A's broadcast.
  • (c) After C, F, and G have received A's
    broadcast. (B and D reject each others
  • broadcast)
  • (d) After E, H, and I have received A's
    broadcast.
  • Shaded nodes are new recipients. Arrows show
    possible reverse routes.

39
Route Discovery (2)
  • ROUTE REQUEST packet processing (broadcast)
  • -if (Source address,Request ID) is new, record
    pair
  • - else discard packet and stop
  • -if a fresh route (assessed by Dest. Seq. ) to
    destination is known, send back ROUTE REPLY
  • -else increment Hop count, broadcast ROUTE
    REQUEST , make an entry in reverse route table
    and start a timer.

40
Route Discovery (3)
  • Lifetime how long the route is valid
  • Hop count how far away the destination is
  • ROUTE REPLY packet processing at each
    intermediate node on the way back (unicast)
  • -make an entry into forward routing table for a
    route to destination, if no such route exists,
    route exists, but is old (Dest. Seq. ), or route
    exists, but new route is shorter (Hop Count)
  • -nodes not on the reverse path erase their
    reverse route table entry after timer expires.

41
Route Discovery
  • In order to limit traffic due to many broadcasts
  • ROUTE REQUEST is sent in areas inside of
    increasingly wider rings.
  • Enabled by setting time to live to 1 at first
    attempt and 2,3,... at further attempts and
    decreasing time to live by one at each hop.

42
Route Maintenance
Discover which neighbors are no longer available
by either periodically polling them or when no
reply comes back for a packet sent. Purge
destinations reached over that neighbor that is
now unavailable Inform those active neighbors
(users) that reach any such destination over
that unavailable neighbor.
  • (a) D's routing table before G goes down.
  • (b) The graph after G has gone down.
Write a Comment
User Comments (0)
About PowerShow.com