Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

RIP - Information Protocol

• RIP is an Interior Gateway Protocol (IGP) – due to inherent administrative traffic, RIP suits best for smaller networks (autonomous systems, routing areas) – routing decisions are based upon hop count measure • RIP was initially released as part of BSD 4.2 UNIX – hence RIP got wide-spread availability RIP, RIPv2 • UNIX workstations supporting RIP – can determine all routers in their LAN themselves – do not need a default- entry Routing Information Protocol ´s First IGP • RIP is specified in RFC 1058 – RFC category „historic“

© 2009, D.I. Manfred Lindner RIP, v4.6 1 © 2009, D.I. Manfred Lindner RIP, v4.6 3

Agenda Basic RIP Table Entries

• RIP Principles NET-ID VECTOR DISTANCE INT TIME • RIP Problems 96.0.0.0 197.23.5.47 7 P1 time_2 • RIP Workarounds 126.0.0.0 148.12.77.3 3 P2 time_1 148.12.0.0 - 0 P2 - – maximum hop count 197.23.5.0 - 0 P1 - – split horizon 0.0.0.0 197.23.5.47 1 P1 Default Route – poison reverse – triggered update NET-ID ...... IP address network part of the target network VECTOR ...... IP-address of the nearest router on the way to – hold down this network ( = next hop) • RIP version 2 DISTANCE .... number of hops ( =metric) INT ...... Label of the outgoing physical router-port TIME ...... timestamp of the last routing update for this entry; important for the aging mechanism

© 2009, D.I. Manfred Lindner RIP, v4.6 2 © 2009, D.I. Manfred Lindner RIP, v4.6 4

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 1 Page 40 - 2 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

RIP Principles 1 RIP Principles 3

• RIP is a Distance Vector Protocol • after a specific time • after booting the non-volatile configuration- – all routers know about all network addresses of the whole memory tells a RIP router to which networks it is network directly connected • if different routing updates (from different • this information is loaded into the routers) contain the same net-ID – then there are redundant paths to this network • basically the routing table contains – only the path with the lowest hop-count is stored in the – the net-ID of the directly connected networks routing-table – and the associated distance (in hops) to them – on receiving equal hop counts, the net-ID of the earlier directly connected networks have hop-count = 0 one will be selected (and all other associated data) • hence, between each two networks exists exactly one active path

© 2009, D.I. Manfred Lindner RIP, v4.6 5 © 2009, D.I. Manfred Lindner RIP, v4.6 7

RIP Principles 2 RIP Principles 4

• then, this routing table is distributed periodically • all routing table‘s net-IDs are periodically (every 30 seconds) to all connected networks = refreshed by routing-update messages routing update • if a routing update tells a better metric than that – using a broadcast MAC-frame containing one currently stored in the table – an IP-broadcast datagram containing – the routing table must be updated with this new – an UDP-datagram with port number 520 information – metric entries of the routing table will be risen by the – this update does not take care about if the sender of this distance of the interface where transmitted-> in case of routing-update is also the router which is currently RIP -> distance is one -> hop count selected as next hop • directly reachable routers – "good news“ are quickly adapted – receive this message, update their own routing tables, – RIP trusts good news from any source ("trusted news") – and hence generate their own routing updates reflecting any corresponding modifications

© 2009, D.I. Manfred Lindner RIP, v4.6 6 © 2009, D.I. Manfred Lindner RIP, v4.6 8

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 3 Page 40 - 4 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

RIP Principles 5 RIP Header plus RIP Data

• if a routing update tells a worse metric than that 0 8 16 31 one currently stored in the table command version must be zero – the routing table must be updated with this new family of net 1 must be zero information if the sender of this routing-update is the next- IP address of net 1 hop router for this network must be zero that is: the actual VECTOR in the table is identical with the source must be zero address of the routing-update distance to net 1 – routing-updates from other routers than that one currently family of net 2 must be zero registered in the table are ignored IP address of net 2 • summary: routing-updates with worse metric is must be zero only relevant if it comes from that router must be zero mentioned in the actual table entry distance to net 2 family of net 3 must be zero ......

© 2009, D.I. Manfred Lindner RIP, v4.6 9 © 2009, D.I. Manfred Lindner RIP, v4.6 11

