RIP Version 2. The Classless Brother

Similar documents
RIPv2. Routing Protocols and Concepts Chapter 7. ITE PC v4.0 Chapter Cisco Systems, Inc. All rights reserved. Cisco Public

TDC 363 Introduction to LANs

Routing Protocols Classification

Basic Idea. Routing. Example. Routing by the Network

Routing by the Network

RIP Configuration. RIP Overview. Operation of RIP. Introduction. RIP routing table. RIP timers

Introduction to IP Routing

SEMESTER 2 Chapter 4 Distance Vector Routing Protocols V 4.0 RIP, IGRP, EIGRP

Routing Information Protocol

Routing Information Protocol. RIP application. RIP version 1

Configuring RIP. RIP Configuration Task List

Chapter 7 Routing Protocols

IP Router. Introduction to IP Routing. Agenda. IP Routing 1

Distance Vector Routing Protocols

Routing Information Protocol. RIP application. RIP version 1

Routing Information Protocol

Top-Down Network Design

Routing Information Protocol. A simple distance vector scheme

Introduction to Local and Wide Area Networks

RFC Compliance Test Report. Release 3.0

Exam : : Building Scalable Cisco Internetworks (BSCI) Title. Ver :

Claim desired outcome

Building the Routing Table. Introducing the Routing Table Directly Connected Networks Static Routing Dynamic Routing Routing Table Principles

RIP Commands. output-delay, page 32 passive-interface (RIP), page 33 poison-reverse, page 35 receive version, page 37 redistribute (RIP), page 39

Configuring RIP. Information About RIP CHAPTER

Distance vector and RIP

Introduction to Routing

College of DuPage. CCNA3 V3.0 Switching Basics and Intermediate Routing: Module 1: Introduction to Classless Routing

shortcut Tap into learning NOW! Visit for a complete list of Short Cuts. Your Short Cut to Knowledge

Chapter 7: Routing Dynamically. Routing & Switching

Chapter 5 RIP version 1

Default & Static Routes and Routing Information Protocol. Presented by : Mohammed Hamad

Unit 3: Dynamic Routing

Routing Protocols of IGP. Koji OKAMURA Kyushu University, Japan

Network Working Group. Obsoletes: 1388 November 1994 Updates: 1058 Category: Standards Track

IP Routing: RIP Configuration Guide, Cisco IOS XE Release 3SE (Catalyst 3650 Switches)

Chapter 4: VLSM and Classless Inter Domain Routing. ITE PC v4.0 Chapter Cisco Systems, Inc. All rights reserved.

Operation Manual IPv4 Routing H3C S3610&S5510 Series Ethernet Switches. Table of Contents

Top-Down Network Design, Ch. 7: Selecting Switching and Routing Protocols. Top-Down Network Design. Selecting Switching and Routing Protocols

Network Protocols. Routing. TDC375 Autumn 03/04 John Kristoff - DePaul University 1

The most simple way to accelerate a Router is at 9.8 m/sec/sec.

Basic IP Routing. Finding Feature Information. Information About Basic IP Routing. Variable-Length Subnet Masks

Routing Architecture. Objectives. Module 2 Routing Fundamentals. Author: Rolf Augstein January 2006

Table of Contents 1 Static Routing Configuration RIP Configuration 2-1

9.1. Routing Protocols

CCNA EXPLORATION V4.0 ROUTING PROTOCOLS AND CONCEPTS ACCESSIBLE INSTRUCTOR MATERIALS POWERPOINT OBJECTIVES

Basic IP Routing. Finding Feature Information. Information About Basic IP Routing. Variable-Length Subnet Masks

CCNA EXPLORATION V4.0 ROUTING PROTOCOLS AND CONCEPTS

Keywords RIP, OSPF, IGP, EGP, AS, LSA

Antonio Cianfrani. Routing Protocols

Draft Manuscript Draft M. Manuscript Draft Ma. t Manuscript Draft Manu. ipt Draft Manuscript Dra. anuscript Draft Manuscri

