Powerpoint Templates Computer Communication & Network www.pctresearchgroup.com Week # 14.

Slides:



Advertisements
Similar presentations
Delivery and Forwarding of
Advertisements

1 Chapter 22 Network layer Delivery, Forwarding and Routing.
Routing Protocol.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
Routing So how does the network layer do its business?
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
Unicast Routing Protocols: RIP, OSPF, and BGP
Routing.
COS 420 Day 17. Agenda Finished Grading Individualized Projects Very large disparity in student grading No two students had same ranking for other students.
Delivery, Forwarding, and Routing
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
1 Dynamic Routing Protocols I RIP Relates to Lab 4. The first module on dynamic routing protocols. This module provides an overview of routing, introduces.
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
TCP/IP Protocol Suite1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Delivery, Forwarding and
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
Dr. John P. Abraham Professor University of Texas Pan American Internet Routing and Routing Protocols.
Chapter 22 Network Layer: Delivery, Forwarding, and Routing
22.1 Chapter 22 Network Layer: Delivery, Forwarding, and Routing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Dynamic Routing Protocols  Function(s) of Dynamic Routing Protocols: – Dynamically share information between routers (Discover remote networks). – Automatically.
CS 4396 Computer Networks Lab
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 Chapter 22 Network layer Delivery, Forwarding and Routing (part2)
Copyright © Lopamudra Roychoudhuri
Delivery, Forwarding, and Routing of IP Packets
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Chapter 6 Delivery and Forwarding of IP Packets
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 6 Delivery and Routing of IP Packets.
1 Routing Table  The seven fields Mask: for finding (sub)network address of the destination l Host-specific routing: (/32) l Default routing:
Delivery, Forwarding, and Routing of IP Packets
1 Internet Routing. 2 Terminology Forwarding –Refers to datagram transfer –Performed by host or router –Uses routing table Routing –Refers to propagation.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
22.1 Chapter 22 Routing Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
TCP/IPTCP/IP Dr. Clincy1 Chapter 6 Delivery & Forwarding of IP Packets.
1 Kyung Hee University Chapter 6 Delivery Forwarding, and Routing of IP Packets.
An internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many.
TCP/IP Protocol Suite 1 Chapter 14 Upon completion you will be able to: Unicast Routing Protocols: RIP, OSPF, and BGP Distinguish between intra and interdomain.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
RIP Routing Protocol. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
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.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Kapitel 19: Routing. Kapitel 21: Routing Protocols
Dynamic Routing Protocols part2
Routing Protocols (RIP, OSPF, and BGP)
Routing Information Protocol (RIP)
COMP 3270 Computer Networks
Chapter 6 Delivery & Forwarding of IP Packets
Net 323 D: Networks Protocols
Delivery, Forwarding, and Routing
Routing: Distance Vector Algorithm
Routing.
UNIT III ROUTING.
Dynamic Routing Protocols part2
Delivery, Forwarding, and Routing
UNICAST ROUTING PROTOCOLS
Delivery and Forwarding of
Net 323 D: Networks Protocols
Communication Networks
Delivery, Forwarding, and Routing of IP Packets
EE 122: Intra-domain routing: Distance Vector
Routing.
Presentation transcript:

Powerpoint Templates Computer Communication & Network Week # 14

ACKNOWLEDGMENTS Mostly adopted from lecture slides by Behrouz A. Forouzan. nterior_vs_exterior.shtml#sthash.dhDkYN0q.dpuf

Week 14: Course Plan  Routing  Forwarding techniques and process  Unicast routing protocols  Concept of distance vector routing  Routing Information protocol

Two Key Network-Layer Functions  Forwarding: move packets from router’s input to appropriate router output OR the process of sending a packet on its way  Routing: determine route taken by packets from source to destination OR the process of deciding in which direction to send traffic  routing algorithms  analogy:  forwarding: process of getting through single interchange  routing: process of planning trip from source to destination

Routing  The process of moving data from one network to another is called routing.  Routing is unnecessary unless you have multiple networks on different address ranges  If you have different combinations of IP addresses and subnet masks, you have separate networks  You don't need to run a routing protocol unless you have multiple networks (and even then, manual static routes are easier for small networks).

Routing  Once you get beyond three routers, it's time to start thinking about dynamic routing protocols.  If you are connecting your networks to the Internet, you will also need to think about running more than one kind of routing protocol