RIP Principles 6 RIP Header and Data Fields

• when a routing table entry is not refreshed • command within 180sec – Request (1): Router or Host requests for a routing update – this entry is considered to be obsolete – Response (2): response to a request but also used for – possible reasons: router-failure, network not reachable periodic routing-updates – without special mechanism • version • we have to wait for 180sec at least in order that all routers have – version number of the RIP protocol ( = 1 for RIP) consistent routing tables again – improvement by a special network-unreachable message • family of net x • which is distributed to all other routers – because RIP is not only build for IP (in the case of IP: 2) • it takes 180sec in the worst case • IP address of net x – slow adaptation of "bad news“ – IP-address of the announced network x – during these 180sec, forwarding of IP datagram's is done • distance to net x according to the routing table !! – = hop-count to net x

© 2009, D.I. Manfred Lindner RIP, v4.6 10 © 2009, D.I. Manfred Lindner RIP, v4.6 12

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 5 Page 40 - 6 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

RIP Principles Creating Routing Tables

to give a clearer idea of the RIP method: Router A Router B

Net 1Net 2Net 3 • every router holds a directory, pointing to other

networks (VECTOR entries) without knowing the Net Hops values used by exact location of them 1 1 Router A: routing router B to 2 1 update to net 2 actualise its routing table • datagram's follow these "signposts" and finally reach their targets Routing table A Routing table B Net Hops Hop-ID Net Hops Hop-ID 1 0 direct 1 1 2.A 2 0 direct 2 0 direct • information about these signposts is based 3 0 direct upon rumours (routing-updates) Situation after distribution of A's routing update

© 2009, D.I. Manfred Lindner RIP, v4.6 13 © 2009, D.I. Manfred Lindner RIP, v4.6 15

Creating Routing Tables Creating Routing Tables

Router A Router B Router A Router B

Net 1Net 2Net 3 Net 1Net 2Net 3

Net Hops Router B: 1 2 routing update 2 1 to net 2 3 1

Routing table A Routing table B Routing table A Routing table B Net Hops Hop-ID Net Hops Hop-ID Net Hops Hop-ID Net Hops Hop-ID 1 0 direct 1 0 direct 1 1 2.A 2 0 direct 2 0 direct 2 0 direct 2 0 direct 3 0 direct 3 1 2.B 3 0 direct

Situation after booting Situation after distribution of B's routing update © 2009, D.I. Manfred Lindner RIP, v4.6 14 © 2009, D.I. Manfred Lindner RIP, v4.6 16

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 7 Page 40 - 8 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Routing Updates and Stable States RIP-Problems

Router A Router B • slow convergence Net 1Net 2Net 3 – due to 30s routing-update interval and 180s aging timeout

Net Hops Net Hops • routing-loops cannot be safely detected Router A: 1 1 1 2 Router B: – because routing updates are obligatory ("Trusted routing update routing update 2 1 2 1 to net 2 Information Principle" of RIP) to net 2 3 2 3 1 • so, failures and rooting-loops keep large

Routing table A Routing table B networks inconsistent for a long period of time Net Hops Hop-ID Net Hops Hop-ID – datagram's circle around along redundant paths 1 0 direct 1 1 2.A – "Count to Infinity" -problem 2 0 direct 2 0 direct 3 1 2.B 3 0 direct

Routing tables keep stable state © 2009, D.I. Manfred Lindner RIP, v4.6 17 © 2009, D.I. Manfred Lindner RIP, v4.6 19

Agenda Count to Infinity 1

• RIP Principles Router A Router B

• RIP Problems Net 1Net 2Net 3 • RIP Workarounds – maximum hop count Net Hops Net Hops Router A: 1 1 1 2 Router B: – split horizon routing update routing update 2 1 2 1 to net 2 – poison reverse to net 2 3 2 3 1 – triggered update – hold down Routing table A Routing table B RIP version 2 Net Hops Hop-ID Net Hops Hop-ID • 1 0 direct 1 1 2.A 2 0 direct 2 0 direct 3 1 2.B 3 0 direct