Configuring IP Summary Address for RIPv2

Configuring EIGRP. 2001, Cisco Systems, Inc.

EECS 122, Lecture 16. Link Costs and Metrics. Traffic-Sensitive Metrics. Traffic-Sensitive Metrics. Static Cost Metrics.

Network Protocols. Routing. TDC375 Winter 2002 John Kristoff - DePaul University 1

IP Routing Volume Organization

Routing Between Autonomous Systems (Example: BGP4) RFC 1771

8. Refer to the exhibit. The ORL router is unable to form a neighbor relationship with the JAX router. What is a possible cause of this problem?

Configuring Routing Information Protocol

Planning for Information Network

CCNA IP ROUTING. Revision no.: PPT/2K605/03

Part II. Chapter 3. Determining IP Routes

CHAPTER 4: ROUTING DYNAMIC. Routing & Switching

Configuring Networking Protocols

IP Routing: RIP Command Reference, Cisco IOS XE Release 3SE (Catalyst 3850 Switches)

Configuring IP Routing Protocols

Two types of routing protocols are used in internetworks: interior gateway protocols (IGPs) and exterior gateway protocols (EGPs).

IP Routing Protocol-Independent Commands

Internet Interconnection Structure

Chapter 7. RIP Version 2 (RIPv2)

CS118 Discussion Week 7. Taqi

Configuring OSPF. Cisco s OSPF Implementation

Chapter 5. RIP Version 1 (RIPv1) CCNA2-1 Chapter 5

OSPF Commands. Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols IP2R-61

Allows IGRP or Enhanced IGRP exterior routes to be advertised in updates.

CompSci 356: Computer Network Architectures. Lecture 12: Dynamic routing protocols: Link State Chapter Xiaowei Yang

Which of the following are primary functions of a router? (Choose two.) - packet switching - path selection

Routing & Protocols 1

Introduction to Dynamic Routing Protocols

Configuring BGP. Cisco s BGP Implementation

Configuring IP Unicast Routing

Chapter 3. Introduction to Dynamic Routing Protocols. CCNA2-1 Chapter 3

Routing, Routing Algorithms & Protocols

Section 6. Implementing EIGRP ICND2

Determining IP Routes. 2000, Cisco Systems, Inc. 9-1

IP Enhanced IGRP Commands

CSCE 463/612 Networks and Distributed Processing Spring 2018

Al-Mustansiriyah University Fourth Year ( )

Lecture 12. Introduction to IP Routing. Why introduction? Routing

Internet Routing Protocols Tuba Saltürk

Routing Protocols and

RIP version 1. Routing Protocols and Concepts Chapter 5. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

Configuring IGRP. The Cisco IGRP Implementation

Configuring EIGRP. Finding Feature Information

Configuring IP Routing Protocols

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

FiberstoreOS IP Routing Configuration Guide

Routing Protocol comparison

CCNA 3 (v v6.0) Chapter 7 Exam Answers % Full

FSOS IP Routing Configuration Guide

Transcription:

RIP Version 2 The Classless Brother (C) Herbert Haas 2005/03/11 1

Why RIPv2 Need for subnet information and VLSM Need for Next Hop addresses for each route entry Need for external route tags Need for multicast route updates RFC 2453 (C) Herbert Haas 2005/03/11 2 Because Subnetting and VLSM get more important RIPv2 was created. RIPv2 was introduced in RFC 1388, "RIP Version 2 Carrying Additional Information", January 1993. This RFC was obsolete in 1994 by RFC 1723 and finally RFC 2453 is the final document about RIPv2. In comparison with RIPv1 the new RIPv2 also support several new features such as, routing domains, route advertisements via EGP protocols or authentication. 2

