0% found this document useful (0 votes)
7 views38 pages

ND-Chapter 3

Uploaded by

eyibeltal3939
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views38 pages

ND-Chapter 3

Uploaded by

eyibeltal3939
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Chapter Three

Routing Information Protocol (RIP)

1
Out lines
✓ Definition

✓ RIP V1 and V2

✓ RIP Characteristics

✓ RIP Message format

✓ OSPF
What is Routing Information Protocol (RIP)?

✓ Definition: A simple interior gateway protocol (IGP) used for


routing data within a local or wide area network.
✓ Type: Distance-vector routing protocol.
✓ Purpose: Enables routers to share routing information and
determine the best path for data transmission.
How Does RIP Work?
✓ Distance Vector Algorithm: Routers periodically share
routing tables with neighbors.
✓ Metric: Hop count (maximum = 15 hops).
✓ Periodic Updates: Routers exchange updates every 30
seconds.
✓ Convergence: Routers update routes based on received
information
Key Features of RIP
Simple & Easy to Configure
Metric: Uses hop count as the primary metric for route
selection.
Convergence Time: Slow convergence and limited scalability.
Versions:
✓ RIP v1 (classful, no subnet support)
✓ RIP v2 (classless, supports subnetting and authentication)
Maximum Hops: Limits routes to 15 hops.
RIP Characteristics
✓ Distance vector routing protocol
✓ Classful routing protocol

– Does not include the subnet mask in the routing updates

• Uses hop count as its only metric for selecting the best path.

• Routes advertised with hop counts greater than 15 are


unreachable.

✓ RIPv1 routing updates, are broadcast every 30 seconds.


– Route entries in the routing table sent every 30 seconds
✓ Administrative Distance of RIP is 120.
6
Comparison of RIP V1 and RIP V2

Feature RIP V1 RIP V2

Routing Type Classful Classless

Subnetting Support No VLSM support Supports VLSM

Broadcast
Update Mechanism Multicast (224.0.0.9)
(255.255.255.255)
Simple Authentication
Authentication None
(password)

Maximum Hops 15 15

Routing Loops Split Horizon, Route Same as RIP V1, with


Prevention Poisoning enhancements
Advantages and Disadvantages of RIP V1 and RIP V2
RIP V1 Advantages:
✓ Simple to configure and implement.
✓ Widely supported by most network devices.
RIP V1 Disadvantages:
✓ Lack of support for VLSM.
✓ No security mechanisms (vulnerable to spoofing).
✓ Limited scalability due to the 15-hop limit.
RIP V2 Advantages:
✓ Supports VLSM, making it more flexible in modern networks.
✓ More efficient multicast updates reduce unnecessary bandwidth
consumption.
✓ Basic authentication improves security.
RIP V2 Disadvantages:
✓ Still limited to a maximum of 15 hops, which restricts its use in larger
networks.
✓ Complexity increases with larger networks
Encapsulated RIP Message

Data Link IP Packet UDP Segment RIP Message


Frame Header Header Header (512 Bytes; Up to 25 routes)

9
Encapsulated RIP Message

Data Link IP Packet UDP Segment RIP Message


Frame Header Header Header (512 Bytes; Up to 25 routes)

Data Link Frame


MAC Destination Address = Broadcast: FF-FF-FF-FF-FF-FF
MAC Source Address = Address of sending interface

1
0
Encapsulated RIP Message

Data Link IP Packet UDP Segment RIP Message


Frame Header Header Header (512 Bytes; Up to 25 routes)

Data Link Frame


MAC Destination Address = Broadcast: FF-FF-FF-FF-FF-FF
MAC Source Address = Address of sending interface

IP Packet
IP Source Address = Address of sending interface
IP Destination Address = Broadcast: 255.255.255.255
Protocol field = 17 for UDP

1
1
Encapsulated RIP Message

Data Link IP Packet UDP Segment RIP Message


Frame Header Header Header (512 Bytes; Up to 25 routes)

Data Link Frame


MAC Destination Address = Broadcast: FF-FF-FF-FF-
FF-FF MAC Source Address = Address of sending
interface
IP Packet
IP Source Address = Address of sending interface
IP Destination Address = Broadcast: 255.255.255.255
Protocol field = 17 for UDP

UDP Segment
Source Port = 520
Destination
1 Port = 520
2
Encapsulated RIP Message

Data Link IP Packet UDP Segment RIP Message


Frame Header Header Header (512 Bytes; Up to 25 routes)

Data Link Frame