Delivery of a Packet  The network layer supervises the delivery of a packet  the handling of the packets by the underlying physical networks.  The delivery of a packet to its final destination is accomplished by using two different methods of delivery  Direct delivery  Indirect delivery

Delivery of a Packet: Direct delivery In a direct delivery  Direct delivery occurs when the source and destination of the packet are located on the same physical network  The sender can easily determine if the delivery is direct  It can extract the network address of the destination (using the mask) and compare this address with the addresses of the networks to which it is connected  If a match is found, the delivery is direct

Delivery of a packet: Indirect Delivery In Indirect delivery  If the destination host is not on the same network as the deliverer, the packet is delivered indirectly  The packet goes from router to router until it reaches the one connected to the same physical network as its final destination.  Note that  a delivery always involves one direct delivery but zero or more indirect deliveries.  the last delivery is always a direct delivery.

Direct and Indirect Delivery

Forwarding Techniques Next-hop Vs route method Next-Hop: A technique to reduce the contents of a routing table  The routing table holds only the address of the next hop instead of information about the complete route Route method  Information about the complete route are maintained

Forwarding Techniques

Network-specific versus host-specific Host-specific has an entry for every destination host connected to the same physical network  The destination host address is given in routing table  Host-specific routing is used for purposes such as checking the route or providing security measures.

Forwarding Techniques Network-specific versus host-specific Network-specific: A technique to reduce the routing table and simplify the searching process  It needs only one entry that defines the address of the destination network itself  In other words, we treat all hosts connected to the same network as one single entity  For example, if 1000 hosts are attached to the same network,  only one entry exists in the routing table instead of 1000.

Forwarding Techniques Network-specific versus host-specific

Forwarding Process  Assume that hosts and routers use classless addressing because classful addressing can be treated as a special case of classless addressing.  In classless addressing, the routing table needs to have one row of information for each block involved. Problem: The table needs to be searched based on the network address (first address in the block)  Unfortunately, the destination address in the packet gives no clue about the network address.

Forwarding Process  To solve the problem, we need to include the mask (/n) in the table; we need to have an extra column that includes the mask for the corresponding block.  A simple forwarding module for classless addressing is shown

Forwarding Process: Example  Make a routing table for router Rl, using the configuration in the following figure

Forwarding Process: Example Q: Show the forwarding process if a packet arrives at Rl (Previous Figure) with the destination address Answer: 1: Applying the first mask (/26) does not match the corresponding network address. 2: The second mask (/25) is applied to the destination address. The result is , which matches the corresponding network address. The next-hop address (the destination address of the packet in this case) and the interface number m0 are passed to ARP for further processing.

Forwarding Process: Example Q: Show the forwarding process if a packet arrives at Rl (Previous Figure) with the destination address Answer: The router performs the following steps: 1.The first mask (/26) is applied to the destination address. The result is , which does not match the corresponding network address (row 1). 2.The second mask (/25) is applied to the destination address. The result is , which does not match the corresponding network address (row 2). 3.The third mask (/24) is applied to the destination address. The result is , which matches the corresponding network address.  The destination address of the packet and the interface number m3 are passed to ARP.

Forwarding Process: Example Q: Show the forwarding process if a packet arrives at Rl (Previous Figure) with the destination address Answer:  All masks are applied, one by one, to the destination address, but no matching network address is found.  When it reaches the end of the table, the module gives the next- hop address and interface number m2 to ARP.  This is probably an outgoing package that needs to be sent, via the default router, to someplace else in the Internet

Internet as a Graph  To find the best route, an internet can be modeled as a graph.  A graph is a set of nodes and edges (lines) that connect the nodes.  Think of each router as a node and each network between a pair of routers as an edge.  An internet is, in fact, modeled as a weighted graph, in which each edge is associated with a cost.

Least Cost Routing  In a weighted graph, one of the ways to interpret the best route from the source router to the destination router is to find the least cost between the two.  In other words, the source router chooses a route to the destination router in such a way that the total cost for the route is the least cost among all possible routes.  In previous Figure, the best route between A and E is A-B-E, with the cost of 6.  This means that each router needs to find the least-cost route between itself and all the other routers to be able to route a packet using this criteria.