Multicast Updates RIPv1 used DA=broadcast Seen by each IP host Slows down other IP stations RIPv2 uses DA=224.0.0.9 Only RIPv2 routers will receive it (C) Herbert Haas 2005/03/11 3 RIPv2 uses the IP-Address 224.0.0.9 to transfer his routing updates. With this advantage only RIPv2 routers see this messages, and will not slow down the different station (RIPv1 and broadcast addresses). RIPv2 is also an alternative choice to OSPF. 3

Message Format Command Version Unused or Routing Domain Address Family Identifier Route Tag IP Address Subnet Mask Next Hop Metric Address Family Identifier Route Tag IP Address Subnet Mask Next Hop Metric......... Up to 25 route entries (C) Herbert Haas 2005/03/11 4 RIPv2 utilizes the unused fields of the RIPv1 message-format. New fields are the routing tag, subnet mask and the next hop. 4

Version and Routing Domain RIPv1 used version "1" RIPv2 uses version "2" (*surprise*) According RFC the next two bytes are unused However, some implementations carry the routing domain here Simply a process number (C) Herbert Haas 2005/03/11 5 The routing domain indicates the routing-process for which the routing-update is destined. Now routers can support several domains within the same subnet. 5

Subnet Mask RIPv2 is a classless routing protocol For each route a subnet mask is carried Discontinuous Subnetting and VLSM is supported (C) Herbert Haas 2005/03/11 6 Remember RIP is an classful routing protocol, because RIPv1 does not bind subnet-masks to the routes. So RIPv1 assumes classful addressing. 6

Next Hop Identifies a better next hop address than implicitly given (SA) Only if one exists (better metric) 0.0.0.0 if the sender is next hop Especially useful on broadcast multiaccess network for peering Indirect routing on a broadcast segment would be...silly. (C) Herbert Haas 2005/03/11 7 With the next hop router announces which networks can be reached over other routers. Note that the next-hop router must be located in the same subnet as the sender of the routing-update. 7

Route Tag To distinguish between internal routes (learned via RIP) and external routes (learned from other protocols) Typically AS number is used Not used by RIPv2 process External routing protocols may use the route tag to exchange information across a RIP domain (C) Herbert Haas 2005/03/11 8 Route Tag contains the autonomous system number for EGP and BGP. When the router receive a routing-update with a routing tag unequal zero, the associated path must be distributed to other routers. In that way interior routers notice the existence of exterior networks (tagging exterior routes). For example if routes were redistributed from EGP into RIPv2, these routes can be tagged. 8

Next Hop and Route Tag 2 2 2 65502 22.22.22.0 255.255.255.0 10.0.0.5 1 2 65502 77.77.77.0 255.255.255.0 10.0.0.6 3 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 RIPv2 AS 65501 + RIPv2 BGP AS 65502 22.22.22.0/24 77.77.77.0/24 (C) Herbert Haas 2005/03/11 9 In the picture above there are two different autonomous systems on the same LAN. The routers in the first AS use RIPv2 the second AS use BGP. Each entry assigned a AS number (65501/65502). The Left AS could apply policies on these special (external) routes or redistribute them with BGP to some other ASs. Note that only 10.0.0.4 speaks RIPv2, so for efficiency only this one advertises the external routes (22.22.22.0/77.77.77.0) but by indicating the true next hops. This is an important special rule on shared medium (true next hops must be indicated)! 9

Authentication Hackers might send invalid routing updates RIPv2 introduces password protection as authentication Initially only Authentication Type 2 defined 16 plaintext characters (!) RFC 2082 proposes keyed MD-5 authentication (Type 3) Multiple keys can be defined, updates contain a key-id And a unsigned 32 bit sequence number to prevent replay attacks Cisco IOS supports MD5 authentication (Type 3, 128 bit hash) (C) Herbert Haas 2005/03/11 10 IF a router receives routing updates without valid authentication are ignored by the receiving router, because only trusted router are accepted. When using MD5 authentication, the first but also the last routing entry space is used for authentication purposes. The MD5 hash is calculated using the routing update plus a password. Thus, authentication and message integrity is provided. The "Authentication Type" is Keyed Message Digest Algorithm, indicated by the value 3 (1 and 2 indicate "IP Route" and "Password", respectively) 10