Initial situation © 2009, D.I. Manfred Lindner RIP, v4.6 18 © 2009, D.I. Manfred Lindner RIP, v4.6 20

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 9 Page 40 - 10 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Count to Infinity 2 Count to Infinity 4

Router A Router B Router A Router B

Net 1Net 2Net 3 Net 1 Net 2 Net 3

Net Hops 1 2 Router B: routing update 2 1 to net 2 3 3

Routing table A Routing table B Routing table A Routing table B Net Hops Hop-ID Net Hops Hop-ID Net Hops Hop-ID Net Hops Hop-ID 1 0 direct 1 1 2.A 1 0 direct 1 1 2.A 2 0 direct 2 0 direct 2 0 direct 2 0 direct 3 1 2.B 3 ? ? 3 3 2.B 3 2 2.A

Failure: net 3 unreachable Situation after sending B's routing update © 2009, D.I. Manfred Lindner RIP, v4.6 21 © 2009, D.I. Manfred Lindner RIP, v4.6 23

Count to Infinity 3 Count to Infinity 5

Router A Router B Router A Router B

Net 1 Net 2 Net 3 Net 1 Net 2 Net 3

Net Hops Net Hops problem: routing updates do not Router A: Router A: routing 1 1 1 1 contain explicit VECTOR- routing update update to net 2 2 1 2 1 information !! to net 2 3 2 3 4 (Vector is given only implicitly through source address) Routing table A Routing table B Routing table A Routing table B Net Hops Hop-ID Net Hops Hop-ID Net Hops Hop-ID Net Hops Hop-ID 1 0 direct 1 1 2.A 1 0 direct 1 1 2.A 2 0 direct 2 0 direct 2 0 direct 2 0 direct 3 1 2.B 3 2 2.A 3 3 2.B 3 4 2.A

Situation after sending A's routing update Situation after sending A's next routing update © 2009, D.I. Manfred Lindner RIP, v4.6 22 © 2009, D.I. Manfred Lindner RIP, v4.6 24

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 11 Page 40 - 12 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Solutions against Count to Infinity Maximum Hop Count

• problem: good news are distributed faster than • maximal distance between each two subnets is bad news limited to 16 – hop count between two end-systems cannot exceed 15 – the information of a path with lower hop-count is distributed every 30 seconds • a DISTANCE-value of 16 in the routing-table – the information of a network-failure is distributed at least means that the corresponding network is not after 180 (or later) reachable • remedy: – using hop count = 16 in a routing update allows a router to – Maximum Hop Count indicate the failure of a network – Split Horizon – we have not to age out this entry in all routing tables hence waiting at least for 180 s – Poison Reverse – IP-datagram's with a net-ID pointing to such an entry are – Triggered Update discarded by the router and additionally a ICMP message –Hold Down "network unreachable" is generated

© 2009, D.I. Manfred Lindner RIP, v4.6 25 © 2009, D.I. Manfred Lindner RIP, v4.6 27

Agenda Agenda

• RIP Principles • RIP Principles • RIP Problems • RIP Problems • RIP Workarounds • RIP Workarounds – maximum hop count – maximum hop count – split horizon – split horizon – poison reverse – poison reverse – triggered update – triggered update – hold down – hold down • RIP version 2 • RIP version 2

© 2009, D.I. Manfred Lindner RIP, v4.6 26 © 2009, D.I. Manfred Lindner RIP, v4.6 28

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 13 Page 40 - 14 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Split Horizon 1 Split Horizon 3

• Maximum Hop Count technique alone Router A Router B (counting to 16) does not avoid routing-loops ! Net 1Net 2Net 3 • to overcome routing-loops and also slow- convergence, Split-Horizon has been Net Hops Net Hops 1 2 Router B: introduced Router A: routing routing update 2 1 2 1 update to net 1 to net 3 – prevents router from sending information about 3 2 reachability of networks in that direction from where the information originally came Routing table A Routing table B • exception of this rule: Net Hops Hop-ID Net Hops Hop-ID 1 0 direct 1 1 2.A – if the router knows a better path 2 0 direct 2 0 direct 3 1 2.B 3 0 direct

Routing update to net1 and net 3 © 2009, D.I. Manfred Lindner RIP, v4.6 29 © 2009, D.I. Manfred Lindner RIP, v4.6 31

