Use a routing protocol to collect the whole network topology. Obtain destination reachability information as well as link weights/states

Similar documents
Dynamic Routing Protocols II OSPF. Distance Vector vs. Link State Routing

Route Discovery Protocols

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Routing Protocols (RIP, OSPF, BGP)

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

Routing with OSPF. Introduction

Internet Protocol (IP) IP - Network Layer. IP Routing. Advantages of Connectionless. CSCE 515: Computer Network Programming IP routing

OSPF Version 2 (RFC 2328) Describes Autonomous Systems (AS) topology. Propagated by flooding: Link State Advertisements (LSAs).

Introduction to TCP/IP

IP - The Internet Protocol

Internet Control Message Protocol (ICMP)

8.2 The Internet Protocol

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Inter-domain Routing. Outline. Border Gateway Protocol

6.263 Data Communication Networks

CSE331: Introduction to Networks and Security. Lecture 8 Fall 2006

Routing Protocols. Interconnected ASes. Hierarchical Routing. Hierarchical Routing

Network layer: Overview. Network layer functions IP Routing and forwarding

Outline. Internet Routing. Alleviating the Problem. DV Algorithm. Routing Information Protocol (RIP) Link State Routing. Routing algorithms

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Based on Computer Networking, 4 th Edition by Kurose and Ross

CS335 Sample Questions for Exam #2

GregSowell.com. Mikrotik Routing

Layer 3 Routing User s Manual

Computer Networks. Main Functions

Cisco Configuring Commonly Used IP ACLs

Exterior Gateway Protocols (BGP)

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Router and Routing Basics

Link-State Routing Protocols

IP Multicasting. Applications with multiple receivers

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

Chapter 4. Distance Vector Routing Protocols

Border Gateway Protocol (BGP)

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Lecture 8: Routing I Distance-vector Algorithms. CSE 123: Computer Networks Stefan Savage

LAB FOUR Dynamic Routing Protocols

IP Routing Configuring RIP, OSPF, BGP, and PBR

CHAPTER 10 IP MULTICAST

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Configuring a Gateway of Last Resort Using IP Commands

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

Internet Protocol version 4 Part I

IP addressing and forwarding Network layer

Routing Protocols OSPF CHAPTER. The following topics describe supported routing protocols. Topics include OSPF, page 9-1 IS-IS Protocol, page 9-3

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Configuration IP Routing and Multicast Avaya Ethernet Routing Switch 4500 Series

Faculty of Engineering Computer Engineering Department Islamic University of Gaza Network Chapter# 19 INTERNETWORK OPERATION

Using the Border Gateway Protocol for Interdomain Routing

Computer Networks Administration Help Manual Sana Saadaoui Jemai Oliver Wellnitz

Instructor Notes for Lab 3

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Lecture 12: Link-state Routing"

Table of Contents. Cisco How Does Load Balancing Work?

Distance Vector Routing Protocols. Routing Protocols and Concepts Ola Lundh

Telematics. 9th Tutorial - IP Model, IPv6, Routing

IP Routing Features. Contents

How To Understand Bg

Transport and Network Layer

O /27 [110/129] via , 00:00:05, Serial0/0/1

CS Computer Networks 1: Routing Algorithms

College 5, Routing, Internet. Host A. Host B. The Network Layer: functions

Chapter 4 Network Layer

Chapter 10 Link-State Routing Protocols

OSPF Routing Protocol

IP Addressing A Simplified Tutorial

The Internet. Internet Technologies and Applications

Introduction to Dynamic Routing Protocols

CCNA 2 v5.0 Routing Protocols Final Exam Answers

21.4 Network Address Translation (NAT) NAT concept

ICS 351: Today's plan

CCNA Exploration 4.0: (II) Routing Protocols and Concepts. Chapter 1: Introduction to Routing and Packet Forwarding

Administrative Distance

Modeling and Simulation of Routing Protocols in the Cloud

DG Forwarding Algorithm

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

Cisco CCNP Optimizing Converged Cisco Networks (ONT)

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1

Assignment 6: Internetworking Due October 17/18, 2012

04 Internet Protocol (IP)

Internet Packets. Forwarding Datagrams

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

OSPF Configuring Multi-Area OSPF

