COMS/CSEE 4140 Networking Laboratory Lecture 05 Salman Abdul Baset Spring 2008.

Slides:



Advertisements
Similar presentations
© J. Liebeherr, All rights reserved 1 Border Gateway Protocol This lecture is largely based on a BGP tutorial by T. Griffin from AT&T Research.
Advertisements

1 Interdomain Routing Protocols. 2 Autonomous Systems An autonomous system (AS) is a region of the Internet that is administered by a single entity and.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
TDC365 Spring 2001John Kristoff - DePaul University1 Interconnection Technologies Routing I.
RD-CSY3021 Comparing Routing Protocols. RD-CSY3021 Criteria used to compare routing protocols includes  Time to convergence  Proprietary/open standards.
RIP – Routing Information Protocol Syeda Momina Tabish MIT - 7.
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
CSEE W4140 Networking Laboratory Lecture 5: IP Routing (OSPF and BGP) Jong Yul Kim
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.
Dynamic Routing Distance Vector and Link State RIP OSPF.
W4140 Network Laboratory Lecture 6 Oct 16 - Fall 2006 Shlomo Hershkop Columbia University.
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.
CS 356: Computer Network Architectures Lecture 12: Dynamic routing protocols: Link State Chapter Xiaowei Yang
RIP. A PPROACHES TO S HORTEST P ATH R OUTING There are two basic routing algorithms found on the Internet. 1. Distance Vector Routing Each node knows.
1 ECE453 – Introduction to Computer Networks Lecture 10 – Network Layer (Routing II)
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
ROUTING PROTOCOLS PART II ET4187/ET5187 Advanced Telecommunication Network.
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.
1 CS 4396 Computer Networks Lab Dynamic Routing Protocols - II OSPF.
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.
1 Routing Protocols. 2 Distributed Routing Protocols Rtrs exchange control info Use it to calculate forwarding table Two basic types –distance vector.
CS 4396 Computer Networks Lab
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 14 Routing Protocols RIP, OSPF, BGP.
Slide /2009COMM3380 Routing Algorithms Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbors A node sends.
Routing/Routed Protocols. Remember: A Routed Protocol – defines logical addressing. Most notable example on the test – IP A Routing Protocol – fills the.
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 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Lecture 4: Dynamic routing protocols
Code : STM#520-1 Samsung Electronics Co., Ltd. OfficeServ7400 Router Operation Distribution EnglishED01.
Review Routing fundamental W.lilakiatsakun. Review Routing Fundamental VLSM VLSM Route Summarization Route Summarization Static & Dynamic Routing Static.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
Interior Gateway Protocol. Introduction An IGP (Interior Gateway Protocol) is a protocol for exchanging routing information between gateways (hosts with.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 13 Routing Protocols (RIP, OSPF, BGP)
Routing in the Internet The Global Internet consists of Autonomous Systems (AS) interconnected with eachother: Stub AS: small corporation Multihomed AS:
1 Module 4: Implementing OSPF. 2 Lessons OSPF OSPF Areas and Hierarchical Routing OSPF Operation OSPF Routing Tables Designing an OSPF Network.
Link State Routing NETE0521 Presented by Dr.Apichan Kanjanavapastit.
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.
7400 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. -0/35- OfficeServ 7x00 Enterprise IP Solutions Quick Install Guide.
 Development began in 1987  OSPF Working Group (part of IETF)  OSPFv2 first established in 1991  Many new features added since then  Updated OSPFv2.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vectore Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
Chapter 14 1 Unicast Routing Protocols There isn’t a person anywhere that isn’t capable of doing more than he thinks he can. - Henry Ford.
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.
Dynamic Routing Protocols II OSPF
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.
1 Chapter 14-16a Internet Routing Review. Chapter 14-16: Internet Routing Review 2 Introduction Motivation: Router performance is critical to overall.
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.
Inter-domain Routing Outline Border Gateway Protocol.
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.
1. 2  An autonomous system is a region of the Internet that is administered by a single entity.  Examples of autonomous regions are:  UVA’s campus.
Routing Information Protocol (RIP) Sungsu Kim Sungsu Kim March 25, 2008.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Malathi Veeraraghavan (originals by Jörg Liebeherr) 1 Link State Routing Algorithm Use a routing protocol to collect the whole network topology Obtain.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Dynamic Routing Protocols II OSPF
Dynamic Routing Protocols part2
Chapter 14 Routing Protocols (RIP, OSPF, and BGP)
Routing Protocols (RIP, OSPF, BGP)
Border Gateway Protocol
Routing Information Protocol (RIP)
Distance Vector and Link State RIP OSPF
Routing.
Dynamic Routing Protocols part2
Dynamic Routing Protocols II OSPF
Routing.
Presentation transcript:

COMS/CSEE 4140 Networking Laboratory Lecture 05 Salman Abdul Baset Spring 2008

2 Announcements  Lab 4 (1-4) due next week before your lab slot  Assignment 2 due next Monday  Class participation Help me update the router/linux commands Glossary  Lab participation TAs / myself will ask random questions  Midterm (March 10 th, duration ~1.5 hours)  Projects

3 Previous Lecture  CIDR multi-homing and IP forwarding  The Internet IETF, IRTF, IESG, IRB IANA, ICANN IETF (eight areas, 119 WGs)  Routing protocols Distance vector vs. link state Intra-domain vs. inter-domain (IGP vs. EGP)  Routing Information Protocol (RIP)

4 Previous Lecture: The Count-to- Infinity Problem A A B B C C 11

5 Agenda  Routing Information Protocol (RIPv2)  Link state protocols  Open Shortest Path First (OSPF)  Autonomous Systems (AS)

6 The Gang of Four Link StateVectoring EGP IGP BGP RIP IS-IS OSPF

7 RIP - History  Late 1960s : Distance Vector protocols were used in the ARPANET  Mid-1970s: XNS (Xerox Network system) routing protocol is the precursor of RIP in IP (and Novell’s IPX RIP and Apple’s routing protocol)  1982Release of routed for BSD Unix  1988RIPv1 (RFC 1058) - classful routing  1993RIPv2 (RFC 1388) - adds subnet masks with each route entry - allows classless routing  1997RIPng (IPv6)  1998Current version of RIPv2 (RFC 2453) and Internet standard (STD 56) (IPv4)

8 Routing Information Protocol  RIPv2 Subnet masks, next hop addresses, authentication (plain text), multicast (instead of broad cast)  Count-to-infinity solution Split-horizon Hold-down timer Triggered updates A A B B C C 11 A never advertises to B that its path to C goes through B A A B B C C 11 B ignores any updates for the link B-C for a hold-down time A A B B C C 11 B immediately advertises that its link is down.

9 Routing Information Protocol  Looping solution (for RIP messages) Maximum number of hops is 16.  Link costs Always one or 16 (link-down)  RIP timers per table: update (30s + /- 0 to 5) send complete routing table in unsolicited response to every neighbor router. per entry: each entry has a timeout timer (180s) per entry: route-flush timer (120s)  Dedicated port UDP port 520 (msgs sent and rcvd on this port)  Complete or partial routing table? Complete (may spread over multiple fragments) No reliable delivery  Multicast

10 RIPv1 Packet Format One RIP message can have up to 25 route entries 20x25=500 bytes + 8 (RIP hdr) + 8 (UDP) + 20 (IP)=536 bytes 1: request 2: response 2: for IP 0…0: request full rou- ting table Address of destination Cost (measured in hops) 1: RIPv1

11 RIPv2  RIPv2 is an extends RIPv1: Subnet masks are carried in the route information Authentication of routing messages Route information carries next-hop address Exploits IP multicasting  Extensions of RIPv2 are carried in unused fields of RIPv1 messages

12 RIPv2 Packet Format One RIP message can have up to 25 route entries 1: request 2: response 2: for IP 0…0: request full rou- ting table Address of destination Cost (measured in hops) 2: RIPv2

13 RIPv2 Packet Format Used to carry information from other routing protocols (e.g., autonomous system number) Identifies a better next-hop address on the same subnet than the advertising router, if one exists (otherwise 0….0) 2: RIPv2 Subnet mask for IP address Any problems?

14 RIP Messages  Dedicated port for RIP is UDP port 520.  Two types of messages: Request messages  used to ask neighboring nodes for an update Response messages  contains an update

15 Routing with RIP  Initialization: Send a request packet (command = 1, address family=0..0) on all interfaces: RIPv1 uses broadcast if possible, RIPv2 uses multicast address , if possible requesting routing tables from neighboring routers  Request received: Routers that receive above request send their entire routing table  Response received: Update the routing table  Regular routing updates: Every 30 +/- 5 seconds, send all or part of the routing tables to every neighbor in an response message  Triggered Updates: Whenever the metric for a route change, send entire routing table.

16 Agenda  Routing Information Protocol (RIPv2)  Link state protocols  Open Shortest Path First (OSPF)  Autonomous Systems

17 Link State Routing  Based on Dijkstra’ s Shortest-Path-First algorithm.  Each router starts by knowing: Prefixes of its attached networks. Links to its neighbors.  Each router advertises to the entire network (flooding): Key idea: synchronize state with directly connected routers Key idea: ACK the flooded messages Prefixes of its directly connected networks Active links to its neighbors.  Each router learns: A complete topology of the network (routers, links).  Each router computes shortest path to each destination.  In a stable situation, all routers have the same graph, and compute the same paths.

18 Dijkstra’s Shortest Path Algorithm for a Graph Input: Graph (N,E) with N the set of nodes and E the set of edges c vw link cost (c vw = 1 if (v,w)  E, c vv = 0) s source node. Output : D n cost of the least-cost path from node s to node n M = {s}; for each n  M D n = c sn ; while (M  all nodes) do Find w  M for which D w = min{D j ; j  M}; Add w to M; for each neighbor n of w and n  M D n = min[ D n, D w + c wn ]; Update route; end for end while end for

19 Link state routing: graphical illustration a b cd a 3 6 b c a’s view: a b c 3 1 b’s view: cd 2 d’s view: Collecting all views yield a global & complete view of the network! Global view: a b cd 1 6 c’s view: 2

20 Operation of a Link State Routing Protocol Received LSAs IP Routing Table Dijkstra’s Algorithm Link State Database LSAs are flooded to other interfaces LSA: link-state advertisement

21 Link State Routing: Properties  Each node requires complete topology information  Link state information must be flooded to all nodes  Guaranteed to converge

22 Distance Vector vs. Link State Routing  With distance vector routing, each node has information only about the next hop: Node A: to reach F go to B Node B: to reach F go to D Node D: to reach F go to E Node E: go directly to F  Distance vector routing makes poor routing decisions if directions are not completely correct (e.g., because a node is down).  If parts of the directions incorrect, the routing may be incorrect until the routing algorithms has re-converged. A A B B C C D D E E F F

23 Distance Vector vs. Link State Routing  In link state routing, each node has a complete map of the topology  If a node fails, each node can calculate the new route  Difficulty: All nodes need to have a consistent view of the network A A B B C C D D E E F F ABC DE F ABC DE F ABC DE F ABC DE F ABC DE F ABC DE F

24 Distance Vector vs. Link State Routing Link StateVectoring Topology information is flooded within the routing domain Best end-to-end paths are computed locally at each router. Best end-to-end paths determine next-hops. Based on minimizing some notion of distance Works only if policy is shared and uniform Examples: OSPF, IS-IS Each router knows little about network topology Only best next-hops are chosen by each router for each destination network. Best end-to-end paths result from composition of all next-hop choices Does not require any notion of distance Does not require uniform policies at all routers Examples: RIP, BGP

25 Agenda  Routing Information Protocol (RIPv2)  Link state protocols  Open Shortest Path First (OSPF)  Autonomous Systems

26  OSPF = Open Shortest Path First (Why Open?)  The OSPF routing protocol is the most important link state routing protocol on the Internet (another link state routing protocol is IS-IS (intermediate system to intermediate system)  The complexity of OSPF is significant RIP (RFC 2453 ~ 40 pages) OSPF (RFC 2328 ~ 250 pages)  History: 1989: RFC 1131 OSPF Version : RFC 1247 OSPF Version : RFC 1583 OSPF Version 2 (revised) 1997: RFC 2178 OSPF Version 2 (revised) 1998: RFC 2328 OSPF Version 2 (current version) OSPF

27 Features of OSPF  Provides authentication of routing messages  Enables load balancing by allowing traffic to be split evenly across routes with equal cost (problem: reordering)  Type-of-Service routing allows to setup different routes dependent on the TOS field  Supports subnetting  Supports multicasting  Allows hierarchical routing

28 Hierarchical OSPF

29 Hierarchical OSPF  Two-level hierarchy: local area, backbone. Link-state advertisements only in area each nodes has detailed area topology; only know direction (shortest path) to nets in other areas.  Area border routers: “summarize” distances to nets in own area, advertise to other Area Border routers.  Backbone routers: run OSPF routing limited to backbone.

30 Example Network Router IDs can be selected independent of interface addresses, but usually chosen to be the smallest interface address Link costs are called Metric Metric is in the range [0, 2 16 ] Metric can be asymmetric / / / / / / / /

31 Link State Advertisement (LSA)  The LSA of router is as follows: Link State ID: = Router ID Advertising Router: = Router ID Number of links: 3 = 2 links plus router itself Description of Link 1: Link ID = , Metric = 4 Description of Link 2: Link ID = , Metric = 3 Description of Link 3: Link ID = , Metric = / / / / / / / /

32 Network and Link State Database Each router has a database which contains the LSAs from all other routers LS TypeLinkStateIDAdv. RouterChecksumLSSeqNoLS Age Router-LSA x9b470x Router-LSA x219e0x Router-LSA x6b530x Router-LSA xe39a0x a20 Router-LSA xd2a60x Router-LSA x05c30x / / / / / / / /

33 Link State Database  The collection of all LSAs is called the link-state database  Each router has an identical link-state database Useful for debugging: Each router has a complete description of the network  If neighboring routers discover each other for the first time, they will exchange their link-state databases  The link-state databases are synchronized using reliable flooding (flooded packets are acknowledged using ‘Link State Acknowledgement’ packet)

34 OSPF Packet Format Destination IP: neighbor’s IP address or (ALLSPFRouters) or (AllDRouters) TTL: set to 1 (in most cases) OSPF packets are not carried as UDP payload! OSPF has its own IP protocol number: 89

35 OSPF Packet Format 2: current version is OSPF V2 Message types: 1: Hello (tests reachability) 2: Database description 3: Link state request 4: Link state update 5: Link state acknowledgement ID of the Area from which the packet originated Standard IP checksum taken over entire packet 0: no authentication 1: Cleartext password 2: MD5 checksum (added to end packet) Authentication passwd = 1: 64 cleartext password Authentication passwd = 2: 0x0000 (16 bits) KeyID (8 bits) Length of MD5 checksum (8 bits) Nondecreasing sequence number (32 bits) Prevents replay attacks

36 OSPF LSA Format LSA Header Link 1 Link 2

37 Discovery of Neighbors  Routers multicasts OSPF Hello packets on all OSPF-enabled interfaces.  If two routers share a link, they can become neighbors, and establish an adjacency  After becoming a neighbor, routers exchange their link state databases Scenario: Router restarts

38 Neighbor discovery and database synchronization Sends empty database description Scenario: Router restarts Discovery of adjacency Sends database description. (description only contains LSA headers) Database description of Acknowledges receipt of description After neighbors are discovered the nodes exchange their databases

39 Regular LSA exchanges explicitly requests each LSA from sends requested LSAs Link State Request packets, LSAs = Router-LSA, , Router-LSA, , Router-LSA, , Router-LSA, , Router-LSA, , Router-LSA, , Link State Update Packet, LSAs = Router-LSA, ,0x Router-LSA, , 0x Router-LSA, , 0x Router-LSA, , 0x a Router-LSA, , 0x Router-LSA, , 0x

40 Dissemination of LSA-Update  A router sends and refloods LSA-Updates, whenever the topology or link cost changes. (If a received LSA does not contain new information, the router will not flood the packet)  Exception: Infrequently (every 30 minutes), a router will flood LSAs even if there are not new changes.  Acknowledgements of LSA-updates: explicit ACK, or implicit via reception of an LSA-Update  Question: If a new node comes up, it could build the database from regular LSA-Updates (rather than exchange of database description). What role do the database description packets play?

41 Agenda  Routing Information Protocol (RIPv2)  Link state protocols  Open Shortest Path First (OSPF)  Autonomous Systems

42 Autonomous Systems  An autonomous system (AS) is a region of the Internet that is administered by a single entity and that has a unified routing policy  Each autonomous system is assigned an Autonomous System Number (ASN).  Columbia campus network (AS14)  Rogers Cable Inc. (AS812)  Sprint (AS1239, AS1240, AS 6211, …)  Interdomain routing is concerned with determining paths between autonomous systems (interdomain routing)  Routing protocols for interdomain routing are called exterior gateway protocols (EGP)

43 Autonomous Systems (AS)

44 Interdomain and Intradomain Routing  Routing protocols for intradomain routing are called interior gateway protocols (IGP) Objective: shortest path  Routing protocols for interdomain routing are called exterior gateway protocols (EGP) Objective: satisfy policy of the AS

45 Interdomain vs. Intradomain  Intradomain routing Routing is done based on metrics Routing domain is one autonomous system  Interdomain routing Routing is done based on policies Routing domain is the entire Internet

46 Interdomain Routing  Interdomain routing is based on connectivity between autonomous systems  Interdomain routing can ignore many details of router interconnection

47 AS Graphs From: T. Griffin, BGP Tutorial, ICNP 2002 AT&T North America

48 Multiple Routing Protocols  Multiple routing protocols can run on the same router  Each routing protocol updates the routing table

49 Autonomous Systems Terminology  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

50 Stub and Transit Networks  AS 1, AS 2, and AS 5 are stub networks  AS 2 is a multi- homed stub network  AS 3 and AS 4 are transit networks

51 Selective Transit Example:  Transit AS 3 carries traffic between AS 1 and AS 4 and between AS 2 and AS 4  But AS 3 does not carry traffic between AS 1 and AS 2  The example shows a routing policy.

52 Customer/Provider  A stub network typically obtains access to the Internet through a transit network.  Transit network that is a provider may be a customer for another network  Customer pays provider for service

53 Customer/Provider and Peers  Transit networks can have a peer relationship  Peers provide transit between their respective customers  Peers do not provide transit between peers  Peers normally do not pay each other for service

54 Shortcuts through peering  Note that peering reduces upstream traffic  Delays can be reduced through peering  But: Peering may not generate revenue

55 This week’s lab  /etc/quagga/ripd.conf  eth1 does not work on some machines (PC1 and PC2 of rack 3)  Set eth1 to a completely different IP address e.g., and use eth2  Enable debugging – and observe /etc/quagga/ripd.log  Count-to-infinity disable split-horizon, triggered updates and set hold- down timer to zero.