Split Horizon 2 Net 3 unreachable

Router A Router B Router A Router B

Net 1Net 2Net 3 Net 1 Net 2 Net 3

Net Hops Net Hops Net Hops Router A: 1 1 Router B: Router A: 1 1 routing update routing update routing update to net 2 to net 2 3 1 to net 2

Routing table A Routing table B Routing table A Routing table B Net Hops Hop-ID Net Hops Hop-ID Net Hops Hop-ID Net Hops Hop-ID 1 0 direct 1 1 2.A 1 0 direct 1 1 2.A 2 0 direct 2 0 direct 2 0 direct 2 0 direct 3 1 2.B 3 0 direct 3 1 2.B 3 16 -

Routing update to net 2 Situation after sending A's routing update © 2009, D.I. Manfred Lindner RIP, v4.6 30 © 2009, D.I. Manfred Lindner RIP, v4.6 32

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 15 Page 40 - 16 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Net 3 unreachable RIP At Work (Update Router A)

Router A Router B NET Hops IF NET Hops IF 1.0.0.0 direct e0 2.0.0.0 direct e0 Net 1 Net 2 Net 3 12.0.0.0 direct s0 12.0.0.0 direct s0 31.0.0.0 direct s1 23.0.0.0 direct s1 DA=∗, SA=A 1.0.0.0 1 s0 NET Hops 31.0.0.0 1 s0 1.0.0.0 1 Net Hops 31.0.0.0 1 Router B: 1.0.0.0 2.0.0.0 e0 Router As0 Router B e0 routing update 12.0.0.0 s0 to net 2 s1 s1 31 3 16 DA= , SA=A . ∗ 0. .0 NET Hops 0. .0 0 .0 3 1.0.0.0 1 2 Routing table A Routing table B 12.0.0.0 1 Net Hops Hop-ID Net Hops Hop-ID s0 s1 1 0 direct 1 1 2.A NET Hops IF Router C 3.0.0.0 direct e0 e0 2 0 direct 2 0 direct 31.0.0.0 direct s0 3 16 2.B 3 16 - 23.0.0.0 direct s1 1.0.0.0 1 s0 3.0.0.0 12.0.0.0 1 s0 Situation after sending B's routing update © 2009, D.I. Manfred Lindner RIP, v4.6 33 © 2009, D.I. Manfred Lindner RIP, v4.6 35

Split Horizon Facts RIP At Work (Update Router B)

• Don't tell neighbour of routes that you learned NET Hops IF NET Hops IF 1.0.0.0 direct e0 2.0.0.0 direct e0 from this neighbour 12.0.0.0 direct s0 12.0.0.0 direct s0 31.0.0.0 direct s1 23.0.0.0 direct s1 • That's what humans (almost) always do: 2.0.0.0 1 s0 DA=∗, SA=B 1.0.0.0 1 s0 23.0.0.0 1 s0 NET Hops 31.0.0.0 1 s0 Don't tell me what I have told you! 2.0.0.0 1 23.0.0.0 1 1.0.0.0 2.0.0.0 Using split horizon a router will not send Router A Router B • e0 s0 s0 e0 s1 12.0.0.0 s1 information about routes he isn't really aware of 3 1. 0. .0 0. .0 0 .0 DA=∗, SA=B • the convergence time 3 2 NET Hops – is reduced to the time of failure-detection (180 s) 2.0.0.0 1 s0 s1 12.0.0.0 1 1.0.0.0 2 – note: method of Maximum Hop Count alone would take 16 Router C NET Hops IF 31.0.0.0 2 3.0.0.0 direct e0 x 30 s = 480 s in the worst case e0 31.0.0.0 direct s0 23.0.0.0 direct s1 1.0.0.0 1 s0 3.0.0.0 12.0.0.0 1 s0 2.0.0.0 1 s1

© 2009, D.I. Manfred Lindner RIP, v4.6 34 © 2009, D.I. Manfred Lindner RIP, v4.6 36

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 17 Page 40 - 18 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

RIP At Work (Update Router C) Poison Reverse 1

