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.

Download Report

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.

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  Hierarchical addressing, route aggregation  Multi-homing Internet Protocol (IP)   Best effort datagram service.

Fragmentation, TTL, protocol de-multiplexing Internet Control Message Protocol (ICMP)  Type/code, update routing tables IP forwarding   Forwarding and routing Configure IP address, default gw, static, dynamic Router architecture  Shared bus (1 st generation), shared bus with line card cache (2 nd 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 My-ISP 129.15/16 AOL 129.0/8 208.20/16 Comp 2 208.20.16/8 Verizo n 5

CIDR Multi-homing

Comp 1 129.21/16 My-ISP 129.15/16 Comp 2 208.20.16/8 AOL Verizo n  My-ISP requests Verizon to advertise its prefixes.

129.0/8 208.20/16 129.15/16   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.

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

Bits mached 11 16 24 0 Host IP address: 10.0.2.41 netmask: 255.255.255.0

Network prefix / host 10.0.2.0

Network mask Interface 255.255.255.0

eth1 Next hop 10.30.0.0

10.30.4.0

0.0.0.0

255.255.0.0

255.255.255.0

0.0.0.0

eth2 eth3 eth1 10.30.0.1

10.30.4.4

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 i t s 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 11 infrastructure described herein.

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

A Mathematical Theory of Memex Conceived 1945 Communication 1948 Silicon Chip 1958 First Vast Computer Network Envisioned 1962 Packet Switching Invented 1964 Hypertext Invented 1965 ARPANET 1969 TCP/IP Created 1972 Internet Named and Goes TCP/IP 1984 WWW Created 1989 Mosaic Created 1993 Age of eCommerce Begins 1995

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 Backbone Network Regional Network IXP Backbone Network Regional Network local ISP IXP local ISP Regional Network Regional Network IXP Tier-3 local ISP corporate 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: Tier-3:

regional networks (in US: less than 100) 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:

link to each other. Two networks establish a direct 19

Node degrees

Source: caida.org

20

Topology of a Tier-1 NSP

21

Organization of a single node in a Tier 1 network

Peering points .. Leased links to customers Links to other nodes of the network

3 Com 3 Com 3 Com 3 Com Bay Networks Bay Networks

SD SD Modem Bank Modem Bank Modem Bank Modem Bank .. Leased links to customers .. Leased links to customers Metropolitan area networks Modem Bank Dial-up and leased links to customers 22

Who is Who on the Internet ?

ISOC ICANN -IP addresses -port numbers -RIRs performs IANA functions IANA -domain names IAB Approves RFC [Get port number] Technical management IETF RFC IESG IRTF 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):

reports, called Request For Comments (RFCs).

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

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)

standardization process : a technical advisory group of the Internet Society, provides oversight of the architecture for the protocols and the

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 other domain) 29

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 performs IANA functions IANA -domain names IAB Approves RFC [Get port number] Technical management IETF RFC IESG IRTF 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: ro utes 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 information protocol (RIP) Interior gateway routing protocol (IGRP, Cisco proprietary) Open shortest path first (OSPF) Intermediate System-to-Intermediate System (IS-IS) Border gateway protocol (BGP) Routing Algorithm Distance vector Distance vector Link state Link state Path vector Intra-domain routing protocol Inter-domain routing protocol RIP, OSPF, IGRP, IS-IS BGP Domain not to be confused with domain name. Here domain refers to administrative domain.

35

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 Ethernet Router Router

Autonomous System 2

Ethernet   aggregate routers into regions, (AS) or domain “autonomous systems” 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

by a single entity.

is a region of the Internet that is administered  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:   Prefixes of its attached networks (“zero” distance).

Its next hop routers (how to find them?)  Each router advertises only to its neighbors:   All prefixes it knows about.

Its distance from them.

 Each router learns:   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 d x (y) := cost of the least-cost path from x to y Then  d x (y) = min v {c(x,v) + d v (y) }, where min is taken over all neighbors of node x 44