Question 1. [7 points] Consider the following scenario and assume host H s routing table is the one given below:

IP address format: Dotted decimal notation:

Comparison of RIP, EIGRP, OSPF, IGRP Routing Protocols in Wireless Local Area Network (WLAN) By Using OPNET Simulator Tool - A Practical Approach

Introduction to LAN/WAN. Network Layer (part II)

IP Routing Configuring Static Routes

Network Protocol Configuration

PRASAD ATHUKURI Sreekavitha engineering info technology,kammam

Textbook Required: Cisco Networking Academy Program CCNP: Building Scalable Internetworks v5.0 Lab Manual.

IP Address Classes (Some are Obsolete) Computer Networking. Important Concepts. Subnetting Lecture 8 IP Addressing & Packets

Chapter 49 Border Gateway Protocol version 4 (BGP-4)

20. Switched Local Area Networks

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

Chapter 13 Internet Protocol (IP)

Transcription:

Link State Routing Algorithm Use a routing protocol to collect the whole network topology Obtain destination reachability information as well as link weights/states Compute shortest paths using Dijkstra s algorithm from a node to all other nodes Construct routing tables that show the destination addresses and the next hop addresses Note that while Dijkstra s algorithm gives you end-to-end routes, the routing tables may only store the next hop address. (originals by Jörg Liebeherr) 1 Shortest path calculations Calculate shortest paths for node s to all other nodes Dijkstra s Algorithm: s source node. cost of the least-cost path from node s to node n D n M = {s}; for each n ˇ M D n = d sn ; while (M all nodes) do Find w ˇ M for which D w = min{d j ; j ˇ M}; Add w to M; for each n ˇ M D n = min w [ D n, D w + d wn ]; Update route; enddo (originals by Jörg Liebeherr) 2 1

Example Assume node 1 has obtained the entire network topology using some link state routing protocol Construct the routing table at node 1 using Dijkstra s algorithm to determine shortest paths from node 1 to all other nodes in the network 5 2 3 3 1 1 2 2 4 5 1 (originals by Jörg Liebeherr) 3 3 1 5 2 6 Example (at node 1) Iteration M D 1 D 2 D 3 D 4 D 5 D 6 Init (originals by Jörg Liebeherr) 4 2

Solution Use Dijkstra s algorithm described in slide 2 Start with M consisting of only node 1. M D1 D2 D3 D4 D5 D6 0 {1} 0 2 5 1 inf inf 1 {1,4} 0 2 4 1 2 inf 2 {1,4,2,5} 0 2 3 1 2 4 3 {1,4,2,5,3} 0 2 3 1 2 4 4 {1,4,2,5,3,6} 0 2 3 1 2 4 (originals by Jörg Liebeherr) 5 Resulting Routing Tree 2 2 3 1 1 6 1 1 4 5 The tree is translated into a routing table at node 1: Destination Next Hop 2 2 3 4 4 4 5 4 6 4 (originals by Jörg Liebeherr) 6 2 3

Link State Discussion Each node requires complete topology information. Link state Information must be flooded to all nodes. Guaranteed to converge. Each node must maintain a global database. Convergence of the algorithm is guaranteed. (originals by Jörg Liebeherr) 7 IP Routing IP Forwarding is performed by IP (in OS kernel) IP Routing is performed by a user-level process In Unix, by the daemon processes routed and gated (originals by Jörg Liebeherr) 8 4

IP Routing routing daemon route command netstat command UDP TCP YES routing table ICMP Redirect ICMP IP Output: Calculate Next Hop Router NO: if forwarding enabled Source Routing For me? Process IP Options IP Input Queue Network Interfaces (originals by Jörg Liebeherr) 9 Routing Table Lookup For each IP packet, there is one routing table lookup. 1. Find matching host address 2. Find matching network address 3. Find default entry Routing table printout with netstat -rn Example: Destination Gateway Flags Refcnt Use Interface 140.252.23.32 140.252.23.1 UGH 3 25000 emd0 127.0.0.1 127.0.0.1 UH 1 0 lo0 default 140.252.13.33 UG 0 0 emd0 (originals by Jörg Liebeherr) 10 5