NET Hops IF NET Hops IF • alternative method against routing loops and 1.0.0.0 direct e0 2.0.0.0 direct e0 12.0.0.0 direct s0 12.0.0.0 direct s0 slow convergence: Poison Reverse 31.0.0.0 direct s1 23.0.0.0 direct s1 2.0.0.0 1 s0 1.0.0.0 1 s0 • router sends not-reachability messages 23.0.0.0 1 s0 31.0.0.0 1 s0 3.0.0.0 1 s1 3.0.0.0 1 s1 (="poison") via routing-updates in the direction 1.0.0.0 2.0.0.0 from which the information about this network e0 Router As0 Router B e0 12.0.0.0 s0 s1 s1 originally came 31 DA=∗, SA=C .0 0 .0 . NET Hops . .0 DA=∗, SA=C 0 .0 • so the convergence time is reduced to the time 3 3.0.0.0 1 2 NET Hops 23.0.0.0 1 3.0.0.0 1 of failure-detection (180 s) 2.0.0.0 2 31.0.0.0 1 s0 s1 1.0.0.0 2 – method of Maximum Hop Count would take 16 x 30 s = NET Hops IF Router C 12.0.0.0 2 3.0.0.0 direct e0 480 s ! e0 31.0.0.0 direct s0 23.0.0.0 direct s1 1.0.0.0 1 s0 3.0.0.0 12.0.0.0 1 s0 2.0.0.0 1 s1

© 2009, D.I. Manfred Lindner RIP, v4.6 37 © 2009, D.I. Manfred Lindner RIP, v4.6 39

Agenda Poison Reverse 2

• RIP Principles Router A Router B

• RIP Problems Net 1Net 2Net 3 • RIP Workarounds – maximum hop count Net Hops Net Hops Router A: 1 1 1 16 Router B: – split horizon routing update routing update 2 16 2 16 to net 2 – poison reverse to net 2 3 16 3 1 – triggered update – hold down Routing table A Routing table B RIP version 2 Net Hops Hop-ID Net Hops Hop-ID • 1 0 direct 1 1 2.A 2 0 direct 2 0 direct 3 1 2.B 3 0 direct

Routing update to net1 and net 2 © 2009, D.I. Manfred Lindner RIP, v4.6 38 © 2009, D.I. Manfred Lindner RIP, v4.6 40

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 19 Page 40 - 20 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Net 3 unreachable Agenda

Router A Router B • RIP Principles

Net 1 Net 2 Net 3 • RIP Problems • RIP Workarounds Net Hops – maximum hop count Router A: 1 1 – split horizon routing update 2 16 to net 2 3 16 – poison reverse – triggered update Routing table A Routing table B – hold down Net Hops Hop-ID Net Hops Hop-ID RIP version 2 1 0 direct 1 1 2.A • 2 0 direct 2 0 direct 3 1 2.B 3 16 -

Situation after sending A's routing update © 2009, D.I. Manfred Lindner RIP, v4.6 41 © 2009, D.I. Manfred Lindner RIP, v4.6 43

Net 3 unreachable Triggered Update

Router A Router B • Triggered Update has been introduced in order

Net 1 Net 2 Net 3 to speed up the convergence time • after notice of a network-failure the router generates immediately a routing-update to Net Hops 1 16 Router B: indicate this failure routing update 2 16 to net 2 – setting hop-count = 16 3 16 – note: the router does not wait for the expiration of the 30 s

Routing table A Routing table B • Triggered Update can also be used when other Net Hops Hop-ID Net Hops Hop-ID events occur (e.g. additional links) 1 0 direct 1 1 2.A 2 0 direct 2 0 direct • Triggered Update without employing additional 3 16 2.B 3 16 - methods (like Split Horizon) cannot avoid routing-loops Situation after sending B's routing update © 2009, D.I. Manfred Lindner RIP, v4.6 42 © 2009, D.I. Manfred Lindner RIP, v4.6 44

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 21 Page 40 - 22 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Agenda Hold Down