Authentication Command Version Unused or Routing Domain 0xFFFF Authentication Type Password Password Password Password Address Family Identifier Route Tag IP Address Subnet Mask Next Hop Metric......... Up to 24 route entries (C) Herbert Haas 2005/03/11 11 The picture above shows a RIPv2 Message which contains authentication entry's. The password is only a plain text. If the password is under 16 octets, it must be left-justified and padded to the right with nulls. 11

Key Chain Cisco's implementation offers key chains Multiple keys (MD5 or plaintext) Each key is assigned a lifetime (date, time and duration) Can be used for migration Key management should rely on Network Time Protocol (NTP) (C) Herbert Haas 2005/03/11 12 Several independent routing domains running RIPv2 with different process numbers ("routing domain"). With using key chains this domains can be work together (synchronize) at a special time or date. 12

RIPv1 Inheritance (1) All timers are the same UPDATE INVALID HOLDDOWN FLUSH Same convergence protections Split Horizon Poison Reverse Hold Down Maximum Hop Count (also 16!!!) (C) Herbert Haas 2005/03/11 13 RIPv1 uses many timers to regulate its performance. This timers are the same in RIPv2. The routing update timer is set to 30 seconds, with a small random amount of time added whenever the timer is reset. A route is declared invalid without being refreshed by routing updates during 90 seconds. The holddown status retains 180 seconds. In this time a router ignore update messages about a special network. After 240 Seconds (Flush timer) a non-refreshed routing table entry will be removed. RIPv2 also using the same convergence protections such as Split Horizon, Hold Down, etc. Note that the Maximum Hop Count is still 16 to be backwards compatibility. 13

RIPv1 Inheritance (2) Same UDP port 520 Also maximum 25 routes per update Equally 512 Byte payloads (C) Herbert Haas 2005/03/11 14 RIPv2 also inherit the bad consequences of this small routing updates. What happened if we want to advertise MANY routes with many single updates. There will be a big overhead (IP + UDP + RIP header). 14

RIPv1 Compatibility RIPv1 Compatibility Mode RIPv2 router uses broadcast addresses RIPv1 routers will ignore header extensions RIPv2 performs route summarization on address class boundaries Disable: (config-router)# no auto-summary RIPv1 Mode RIPv2 sends RIPv1 messages RIPv2 Mode Send genuine RIPv2 messages (C) Herbert Haas 2005/03/11 15 RIPv2 is totally backwards compatible with existing RIP implementations. There is also an compatibility switch, which allows to chance between three different settings: 1. RIP-1 Modus. Only RIP-1 packets are sent 2. RIP-1 compatibility Modus. RIP-2 packets are broadcast 3. RIP-2 Modus. RIP-2 packets are multicast. The recommended default for this switch is RIP-1 compatibility. 15

Classful Routing routing protocols like RIP, IGRP cannot carry subnetmask information in routing updates this has several consequences if a given class A, B or C address is subnetted the subnetmask must be constant in the whole area no variable length subnet mask (VLSM) can be used if a routing update is sent to an interface with an network number different to the subnetted network only the major class A, B or C network number will be announced route summarization will be performed on class boundaries hence a subnetted area must be contiguous classful routing 2005/03/11 16 16

Classful Routing 10.1.0.0 10.2.0.0 10.7.0.0 10.5.0.0 10.6.0.0 routing update with summarization on class boundary 10.0.0.0 192.168.1.0 10.4.0.0 subnet mask 255.255.0.0 must be constant in whole domain 2005/03/11 17 17

Discontiguous Subnetting Classful 10.1.0.0 10.2.0.0 R1 192.168.3.0 R2 route summarization done by R1, R2 on class boundary 192.168.2.0 R3 172.16.0.0 10.0.0.0 10.0.0.0 R3 will select either one path as best path (RIP) and hence some IP hosts can not be reached or both paths and performs equal load balancing (IGRP), hence every second packet will be sent to wrong destination (the same with eigrp / auto-summary) 2005/03/11 18 18

