COMS/CSEE 4140 Networking Laboratory
Lecture 04
Salman Abdul BasetSpring 2008
2
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.
3
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 (1st generation), shared bus with line card
cache (2nd generation), switched architecture.
4
Agenda CIDR multi-homing and IP forwarding The Internet Routing protocols Routing Information Protocol (RIP)
5
CIDR Multi-homing
AOLAOL
Verizon
Verizon
Comp 1
Comp 1
My-ISP My-ISP
129.15/16
129.21/16129.0/8
Comp 2
Comp 2
208.20.16/8
208.20/16
6
CIDR Multi-homing
AOLAOL
Verizon
Verizon
Comp 1
Comp 1
My-ISP My-ISP
129.15/16
129.21/16129.0/8
Comp 2
Comp 2
208.20.16/8
208.20/16129.15/16
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.
7
Routing and Forwarding
Control plane: run routing protocols: (RIP, OSPF, BGP)
Data plane: forwarding packets from incoming to outgoing linkFIB: forwarding information base
RIB: routing information base
8
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).
9
Longest Prefix Match
Network prefix / host
Network mask
Interface Next hop
10.0.2.0 255.255.255.0
eth1
10.30.0.0 255.255.0.0 eth2 10.30.0.1
10.30.4.0 255.255.255.0
eth3 10.30.4.4
0.0.0.0 0.0.0.0 eth1 10.0.2.1
Find route for 10.30.4.1
Host IP address: 10.0.2.41 netmask: 255.255.255.0
Bits mached
11
16
24
0
default gw
10
Agenda CIDR multi-homing and IP forwarding The Internet Routing protocols Routing Information Protocol (RIP)
11
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.
12
Applications of the Internet Traditional core applications:
EmailNewsRemote loginFile transfer
The killer application:World-Wide Web (WWW)
New applications:VideoTelephony Mesh-upsP2P applicationsSocial networks
13
Brief History of the InternetMid 1960: Papers on “Packet Switching” emerge.End 1969s: ARPA sponsors the development of a packet-
switching network, called the ARPANET. First four nodes are UCLA, SRI, U.
Utah, UCSB. 1974: The TCP/IP protocols and model are being
proposed by Cerf/Kahn.1980: IPv4 is introduced1983: ARPANET adopts TCP/IP. At this time, the
ARPANET has200 routers.
1984: NSF funds a TCP/IP based backbone network. This backbone grows
into the NSFNET, which becomes the successor of the ARPANET.
1995: NSF stops funding of NSFNET. The Internet is completely commercial.
14
A Brief Summary of the Evolution of the Internet
1945 1995
Memex Conceived
1945
WWWCreated
1989
MosaicCreated
1993
A Mathematical
Theory of Communication
1948
Packet Switching Invented
1964
SiliconChip1958
First Vast ComputerNetwork
Envisioned1962
ARPANET1969
TCP/IPCreated
1972
InternetNamed
and Goes
TCP/IP1984
HypertextInvented
1965
Age ofeCommerce
Begins1995
Copyright 2002, William F. Slater, III, Chicago, IL, USA
15
Internet History
Source:
16
Growth of the Internet
Source: Internet Software Consortium
17
Internet Infrastructure
local ISP
campusnetwork
corporatenetwork
IXP
RegionalNetwork
RegionalNetwork
local ISP
local ISP
IXP
IXP
Backbone Network
Backbone Network
RegionalNetwork
RegionalNetwork
Tier-1Tier-2
Tier-3
18
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)
19
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.
20
Node degrees
Source: caida.org
21
Topology of a Tier-1 NSP
22
Organization of a single node in a Tier-1 network
Links to othernodes of thenetwork
....
Dial-up andleased linksto customers
.... Leased links
to customers
Peering points
Metropolitanarea networks
....
Com3
Com3
Com3
Com3
Bay Networks
Bay Networks
Modem Bank
SD
SD
Modem Bank
Modem Bank Modem Bank
Modem Bank
.... Leased links
to customers
.... Leased links
to customers
23
Who is Who on the Internet ?
IETF IRTF
IESG
Technical managementIAB
Internet standard
Approves RFC
IANAICANN
-IP addresses-port numbers-RIRs
[Get port number] RFC
-domain names
ISOCperformsIANA functions
24
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.
25
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)
26
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
27
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.
28
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)
29
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)
30
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.
31
Who is Who on the Internet ?
IETF IRTF
IESG
Technical managementIAB
Internet standard
Approves RFC
IANAICANN
-IP addresses-port numbers-RIRs
[Get port number] RFC
-domain names
ISOCperformsIANA functions
32
Agenda CIDR multi-homing and IP forwarding The Internet Routing protocols Routing Information Protocol (RIP)
33
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.
34
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.
35
Overview of Routing Protocols
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
Routing protocol Routing Algorithm
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.
36
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.
37
Autonomous Systems
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
Ethernet
Router
Ethernet
Ethernet
RouterRouter
Ethernet
Ethernet
EthernetRouterRouter
Router
AutonomousSystem 2
AutonomousSystem 1
38
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.
39
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.
40
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.
41
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).
42
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.
43
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).
44
Bellman-Ford AlgorithmBellman-Ford EquationDefinedx(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
45
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 ]
46
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)
47
Distance vector algorithm: an example
1 1
1
1 1
1
1
1
Time = 0
48
Distance vector algorithm: an example
Time = 1
49
Distance vector algorithm: an example
Time = 2 (End)
50
How to map the abstract graph to the physical network
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
n
v
w
Net
Net(v,w)
Net(v,n)
c(v,w)
c(v,n)
51
Distance Vector Algorithm: Routing Table
Dest
n
v
w
D (v,Net)n
costvia(next hop)
Net
RoutingTable of node v
Net
Net(v,w)c(v,w)
Net(v,n)c(v,n)
Net(v,w): Network address of the network between v and w The network can be a link, but could also be a LAN
c(v,w): cost to transmit on the interface to network Net(v,w)
52
Distance Vector Algorithm: Messages
Dest
D (v,Net)n
costvia(next hop)
Net
RoutingTable of node v
• Nodes send messages to their neighbors which contain routing table entries
• A message has the format: [Net , D(v,Net)] means“My cost to go to Net is D (v,Net)”
vv nn[Net , D(v,Net)]
53
Distance Vector Algorithm: Sending Updates
Dest
D (v,Net 2)n
costvia(next hop)
Net 2
RoutingTable of node v
D (v,Net 1)mNet 1
D (v,Net N)wNet N
Periodically, each node v sends the content of its routing table to its neighbors:
n
v wm
[Net N,D(v,Net N)]
[Net 1,D(v,Net 1)]
[Net N,D(v,Net N)]
[Net 1,D(v,Net 1)]
[Net N,D(v,Net N)]
[Net 1,D(v,Net 1)]
54
Initiating Routing Table I
Destc (v,w)
Net(v,w)
0m
costvia(next hop)
Net(v,m)
RoutingTablec(v,m)
Net(v,m)
c(v,n)Net(v,n) 0wNet(v,w)
0nNet(v,n)n
v wm
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
55
Initiating Routing Table IIDest
0m
costvia(next hop)
Net(v,m)
RoutingTable
0wNet(v,w)
0nNet(v,n)
New node v sends the routing table entry to all its neighbors:
n
v wm
[w,0]
[n,0 ] [n,0 ]
[m,0]
[m,0]
[w,0]
n
v wm
[Net(v,w),0]
[Net(v,n),0] [Net(v,n),0]
[Net(v,m),0]
[Net(v,w),0]
[Net(v,m),0]
n
v wm
[Net(v,w),0]
[Net(v,n),0] [Net(v,n),0]
[Net(v,m),0]
[Net(v,w),0]
[Net(v,m),0]
56
n
v wm
[Net N,D(n,Net N)]
[Net 1,D(n,Net 1)]
[Net N,D(m,Net N)]
[Net 1,D(m,Net 1)]
[Net N,D(w,Net N)]
[Net 1,D(w,Net 1)]
Initiating Routing Table III Node v receives the routing tables from
other nodes and builds up its routing table
57
Updating Routing Tables I
c(v,m)Net(v,m)
n
v wmNet
[Net,D(m,Net)]
• Suppose node v receives a message from node m: [Net,D(m,Net)]
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
}
Node v updates its routing table and sends out further messages if the message reduces the cost of a route:
58
Updating Routing Tables II
c(v,m)Net(v,m)
n
v wmNet
[Net,D(m,Net)]
• Before receiving the message:Dest
D(v,Net)??
costvia(next hop)
Net
RoutingTable
c(v,m)Net(v,m)
n
v wmNet
[Net,D new (v,Net)]
[Net,D new (v,Net)]
Dest
m
costvia(next hop)
Net
RoutingTable
D new (v,Net)
• Suppose D (m,Net) + c (v,m) < D (v,Net):
59
Example
Router A Router B Router C Router D
10.0.2.0/24 10.0.3.0/24 10.0.4.0/24 10.0.5.0/2410.0.1.0/24
.1.2.2.2.2 .1.1.1
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
t=0:10.0.1.0 - 010.0.2.0 - 0
Net via cost
t=0:10.0.2.0 - 010.0.3.0 - 0
Net via cost
t=0:10.0.3.0 - 010.0.4.0 - 0
Net via cost
t=0:10.0.4.0 - 010.0.5.0 - 0
Net via cost
t=1:10.0.1.0 - 010.0.2.0 - 0 10.0.3.0 10.0.2.2 1
t=2:10.0.1.0 - 010.0.2.0 - 0 10.0.3.0 10.0.2.2 110.0.4.0 10.0.2.2 2
t=2:10.0.1.0 10.0.2.1 1 10.0.2.0 - 010.0.3.0 - 010.0.4.0 10.0.3.2 110.0.5.0 10.0.3.2 2
t=1:10.0.1.0 10.0.2.1 1 10.0.2.0 - 010.0.3.0 - 010.0.4.0 10.0.3.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 - 010.0.4.0 - 010.0.5.0 10.0.4.2 1
t=1:10.0.2.0 10.0.3.1 1 10.0.3.0 - 010.0.4.0 - 010.0.5.0 10.0.4.2 1
t=2:10.0.2.0 10.0.4.1 210.0.3.0 10.0.4.1 110.0.4.0 - 010.0.5.0 - 0
t=1:10.0.3.0 10.0.4.1 110.0.4.0 - 010.0.5.0 - 0
60
Example
Router A Router B Router C Router D
10.0.2.0/24 10.0.3.0/24 10.0.4.0/24 10.0.5.0/2410.0.1.0/24
.1.2.2.2.2 .1.1.1
t=3:10.0.1.0 - 010.0.2.0 - 0 10.0.3.0 10.0.2.2 110.0.4.0 10.0.2.2 210.0.5.0 10.0.2.2 3
Net via cost
t=3:10.0.1.0 10.0.2.1 1 10.0.2.0 - 010.0.3.0 - 010.0.4.0 10.0.3.2 110.0.5.0 10.0.3.2 2
Net via cost
t=3:10.0.1.0 10.0.3.1 2 10.0.2.0 10.0.3.1 1 10.0.3.0 - 010.0.4.0 - 010.0.5.0 10.0.4.2 1
Net via cost
t=3:10.0.1.0 10.0.4.1 310.0.2.0 10.0.4.1 210.0.3.0 10.0.4.1 110.0.4.0 - 010.0.5.0 - 0
Net via cost
Now, routing tables have converged !
t=2:10.0.1.0 - 010.0.2.0 - 0 10.0.3.0 10.0.2.2 110.0.4.0 10.0.2.2 2
t=2:10.0.1.0 10.0.2.1 1 10.0.2.0 - 010.0.3.0 - 010.0.4.0 10.0.3.2 110.0.5.0 10.0.3.2 2
t=2:10.0.1.0 10.0.3.1 2 10.0.2.0 10.0.3.1 1 10.0.3.0 - 010.0.4.0 - 010.0.5.0 10.0.4.2 1
t=2:10.0.2.0 10.0.4.1 210.0.3.0 10.0.4.1 110.0.4.0 - 010.0.5.0 - 0
61
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 update periods.
62
The Count-to-Infinity ProblemAA BB CC1 1
A's Routing Table B's Routing Table
C
to costvia(next hop)
2B C
to costvia(next hop)
1C
now link B-C goes down
C 2 C oo
C oo-C 2B
C oo C 3
C 3AC oo-
C 4 C oo
C oo-C 4B
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?
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 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.
65
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!
66
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.
67
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)
1982 Release of routed for BSD Unix 1988 RIPv1 (RFC 1058)
- classful routing 1993 RIPv2 (RFC 1388)
- adds subnet masks with each route entry
- allows classless routing 1998 Current version of RIPv2 (RFC 2453)
68
RIPv1 Packet FormatIP header UDP header RIP Message
Command Version Set to 00...0
32-bit address
Unused (Set to 00...0)
address family Set to 00.00
Unused (Set to 00...0)
metric (1-16)
one
rout
e en
try(2
0 by
tes)
Up to 24 more routes (each 20 bytes)
32 bits
One RIP message can have up to 25 route entries
1: request2: response
2: for IP0…0: request full rou-ting table
Address of destination
Cost (measured in hops)
1: RIPv1
69
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
70
RIPv2 Packet FormatIP header UDP header RIP Message
Command Version Set to 00...0
32-bit address
Unused (Set to 00...0)
address family Set to 00.00
Unused (Set to 00...0)
metric (1-16)
one
rout
e en
try(2
0 by
tes)
Up to 24 more routes (each 20 bytes)
32 bits
One RIP message can have up to 25 route entries
1: request2: response
2: for IP0…0: request full rou-ting table
Address of destination
Cost (measured in hops)
2: RIPv2
71
RIPv2 Packet FormatIP header UDP header RIPv2 Message
Command Version Set to 00.00
IP address
Subnet Mask
address family route tag
Next-Hop IP address
metric (1-16)
one
rout
e en
try(2
0 by
tes)
Up to 24 more routes (each 20 bytes)
32 bits
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
72
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
73
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.
74
RIP Security Issue: Sending bogus routing updates to a router RIPv1: No protection RIPv2: Simple authentication scheme
IP header UDP header RIPv2 Message
Command Version Set to 00.00
Password (Bytes 0 - 3)
Password (Bytes 4 - 7)
0xffff Authentication Type
Password (Bytes 8- 11)
Password (Bytes 12 - 15) Auth
etic
atio
nUp to 24 more routes (each 20 bytes)
32 bits
2: plaintext password
75
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