• RIP Principles • basic idea: • RIP Problems – network-failure message requires a specific amount of time to spread across the whole network (like a wave) • RIP Workarounds – with Hold Down, all routers get the chance to receive the – maximum hop count network-failure message – split horizon – steady-state will be awaited to avoid inconsistent routing- – poison reverse tables and rooting-loops – triggered update • disadvantages of Hold Down – hold down – longer convergence time... • RIP version 2 – ...can be a drawback at all (in special cases)

© 2009, D.I. Manfred Lindner RIP, v4.6 45 © 2009, D.I. Manfred Lindner RIP, v4.6 47

Hold Down Split Horizon 1

• Split Horizon is a good means to avoid RT2: Net3, 2H, S0 temporary routing-loops and to improve the R 2 RT1: convergence time in simple network topologies Net3, 3H, S0 RT5: RT4: Net3, 0H, E1 • complex network topologies require an S1 S0 Net3, 1H, E0 additional tool to avoid temporary rooting-loops: Net3, 3H R 5 Hold Down S0 Split S0 E0 R 1 Net3, 4H R 4 Horizon E0 E1 • if a router gets information about a network S1

failure, it ignores further informations about that Net 2 Net 3 network from other routers for a specific S0 Net3, 3H duration of time higher metric – typically 240 seconds R 3 RT3: Net3, 2H, S0

© 2009, D.I. Manfred Lindner RIP, v4.6 46 © 2009, D.I. Manfred Lindner RIP, v4.6 48

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 23 Page 40 - 24 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Split Horizon 2 Split Horizon 4

RT2: RT2: Net3, 2H, S0 Net3, 16H, S0 R 2 R 2 RT1: RT1: Net3, 3H, S0 RT5: Net3, 3H, S0 RT5: Net3, 16H RT4: Net3, 0H, E1 RT4: Net3, 16H, E1 S1 S0 Net3, 1H, E0 S1 S0 Net3, 16H, E0 Net3, 3H R 5 R 5 S0 Split S0 E0 S0 S0 E0 R 1 Net3, 4H R 4 R 1 R 4 S1 Horizon E0 E1 S1 E0 E1 S1 S1

Net3, 4H Net 2 Net 3 Net 2 Net 3 S1 S0 S1 S0 Net3, 3H Net3, 16H Net3-failure later higher stable situation: R2 tells R1 messages reaches update about net3 earlier than R3 metric R 3 R 3 R2 and R3 RT3: RT3: Net3, 2H, S0 ……. Bit-bucket Net3, 16H, S0

© 2009, D.I. Manfred Lindner RIP, v4.6 49 © 2009, D.I. Manfred Lindner RIP, v4.6 51

Split Horizon 3 Split Horizon 5

RT2: RT2: Net3, 2H, S0 Net3, 16H, S0 R 2 R 2 RT1: RT1: Net3, 3H, S0 RT5: Net3, 3H, S0 RT5: RT4: Net3, 16H, E1 RT4: Net3, 16H, E1 S1 S0 Net3, 16H, E0 S1 S0 Net3, 16H, E0

R 5 R 5 S0 S0 E0 S0 S0 E0 R 1 R 4 R 1 R 4 S1 E0 E1 S1 E0 E1 S1 S1 Net3, 16H Net3, 4H Net 2 Net 3 Net 2 Net 3 S1 S0 S1 S0 R1 sends its routing- R5 tells R4 about lower update to R3 before R 3 Net3 failure metric R 3 RT3: RT3: Net3, 16H, S0 R1 is receiving the Net3, 2H, S0 Net3, 4H, S1 net3-failure-message © 2009, D.I. Manfred Lindner RIP, v4.6 50 © 2009, D.I. Manfred Lindner RIP, v4.6 52

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 25 Page 40 - 26 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Split Horizon 6 Hold Down 2

RT2: RT2: HD Net3, 6H, S0 Net3, 16H, S0 R 2 R 2 RT1: RT1: Net3, 7H, S0 RT5: Net3, 3H, S0 RT5: Net3, 16H Net3, 6H RT4: Net3, 6H, E0 RT4: HD Net3, 16H, E1 S1 S0 Net3, 5H, S1 S1 S0 Net3, 16H, E0 Net3, 7H R 5 R 5 S0 S0 E0 S0 S0 E0 R 1 R 4 R 1 R 4 S1 E0 E1 S1 E0 E1 S1 S1

