* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download ppt - Computer Science, Columbia University
Survey
Document related concepts
Backpressure routing wikipedia , lookup
Deep packet inspection wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Internet protocol suite wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Computer network wikipedia , lookup
Net neutrality wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Airborne Networking wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Net neutrality law wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Transcript
COMS/CSEE 4140 Networking Laboratory Lecture 04 Salman Abdul Baset Spring 2008 Announcements Lab 3 (5-7) and prelab 4 due next week before your slot. Grades for prelab 1 &2 and lab report 1 & 2 will be posted this week. Lab report format. 2 Previous Lecture More on CIDR Internet Protocol (IP) Type/code, update routing tables IP forwarding Best effort datagram service. Fragmentation, TTL, protocol de-multiplexing Internet Control Message Protocol (ICMP) Hierarchical addressing, route aggregation Multi-homing Forwarding and routing Configure IP address, default gw, static, dynamic Router architecture Shared bus (1st generation), shared bus with line card cache (2nd generation), switched architecture. 3 Agenda CIDR multi-homing and IP forwarding The Internet Routing protocols Routing Information Protocol (RIP) 4 CIDR Multi-homing Comp 1 129.21/16 AOL 129.0/8 My-ISP 129.15/16 208.20/16 Comp 2 Verizo n 208.20.16/8 5 CIDR Multi-homing My-ISP requests Verizon to advertise its prefixes. Q: I have a 128.59/16 network. Can I connect a 202.15.16.23 IP address? Typically no. Announcements smaller than /24 not accepted. Comp 1 129.21/16 AOL 129.0/8 My-ISP 129.15/16 208.20/16 129.15/16 Comp 2 Verizo n 208.20.16/8 6 Routing and Forwarding Control plane: run routing protocols: (RIP, OSPF, BGP) RIB: routing information base Data plane: forwarding packets from incoming to outgoing link FIB: forwarding information base 7 Routing and Forwarding Select the next-hop router. Find the outgoing interface. Find the MAC address of the next-hop router. In Linux, you specify the IP address of the next-hop router. Longest-prefix first. Default routing (implied by longest-prefix rule: default has prefix of length 0). 8 Longest Prefix Match Find route for 10.30.4.1 Host IP address: 10.0.2.41 netmask: 255.255.255.0 Bits mached Network prefix / host Network mask Interface Next hop 11 10.0.2.0 255.255.255.0 eth1 16 10.30.0.0 255.255.0.0 eth2 10.30.0.1 24 10.30.4.0 255.255.255.0 eth3 10.30.4.4 0 0.0.0.0 0.0.0.0 eth1 10.0.2.1 9 default gw Agenda CIDR multi-homing and IP forwarding The Internet Routing protocols Routing Information Protocol (RIP) 10 A Definition (not the only one) On October 24, 1995, the FNC unanimously passed a resolution defining the term Internet. •RESOLUTION: The Federal Networking Council (FNC) agrees that the following language reflects our definition of the term "Internet". "Internet" refers to the global information system that -- •(i) is logically linked together by a globally unique address space based on the Internet Protocol (IP) or its subsequent extensions/follow-ons; •(ii) is able to support communications using the Transmission Control Protocol/Internet Protocol (TCP/IP) suite or its subsequent extensions/follow-ons, and/or other IP-compatible protocols; and •(iii) provides, uses or makes accessible, either publicly or privately, high level services layered on the communications and related infrastructure described herein. 11 Applications of the Internet Traditional core applications: Email News Remote login File transfer The killer application: World-Wide Web (WWW) New applications: Video Telephony Mesh-ups P2P applications Social networks 12 Brief History of the Internet Mid 1960: End 1969s: 1974: 1980: 1983: 1984: 1995: Papers on “Packet Switching” emerge. ARPA sponsors the development of a packet-switching network, called the ARPANET. First four nodes are UCLA, SRI, U. Utah, UCSB. The TCP/IP protocols and model are being proposed by Cerf/Kahn. IPv4 is introduced ARPANET adopts TCP/IP. At this time, the ARPANET has 200 routers. NSF funds a TCP/IP based backbone network. This backbone grows into the NSFNET, which becomes the successor of the ARPANET. NSF stops funding of NSFNET. The Internet is completely commercial. 13 A Brief Summary of the Evolution of the Internet First Vast Computer Network Silicon Envisioned Chip A 1962 Mathematical 1958 Theory of Communication Memex 1948 Conceived Packet Switching Invented 1964 Hypertext Invented 1965 TCP/IP Created ARPANET 1972 1969 Mosaic Created WWW Internet Created 1993 Named 1989 and Goes TCP/IP 1984 Age of eCommerce Begins 1995 1945 1945 Copyright 2002, William F. Slater, III, Chicago, IL, USA 1995 14 Internet History Source: 15 Growth of the Internet Source: Internet Software Consortium 16 Internet Infrastructure Tier-1 Tier-2 Regional Network Backbone Network Regional Network IXP local ISP IXP Backbone Network local ISP Regional Network Tier-3 local ISP IXP corporate network Regional Network campus network 17 Internet Infrastructure The infrastructure of the Internet consists of a federation of connected networks that are each independently managed (“autonomous system”) Note: Each “autonomous system may consist of multiple IP networks Autonomous systems have a number (AS number) Hierarchy of network service providers (NSPs) Tier-1: nation or worldwide network (US: less than 20) Tier-2: regional networks (in US: less than 100) Tier-3: local Internet service provider (in US: several thousand) 18 Internet Infrastructure Location where a network (ISP, corporate network, or regional network) gets access to the Internet is called a Point-of-Presence (POP). Locations (Tier-1 or Tier-2) networks are connected for the purpose of exchanging traffic are called peering points. Public peering: Traffic is swapped in a specific location, called Internet exchange points (IXPs) Private peering: Two networks establish a direct link to each other. 19 Node degrees Source: caida.org 20 Topology of a Tier-1 NSP 21 Organization of a single node in a Tier1 network .... Peering points Leased links to customers 3Com Bay Networks Modem Bank Modem Bank Modem Bank Modem Bank Leased links to customers Leased links to customers Bay Networks SD 3Com .... 3Com Modem Bank .... Links to other nodes of the network .... SD .... 3Com Metropolitan area networks Dial-up and leased links to customers 22 Who is Who on the Internet ? ISOC ICANN -IP addresses -port numbers -RIRs -domain names performs IANA functions IESG IANA IAB Approves RFC [Get port number] Technical management IETF IRTF RFC Internet standard 23 Who is Who on the Internet ? Internet Society (ISOC): Founded in 1992, an international nonprofit professional organization that provides administrative support for the Internet. Founded in 1992, ISOC is the organizational home for the standardization bodies of the Internet. Internet Engineering Task Force (IETF): Forum that coordinates the development of new protocols and standards. Organized into working groups that are each devoted to a specific topic or protocol. Working groups document their work in reports, called Request For Comments (RFCs). IRTF (Internet Research Task Force): The Internet Research Task Force is a composed of a number of focused, long-term and small Research Groups. Internet Architecture Board (IAB): a technical advisory group of the Internet Society, provides oversight of the architecture for the protocols and the standardization process The Internet Engineering Steering Group (IESG): The IESG is responsible for technical management of IETF activities and the Internet standards process. Standards. Composed of the Area Directors of the IETF working groups. 24 Internet Standardization Process Working groups present their working of the Internet which are published as RFC (Request for Comments). RFCs are the basis for Internet standards. Not all RFCs become Internet Standards ! (There are >5000 RFCs and less than 70 Internet standards) A typical (but not only) way of standardization is: Internet Drafts RFC Proposed Standard Draft Standard (requires 2 working implementation) Internet Standard (declared by IAB) 25 Assigning Identifiers for the Internet Who gives the university the domain name “virginia.edu” Who assigns it the network prefix “128.143.0.0/16”? Who assigns port 80 as the default port for web servers? The functions associated with the assignment of numbers is referred to as Internet Assigned Number Authority (IANA). IANA used to be managed by Jon Postel at ISI Since the 1990s, IP addresses and domain name allocation are delegated to independent organizations. Different organizations are responsible for allocating domain names and IP addresses 26 The IANA Function The functions associated with the assignment of numbers in the Internet is referred to as Internet Assigned Number Authority (IANA). IANA serves as a registry that keeps records of assigned numbers: IP addresses Protocol numbers Domain names (until 1992) There is no charge for allocation. 27 Regional Internet Registries (RIRs) Registration and management of IP address is done by Regional Internet Registries (RIRs) Where do RIRs get their addresses from: IANA maintains a high-level registry that distributes large blocks to RIRs RIRs administer allocation of: IPv4 address blocks IPv6 address blocks Autonomous system (AS) numbers There are currently 5 RIRs worldwide: APNIC (Asia/Pacific Region), ARIN (North America and Sub-Sahara Africa), LACNIC (Latin America and some Caribbean Islands) RIPE NCC (Europe, the Middle East, Central Asia) AfriNIC (African continent) 28 Transitioning of Domain Name Registration Until 1992: Domain name registration done as part of IANA 1992: InterNIC was created in a partnership between US government and companies to organize and maintain the growing DNS registry and services. The company Network Solutions ran the administration of InterNIC. Until 1998, Network Solutions had a monopoly for domain names. 1995: InterNIC started harging for domain names ($100 for 2 years) 1997: President Clinton directs the Secretary of Commerce to privatize the management of the domain name system (DNS) in a manner that increases competition and facilitates international participation in its management. 1998: ICANN was created in response to a policy statement issued by the US Department of Commerce that called for the formation of a private sector not-for-profit Internet stakeholder to administer policy for the Internet name and address system. ICANN operates under a renewable 3-year contract with the US Department of the Commerce. ICANN accredits domain-name registrar for .com, .org., .net (and other29 domain) ICANN The Internet Corporation for Assigned Names and Numbers (ICANN) is an internationally organized, non-profit corporation that has responsibility for Internet Protocol (IP) address space allocation, protocol identifier assignment, Top-Level Domain name system management, and root server system management functions. ICANN performs the IANA functions ICANN accredits domain-name registrar for .com, .org., .net (and other domain) Since ICANN performs the IANA functions, it is in charge for allocating all numbers. However, the main concern is the allocation of domain names. ICANN role is to oversee the domain-name registration system's transition from government hands to private hands and to coordinate its decentralization and the integration into a global community. 30 Who is Who on the Internet ? ISOC ICANN -IP addresses -port numbers -RIRs -domain names performs IANA functions IESG IANA IAB Approves RFC [Get port number] Technical management IETF IRTF RFC Internet standard 31 Agenda CIDR multi-homing and IP forwarding The Internet Routing protocols Routing Information Protocol (RIP) 32 Routing Protocols Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface of a router (forwarding) ? 2. How to find and setup a route (routing) ? We already discussed the packet forwarding part. Longest prefix match There are two approaches for calculating the routing tables: Static routing: manually modify the routes. Dynamic routing: routes are calculated by a routing protocol. 33 Routing Protocols vs. Routing Algorithms Routing protocols establish routing tables at routers. A routing protocol specifies: What messages are sent between routers. Under what conditions the messages are sent. How messages are processed to compute routing tables. At the heart of any routing protocol is a routing algorithm that determines the path from a source to a destination. 34 Overview of Routing Protocols Routing protocol Routing Algorithm Routing information protocol (RIP) Distance vector Interior gateway routing protocol (IGRP, Cisco proprietary) Distance vector Open shortest path first (OSPF) Link state Intermediate System-to-Intermediate System (IS-IS) Link state Border gateway protocol (BGP) Path vector Intra-domain routing protocol Inter-domain routing protocol RIP, OSPF, IGRP, IS-IS BGP 35 Domain not to be confused with domain name. Here domain refers to administrative domain. Intra-domain Routing vs. Inter-domain Routing Recall Internet is a network of networks. Administrative autonomy Internet = network of networks each network admin. may want to control routing in its own network Scale: with 550 million destinations: can’t store all destination IP addresses in routing tables! perhaps yes but then … routing table exchange would swamp links. 36 Autonomous Systems Ethernet Router Ethernet Ethernet Autonomous System 1 Router Router Router Ethernet Router Ethernet Autonomous System 2 Router Ethernet aggregate routers into regions, “autonomous systems” (AS) or domain routers in the same AS run the same routing protocol. “intra-AS” or intra-domain routing protocol routers in different AS can run different intra-AS routing protocol 37 Autonomous Systems An autonomous system is a region of the Internet that is administered by a single entity. Examples of autonomous regions are: Columbia campus network AT&T backbone network Regional Internet Service Provider Routing is done differently within an autonomous system (intradomain routing) and between autonomous system (interdomain routing). RIP, OSPF, IGRP, and IS-IS are intra-domain routing protocols. BGP is the only inter-domain routing protocol. 38 Components of a Routing Algorithm A procedure for sending and receiving reachability information about network to other routers. A procedures for reacting to and advertising topology changes. A procedure for calculating optimal routes. Routes are calculated using a shortest path algorithm: Goal: Given a network were each link is assigned a cost. Find the path with the least cost between two networks with minimum cost. 39 Approaches to Shortest Path Routing There are two basic routing algorithms found on the Internet. 1. Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbors. A node sends periodically a list of routing updates to its neighbors. If all nodes update their distances, the routing tables eventually converge. New nodes advertise themselves to their neighbors. 2. Link State Routing Each node knows the distance to its neighbors. The distance information (=link state) is broadcast to all nodes in the network. Each node calculates the routing tables independently after receiving the broadcast. 40 Distance Vector Routing Variations of Bellman-Ford algorithm. Each router starts by knowing: Each router advertises only to its neighbors: All prefixes it knows about. Its distance from them. Each router learns: Prefixes of its attached networks (“zero” distance). Its next hop routers (how to find them?) All prefixes its neighbors know about. Their distance from them. Each router figures out, for each destination prefix: The “distance” (how far away it is). The “vector” (the next hop router). 41 Distance Vector Routing Properties DV computes the shortest path “Routing by rumor” Each router believes what its neighbors tell it. In steady-state, each router has the “shortest” (smallest metric) path to the destination. Convergence time is (on the average) proportional to the diameter of the network. Any link change affects the entire network. 42 Distance Vector Algorithm A decentralized algorithm A router knows physically-connected neighbors and link costs to neighbors A router does not have a global view of the network Path computation is iterative and mutually dependent. A router sends its known distances to each destination (distance vector) to its neighbors. A router updates the distance to a destination from all its neighbors’ distance vectors A router sends its updated distance vector to its neighbors. The process repeats until all routers’ distance vectors do not change (this condition is called convergence). 43 Bellman-Ford Algorithm Bellman-Ford Equation Define dx(y) := cost of the least-cost path from x to y Then dx(y) = minv{c(x,v) + dv(y) }, where min is taken over all neighbors of node x 44 Distance Vector Algorithm: Initialization Let Dx(y) be the estimate of least cost from x to y Initialization: Each node x knows the cost to each neighbor: c(x,v). For each neighbor v of x, Dx(v) = c(x,v) Dx(y) to other nodes are initialized as infinity. Each node x maintains a distance vector (DV): Dx = [Dx(y): y in N ] 45 Distance Vector Algorithm: Updates Each node x sends its distance vector to its neighbors, either periodically, or triggered by a change in its DV. When a node x receives a new DV estimate from a neighbor v, it updates its own DV using B-F equation: If c(x,v) + Dv(y) < Dx(y) then Dx(y) = c(x,v) + Dv(y) Sets the next hop to reach the destination y to the neighbor v Notify neighbors of the change The estimate Dx(y) will converge to the actual least cost dx(y) 46 Distance vector algorithm: an example 1 1 1 1 1 1 1 Time = 0 1 47 Distance vector algorithm: an example Time = 1 48 Distance vector algorithm: an example Time = 2 (End) 49 How to map the abstract graph to the physical network c(v,w) Net(v,w) w v Net c(v,n) Net(v,n) n Nodes (e.g., v, w, n) are routers, identified by IP addresses, e.g. 10.0.0.1 Nodes are connected by either a directed link or a broadcast link (Ethernet) Destinations are IP networks, represented by the network prefixes, e.g., 10.0.0.0/16 Net(v,n) is the network directly connected to router v and n. Costs (e.g. c(v,n)) are associated with network interfaces. Router1(config)# router rip Router1(config-router)# offset-list 0 out 10 Ethernet0/0 Router1(config-router)# offset-list 0 out 10 Ethernet0/1 50 Distance Vector Algorithm: Routing Table c(v,w): cost to transmit on the interface to network Net(v,w) Net(v,w): Network address of the network between v and w The network can be a link, but could also be a LAN RoutingTable of node v Dest v Net(v,w) c(v,w) Net(v,n) c(v,n) via (next hop) cost w Net Net n D(v,Net) n 51 Distance Vector Algorithm: Messages RoutingTable of node v Dest Net via (next hop) n cost D(v,Net) • Nodes send messages to their neighbors which contain routing table entries v [Net , D(v,Net)] n • A message has the format: [Net , D(v,Net)] means“My cost to go to Net is D (v,Net)” 52 Distance Vector Algorithm: Sending Updates RoutingTable of node v Dest via (next hop) cost Net1 m D(v,Net 1) Net2 n D(v,Net 2) NetN w D(v,Net N) Periodically, each node v sends the content of its routing table to its neighbors: m [Net1,D(v,Net1)] [Net1,D(v,Net1)] [NetN,D(v,NetN)] [NetN,D(v,NetN)] v w [Net1,D(v,Net1)] [NetN,D(v,NetN)] n 53 Initiating Routing Table I Suppose a new node v becomes active. The cost to access directly connected networks is zero: D (v, Net(v,m)) = 0 D (v, Net(v,w)) = 0 D (v, Net(v,n)) = 0 RoutingTable c(v,m) Net(v,m) m c (v,w) Net(v,w) v Dest via (next hop) cost w c(v,n) Net(v,n) Net(v,m) m 0 Net(v,w) w 0 Net(v,n) n 0 n 54 Initiating Routing Table II RoutingTable Dest via (next hop) cost Net(v,m) m 0 Net(v,w) w 0 Net(v,n) n 0 New node v sends the routing table entry to all its neighbors: [n,0] [Net(v,n),0] [w,0] [Net(v,w),0] m [n,0] [Net(v,n),0] [m,0] [Net(v,m),0] v w [m,0] [Net(v,m),0] [w,0] [Net(v,w),0] n 55 Initiating Routing Table III Node v receives the routing tables from other nodes and builds up its routing table [Net1,D(m,Net1)] [Net1,D(w,Net1)] [NetN,D(m,NetN)] [NetN,D(w,NetN)] m v w [Net1,D(n,Net1)] [NetN,D(n,NetN)] n 56 Updating Routing Tables I • Suppose node v receives a message from node m: [Net,D(m,Net)] [Net,D(m,Net)] Net m c(v,m) Net(v,m) v w n Node v updates its routing table and sends out further messages if the message reduces the cost of a route: if ( D(m,Net) + c (v,m) < D (v,Net) ) { Dnew (v,Net) := D (m,Net) + c (v,m); Update routing table; send message [Net, Dnew (v,Net)] to all neighbors } 57 Updating Routing Tables II • Before receiving the message: RoutingTable [Net,D(m,Net)] Net m c(v,m) Net(v,m) Dest v via (next hop) cost w Net ?? D(v,Net) n • Suppose D (m,Net) + c (v,m) < D (v,Net): RoutingTable Dest [Net,Dnew (v,Net)] Net m c(v,m) Net(v,m) v w Net via (next hop) m cost Dnew(v,Net) [Net,Dnew (v,Net)] n 58 Assume: - link cost is 1, i.e., c(v,w) = 1 - all updates, updates occur simultaneously - Initially, each router only knows the cost of connected interfaces Example 10.0.3.0/24 10.0.4.0/24 .1 .1 .1 Net via cost Router A t=0: 10.0.1.0 10.0.2.0 - 0 0 t=1: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.2.2 t=2: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.2.2 10.0.2.2 .2 Router B Net via .2 Router C Net via 0 0 t=0: 10.0.3.0 10.0.4.0 - 0 0 0 0 1 t=1: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 1 0 0 1 t=1: 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 1 0 0 1 0 0 1 2 t=2: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 1 0 0 1 2 t=2: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 10.0.2.1 10.0.3.2 10.0.3.2 10.0.3.1 10.0.4.2 10.0.3.1 10.0.3.1 10.0.4.2 .1 Router D t=0: 10.0.2.0 10.0.3.0 - 10.0.2.1 10.0.3.2 10.0.5.0/24 2 1 0 0 1 Net via cost .2 cost .2 10.0.2.0/24 cost 10.0.1.0/24 t=0: 10.0.4.0 10.0.5.0 - 0 0 t=1: 10.0.3.0 10.0.4.1 10.0.4.0 10.0.5.0 - 1 0 0 t=2: 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 10.0.4.1 2 10.0.4.1 1 0 59 0 Example 10.0.3.0/24 10.0.4.0/24 .1 .1 .1 Net t=2: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 t=3: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 via 10.0.2.2 10.0.2.2 10.0.2.2 10.0.2.2 10.0.2.2 Router B cost Router A .2 Net 0 0 1 2 0 0 1 2 3 via .2 Router C t=2: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 10.0.2.1 10.0.3.2 10.0.3.2 1 0 0 1 2 t=3: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 10.0.2.1 10.0.3.2 10.0.3.2 1 0 0 1 2 Net t=2: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 t=3: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 via 10.0.3.1 10.0.3.1 10.0.4.2 10.0.3.1 10.0.3.1 10.0.4.2 Now, routing tables have converged ! 10.0.5.0/24 .1 Router D 2 1 0 0 1 2 1 0 0 1 Net via cost .2 cost .2 10.0.2.0/24 cost 10.0.1.0/24 t=2: 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 10.0.4.1 10.0.4.1 - 2 1 0 0 t=3: 10.0.1.0 10.0.2.0 10.0.3.0 10.0.4.0 10.0.5.0 10.0.4.1 10.0.4.1 10.0.4.1 - 3 2 1 0 0 60 Characteristics of Distance Vector Routing Periodic Updates: Updates to the routing tables are sent at the end of a certain time period. A typical value is 90 seconds. Triggered Updates: If a metric changes on a link, a router immediately sends out an update without waiting for the end of the update period. Full Routing Table Update: Most distance vector routing protocol send their neighbors the entire routing table (not only entries which change). Route invalidation timers: Routing table entries are invalid if they are not refreshed. A typical value is to invalidate an entry if no update is received after 3-6 61 update periods. The Count-to-Infinity Problem 1 A A's Routing Table to C via (next hop) C B's Routing Table cost B 1 B via to 2 (next hop) C cost C 1 - oo A 3 - oo now link B-C goes down C B 2 C C C - 2 oo C C C B C oo C 4 C oo 3 C 4 C oo 62 Count-to-Infinity The reason for the count-to-infinity problem is that each node only has a “next-hop-view” For example, in the first step, A did not realize that its route (with cost 2) to C went through node B How can the count-to-infinity problem be solved? 63 Count-to-Infinity The reason for the count-to-infinity problem is that each node only has a “next-hop-view”. For example, in the first step, A did not realize that its route (with cost 2) to C went through node B. How can the Count-to-Infinity problem be solved? Solution 1: Always advertise the entire path in an update message (Path vectors). If routing tables are large, the routing messages require substantial bandwidth. BGP uses this solution. 64 Count-to-Infinity The reason for the count-to-infinity problem is that each node only has a “next-hop-view” For example, in the first step, A did not realize that its route (with cost 2) to C went through node B How can the Count-to-Infinity problem be solved? Solution 2: Never advertise the cost to a neighbor if this neighbor is the next hop on the current path (Split Horizon) Example: A would not send the first routing update to B, since B is the next hop on A’s current route to C Split Horizon does not solve count-to-infinity in all cases! 65 RIP - Routing Information Protocol A simple intradomain protocol Straightforward implementation of distance vector routing. Each router advertises its distance vector every 30 seconds (or whenever its routing table changes) to all of its neighbors RIP always uses 1 as link metric. Maximum hop count is 15, with “16” equal to “” Routes are timeout (set to 16) after 3 minutes if they are not updated. 66 RIP - History Late 1960s : Mid-1970s: 1982 1988 1993 1998 Distance Vector protocols were used in the ARPANET XNS (Xerox Network system) routing protocol is the precursor of RIP in IP (and Novell’s IPX RIP and Apple’s routing protocol) Release of routed for BSD Unix RIPv1 (RFC 1058) - classful routing RIPv2 (RFC 1388) - adds subnet masks with each route entry - allows classless routing Current version of RIPv2 (RFC 2453) 67 RIPv1 Packet Format IP header UDP header RIP Message 1: RIPv1 2: for IP 0…0: request full routing table Command Version Set to 00...0 address family Set to 00.00 32-bit address Unused (Set to 00...0) Address of destination Cost (measured in hops) One RIP message can have up to 25 route entries Unused (Set to 00...0) one route entry (20 bytes) 1: request 2: response metric (1-16) Up to 24 more routes (each 20 bytes) 68 32 bits 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 69 RIPv2 Packet Format IP header UDP header RIP Message 2: RIPv2 2: for IP 0…0: request full routing table Command Version Set to 00...0 address family Set to 00.00 32-bit address Unused (Set to 00...0) Address of destination Cost (measured in hops) One RIP message can have up to 25 route entries Unused (Set to 00...0) metric (1-16) one route entry (20 bytes) 1: request 2: response Up to 24 more routes (each 20 bytes) 70 32 bits RIPv2 Packet Format Used to carry information from other routing protocols (e.g., autonomous system number) RIPv2 Message Command Version Set to 00.00 address family route tag IP address Subnet mask for IP address Subnet Mask Next-Hop IP address Identifies a better next-hop address on the same subnet than the advertising router, if one exists (otherwise 0….0) metric (1-16) 2: RIPv2 one route entry (20 bytes) IP header UDP header Up to 24 more routes (each 20 bytes) 71 32 bits RIP Messages This is the operation of RIP in routed. 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 72 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 224.0.0.9, 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 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. 73 RIP Security Issue: Sending bogus routing updates to a router RIPv1: No protection RIPv2: Simple authentication scheme 2: plaintext password RIPv2 Message IP header UDP header Command Version Set to 00.00 0xffff Authentication Type Password (Bytes 0 - 3) Password (Bytes 4 - 7) Password (Bytes 8- 11) Password (Bytes 12 - 15) Authetication Up to 24 more routes (each 20 bytes) 74 32 bits RIP Problems RIP takes a long time to stabilize RIP has all the problems of distance vector algorithms, e.g., count-to-Infinity Even for a small network, it takes several minutes until the routing tables have settled after a change RIP uses split horizon to avoid count-to-infinity The maximum path in RIP is 15 hops 75