Routing We first need to know what is a route… Come on we all know what is a route!!! A path that leads us to our destination is known as a route. Just.

Slides:



Advertisements
Similar presentations
Distance Vector Routing Protocols
Advertisements

CSE 211 Discrete Mathematics
McGraw-Hill © The McGraw-Hill Companies, Inc., 2004 Chapter 22 Network Layer: Delivery, Forwarding, and Routing Copyright © The McGraw-Hill Companies,
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Link-State Routing Protocols Routing Protocols and Concepts – Chapter.
Graph Theory Arnold Mesa. Basic Concepts n A graph G = (V,E) is defined by a set of vertices and edges v3 v1 v2Vertex (v1) Edge (e1) A Graph with 3 vertices.
1 Chapter 22 Network layer Delivery, Forwarding and Routing.
BY PAYEL BANDYOPADYAY WHAT AM I GOING TO DEAL ABOUT? WHAT IS AN AD-HOC NETWORK? That doesn't depend on any infrastructure (eg. Access points, routers)
Routing So how does the network layer do its business?
Routing and Routing Protocols
Routing and Routing Protocols
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
Delivery, Forwarding, and Routing
Routing Protocol Pertemuan 21 Matakuliah: H0484/Jaringan Komputer Tahun: 2007.
Institute of Technology Sligo - Dept of Computing Chapter 11 Layer 3 Protocols Paul Flynn.
1 LAN switching and Bridges Relates to Lab 6. Covers interconnection devices (at different layers) and the difference between LAN switching (bridging)
Chapter 27 Q and A Victor Norman IS333 Spring 2015.
1 25\10\2010 Unit-V Connecting LANs Unit – 5 Connecting DevicesConnecting Devices Backbone NetworksBackbone Networks Virtual LANsVirtual LANs.
ROUTING ON THE INTERNET COSC Aug-15. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
Connecting Networks © 2004 Cisco Systems, Inc. All rights reserved. Exploring How Routing Works INTRO v2.0—4-1.
Delivery, Forwarding and
Lecture Week 8 The Routing Table: A Closer Look
CECS 474 Computer Network Interoperability WAN Technologies & Routing
Introduction to Routing and Routing Protocols By Ashar Anwar.
Connecting LANs, Backbone Networks, and Virtual LANs
22.1 Chapter 22 Network Layer: Delivery, Forwarding, and Routing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Pertemuan 20 Teknik Routing Matakuliah: H0174/Jaringan Komputer Tahun: 2006 Versi: 1/0.
M. Menelaou CCNA2 DYNAMIC ROUTING. M. Menelaou DYNAMIC ROUTING Dynamic routing protocols can help simplify the life of a network administrator Routing.
University of the Western Cape Chapter 11: Routing Aleksandar Radovanovic.
Unicast Routing Protocols  A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
M.Menelaou CCNA2 ROUTING. M.Menelaou ROUTING Routing is the process that a router uses to forward packets toward the destination network. A router makes.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking BGP, Flooding, Multicast routing.
CSC 336 Data Communications and Networking Lecture 7d: Interconnecting LAN Dr. Cheer-Sun Yang Spring 2001.
 Network Segments  NICs  Repeaters  Hubs  Bridges  Switches  Routers and Brouters  Gateways 2.
