Internal www.huawei.com RIP Routing Protocol ISSUE 1.0 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 2 RIP routing protocol is a distance-vector routing protocol, it is applied in small scale network mostly, this course gives a detail introduction of two version of RIP routing protocol: RIPv1 and RIPv2, and introduces the common configuration command of RIP. HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 3 Upon completion of this course, you will be able to: Master basic principle of RIP routing protocol Master the similarities and differences between RIPv1 and RIPv2 Master configuration of RIP HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 4 RIP Routing Protocol Overview RIP: Routing Information Protocol It is a distance-vector routing protocol and belongs to IGP protocol RIP is suitable for small scale network, and includes two version: RIPv1 and RIPv2 RIP uses UDP as transport layer to exchange routing information, its port number is 520. RIP supports split horizon, poisoned reverse and trigger update HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 5 Initialization of RIP Routing Table Routing table initialization
NET1 NET2 Routing table initialization
Request Response RTA RTB HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 6 RIP Routing Table Update Routing Table destination next hop N1 C N2 D N3 E Routing Table destination next hop N4 F Routing Table destination next hop N1 C N2 D N3 E N4 B Route update Routing Table destination next hop N1 A N2 A N3 A N4 F Response Response RTA RTB RTA RTB HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 7 RIPv1 vs. RIPv2 RIPv1 is a class routing protocol, not supports VLSM and CIDR It sends message via broadcast. It doesnt support authentication RIPv2 is a classless routing protocol, supports VLSM, route aggregation and CIDR. It supports sending message via broadcast or multicast address (240.0.0.9) It supports plain text authentication and MD5 authentication. HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 8 RIPv1 Message Format Command version Unused( set to all zeros) Address Family Identifier Unused( set to all zeros) IP address Unused( set to all zeros) Unused( set to all zeros) Metric Multiple fields, up to maximum of 25 Address Family Identifier Unused( set to all zeros) IP address Unused( set to all zeros) Unused( set to all zeros) Metric route entry route entry 0 8 16 31 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 9 RIPv2 Message format Command version Unused( set to all zeros) Address Family Identifier Route tag IP address Subnet mask Next hop Metric Multiple fields, up to maximum of 25 Address Family Identifier Route tag IP address Subnet mask Next hop Metric route entry route entry 0 8 16 31 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 10 Example of RIP Basic Configuration [RTA] rip [RTA-rip-1]version 2 [RTA-rip-1] network 192.168.1.0 [RTA-rip-1] network 172.16.0.0 [RTB]rip [RTB-rip-1]version 2 [RTB-rip-1]network 192.168.1.0 [RTB-rip-1]network 192.168.2.0 [RTC]rip [RTC-rip-1]version 2 [RTC-rip-1]network 192.168.2.0 [RTC-rip-1]network 10.0.0.0 192.168.1.0/30 192.168.2.0/30 .1 .2 .1 .2 RTA RTB RTC L0: 172.16.1.1/32 L0: 10.1.1.1/32 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 11 Display RIP Information <[Quidway]display rip Public VPN-instance name: RIP process: 1 RIP version: RIP-2 Preference: 100 Checkzero: Enabled Default-cost: 0 Summary: Enabled Hostroutes: Enabled Maximum number of balanced paths: 6 Update time : 30 sec Age time : 180 sec Suppress time: 0 sec Garbage-collect time: 120 sec Silent interfaces: None Default routes: Disabled Verify-source: Enabled Networks: 192.168.1.0 172.16.0.0 Configured peers: None Triggered updates sent: 2 Number of route changes: 2 Number of replies to queries: 1 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 12 Display RIP Route [RTA]display rip 1 route Route Flags: R - RIP, T - TRIP P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect --------------------------------------------------------------------------- - Peer 192.168.1.2 on Serial0/0/1 Destination/Mask Nexthop Cost Tag Flags Sec 192.168.2.0/30 192.168.1.2 1 0 RA 12 10.1.1.1/32 192.168.1.2 2 0 RA 12
RIP neighbor address, the interface connected with neighbor Classless route and variable subnet mask The metric to destination, namely hop count HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 13 Configuring RIP Version [Quidway-rip-1]version 2 [Quidway-Serial0/0/1]rip version 2 multicast [Quidway]display rip 1 Public VPN-instance name: RIP process: 1 RIP version: RIP-2
The version of RIP is 2 192.168.1.0/30 192.168.2.0/30 .1 .2 .1 .2 RTA RTB RTC L0: 172.16.1.1/32 L0: 10.1.1.1/32 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 14 RIP Route Aggregation Route aggregation means that when the routes of different sub-network in the same natural network segment are advertised, the route will be advertised as aggregated route with natural mask Route aggregation doesnt works on RIPv1. RIPv2 supports classless inter- domain routing By default, RIPv2 enable function of route aggregation; when all the sub- network routes need to be broadcasted, it should disable the function of route aggregation HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 15 RIP Route Aggregation Automatically [RTB-rip-1]display rip 1 route Route Flags: R - RIP, T - TRIP P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect --------------------------------------------------------------------------- Peer 192.168.1.1 on Serial0/0/0 Destination/Mask Nexthop Cost Tag Flags Sec 192.168.1.0/24 192.168.1.1 1 0 RA 20 172.16.0.0/16 192.168.1.1 1 0 RA 20 ...... L0: 172.16.1.1/32 L1: 172.16.1.2/32 L2: 172.16.1.3/32 192.168.1.0/30 .1 .2 RTA RTB [RTA-rip-1] summary aggregated route HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 16 Undo RIP Route Aggregation Automatically [RTB]display rip 1 route Route Flags: R - RIP, T - TRIP P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------------------- Peer 192.168.1.1 on Serial0/0/0 Destination/Mask Nexthop Cost Tag Flags Sec 192.168.1.0/30 192.168.1.1 1 0 RA 21 172.16.1.3/32 192.168.1.1 1 0 RA 21 172.16.1.2/32 192.168.1.1 1 0 RA 21 172.16.1.1/32 192.168.1.1 1 0 RA 21 [RTA-rip-1] network 172.16.0.0 [RTA-rip-1] undo summary L0: 172.16.1.1/32 L1: 172.16.1.2/32 L2: 172.16.1.3/32 192.168.1.0/30 .1 .2 RTA RTB HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 17 RIP Route Aggregation Manually L0: 172.16.1.1/32 L1: 172.16.1.2/32 L2: 172.16.1.3/32 192.168.1.0/30 .1 .2 RTA RTB [RTA-Serial0/0/0]rip summary-address 172.16.1.1 255.255.255.0 aggregated route manually <RTB>display rip 1 route Route Flags: R - RIP, T - TRIP P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect ------------------------------------------------------------------------- Peer 192.168.1.1 on Serial0/0/0 Destination/Mask Nexthop Cost Tag Flags Sec 192.168.1.0/30 192.168.1.1 1 0 RA 8 172.16.1.0/24 192.168.1.1 1 0 RA 8
HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 18 The Preference of RIP [RTA-rip-1] preference ? INTEGER<1-255> Value of Preference [RTA-rip] preference 150 [RTA-rip] display ip routing-table Routing Table: public net Destination/Mask Protocol Pre Cost Nexthop Interface 10.0.0.0/8 RIP 150 2 192.168.1.2 Ethernet0/0
172.16.0.0/16 RIP 150 0 127.0.0.1 InLoopBack0 192.168.1.0/24 RIP 150 1 192.168.1.2 Ethernet0/0 Change preference of RIP, the value range is 1~255, and the default value is 100 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 19 Import Exterior Route 192.168.1.0/30 .1 .2 RTA RTB [RTA-rip] import-route direct cost 10 [RTB-rip-1]dis rip 1 route Route Flags: R - RIP, T - TRIP P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect --------------------------------------------------------------------------- Peer 192.168.1.1 on Serial0/0/0 Destination/Mask Nexthop Cost Tag Flags Sec 192.168.1.0/30 192.168.1.1 1 0 RA 15 192.168.1.2/32 192.168.1.1 11 0 RA 15 172.16.1.3/32 192.168.1.1 11 0 RA 15 172.16.1.2/32 192.168.1.1 11 0 RA 15 172.16.1.1/32 192.168.1.1 11 0 RA 15 The metric of imported route is 11 L0: 172.16.1.1/32 L1: 172.16.1.2/32 L2: 172.16.1.3/32 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 20 Interface Add-ons Metric 192.168.1.0/30 .1 .2 RTA RTB [RTA-Serial0/0/0]rip metricin 5 The metric is 1+5=6 L0: 172.16.1.1/32 L1: 172.16.1.2/32 L2: 172.16.1.3/32 [RTA]display rip 1 route Route Flags: R - RIP, T - TRIP P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect --------------------------------------------------------------------------- Peer 192.168.1.2 on Serial0/0/0 Destination/Mask Nexthop Cost Tag Flags Sec 10.1.1.1/32 192.168.1.2 6 0 RA 16 L0: 10.1.1.1/32 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 21 Interface Add-ons Metric 192.168.1.0/30 .1 .2 RTA RTB [RTA-Serial0/0/0]rip metricout 4 [RTB]display rip 1 route Route Flags: R - RIP, T - TRIP P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect ---------------------------------------------------------------------------- Peer 192.168.1.1 on Serial0/0/0 Destination/Mask Nexthop Cost Tag Flags Sec 172.16.1.3/32 192.168.1.1 4 0 RA 5 172.16.1.2/32 192.168.1.1 4 0 RA 5 172.16.1.1/32 192.168.1.1 4 0 RA 5 The metric is 0+4=4 L0: 172.16.1.1/32 L1: 172.16.1.2/32 L2: 172.16.1.3/32 HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 22 Other Configuration Command [Quidway-Ethernet0/0]rip authentication-mode { { simple password } | { md5 { rfc2082 key-string key-id | huawei key-string } } } Configuring RIP authentication mode, RIPv2 supports two authentication modes: plain text authentication and MD5 authentication [Quidway-Ethernet0/0] rip work/input/output Configuring work status of interface HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 23 Summary Whats the characteristic of RIP routing protocol? What the difference between RIPv1 and RIPv2? Thank You www.huawei.com T