Least Cost Trees  If there are N routers in an internet, there are (N − 1) least-cost paths from each router to any other router.  This means we need N × (N − 1) least-cost paths for the whole internet.  If we have only 10 routers in an internet, we need 90 least-cost paths.  A better way to see all of these paths is to combine them in a least- cost tree.  A least-cost tree is a tree with the source router as the root that spans the whole graph (visits all other nodes) and in which the path between the root and any other node is the shortest.  In this way, we can have only one shortest-path tree for each node;  we have N least-cost trees for the whole internet.

Least Cost Trees  Her seven least-cost trees for the internet in Previous Figure

 An internet is a combination of networks connected by routers.  When a datagram goes from a source to a destination, it will probably pass through many routers  until it reaches the router attached to the destination network.  Today, an internet can be so large that one routing protocol cannot handle the task of updating the routing tables of all routers.  For this reason, an internet is divided into autonomous systems

Autonomous Systems  Group of networks and routers under the authority of a single administration is called an Autonomous System  Routing inside an autonomous system is called intra-domain or Interior routing.  Routing between autonomous systems is called inter-domain Exterior routing

Unicast Routing Protocols  A routing table can be either static or dynamic.  A static table is one with manual entries.  A dynamic table is one that is updated automatically when there is a change somewhere in the Internet.  A routing protocol is a combination of rules and procedures that lets routers in the Internet inform each other of changes  Routing protocols are needed to create the routing tables dynamically

Unicast Routing Protocols  In unicast routing, the message is sent from one source to one destination (routed hop-by-hop).  When a router receives a packet it forwards the packet through only one of its ports (the one belonging to the optimum path) as defined in routing table  The packet may be discarded if the route couldn’t be constructed

30 Popular Routing protocols

Interior Routing Protocols (IGP) Routing inside an autonomous system Categories Distance vector protocols: router knows physically-connected neighbors, link costs to neighbors, iterative process of computation, exchange of partial information with neighbors  Routing Information Protocol (RIP) Link State Protocols: all routers have complete topology, link cost information  Open Shortest Path First (OSPF)

Exterior routing Protocols (EGP)  Routing between autonomous systems  To get from place to place outside ones network(s), i.e. on the Internet, one must use an Exterior Gateway Protocol.  EGPs handle routing outside an Autonomous System and get one from ones network, through ones Internet provider's network and onto any other network.  Examples of EGP  Border Gateway Protocol (BGP) [A Path vector protocol]

Chapter 11 Interior Routing Protocols33 Application of Exterior and Interior Routing Protocols

34 Metric of different Routing Protocols Metric is the cost assigned for passing through a network  The total metric of a particular route is equal to the sum of the metrics of networks that comprise the route.  A router chooses the route with smallest metric. RIP (Routing Information Protocol): the cost of passing each network is one hop count  If a packet passes through 10 networks to reach the destination, the total cost is 10 hop counts.

35 Metric of different Routing Protocols OSPF (Open Shortest Path First)  Administrator can assign cost for passing a network based on type of service required.  OSPF allows each router to have more than one routing table based on required type of service, such as Maximum throughput or minimum delay. BGP (Border Gateway Protocol)  Criterion is the policy, which is set by the administrator.

36 Distance Vector Routing  Each node maintains a set of triples (Destination, Cost, NextHop)  Node knows the cost to each neighbor  Directly connected neighbors exchange updates  periodically (on the order of several seconds -30s-)  whenever table changes (called triggered update)  Each update is a list of pairs:  (Destination, Cost)  Update local table if a better route is received  smaller cost  came from next-hop  Refresh existing routes; delete if timed out

Bellman-Ford Equation  Heart of distance vector routing  Used t find the least cost (shortest distance) between a source node, x, and a destination node, y, through some intermediary nodes (a, b, c,...)  when the costs between the source and the intermediary nodes and the least costs between the intermediary nodes and the destination are given. D xy = min{(c xa + D ay ), (c xb + D by ), (c xc + D cy ), …}  In distance-vector routing, normally update an existing least cost with a least cost through an intermediary node, such as z,  if the latter is shorter.  So the equation becomes simpler as D xy = min{D xy, (c xz + D zy )}

Bellman-Ford Equation

Distance Vector Corresponding to a Tree Do these distance vectors represent least-cost paths? They do, considering the limited information a node has. When we know only one distance between two nodes, it is the least cost.

Initial Distance Vector for an internet in the Figure