Routing Table Lookup (Classful) assumption: IP datagram with a given IP address is received by a classful router IP address is interpreted as class A, B or C the major net is determined next a lookup in the routing table for the major net is performed if there is no entry the IP datagram will be discarded if there is a match the IP address is compared to every known subnet of this major network if there is no such subnet the IP datagram will be discarded 2005/03/11 19 19

Routing Table Lookup (Classful) cont. hence a problem may arise with default routing if the major network is known by the router, but the subnet does not exist, the IP datagram will be discarded even if a default route exists therefore subnetted area must be contiguous all subnets of a given major net must be reachable using only paths with these subnet-ids remark: Cisco s configuration command ip classless will change such an behavior in case of default routing to the behavior of classless routing even if classful routing is used 2005/03/11 20 20

Classful route match (1/2) 1) If the classful network number is NOT listed in the routing table, use the default route if available (otherwise discard the packet) 2) If the classful network number is listed in the routing table: If the listed network number is NOT subnetted and matches the IP-packet's destination address then use this route If this network is subnetted, then lookup the corresponding subnet; if no subnet matches then discard the packet (even if a default route exists!) Example: IP Packet DA = 10.35.72.26 SA = Routing Table: 10.0.0.0/8 is subnetted, 4 subnets: 10.22.0.0/16 via 172.17.7.19 10.31.0.0/16 via 172.17.8.31 10.34.0.0/16 via 172.18.1.254 10.35.0.0/16 via 192.186.176.254 0.0.0.0/0 via 172.19.41.254 2005/03/11 21 21

Classful route match (2/2) 1) If the classful network number is NOT listed in the routing table, use the default route if available (otherwise discard the packet) 2) If the classful network number is listed in the routing table: If the listed network number is NOT subnetted and matches the IP-packet's destination address then use this route If this network is subnetted, then lookup the corresponding subnet; if no subnet matches then discard the packet (even if a default route exists!) Example: IP Packet DA = 10.35.72.26 SA = Routing Table: 10.0.0.0/8 is subnetted, 4 subnets: 10.22.0.0/16 via 172.17.7.19 10.31.0.0/16 via 172.17.8.31 10.34.0.0/16 via 172.18.1.254 0.0.0.0/0 via 172.19.41.254 DISCARD THE PACKET (!) 2005/03/11 22 22

Classless Routing routing protocols like RIPv2, OSPF, eigrp can carry subnet mask information in routing updates this has several advantages variable length subnet mask (VLSM) can be used subnetting of a given address can be done according to the number of hosts required on a certain subnet more efficient use of address space sub-subnetting route summarization can be performed on any address boundary and not only on class boundaries a routing update contains prefix (relevant part of IP address) and length (number of ones used in subnetmask) supernetting actual subnetmask is smaller than natural subnetmask of given class 2005/03/11 23 23

Classless Routing 10.1.0.0 10.2.0.0 10.7.0.0 10.5.0.0 10.6.0.0 routing update 10.1.0.0/16 10.2.0.0/16 10.3.0.0/16 10.4.0.0/16.. 192.168.1.0 10.4.0.0 note: behavior for eigrp if auto-summary is disabled 2005/03/11 24 24

Discontiguous Subnetting Classless 10.1.0.0 10.2.0.0 R1 192.168.2.0 10.1.0.0/16 192.168.3.0 10.2.0.0/16 R2 note: behavior for eigrp if auto-summary is disabled R3 172.16.0.0 R3 select correct path depending on the destination address of an IP datagram 2005/03/11 25 25

Routing Table Lookup (Classless) assumption: IP datagram with a given IP address is received by a classless router IP address is not interpreted as class A, B or C a lookup in the routing table for the best match for this IP address is performed IP prefixes of the routing table are compared with the given IP address bit by bit from left to right IP datagram is passed on to the network which matches best Longest Match Routing Rule result: IP addresses with any kind of subnetting can be used independent from the underlying network topology 2005/03/11 26 26