MAC Destination Address = Broadcast: FF-FF-FF-FF-FF-FF MAC
Source Address = Address of sending interface
IP Packet
IP Source Address = Address of sending interface
IP Destination Address = Broadcast: 255.255.255.255
Protocol field = 17 for UDP
UDP Segment Source
Port = 520
Destination Port = 520
RIP Message:
Command: Request (1); Response (2)
Version = 1
Routes: Network IPAddress
1
3 Hop Count
Metric:
RIPv1 Message Format

Data Link IP Packet UDP Segment RIP Message


Frame Header Header Header (512 Bytes; Up to 25 routes)

Bit
0 7 8 15 16 23 24 31
Command=1or2 Version=1 Mustbezero
Route
Entry
Addressfamilyidentifier(2=IP) Mustbezero
IPAddress(NetworkAddress)
Mustbezero
Mustbezero
Metric (Hops)

MultipleRouteEntries,uptoamaximumof25

1
4
RIPv1 Message Format

Data Link IP Packet UDP Segment RIP Message


Frame Header Header Header (512 Bytes; Up to 25 routes)

0 7 8 15 16 23 24 31
Command = 1 or 2 Version = 1 Must be zero
Bit Address family identifier (2 = IP) Must be zero
IP Address (Network Address)
Must be zero
Must be zero
Route Metric (Hops)
Entry
Multiple Route Entries, up to a maximum of 25

Command: 1 for a Request or 2 for a


Reply Version: 1 for RIP v 1 or 2 for RIP
v2
Address Family Identifier: 2 for IP unless a Request is for the full routing table in which case, set to 0
IP Address: The address of the destination route, which may be a network, subnet, or host
address.
Metric: Hop count between 1 and 16. Sending ro9uter increases the metric before sending out
message.
Topology: Scenario A

192.168.3.0/24
RIP enabled on all
routers .1

.2 .2

192.168.2.0/24 192.168.4.0/24

192.168.1.0/24 192.168.5.0/24
.1
.1

.1 .1

10
Interface Configurations

R1 R3
interface FastEthernet0/0 interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0 ip address 192.168.5.1 255.255.255.0
! !
interface Serial0/0 interface Serial0/1
ip address 192.168.2.1 255.255.255.0 ip address 192.168.4.1 255.255.255.0
clockrate 64000
!

R2
interface FastEthernet0/0
ip address 192.168.3.1 255.255.255.0
!
interface Serial0/0
ip address 192.168.2.2 255.255.255.0
!
Don’t forget: no shutdown
interface Serial0/1
ip address 192.168.4.2 255.255.255.0
clockrate 64000

11
Verify
R1#show ip inter brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
Serial0/0 192.168.2.1 YES manual up up

R2#show ip inter brief


Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.3.1 YES manual up up
Serial0/0 192.168.2.2 YES manual up up
Serial0/1 192.168.4.2 YES manual up up

R3#show ip inter brief


Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.5.1 YES manual up up
Serial0/1 192.168.4.1 YES manual up up

18
Enabling RIP
R1#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ?
bgp Border Gateway Protocol (BGP) egp
Exterior Gateway Protocol (EGP)
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP) igrp
Interior Gateway Routing Protocol (IGRP)
isis ISO IS-IS
iso-igrp IGRP for OSI networks mobile
Mobile routes
odr On Demand stub Routes
ospf Open Shortest Path First (OSPF) rip
Routing Information Protocol (RIP)

R1(config)#router rip
R1(config-router)#

• To remove the RIP process: no router rip


• Router-mode prompt: (config-router)
19
Enabling RIP
R1(config)#router rip
R1(config-router)#

R2(config)#router rip
R2(config-router)#

R3(config)#router rip
R3(config-router)#

• Enable RIP on all three routers.

20
Network Command
R1(config)#router rip
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.0

• Router(config-router)#network directly-connected- classful-network-


address
• directly-connected-classful-network-address: Classful
major network address of the interface
• Network command may include multiple interfaces.
• The network command does two things:
– Enables the routing process (RIP) on all interfaces on the router that
belong to this network. These interfaces will now both send and receive
routing updates (RIP) updates.
– Includes this network or subnets if the interface is a subnet of the
network, in routing updates se15ntto otherrouters.
Network
R2(config)#router
Command
rip
R2(config-router)#network 192.168.2.0
R2(config-router)#network 192.168.3.0
R2(config-router)#network 192.168.4.0

• Network command on R2.


• Note: If a submitted address or interface address is used, IOS
will modify it to the classful network address.
• network 192.168.2.2The router will convert it to
network 192.168.2.0.
22
Network Command
R3(config)#router rip
R3(config-router)#network 192.168.4.0
R3(config-router)#network 192.168.5.0

• Network commands on R3.

23
Verify: Running-config

R1#show running-config
Building configuration...
!
router rip
network 192.168.1.0
network 192.168.2.0
!

• If a subnet or interface address was used in the network command,


IOS will always convert it to the classful network address.