Updating Distance Vectors

42 Distance Vector Routing: Table Initialization

43 Distance Vector Routing: Sharing

44 Distance Vector Routing: Updating In distance vector routing, each node shares its routing table with its immediate neighbors periodically and when there is a change

Updating Routing Table  If the next-node entry is different  The receiving node chooses the row with the smaller cost  If there is a tie, the old one is kept  If the next-node entry is the same  i.e. the sender of the new row is the provider of the old entry  The receiving node chooses the new row, even though the new value is infinity.

When to Share  Periodic Update  A node sends its routing table, normally 30 seconds, in a periodic update  Triggered Update  A node sends its routing table to its neighbors any time when there is a change in its routing table  1. After updating its routing table, or  2. Detects some failure in the neighboring links

Count to Infinity  A problem with distance-vector routing is that  any decrease in cost (good news) propagates quickly,  but any increase in cost (bad news) will propagate slowly.  For a routing protocol to work properly, if a link is broken (cost becomes infinity),  every other router should be aware of it immediately,  but in distance-vector routing, this takes some time.  The problem is referred to as count to infinity  It sometimes takes several updates before the cost for a broken link is recorded as infinity by all routers.

Count to Infinity: Two node loop Most implementations define 16 as infinity

Solutions for Two-Node Instability Split Horizon  Split horizon is a method of preventing a routing loop in a network.  Simple principle: Information about the routing for a particular packet is never sent back in the direction from which it was received.  So, instead of flooding the table through each interface, each node sends only part of its table through each interface  E.g. node B thinks that the optimum route to reach X is via A, it does not need to advertise this piece of information to A

Solutions for Two-Node Instability One drawback of Split Horizon  Normally, the DV protocol uses a timer and if there is no news about a route, the node deletes the route from its table  In the previous e.g., node A cannot guess that this is due to split horizon or because B has not received any news about X recently

Poison Reverse  Node B can still advertise the value for X,  but if the source of information is A, it can replace the distance with infinity as a warning “Do not use this value; what I know about this route comes from you.”  informing all routers that the path back to the originating node for a particular packet has an infinite metric  Split horizon with poison reverse is more effective than simple split horizon in networks with multiple routing paths,  although it affords no improvement over simple split horizon in networks with only one routing path Solutions for Two-Node Instability

Routing Information Protocol (RIP)

Routing Information Protocol  The Routing Information Protocol (RIP) is an intra-domain (interior) routing protocol used inside an autonomous system.  It is a very simple protocol based on distance vector routing.  RIP implements distance vector routing directly with some considerations.

Routing Information Protocol  The destination in a routing table is a network, which means the first column defines a network address  The metric used is distance (hop count) which is defined as the number of links (networks) to reach the destination.  Infinity is defined as 16, which means that any route in an autonomous system using RIP cannot have more than 15 hops.  The next-node column defines the address of the router to which the packet is to be sent to reach its destination

55 RIP Operation  Router sends update message to neighbors every 30 sec  A router expects to receive an update message from each of its neighbors within 180 seconds in the worst case  If router does not receive update message from neighbor X within this limit, it assumes the link to X has failed and sets the corresponding minimum cost to 16 (infinity)  Based on convergence speeded up by triggered updates  neighbors notified immediately of changes in distance vector table

Example of a domain using RIP  Autonomous system with seven networks and four routers with table of each router.  Routing table for Rl has seven entries to show how to reach each network in the autonomous system.  Router is directly connected to networks and which means that there are no next-hop entries for these two networks.

57 RIP Updating Algorithm Receive a response RIP message 1.Add one hop to the hop count for each advertised destination. 2.Repeat the following steps for each advertised destination: If (destination is not in the routing table) Add the advertised information to the table. Else If (next-hop field is the same) Replace entry in the table with the new one. Else If (new hop count < the one in the table) Replace entry in the routing table.

Example of updating a routing table

Initial routing tables in a small autonomous system

Final routing tables (previous figure)

 RIP is implemented as a process that uses the services of UDP on the well known port 520  It runs in the background (a daemon process)  RIP routing protocol helps IP in routing datagrams through AS  So RIP messages are encapsulated inside UDP user datagrams; which in turn are encapsulated inside IP datagrams  Two versions are RIP-1 and RIP-2  RIP-2 is backward compatible with RIP-1