Classless routing: Longest match The subnet mask of each route entry tells how many bits must be compared with the IP-packet's destination address The router takes the route with the longest match Example: IP Packet DA = 10.35.72.26 SA = Routing Table: 10.0.0.0/8 via 172.16.1.1 10.22.0.0/16 via 172.17.7.19 10.31.0.0/16 via 172.17.8.31 10.34.0.0/16 via 172.18.1.254 10.35.0.0/16 via 192.186.176.254 10.35.64.0/19 via 192.186.177.254 10.35.192.0/19 via 172.19.54.1 2005/03/11 27 27

VLSM Example (1) First step 6 bit subnetting of 172.16.0.0 172.16.0.0 with 255.255.252.0 (172.16.0.0 / 22) subnetworks: 172.16.0.0 172.16.4.0 172.16.8.0 172.16.12.0 172.16.16.0. 172.16.248.0 172.16.252.0 64 subnetworks each of them capable of addressing 1022 IP systems 2005/03/11 28 28

VLSM Example (2) next step sub-subnetting basic subnet 172.16.4.0 255.255.252.0 (172.16.4.0 / 22) sub-subnetworks with mask 255.255.255.252 ( / 30): 172.16.4.0 / 30 172.16.4.4 / 30 172.16.4.4 net-id 172.16.4.5 first IP host of subnet 172.16.4.4 172.16.4.6 last IP host of subnet 172.16.4.4 172.16.4.7 directed broadcast of subnet 172.16.4.4 172.16.4.8 / 30 172.16.4.12 / 30. 172.16.4.252 / 30 64 sub-subnetworks each of them capable of addressing 2 IP systems 2005/03/11 29 29

VLSM Example (3) next step sub-subnetting basic subnet 172.16.8.0 255.255.252.0 (172.16.8.0 / 22) sub-subnetworks with mask 255.255.255.0 ( / 24): 172.16.8.0 / 24 172.16.9.0 / 24 172.16.9.0 net-id 172.16.9.1 first IP host of subnet 172.16.9.0 ------------- 172.16.9.254 last IP host of subnet 172.16.9.0 172.16.9.255 directed broadcast of subnet 172.16.9.0 172.16.10.0 / 24 172.16.11.0 / 24 4 sub-subnetworks each of them capable of addressing 254 IP systems 2005/03/11 30 30

VLSM Example (4) no sub-subnetting for basic subnet 172.16.12.0 172.16.12.0 with 255.255.252.0 (172.16.12.0 / 22) 172.16.12.0 net-id 172.16.12.1 first IP host of subnet 172.16.12.0 ------------- 172.16.15.254 last IP host of subnet 172.16.12.0 172.16.15.255 directed broadcast of subnet 172.16.12.0 one subnetwork capable of addressing 1022 IP systems 2005/03/11 31 31

VLSM Classless 172.16.8.0/24 172.16.12.0/22 172.16.12.1 172.16.12.2 172.16.4.8/30 172.16.15.254 172.16.15.253 172.16.4.4/30 172.16.4.12/30 172.16.10.0/24 class B with variable subnet mask: 172.16.0.0 with 6 bit subnetting gives basic subnets 172.16.4.0, 172.16.8.0, 172.16.12.0, 172.16.16.0 172.16.252.0 172.16.9.0/24 sub-subnetting of 172.16.4.0 (14 bit subnetting) for WAN links sub-subnetting of 172.16.8.0 (8bit subnetting) for small ethernets 2005/03/11 32 32

Summary Most important: RIPv2 is classless Subnet masks are carried for each route Multicasts and next hop field increase performance But still not powerful enough for large networks (C) Herbert Haas 2005/03/11 33 33

Quiz What is a routing domain? Why is "infinity" still 16? (C) Herbert Haas 2005/03/11 34 34