Explanation of the printout Flags: U: route is up G: route is to a gateway (router); if flag is not set, destination is directly connected H: route is to a host, I.e., destination address is the complete host address; if flag is not set, route is to a network and destination address is netid or subnetid D: route created by redirect M: route modified by redirect Refcnt: reference count: number of active uses of each route; for each TCP connection passing through route, this is increased by 1 Use: number of packets sent on route Interface: local interface (originals by Jörg Liebeherr) 11 Statically Setting IP Routing Tables There are several ways for setting IP routing tables without a routing protocol (=Static Routing) 1. Automatic creation of entry during initialization of a local interface (with ifconfig) 2. During bootstrap with route command 3. Via ICMP redirect messages 4. Via ICMP router advertisement/router discovery messages (originals by Jörg Liebeherr) 12 6

Route Command Route commands are put in a system file that is read during system bootstrap System file is: /etc/rc2.d/s69inet in Solaris, /etc/netstart in FreeBSD. Example: default: destination sun: gateway or router 1: metric route add default sun 1 route add slip bsdi 1 (originals by Jörg Liebeherr) 13 ICMP Redirect Based on routing data in host, it does an arp for router 1 and sends packet to router 1 When router 1 detects that an IP datagram should have gone to a different router, the router: forwards the IP datagram to the correct router sends an ICMP redirect message to the host Host uses ICMP message to update its routing table (1) IP datagram (3) ICMP Redirect Router 1 (2) IP datagram Router 2 (originals by Jörg Liebeherr) 14 7

ICMP Router Solicitation ICMP Router Advertisement Specified in RFC 1256 (1991) After bootstrapping a host broadcasts an ICMP router solicitation message. In response, routers send an ICMP router advertisement message Also, routers periodically broadcast ICMP router advertisement (originals by Jörg Liebeherr) 15 Dynamic IP Routing Protocols In Unix systems, the dynamic setting of routing tables is done by the routed or gated daemons The routing daemons execute the following intradomain and interdomain routing protocols Daemon Hello RIP OSPF EGP BGP rrouted intradomain V1 interdomain Gated (Version 3) Yes V1 V2 V2 Yes V2, V3 (originals by Jörg Liebeherr) 16 8

RIP - Routing Information Protocol A simple intradomain protocol Straightforward implementation of Distance Vector Routing Each router advertises its minimum distances to destinations every 30 seconds (or whenever its routing table changes) RIP always uses the hop-count as link metric. Maximum hop count is 15, with 16 equal to. Routes timeout after 3 minutes if they are not updated. Route metric is set to (16) and marked for deletion (originals by Jörg Liebeherr) 17 RIP Packet Format IP header UDP header RIP Message 1: request 2: reply 3, 4: unused 5: poll 6: poll entry addr. family: 2 for IP 20 bytes long 0 7 8 15 16 31 Command (1-6) Version (1) 32-bit address Unused (Set to 00...0) Set to 00...0 address family Set to 00.00 Unused (Set to 00...0) metric (1-16) IP address for which a route is requested Up to 24 more routes (each 20 bytes) (originals by Jörg Liebeherr) 18 9

Routing with RIP This is the operation of RIP in routed. Dedicated port for RIP is UDP port 520. Initialization: Broadcast a request packet (command = 1, metric=16; address family=0, metric=16) on the interfaces requesting current routing tables from routers. Request received: Routers that receive above request send their entire routing table. Response received: Update the routing table (see distance vector algorithm). Regular routing updates: Every 30 seconds, send all or part of the routing tables to every neighbor. Triggered Updates: Whenever the metric for a route changes, send data that has changed. (originals by Jörg Liebeherr) 19 RIPv2 IP header UDP header RIPv2 Message Process ID of routing daemon Command Version (1-6) (=2) address family routing domain route tag Support of EGP and BGP 32-bit address Subnet Mask (32 bits) Next-Hop IP address (32 bits) Metric (1-16) Subnet Mask of IP address (RIP version 1 is not aware of subnet masks) Identifies next hop; value of 0 means packets Identifies next hop: value of 0 means packets should be should be sent to node sending this RIP message sent to node sending this RIP message Up to 24 more routes (each 20 bytes) The next-hop IP address is where packets to that dest. IP address should be sent; a value of 0 means packets should be sent to the router sending this RIP message (originals by Jörg Liebeherr) 20 10