Net3, 8H Net 2 Net 3 Net 2 Net 3 S1 S0 S1 S0 Net3, 5H Net3, 16H Net3-failure messages lower R1 initiates a count to reaches R2 and R3 metric R 3 RT3: R 3 Net3, 4H, S1 infinity !! RT3: HD R2 and R3 are in hold- Net3, 8H, S1 Net3, 16H, S0 down state © 2009, D.I. Manfred Lindner RIP, v4.6 53 © 2009, D.I. Manfred Lindner RIP, v4.6 55

Hold Down 1 Hold Down 3

RT2: RT2: HD Net3, 2H, S0 Net3, 16H, S0 R 2 R 2 RT1: RT1: Net3, 3H, S0 RT5: Net3, 3H, S0 RT5: RT4: HD Net3, 16H, E1 RT4: HD Net3, 16H, E1 S1 S0 Net3, 16H, E0 S1 S0 Net3, 16H, E0

R 5 R 5 S0 S0 E0 S0 S0 E0 R 1 R 4 R 1 R 4 S1 E0 E1 S1 E0 E1 S1 S1 Net3, 16H Net3, 4H Net 2 Net 3 Net 2 Net 3 S1 S0 S1 S0 R5 tells R4 about Net3 failure R1's routing update is R 3 R 3 ignored because R3 RT3: R4 in hold-down state (HD) RT3: HD is in hold-down state ! Net3, 2H, S0 Net3, 16H, S0

© 2009, D.I. Manfred Lindner RIP, v4.6 54 © 2009, D.I. Manfred Lindner RIP, v4.6 56

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 27 Page 40 - 28 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Hold Down 4 Further RIP-Problems

RT2: HD • load balancing over redundant paths with same Net3, 16H, S0 R 2 hop counts is not possible RT1: HD Net3, 16H, S0 RT5: • routing-updates always contain the whole RT4: HD Net3, 16H, E1 S1 S0 Net3, 16H, E0 routing-table !! Net3, 16H – problematical in large networks (many net-ID entries) R 5 S0 S0 E0 • periodic routing updates produce a permanent R 1 R 4 S1 E0 E1 S1 network load – especially WAN-links are most affected Net 2 Net 3 S1 S0 • RIP-updates are sent in 512 byte blocks, 24 Net3 failure message entries each -> larger networks require several reached R1 R 3 routing-updates, which take some seconds on RT3: HD R1 changes into hold-down slower links Net3, 16H, S0 state; no count to infinity ! © 2009, D.I. Manfred Lindner RIP, v4.6 57 © 2009, D.I. Manfred Lindner RIP, v4.6 59

Timer Synchronization / RIP Timers Agenda

• timer synchronization • RIP Principles – in case of many routers on a single network processing load might affect update timer • RIP Problems – routers might get synchronized and collisions occur more often • RIP Workarounds – therefore either use – maximum hop count • External timer or add a small random time to the update timer (30 seconds + RIP_JITTER = 25...35 seconds) – split horizon • RIP timers and their values – poison reverse – UPDATE (30 seconds) – triggered update • period to send routing update – INVALID (180 seconds) – hold down • aging time before declaring a route invalid ("16") in the routing table – HOLDDOWN (180 seconds) • RIP version 2 • how long a router will wait before accepting an update with better metric for an invalid route – FLUSH (240 seconds) • time before a non-refreshed routing table entry is removed

© 2009, D.I. Manfred Lindner RIP, v4.6 58 © 2009, D.I. Manfred Lindner RIP, v4.6 60

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 29 Page 40 - 30 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

RIP Version 2 Message Fields of RIPv2 1

• RFC 2453 specifies a new, extended RIP version: • version = 2 (RIPv2) – RIPv2 is RFC category “Standard” • IP address of net x, distance to net x, command – RIPv1 is RFC category “Historic” fields • RIPv2 is an alternative choice to OSPF – have the same meaning as for RIPv1 • RIPv2 utilizes the unused fields of the RIPv1 • subnet mask message-format – contains the subnet-mask to the "IP address"-field • several new features are supported: – now discontiguos subnetting and variable length subnet – Routing Domains masks (VLSM) are supported – transmission of subnet-masks • RIPv2 is a classless – transmission of next hop redirect information – route advertisements via EGP - protocols – authentication