24
Verify: Routing Table
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,

R 192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:10, Serial0/0


R 192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:10, Serial0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/0
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:10, Serial0/0
R1#
Next-hop router Exit interface
[ Administrative Distance / Metric (hop count) ]
hh:mm: ss since last
update
• Notice RIP routes.
• Notice directly connected networks.

25
Verify: Routing Table
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,

C 192.168.4.0/24 is directly connected, Serial0/1


R 192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:22, Serial0/1
R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:19, Serial0/0
C 192.168.2.0/24 is directly connected, Serial0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
R2#

• R2 Routing Table

26
Verify: Routing Table
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,

C 192.168.4.0/24 is directly connected, Serial0/1


C 192.168.5.0/24 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/2] via 192.168.4.2, 00:00:04, Serial0/1
R 192.168.2.0/24 [120/1] via 192.168.4.2, 00:00:04, Serial0/1
R 192.168.3.0/24 [120/1] via 192.168.4.2, 00:00:04, Serial0/1
R3#

• R3 Routing Table

27
R1: Receiving Updates

192.168.3.0 in 1 hops
192.168.4.0 in 1 hops
192.168.5.0 in 2 hops

28
R1: Sending Updates

192.168.1.0 metric 1

192.168.2.0 metric 1
192.168.3.0 metric 2
192.168.4.0 metric 2
192.168.5.0 metric 3
29
Passive Interface

R1(config)#router rip
R1(config-router)#passive-interface fa 0/0

R2(config)#router rip
R2(config-router)#passive-interface fa 0/0 X
R2(config)#router rip
R2(config-router)#passive-interface fa 0/0

• Passive-interface command allows for routing updates to be


received, but none will be sent on that interface.
• Used on interfaces where there are no other routers or routers that we do
not wish to exchange routing updates with.
• Saves bandwidth
• Devices do not need to process these Layer 2 and Layer 3
broadcasts.
• Possible security risk or incorrec24t routing information received.
Review: Scenario A

192.168.3.0/24
RIP enabled on all
.1 routers

.2 .2

192.168.2.0/24 192.168.4.0/24

192.168.1.0/24 192.168.5.0/24
.1
.1

.1 .1

31
Review: Scenario A
R1
router rip
network 192.168.1.0
network 192.168.2.0
passive-interface fa 0/0

R2
router rip
network 192.168.2.0
network 192.168.3.0
network 192.168.4.0
passive-interface fa 0/0

R3
router rip
network 192.168.4.0
network 192.168.5.0
passive-interface fa 0/0

32
What is OSPF?
✓ OSPF (Open Shortest Path First) is a link-state routing protocol
used to determine the best path for routing packets within an IP
network.
✓ Open Standard protocol, meaning it's vendor-neutral and widely
supported across different devices.
✓ Uses Dijkstra’s algorithm to compute the shortest path.
✓ Designed for large-scale networks with hierarchical design
using areas.
How OSPF Works
✓ Link-State Advertisement (LSA): Routers share information about
their links with neighbors.
✓ Link-State Database (LSDB): Each router builds a database based
on received LSAs.
✓ Shortest Path First (SPF): Dijkstra’s algorithm calculates the best
paths using the LSDB.
✓ Area Structure: OSPF uses areas to reduce routing table size and
optimize network performance.
Use of OSPF
Common Use:
✓ Enterprise Networks: Ideal for large organizations with multiple routers.

✓ Hierarchical Network Design: Supports multiple areas to optimize routing


efficiency.

✓ Multi-Vendor Environments: Works across devices from different vendors.


✓ Large-scale Routing: Supports networks with thousands of routes.
Advantages of OSPF
Scalability:
✓ Supports large networks using areas to keep routing tables small.
Fast Convergence:
✓ Quickly recalculates routes when there are network changes,
minimizing downtime.
Efficient Bandwidth Use:
✓ Only sends updates when changes occur, reducing unnecessary traffic.
Load Balancing:
✓ Supports ECMP (Equal-Cost Multi-Path) for distributing traffic
across multiple links.
Flexible Network Design:
✓ Supports a variety of network types (Point-to-Point, Broadcast, Non-
broadcast).
Built-in Authentication:
✓ Protects OSPF communications with authentication (simple password or
MD5)
Disadvantages of OSPF

Complex Configuration
✓ OSPF requires careful configuration, especially in larger, hierarchical networks.
Memory & CPU Intensive
✓ OSPF routers maintain a Link-State Database (LSDB), which grows as the
network expands.
Scalability Issues
✓ OSPF is scalable but struggles with very large networks (e.g., networks with
1000+ routers).
Overhead in Large Networks
✓ In large networks, flooding can cause high traffic overhead.
Cont..

You might also like