OSPF OSPF = Open Shortest Path First RFC 1247 from 1991 Alternative solution to RIP as interior gateway protocol OSPF is a link state protocol, i.e., each node has complete topology information OSPF messages are sent directly in IP (and not as payload of UDP packets) Hellos and Link State Advertisements (LSAs) To get the topology of the network Shortest-path algorithm, e.g., Dijkstra s to precompute routing tables. (originals by Jörg Liebeherr) 21 Features of OSPF Provides authentication of routing messages Enables load balancing by allowing traffic to be split evenly across routes with equal cost Supports subnetting Supports multicasting (originals by Jörg Liebeherr) 22 11

BGP BGP = Border Gateway Protocol Currently in version 4 Note: In the context of BGP, a gateway is nothing else but an IP router that connects autonomous systems. Interdomain routing protocol for routing between autonomous systems Uses TCP to send routing messages BGP is a distance vector protocol, but unlike in RIP, routing messages in BGP contain complete routes. Network administrators can specify routing policies (originals by Jörg Liebeherr) 23 BGP BGP s goal is to find any path (not an optimal one). Since the internals of the AS are never revealed, finding an optimal path is not feasible. For each autonomous system (AS), BGP distinguishes: local traffic = traffic with source or destination in AS transit traffic = traffic that passes through the AS Stub AS = has connection to only one AS, only carry local traffic Multihomed AS = has connection to >1 AS, but does not carry transit traffic Transit AS = has connection to >1 AS and carries transit traffic (originals by Jörg Liebeherr) 24 12

BGP AS 1 AS 2 Router Router Router Router AS 3 Router Router Router AS 4 (originals by Jörg Liebeherr) 25 Exercise 135.60.81 161.6.5.1.1 R1.1.2 R2.4 11.4.6 180.11.22.1 190.4.6 Assume route commands in the bootstrap sequence in both routers allows them to immediately recognize their directly connected subnets Show the routing tables at nodes R1 and R2 initially before they exchange RIP messages and after. See Page 131 of your textbook for guidance. (originals by Jörg Liebeherr) 26 13

Exercise solution Routing table at router R1 soon after reboot Destination Gateway Flags RIP Metric 135.60.81 135.60.81.1 U 1 161.6.5 161.6.5.1 U 1 180.11.22 180.11.22.1 U 1 Table created by route commands executed during boot-up procedure - directly-connected interfaces have a route command metric of 0 (pg. 116) but a RIP metric of 1 (pg. 131) See page 116- it states that the metric is 0 if the G flag is not set, which means a direct route. The gateway column has the IP address of the outgoing interface. (originals by Jörg Liebeherr) 27 Exercise solution contd. Routing table at router R2 soon after reboot Destination Gateway Flags RIP Metric 190.4.6 190.4.6.1 U 1 11.4.6 11.4.6.4 U 1 180.11.22 180.11.22.2 U 1 Same as on previous slide (originals by Jörg Liebeherr) 28 14

Exercise solution contd. RIP messages sent. As per fig. 10.4 on page 131 of your text book each router advertises routes to each subnet on all other subnets with a hop count of 1. Thus, each router listens to the broadcasts about the other router s subnets. Updated routing tables are shown on the next two slides. (originals by Jörg Liebeherr) 29 Exercise solution contd. Routing table at router R1 after receiving RIP messages from R2 Destination Gateway Flags RIP Metric 135.60.81 135.60.81.1 U 1 161.6.5 161.6.5.1 U 1 180.11.22 180.11.22.1 U 1 190.4.6 180.11.22.2 UG 2 11.4.6 180.11.22.2 UG 2 See page 131 of your textbook for RIP metrics for subnets on adjacent routers (originals by Jörg Liebeherr) 30 15

Exercise solution contd. Routing table at router R2 after receiving RIP messages from R1 Destination Gateway Flags RIP Metric 190.4.6 190.4.6.1 U 1 11.4.6 11.4.6.4 U 1 180.11.22 180.11.22.2 U 1 135.60.81 180.11.22.1 UG 2 161.6.5 180.11.22.1 UG 2 (originals by Jörg Liebeherr) 31 16