10/8/2015CST Computer Networks1 IP Routing CST 415.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
TCP Traffic and Congestion Control in ATM Networks
Dr. Clincy1 Chapter 6 Delivery & Forwarding of IP Packets Lecture #4 Items you should understand by now – before routing Physical Addressing – with in.
© 2002, Cisco Systems, Inc. All rights reserved. 1 Determining IP Routes.
1 Routing Table  The seven fields Mask: for finding (sub)network address of the destination l Host-specific routing: (/32) l Default routing:
Page 110/27/2015 A router ‘knows’ only of networks attached to it directly – unless you configure a static route or use routing protocols Routing protocols.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
Routing Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific Institute of Information.
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
Networks and Graphs in Introduction Many Decision Science problems can be modelled using what are called graphs or networks. A network is.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
M. Veeraraghavan (originals by J. Liebeherr) 1 Need for Routing in Ethernet switched networks What do bridges do if some LANs are reachable only in multiple.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
Distance Vector Routing
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
22.1 Network Layer Delivery, Forwarding, and Routing.
ROUTING ON THE INTERNET COSC Jun-16. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Ethernet switches and IP routers
Chapter 6 Delivery & Forwarding of IP Packets
(How the routers’ tables are filled in)
Forwarding and Routing IP Packets
Chapter 6 Delivery & Forwarding of IP Packets
What is a router? A router is a device that connects multiple computers together. Not to be confused with a switch Routers transmit packets of data across.
Routing: Distance Vector Algorithm
Chapter 6 Delivery & Forwarding of IP Packets
(How the routers’ tables are filled in)
Delivery, Forwarding, and Routing
UNICAST ROUTING PROTOCOLS
Chapter 15 Graphs © 2006 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Communication Networks
Communication Networks
Presentation transcript:

Routing We first need to know what is a route… Come on we all know what is a route!!! A path that leads us to our destination is known as a route. Just think Mac needs to go to his school. If does not know how will he find out the route? He will ask somebody isn't it? Lets say he has police men to ask at some crossings who know about some of the places near them and other policemen standing at other crossings. The next slide displays such a situation. The arrows indicate the places and policemen, a policeman knows. Lets see how Mac finds out the route to his school!!!

I want to go to school This way R2 = 2 stops R3 = 3 stops so I will send him via R2 I want to go to school I dont know any one other than R4 I will send him via R4 Go this way Where is my school There you are This block Geeeeee… !!!! I am here!!! R1 R2 R4 R3 R5 R6

So, we can see that Mac has ultimately found out the route!!! We can also see that a path has been established from Macs starting place to his school. Now let us figure out the various components involved in this model. Mac – Analogous to Data Packet Blocks – Analogous to Distinct Networks Police Men – Analogous to routers.

Now we can explain Router – Router is a device that connects different networks and also finds the minimum cost path between them. The fact is that a router never finds out the full path. Doing this is practically not possible. It just redirects the data packet to the next router (also referred to as next hop) on the shortest path. We will now try to learn how.

What is meant by shortest path ? Well, the path from one point to another is logically weighted according to the distance. The weight is called metric. Metric is calculated on the basis of a number of factors. For instance – Number of Hops – Number of routers the data will have to pass through. Time required – The total time delay of the path. Cost – The path taken may cost some units at every router.

So how do we estimate the metric? To estimate the metric and find out the shortest path on that basis, some standardized algorithms may be used. Before this we must understand a mathematical model representing a network.

Lets first define a network A network (also called a graph) can be defined by two sets – A set of nodes (or vertices – machines) V. A set of connections (Edges or links) E. An edge may be defined by a pair of vertices. Thus for an edge to exist at least two vertices must exist in V. If number of vertices is n then the maximum no. of edges is n C 2. V1 V2 V4 V3 E4 E5 E1 E3 E2 Thus the sets E and V may be defined as – V = {V1, V2, V3, V4} E = { (v1,v2), (v1,v3), (v1,v4), (v2,v3), (v3,v4) }

Other definitions Directed Graph (or Digraph) – When the elements of E are ordered pairs then we call the graph a directed graph. This means, that while traversing through the edge, we can take only a fixed direction, as implied by arrows. V1 V2 V4 V3 E4 E5 E1 E3 E2 Thus the sets E and V may be defined as – V = {V1, V2, V3, V4} E = { (v1,v2), (v3, v1), (v1,v4), (v2,v3), (v4, v3) }