Distance Vector Algorithm: Initialization

 Let D x (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, D x (v) = c(x,v) D x (y) to other nodes are initialized as infinity.

 Each node x maintains a distance vector (DV): 

D

x = [D x (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) + D v (y) < D x (y) then   D x (y) = c(x,v) + D v (y) Sets the next hop to reach the destination y to the neighbor v  Notify neighbors of the change  The estimate

D x (y) will converge to the actual least cost

d x (y) 46

Distance vector algorithm: an example

1 1 1 1 1 1 1 1

Time = 0

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)

v w

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)

v

Net(v,w) c(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 via (next hop) cost

w

Net(v,n) c(v,n) Net Net n D(v,Net)

n

51

Distance Vector Algorithm: Messages

RoutingTable of node v

Dest via (next hop) cost Net n D(v,Net) • Nodes send messages to their neighbors which contain routing table entries

[Net , D(v,Net)] v n

• A message has the format:

[Net , D(v,Net)]

go to Net is D (v,Net)”

means

“My cost to

52

Distance Vector Algorithm: Sending Updates

RoutingTable of node v

Dest Net 1 via (next hop) m cost D(v,Net 1 ) Net 2 n D(v,Net 2 ) Periodically, each node v sends the content of its routing table to its neighbors: Net N w D(v,Net N )

m [Net 1 ,D(v,Net 1 )] [Net N ,D(v,Net N )] v [Net 1 ,D(v,Net 1 )] [Net N ,D(v,Net N )] w [Net 1 ,D(v,Net 1 )] [Net N ,D(v,Net N )] 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) c (v,w) Net(v,w) Dest via (next hop) cost

m v w

Net(v,m) m 0 c(v,n) Net(v,n) 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) Net(v,w) m w 0 0 Net(v,n) n 0  New node v sends the routing table entry to all its neighbors: 55

Initiating Routing Table III

 Node v receives the routing tables from other nodes and builds up its routing table