© 2009, D.I. Manfred Lindner RIP, v4.6 61 © 2009, D.I. Manfred Lindner RIP, v4.6 63

RIPv2 Header plus RIPv2 Data Message Fields of RIPv2 2

0 8 16 31 • routing domain command version routing domain – indicates the routing-process for which the routing- family of net 1 route tag update is destined IP address of net 1 – now routers can support several domains within the subnet mask same subnet next hop • route tag distance to net 1 – contains the autonomous system number for EGP and family of net 2 route tag BGP IP address of net 2 subnet mask – on receiving a routing-update with a routing tag unequal next hop zero, the associated path must be distributed to other distance to net 2 routers; so interior routers notice the existence of exterior networks (tagging exterior routes) family of net 3 route tag ......

© 2009, D.I. Manfred Lindner RIP, v4.6 62 © 2009, D.I. Manfred Lindner RIP, v4.6 64

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 31 Page 40 - 32 Institute of Computer Technology - Vienna University of Technology Institute of Computer Technology - Vienna University of Technology

L40 - RIP L40 - RIP

Message Fields of RIPv2 3 RIP2 Header plus Authentication

• next hop 0 8 16 31 – datagram's for the network specified in the "IP address" - command version routing domain field have to be redirected to that router whose IP hex FFFF authentication type address is specified in the "next hop" field authentication – this next-hop router must be located in the same subnet authentication as the sender of the routing-update authentication – a next hop value of 0.0.0.0 indicates, that the sender- authentication router acts as next hop itself for the given network family of net 1 route tag – so in cases when there are several routers in a subnet, IP address of net 1 just one router needs to send a routing-update subnet mask next hop – using RIPv2 this router announces which networks can be reached over other routers distance to net 1 family of net 2 route tag ......

© 2009, D.I. Manfred Lindner RIP, v4.6 65 © 2009, D.I. Manfred Lindner RIP, v4.6 67

Next Hop and Route Tag Authentication

• family of net = hex FFFF 2 2 2 65502 22.22.22.0 – this value registered in the first family of net entry 255.255.255.0 10.0.0.5 announces 16 authentication octets to follow 1 2 65502 – currently only a single type (type = 2) defined with a 77.77.77.0 255.255.255.0 simple (clear text) password protection 10.0.0.6 3 – Cisco supports also type 3 based on Message Digest 5 (MD5) 10.0.0.1/24 10.0.0.2/24 10.0.0.3/24 10.0.0.4/24 10.0.0.5/24 10.0.0.6/24 – routing updates without valid authentication are ignored by the receiving router (only trusted router are accepted) RIPv2 RIPv2 • family of net unequal hex FFFF AS 65501 AS 65502 – has the same meaning as for RIP1

22.22.22.0/24 77.77.77.0/24

© 2009, D.I. Manfred Lindner RIP, v4.6 66 © 2009, D.I. Manfred Lindner RIP, v4.6 68

© 2009, D.I. Manfred Lindner © 2009, D.I. Manfred Lindner

Page 40 - 33 Page 40 - 34 Institute of Computer Technology - Vienna University of Technology

L40 - RIP

Treatment of Routing Updates

• RIPv2 uses a class D multicast-address (224.0.0.9) – no use of broadcast messages (like RIPv1 does) – only a router who is member of this group will receive and must process this routing update • remember: – RIPv1 used broadcast addresses – Seen by each IP host – Slows down stations

© 2009, D.I. Manfred Lindner RIP, v4.6 69

Compatibility RIPv1 <-> RIPv2

• RIPv1 Compatibility Mode – version number >1 and family of net = hexFFFF indicates RIPv2 – RIPv1 routers will ignore header extensions – RIPv2 router uses broadcast addresses • RIPv1 Mode – RIPv2 sends RIPv1 messages • RIPv2 Mode – Send genuine RIPv2 messages – RIPv2 messages are sent as multicasts

© 2009, D.I. Manfred Lindner RIP, v4.6 70

© 2009, D.I. Manfred Lindner

Page 40 - 35