Weighted Graph – This is a kind of graph where the element of E are triples with two vertices and a number representing the weight (cost) of the edge. V1 V2 V4 V3 E1, 2 Thus the sets E and V may be defined as – V = {V1, V2, V3, V4} E = { (v1,v2, 2), (v3, v1, 5), (v1,v4, 1), (v2,v3, 4), (v4, v3, 2) } E4, 4 E2, 5 E3, 1 E5, 2 Path – This is a part of the graph connecting two distinct vertices and has no loops. More fundoo – It consists of subsets of V and E where each element of V is associated with some E. V1 V2 V4 V3 E4 E5 E1 E3 E2 The highlighted part is a path from V2 to V4

Tree – This is a graph or sub-graph where there exists maximum one path between two nodes. This simply means that there is no loop in the graph. V1 V2 V4 V3 E1, 2 The highlighted portion is a tree E4, 4 E2, 5 E3, 1 E5, 2 Spanning Tree – A tree that covers all the vertices of the graph or network is called a spanning tree. V1 V2 V4 V3 E4 E5 E1 E3 E2 The highlighted part is a spanning tree

Algorithms to find the shortest path between two nodes. Dijkstras Algorithm The algorithm works as follows: 1. Label the start vertex's final value as 0 (as it is the origin), and label it Update the working values (if they have no working value yet, or if the new working value is lower) of all the vertices that can be reached directly from the last vertex labelled. 3. Choose the unlabelled vertex with the smallest working value, and record its working value as its final value and record its order of labellling. 4. Repeat steps 2 and 3 until the destination vertex is labelled. The working value for the destination vertex is its best working value. The shortest route can now be found by tracking back: If vertex a lies on the route, then vertex b is the previous vertex if the label at a - label at b =weight of edge ab

Example of using Dijkstra's algorithm to get from A to C: This is the graph given Step 1 – Label the start vertex's final value as 0 (as it is the origin), and label it 1.

Step 2 – Update the working values of B,E and D. Step 3 – Choose the vertex with the lowest working value (B), and record its working value as its final value and the order in which it was labelled

Step 4 Update all working values 5 Label the smallest working value vertex with no label (E),final value=working value.

Step 6 – Update working values (no change) Step 7 – Choose smallest working value (D), label. Step 8 – Update working values (No change) Step 9 – Choose and label smallest working value, unlabelled, vertex. It is C, so C's final working value is To find the path: 7-5=2 and 7-1=6 so the path can either be ADC or ABC (it doesn't matter which we choose).

There are a number of similar algorithms for finding the shortest path. There is another called Floyds Algorithm in which we use a matrix formation to find out the shortest paths, but right now let us concentrate on basics. So how does the router take advantage of these algorithms? The routers actually communicate with their neighbours to create a table called routing table This is how a routing table looks like. DestinationGateway Flags Ref Use Interface UH lo0 default UG U le UG UG UG UG

If we look at the above table closely, we will find that it has the next hop information. For instance if some packet is destined for the network then it will be sent to the gateway The rest of the headache is to be taken by the later. A question may be asked over here that how was this routing table generated?. The routers have communicated the costs of connecting to their neighbours to all the other routers. Then the routers have used some or other shortest path algorithms to determine the routing table for itself. This communication may be done only once (The first time they are connected – Static Routing), Periodically (At fixed time intervals - Dynamic) or in Triggered manner (Whenever there is some change in the network – new router is added or an existing one is removed etc. - Triggered). Table updating can also be done manually in some routers. However in a vast network like the internet, we would like automatic configurations.

Are there any standard methods for communication between routers? Yes, of course there are!!! The simplest method is Flooding – A router sends a copy of its table to its neighbours. These neighbours update the table accordingly and send it to their neighbours and this way, all the routers in the network share their data. However this leads in congestion in the network and leads to multiple copies of the same data reaching on place. To avoid this problem, occurring on a periodic basis, triggered updating schemes are used. Moreover time stamps are attached with these packets so that old or already received packets can be rejected.

There are many protocols that define rules for the communication between routers. E.g. RIP, BGP etc. Two important definitions - 1.Routing Protocols – The protocols that govern how the routing should be managed 2.Routed Protocols – The protocols that govern the data flow.