[Net 1 ,D(m,Net 1 )] [Net N ,D(m,Net N )] m v [Net 1 ,D(w,Net 1 )] [Net N ,D(w,Net N )] w n [Net 1 ,D(n,Net 1 )] [Net N ,D(n,Net 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 v w

c(v,m) Net(v,m)

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) ) { D new (v,Net) := D (m,Net) + c (v,m); Update routing table; send message [Net, D new (v,Net)] to all neighbors 57

Updating Routing Tables II

• Before receiving the message:

[Net,D(m,Net)]

Dest

RoutingTable

via (next hop) cost Net

m v w

c(v,m) Net(v,m) Net ??

D(v,Net)

n

• Suppose D (m,Net) + c (v,m) < D (v,Net): Net

m

c(v,m) Net(v,m)

[Net,D new (v,Net)] v w [Net,D new (v,Net)]

Dest

RoutingTable

via (next hop) cost Net m D new (v,Net) 58

n

Example

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

10.0.1.0/24 10.0.2.0/24 10.0.3.0/24 10.0.4.0/24 10.0.5.0/24 .2

Router A .1

.2

Router B .1

.2

Router C .1

.2

Router D .1

Net via

t=0: 10.0.1.0 10.0.2.0 0 0 t=1: 10.0.1.0 0 10.0.2.0 0 10.0.3.0 10.0.2.2 1 t=2: 10.0.1.0 0 10.0.2.0 0 10.0.3.0 10.0.2.2 1 10.0.4.0 10.0.2.2 2

Net via

t=0: 10.0.2.0 10.0.3.0 0 0

Net via

t=0: 10.0.3.0 10.0.4.0 0 0

Net via

t=0: 10.0.4.0 10.0.5.0 0 0 t=1: 10.0.1.0 10.0.2.1 1 10.0.2.0 0 10.0.3.0 0 10.0.4.0 10.0.3.2 1 t=2: 10.0.1.0 10.0.2.1 1 10.0.2.0 0 10.0.3.0 0 10.0.4.0 10.0.3.2 1 10.0.5.0 10.0.3.2 2 t=1: 10.0.2.0 10.0.3.1 1 10.0.3.0 0 10.0.4.0 0 10.0.5.0 10.0.4.2 1 t=2: 10.0.1.0 10.0.3.1 2 10.0.2.0 10.0.3.1 1 10.0.3.0 0 10.0.4.0 0 10.0.5.0 10.0.4.2 1 t=1: 10.0.3.0 10.0.4.1 1 10.0.4.0 0 10.0.5.0 0 t=2: 10.0.2.0 10.0.4.1 2 10.0.3.0 10.0.4.1 1 10.0.4.0 0 10.0.5.0 -

59

0

Example

10.0.2.0/24 10.0.1.0/24 10.0.3.0/24 10.0.4.0/24 10.0.5.0/24 .2

Router A .1

.2

Router B .1

.2

Router C .1

.2

Router D .1

Net via

t=2: 10.0.1.0 0 10.0.2.0 0 10.0.3.0 10.0.2.2 1 10.0.4.0 10.0.2.2 2

Net via

t=2: 10.0.1.0 10.0.2.1 1 10.0.2.0 0 10.0.3.0 0 10.0.4.0 10.0.3.2 1 10.0.5.0 10.0.3.2 2

Net via

t=2: 10.0.1.0 10.0.3.1 2 10.0.2.0 10.0.3.1 1 10.0.3.0 0 10.0.4.0 0 10.0.5.0 10.0.4.2 1

t=3: 10.0.1.0 0 10.0.2.0 0 10.0.3.0 10.0.2.2 1 10.0.4.0 10.0.2.2 2 10.0.5.0 10.0.2.2 3 t=3: 10.0.1.0 10.0.2.1 1 10.0.2.0 0 10.0.3.0 0 10.0.4.0 10.0.3.2 1 10.0.5.0 10.0.3.2 2 t=3: 10.0.1.0 10.0.3.1 2 10.0.2.0 10.0.3.1 1 10.0.3.0 0 10.0.4.0 0 10.0.5.0 10.0.4.2 1

Now, routing tables have converged !

Net via

t=2: 10.0.2.0 10.0.4.1 2 10.0.3.0 10.0.4.1 1 10.0.4.0 0 10.0.5.0 0

t=3: 10.0.1.0 10.0.4.1 3 10.0.2.0 10.0.4.1 2 10.0.3.0 10.0.4.1 1 10.0.4.0 0 10.0.5.0 0

60

Characteristics of Distance Vector Routing

   

Periodic Updates:

sent at the end of a certain time period. A typical value is 90 seconds.

Updates to the routing tables are

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:

update periods.

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

The Count-to-Infinity Problem

A 1 B 1 C

to A's Routing Table C via (next hop) B cost 2 C B to C 2 now link B-C goes down C B's Routing Table via (next hop) C cost 1 oo C 2 C oo C oo C oo C C 3 A 3 C B 4 C 4 C C oo 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: request 2: response 2: for IP 0…0: request full rou ting table Address of destination Cost (measured in hops) One RIP message can have up to 25 route entries

Command Version address family Set to 00...0

Set to 00.00

32-bit address Unused (Set to 00...0) Unused (Set to 00...0) metric (1-16) Up to 24 more routes (each 20 bytes) 32 bits

1: RIPv1 68

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

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

Command Version address family Set to 00...0

Set to 00.00

32-bit address Unused (Set to 00...0) Unused (Set to 00...0) metric (1-16) Up to 24 more routes (each 20 bytes) 32 bits

2: RIPv2 70

RIPv2 Packet Format

IP header UDP header RIPv2 Message

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

Command Version address family Set to 00.00

IP address Subnet Mask route tag Next-Hop IP address metric (1-16) Up to 24 more routes (each 20 bytes) 32 bits

2: RIPv2 71

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

IP header UDP header RIPv2 Message

2: plaintext password

Command Version 0xffff Set to 00.00

Authentication Type Password (Bytes 0 - 3) Password (Bytes 4 - 7) Password (Bytes 8- 11) Password (Bytes 12 - 15) Up to 24 more routes (each 20 bytes) 32 bits

74

RIP Problems

 RIP takes a long time to stabilize  Even for a small network, it takes several minutes until the routing tables have settled after a change  RIP has all the problems of distance vector algorithms, e.g., count-to-Infinity  RIP uses split horizon to avoid count-to-infinity  The maximum path in RIP is 15 hops 75