Upload
lamthu
View
229
Download
2
Embed Size (px)
Citation preview
Routing Information ProtocolA simple distance vector scheme
Karst Koymans
Informatics InstituteUniversity of Amsterdam
(version 16.3, 2017/03/01 13:00:45)
Friday, March 3, 2017
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 1 / 40
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 2 / 40
RIP version 1
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 3 / 40
RIP version 1 Origin and application
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 4 / 40
RIP version 1 Origin and application
RIP version 1
RFC 1058Charles Hedrick, Rutgers University, 1988
Based on the Bellman-Ford distance vector algorithm
Also used as the first ARPANET routing protocol
Many implementations were already presentdiffering in details (timers . . . )available before the specification itself
GWINFO from Xerox PARCrouted from BSD 4.2
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 5 / 40
RIP version 1 Origin and application
RIP application
Inside homogeneous networkswith a moderate size
An interior routing protocol (IGP)
Maximum diameter is 15 hopsBased on a uniform cost (weight) of 1Hence in this case “16 = ∞”
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 6 / 40
RIP version 1 Basic RIPv1 operation
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 7 / 40
RIP version 1 Basic RIPv1 operation
Basic operation
Keep a table of routes to destination networks withdistance (metric), gateway (next hop)
Periodically send out a complete table to all neighboursSend all destination networks with distancesDo not send the gateways
Update your table with newly collected informationThe distance can only decrease (become better)
unless the information comes from the gateway itself,thereby overriding the old informationwhich only occurs if the topology changes or links fail or come up
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 8 / 40
RIP version 1 Basic RIPv1 operation
Split horizon (with poisoned reverse)
Split horizonDo not advertize back routes you learned fromyour neighbour to the network you both are on
Poisoned reverseDo advertise routes back but with distance ∞
which indicates unreachability explicitlyAdvantage is the faster convergence in case topology changes
for instance when routers point to each other
Disadvantage is the larger routing update packetsTherefore implementation is optional or configurable
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 9 / 40
RIP version 1 Basic RIPv1 operation
Timers
Update timer: updates are sent every 30 seconds (default)
Invalid timer: routes time out after 180 seconds (default)Called “timeout” in RFC 1058
Flush timer: routes disappear after 240 seconds (default)Called “garbage-collection timer” in RFC 1058
with a default value of 120 seconds after timeout
Unreachable networks are included in updates until the flush timerexpires them and they are eliminated from the routing table
Infinity = ∞ = 16
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 10 / 40
RIP version 1 Basic RIPv1 operation
Timers (later additions)
Triggered updatesAn update is being sent as soon as a route changes
Hold-down timer (default 180 seconds)This is a later (Cisco) addition, not present in RFCsIt exists to prevent incorporating possibly bad routing informationwhich might be present in a network that didn’t converge yetThe semantics is not completely clear (not standardized)
Essentially do not accept updates during hold-down on routesthat have been marked unreachable
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 11 / 40
RIP version 1 RIPv1 packets
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 12 / 40
RIP version 1 RIPv1 packets
RIP version 1 packets
Packets are broadcast to 255.255.255.255or to a directed broadcast addressor to an individual host or router as a response to a request
Works on top of UDP and uses 520 as its well-known port
The maximum size of this UDP packet is 512 bytes,including the 8 bytes long UDP header
There is room for 25 route updatesEach update needs 20 bytes
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 13 / 40
RIP version 1 RIPv1 packets
RIPv1 packet format
0 7 8 15 16 23 24 31
Command Version Reserved (must be 0)Address Family Identifier Reserved (must be 0)
IP Address (network)
Reserved (must be 0)
Metric
Repeatedmaximally 25times
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 14 / 40
RIP version 1 RIPv1 packets
RIPv1 packet fields
RIPv1 fields
Command Request(1) or Response(2)
Version 1
AFI IP(2)
IP Address Destination Network
Metric Distance (max 16=∞)
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 15 / 40
RIP version 1 RIP version 1 and subnetting
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 16 / 40
RIP version 1 RIP version 1 and subnetting
Subnets
RIPv1 “supports” fixed length, one level deep, subnet masks
RIPv1 uses heuristics to derive the uniform subnet mask
in use throughout the whole subnetted network
from its own directly connected subnets
RIPv1 differentiates between neighbours for updates about subnetsbeing part of that same subnetted networkbeing part of another network
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 17 / 40
Protocol extensions
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 18 / 40
Protocol extensions IGRP
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 19 / 40
Protocol extensions IGRP
IGRP (1)
IGRP stands for “Interior Gateway Routing Protocol”
IGRP is a Cisco proprietary protocol
IGRP is just like RIP a distance vector protocolThe basics are the same as with RIPIt runs directly on top of IP (protocol 9)It has a larger notion of ∞, typically 100, maximum 255It accepts up to four parallel paths
which Cisco also used in its RIP implementation,deviating from the official specification
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 20 / 40
Protocol extensions IGRP
IGRP (2)
Division into independent domains is possiblewhich are called (confusingly) autonomous systems
Uses three types of network routesInterior route
with implicit subnet information, like in RIPv1System route
which is possibly summarizedExterior route
candidate default
Support for multiple default routesusing fictitious network numberscontrary to RIP that only (optionally) includes 0.0.0.0
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 21 / 40
Protocol extensions IGRP
IGRP (3)
RIPThe only metric is the hop count
IGRPThe metric is composite, based on
Delay, Bandwidth, Reliability and Load
The hop count is still communicated as a separate field
to see when ∞ has been reached
MTU information about the path is also communicated
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 22 / 40
Protocol extensions EIGRP
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 23 / 40
Protocol extensions EIGRP
EIGRP (1)
EIGRP stands for “Enhanced Interior Gateway Routing Protocol”It runs directly on top of IP (protocol 88)Remembers all paths, not only the best pathIt carries explicit subnet information (VLSM)It keeps state about its neighboursIt can take the MTU into accountIt uses the DUAL (Diffusing Update Algorithm) algorithmfor loop free routing and fast convergence
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 24 / 40
Protocol extensions EIGRP
EIGRP (2)
It uses no regular (periodic) routing table updatesUses partial and incremental updates when the routing table changesIt uses hello multicast packets to be discovered by neighboursIt forms adjacencies with neighbours
It uses ack(nowledgement)s for reliable communication
It can summarize on arbitrary bit boundaries (classless)
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 25 / 40
Protocol extensions EIGRP
EIGRP (3)
Use of DUALComplicated algorithm, remotely similar to thepropose and agree mechanism for Rapid Spanning Tree
Suppose S-M-T is a path from S to T via neighbour MSuppose the link cost for S-M is cSuppose the path cost for M-T is p
When is it safe (with respect to loop avoidance) to switchto a backup path via neighbour N when the link S-M fails?
Say the link cost for S-N is d and the path cost for N-T is qAnswer: q ≤ c + p (feasible successor condition)
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 26 / 40
RIP version 2
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 27 / 40
RIP version 2 Extensions with respect to version 1
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 28 / 40
RIP version 2 Extensions with respect to version 1
RIP version 2
Specified in RFC 2453Gary Malkin, Bay Networks, 1998
It has extensions forSubnet masksAlternate next hopAuthenticationMulticastingRoute tags
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 29 / 40
RIP version 2 Extensions with respect to version 1
RIPv2 packet format
0 7 8 15 16 23 24 31
Command Version Reserved (must be 0)Address Family Identifier Route Tag
IP Address (network)Subnet Mask
Next HopMetric
Repeatedmaximally 25times
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 30 / 40
RIP version 2 Extensions with respect to version 1
RIPv2 packet fields
RIPv2 fields
Command Request(1) or Response(2)
Version 2
AFI IP(2)
Route Tag Identification of route origin
IP Address Destination Network
Subnet Mask CIDR support
Next Hop Gateway (if different from advertising router)
Metric Distance (max 16=∞)
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 31 / 40
RIP version 2 Extensions with respect to version 1
First-routing-entry-as-authentication hack
0 7 8 15 16 23 24 31
Address Family Identifier (=0xFFFF) Authentication Type
Authentication
Authentication type 2 means use of a plaintext password
Authentication type 3 (RFC 4822) means use of
Keyed-MD5 or HMAC-SHA-{1,256,384,512} where extended
authentication data is added as a trailer to the RIP dataKarst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 32 / 40
RIP version 2 Summary of changes with respect to version 1
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 33 / 40
RIP version 2 Summary of changes with respect to version 1
Summary of changes (1)
Authentication fieldsFirst AFI is 0xFFFFType 2: simple password of length 16 bytesType 3: key id, sequence number and length and offsetof a variable length authentication trailer
Route tag fieldThis is simply carried alongIt differentiates between internally and externally generated routes
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 34 / 40
RIP version 2 Summary of changes with respect to version 1
Summary of changes (2)
Subnet mask fieldnet/subnet/host route differentiation
Next Hop fieldUsed when best next hop does not speak RIP itself
Multicast (not a field) replaces broadcastThe destination of updates is 224.0.0.9 (which is not forwarded)
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 35 / 40
Next Hop scenario
A B E F
Network
A and B speak RIP internally.E and F speak some other protocol over the external network.
E can speak RIP to A and B on behalf of F,setting the Next Hop to F as appropriate.
RIP Next Generation and RIP variants
Outline
1 RIP version 1Origin and applicationBasic RIPv1 operationRIPv1 packetsRIP version 1 and subnetting
2 Protocol extensionsIGRPEIGRP
3 RIP version 2Extensions with respect to version 1Summary of changes with respect to version 1
4 RIP Next Generation and RIP variants
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 37 / 40
RIP Next Generation and RIP variants
RIPng (for IPv6)
Specified in RFC 2080
It still runs over UDP
It uses port number 521
Packets can be any length that fits inside the network unfragmented
Supports IPv6 prefix, route tags, next hopNo authentication (which can be done at the IP level)
It uses FF02::9, the all-rip-routers multicast address
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 38 / 40
RIP Next Generation and RIP variants
RIPng packet format
0 7 8 15 16 23 24 31
Command Version Reserved (must be 0)
IPv6 Prefix
Route Tag Prefix Length Metric
As many as canfit in a packetunfragmented
Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 39 / 40
RIP Next Generation and RIP variants
RTE-with-big-metric-as-next-hop hack
0 7 8 15 16 23 24 31
Next Hop
0x0000 0x00 Metric(=0xFF)
The next hop must be a link local address
Using :: as next hop means use originator as next hop
Next Hop remains valid until next “next-hop-RTE”Karst Koymans (UvA) Routing Information Protocol Friday, March 3, 2017 40 / 40