RIPv1 - Routing Information Protocol version 1

What is RIPv1?

RIPv1 (Routing Information Protocol version 1) is a distance-vector routing protocol used to facilitate the exchange of routing information within small to medium-sized networks.

Is RIPv1 a classful or classless protocol?

RIPv1 is a classful routing protocol, meaning it does not support subnet information in its routing updates. It assumes default subnet masks based on IP address classes (A, B, C).

How does RIPv1 share routing information?

RIPv1 uses broadcasts to send routing updates every 30 seconds to the address 255.255.255.255.

What metric does RIPv1 use?

RIPv1 uses hop count as its metric. The maximum number of hops allowed is 15; anything beyond that is considered unreachable.

What are the limitations of RIPv1?

  • No support for subnetting or CIDR.

  • No authentication.

  • Limited to 15 hops.

  • Broadcast-based updates can cause unnecessary traffic.

  • In this section, you are going to learn

  • Terminology

  • Version Info

Version & RFC Details

RIP Version

RFC Version

Year

Core Idea / Contribution

RIPv1

RFC 1058

1988

Introduced the original RIP protocol. It defined a simple distance-vector routing protocol using hop count as the metric. It supported classful routing (no subnet masks), periodic updates, and a maximum hop count of 15. Designed for small, stable networks.

  • Setup

  • Setup

RIPv1 Request Packet

S.No

Protocol Packets

Description

Size(bytes)

1

Request

24504

Header

Command

Set to 1 for Request

1

Version

Set to 1 for RIPv1

1

Unused

Reserved; must be set to 0

2

Routing entry

Address Family Identifier

Set to 2 for IP

2

Route Tag

Not used in RIPv1; set to 0

2

IP Address

IP address of the destination being requested

4

Subnet Mask

Not used in RIPv1; set to 0

4

Next Hop

Not used in RIPv1; set to 0

4

Metric

Set to 16 to request the route to the specified IP address; all fields set to 0 and metric 16 means request for the full routing table

4

RIPv1 Response Packet

S.No

Protocol Packets

Description

Size(bytes)

2

Response

24504

Header

Command

Set to 2 for Response

1

Version

Set to 1 for RIPv1

1

Unused

Reserved; must be set to 0

2

Routing Entry

Address Family Identifier

Set to 2 for IP

2

Route Tag

Not used in RIPv1; set to 0

2

IP Address

Destination IP address of the route

4

Subnet Mask

Not used in RIPv1; set to 0

4

Next Hop

Not used in RIPv1; set to 0

4

Metric

Hop count to the destination (115); 16 means unreachable

4

RIPv1 - Use Cases

S.no

Use Case

Description

1

Small, simple networks

Ideal for small LANs with minimal routing complexity.

2

Static IP environments

Works well where IP addressing is classful and does not require subnetting.

3

Legacy systems

Useful in older systems or devices that only support RIPv1.

4

Educational purposes

Commonly used in labs and training to demonstrate basic routing concepts.

RIPv1 - Basic Features

S.no

Features

Description

1

Classful Routing

Does not send subnet mask information; assumes default masks based on IP class.

2

Distance Vector Protocol

Uses hop count as the routing metric.

3

Maximum Hop Count

Routes with hop count >15 are considered unreachable.

4

Broadcast Updates

Sends routing updates via broadcast (255.255.255.255).

5

Periodic Updates

Sends updates every 30 seconds.

6

No Authentication

Does not support any form of authentication.

Classful Routing - Testcases

Classful Routing- Test Cases

#

Test Case

Description

Expected Result

1

Send Class A route

Route: 10.0.0.0

Accepted with default mask 255.0.0.0

2

Send Class B route

Route: 172.16.0.0

Accepted with default mask 255.255.0.0

3

Send Class C route

Route: 192.168.1.0

Accepted with default mask 255.255.255.0

4

Send Class D route

Route: 224.0.0.0

Rejected (multicast)

5

Send Class E route

Route: 240.0.0.0

Rejected (reserved)

6

Send Class A with correct mask

10.0.0.0/8

Accepted

7

Send Class B with correct mask

172.16.0.0/16

Accepted

8

Send Class C with correct mask

192.168.1.0/24

Accepted

9

Send Class A with subnet mask

10.1.0.0/16

Mask ignored, default class A mask used

10

Send Class B with subnet mask

172.16.1.0/24

Mask ignored, default class B mask used

11

Send Class C with subnet mask

192.168.1.128/25

Mask ignored, default class C mask used

12

Send Class A with supernet mask

10.0.0.0/7

Mask ignored, default class A mask used

13

Send Class B with supernet mask

172.16.0.0/15

Mask ignored, default class B mask used

14

Send Class C with supernet mask

192.168.0.0/23

Mask ignored, default class C mask used

15

Send default route

0.0.0.0

Accepted

16

Send loopback route

127.0.0.0

Rejected

17

Send broadcast route

255.255.255.255

Rejected

18

Send private Class A

10.0.0.0

Accepted

19

Send private Class B

172.16.0.0

Accepted

20

Send private Class C

192.168.0.0

Accepted

21

Send public Class A

11.0.0.0

Accepted

22

Send public Class B

150.0.0.0

Accepted

23

Send public Class C

198.51.100.0

Accepted

24

Send Class A with metric = 1

Valid metric

Accepted

25

Send Class B with metric = 16

Unreachable

Accepted as unreachable

26

Send Class C with metric > 16

Invalid metric

Rejected

27

Send Class A with invalid AFI

AFI ? 2

Rejected

28

Send Class B with valid AFI

AFI = 2

Accepted

29

Send Class C with valid AFI

AFI = 2

Accepted

30

Send Class A with valid command

Command = 2

Accepted

31

Send Class B with invalid command

Command ? 1 or 2

Rejected

32

Send Class C with valid version

Version = 1

Accepted

33

Send Class A with invalid version

Version ? 1

Rejected

34

Send Class B with valid checksum

Correct checksum

Accepted

35

Send Class C with invalid checksum

Corrupted checksum

Rejected

36

Send Class A with TTL = 1

TTL expired

Dropped

37

Send Class B with TTL = 255

Valid TTL

Accepted

38

Send Class C with spoofed source

Fake IP

Rejected

39

Send Class A with valid source

Known router IP

Accepted

40

Send Class B with large payload

Max UDP size

Accepted

41

Send Class C with small payload

Minimal packet

Accepted

42

Send Class A with invalid UDP port

Port ? 520

Rejected

43

Send Class B with valid UDP port

Port = 520

Accepted

44

Send Class C with rapid updates

Every 1 sec

Accepted

45

Send Class A with normal updates

Every 30 sec

Accepted

46

Send Class B with delayed updates

Every 5 min

Accepted

47

Send Class C with duplicate entries

Same route repeated

Last entry used

48

Send Class A with inconsistent metrics

Same route, different metrics

Lowest metric used

49

Send Class B with inconsistent masks

Same route, different masks

Default class mask used

50

Send Class C with invalid IP

IP = 300.0.0.0

Rejected

Distance Vector Protocol - Testcases

Distance Vector Protocol - Test Cases

#

Test Case

Description

Expected Result

1

Basic route advertisement

Router advertises its routing table

Neighbor receives and updates table

2

Periodic update

Router sends update every 30 seconds

Neighbor receives update

3

Hop count = 1

Directly connected network

Route added with metric 1

4

Hop count = 15

Max valid hop count

Route accepted

5

Hop count = 16

Unreachable route

Route marked as unreachable

6

Hop count > 16

Invalid route

Route discarded

7

Split horizon enabled

Route not advertised back on incoming interface

Prevents routing loops

8

Split horizon disabled

Route advertised back

May cause loops

9

Route poisoning

Route set to metric 16

Neighbor marks route as unreachable

10

Hold-down timer active

Route change ignored temporarily

Prevents flapping

11

Hold-down timer expired

Route change accepted

Routing table updated

12

Invalid metric value

Metric = 255

Route discarded

13

Valid metric value

Metric = 2

Route accepted

14

Broadcast update

Sent to 255.255.255.255

All neighbors receive update

15

Unicast update

Sent to specific IP

Route accepted if valid

16

Update with invalid version

Version ? 1

Packet ignored

17

Update with version = 1

Valid RIPv1 packet

Packet processed

18

Update with invalid command

Command ? 1 or 2

Packet ignored

19

Update with command = 2

Response

Packet processed

20

Update with command = 1

Request

Routing table sent in response

21

Update with invalid checksum

Corrupted packet

Packet discarded

22

Update with valid checksum

Correct packet

Packet accepted

23

Update with TTL = 1

TTL expired

Packet dropped

24

Update with TTL = 255

Valid TTL

Packet accepted

25

Update with valid AFI

AFI = 2

Route accepted

26

Update with invalid AFI

AFI ? 2

Route ignored

27

Update with loopback source

Source IP = 127.0.0.1

Packet ignored

28

Update with valid source

Known router IP

Packet accepted

29

Update with duplicate routes

Same route repeated

Last entry used

30

Update with inconsistent metrics

Same route, different metrics

Lowest metric used

31

Update with empty routing table

No routes

Packet ignored

32

Update with max entries

25 routes

All processed

33

Update with invalid IP

IP = 300.0.0.0

Route ignored

34

Update with valid IP

IP = 192.168.1.0

Route accepted

35

Update with classful route

No subnet mask

Default mask applied

36

Update with classless route

Subnet mask included

Mask ignored

37

Update with unreachable route

Metric = 16

Route marked unreachable

38

Update with reachable route

Metric = 1

Route added

39

Update with route to self

Own IP in route

Route ignored

40

Update with route to broadcast

255.255.255.255

Route ignored

41

Update with route to multicast

224.0.0.0

Route ignored

42

Update with route to loopback

127.0.0.0

Route ignored

43

Update with route to private IP

10.0.0.0

Route accepted

44

Update with route to public IP

8.8.8.0

Route accepted

45

Update with route to default

0.0.0.0

Route accepted

46

Update with route to APIPA

169.254.0.0

Route accepted

47

Update with route tag

Not supported in RIPv1

Field ignored

48

Update with authentication

Not supported in RIPv1

Field ignored

49

Update with next hop

Not supported in RIPv1

Field ignored

50

Update with valid port

UDP port 520

Packet accepted

Maximum Hop Count - Testcases

Maximum Hop Count - Test Cases

#

Test Case

Description

Expected Result

1

Route with hop count = 1

Directly connected network

Route accepted

2

Route with hop count = 2

One intermediate router

Route accepted

3

Route with hop count = 15

Maximum valid hop count

Route accepted

4

Route with hop count = 16

Unreachable route

Route marked as unreachable

5

Route with hop count = 17

Exceeds max hop count

Route discarded

6

Route with hop count = 0

Invalid metric

Route discarded

7

Route with hop count = 10

Mid-range hop count

Route accepted

8

Route with hop count = 14

Near max hop count

Route accepted

9

Route with hop count = 255

Invalid metric

Route discarded

10

Route with hop count = 1 and valid IP

Valid route

Route accepted

11

Route with hop count = 15 and valid IP

Valid route

Route accepted

12

Route with hop count = 16 and valid IP

Valid but unreachable

Route accepted as unreachable

13

Route with hop count = 1 and invalid IP

Invalid IP address

Route discarded

14

Route with hop count = 15 and invalid IP

Invalid IP address

Route discarded

15

Route with hop count = 16 and invalid IP

Invalid IP address

Route discarded

16

Route with hop count = 1 and invalid AFI

AFI ? 2

Route discarded

17

Route with hop count = 15 and valid AFI

AFI = 2

Route accepted

18

Route with hop count = 16 and valid AFI

AFI = 2

Route marked unreachable

19

Route with hop count = 1 and valid checksum

Valid packet

Route accepted

20

Route with hop count = 15 and invalid checksum

Corrupted packet

Route discarded

21

Route with hop count = 16 and valid checksum

Valid packet

Route marked unreachable

22

Route with hop count = 1 and TTL = 255

Valid TTL

Route accepted

23

Route with hop count = 15 and TTL = 1

TTL expired

Packet dropped

24

Route with hop count = 16 and TTL = 255

Valid TTL

Route marked unreachable

25

Route with hop count = 1 and valid source

Known router

Route accepted

26

Route with hop count = 15 and spoofed source

Fake IP

Route discarded

27

Route with hop count = 16 and valid source

Known router

Route marked unreachable

28

Route with hop count = 1 and valid port

UDP port 520

Route accepted

29

Route with hop count = 15 and invalid port

Port ? 520

Packet discarded

30

Route with hop count = 16 and valid port

UDP port 520

Route marked unreachable

31

Route with hop count = 1 and valid command

Command = 2

Route accepted

32

Route with hop count = 15 and invalid command

Command ? 1 or 2

Packet discarded

33

Route with hop count = 16 and valid command

Command = 2

Route marked unreachable

34

Route with hop count = 1 and version = 1

Valid version

Route accepted

35

Route with hop count = 15 and version = 2

Invalid version

Packet discarded

36

Route with hop count = 16 and version = 1

Valid version

Route marked unreachable

37

Route with hop count = 1 and route to self

Own IP

Route ignored

38

Route with hop count = 15 and route to self

Own IP

Route ignored

39

Route with hop count = 16 and route to self

Own IP

Route ignored

40

Route with hop count = 1 and route to broadcast

255.255.255.255

Route ignored

41

Route with hop count = 15 and route to multicast

224.0.0.0

Route ignored

42

Route with hop count = 16 and route to loopback

127.0.0.0

Route ignored

43

Route with hop count = 1 and private IP

10.0.0.0

Route accepted

44

Route with hop count = 15 and public IP

8.8.8.0

Route accepted

45

Route with hop count = 16 and default route

0.0.0.0

Route marked unreachable

46

Route with hop count = 1 and duplicate entry

Same route repeated

Last entry used

47

Route with hop count = 15 and inconsistent metrics

Same route, different metrics

Lowest metric used

48

Route with hop count = 16 and inconsistent metrics

Same route, different metrics

Route marked unreachable

49

Route with hop count = 1 and valid update interval

Every 30 sec

Route accepted

50

Route with hop count = 15 and rapid updates

Every 1 sec

Route accepted

Broadcast Updates - Testcases

Broadcast Updates - Test Cases

#

Test Case

Description

Expected Result

1

Broadcast to 255.255.255.255

Standard RIPv1 update

All directly connected routers receive update

2

Broadcast every 30 seconds

Periodic update interval

Update sent successfully

3

Broadcast on all interfaces

Multiple interfaces configured

Update sent on each interface

4

Broadcast with valid routing table

Contains valid routes

Neighbors update their tables

5

Broadcast with empty routing table

No routes to advertise

Neighbors receive empty update

6

Broadcast with invalid checksum

Corrupted packet

Packet discarded

7

Broadcast with valid checksum

Correct packet

Packet accepted

8

Broadcast with TTL = 1

TTL expired

Packet dropped

9

Broadcast with TTL = 255

Valid TTL

Packet accepted

10

Broadcast with spoofed source IP

Fake router IP

Packet ignored

11

Broadcast with valid source IP

Known router

Packet accepted

12

Broadcast with invalid version

Version ? 1

Packet ignored

13

Broadcast with version = 1

Valid RIPv1 packet

Packet processed

14

Broadcast with command = 2

Response

Packet processed

15

Broadcast with command = 1

Request

Response expected

16

Broadcast with invalid command

Command ? 1 or 2

Packet ignored

17

Broadcast with AFI = 2

IP routing

Route accepted

18

Broadcast with AFI ? 2

Non-IP routing

Route ignored

19

Broadcast with metric = 1

Valid route

Route accepted

20

Broadcast with metric = 16

Unreachable route

Route marked unreachable

21

Broadcast with metric > 16

Invalid metric

Route ignored

22

Broadcast with duplicate routes

Same route repeated

Last entry used

23

Broadcast with inconsistent metrics

Same route, different metrics

Lowest metric used

24

Broadcast with valid IP

192.168.1.0

Route accepted

25

Broadcast with invalid IP

300.0.0.0

Route ignored

26

Broadcast with loopback IP

127.0.0.0

Route ignored

27

Broadcast with multicast IP

224.0.0.0

Route ignored

28

Broadcast with broadcast IP

255.255.255.255

Route ignored

29

Broadcast with default route

0.0.0.0

Route accepted

30

Broadcast with private IP

10.0.0.0

Route accepted

31

Broadcast with public IP

8.8.8.0

Route accepted

32

Broadcast with route to self

Own IP

Route ignored

33

Broadcast with valid port

UDP port 520

Packet accepted

34

Broadcast with invalid port

Port ? 520

Packet ignored

35

Broadcast with valid subnet

Classful subnet

Route accepted

36

Broadcast with classless subnet

Subnet mask included

Mask ignored

37

Broadcast with route poisoning

Metric = 16

Route marked unreachable

38

Broadcast with split horizon

Route not advertised back

Loop prevention

39

Broadcast with hold-down timer active

Route change ignored

Prevents flapping

40

Broadcast with hold-down timer expired

Route change accepted

Table updated

41

Broadcast with max entries

25 routes

All processed

42

Broadcast with no entries

Empty update

Packet processed

43

Broadcast with authentication field

Not supported in RIPv1

Field ignored

44

Broadcast with next hop field

Not supported in RIPv1

Field ignored

45

Broadcast with route tag

Not supported in RIPv1

Field ignored

46

Broadcast with valid interface config

Interface up

Update sent

47

Broadcast with interface down

Interface disabled

Update not sent

48

Broadcast with rapid frequency

Every 5 sec

Update sent

49

Broadcast with delayed frequency

Every 5 min

Update sent

50

Broadcast with mixed RIPv1/RIPv2 routers

RIPv1 router in mixed network

RIPv1 processes only broadcast packets

Periodic Updates - Testcases

Periodic Updates - Test Cases

#

Test Case

Description

Expected Result

1

Update interval = 30 seconds

Standard RIPv1 behavior

Update sent every 30 seconds

2

Update interval < 30 seconds

Update every 10 seconds

Update sent more frequently

3

Update interval > 30 seconds

Update every 60 seconds

Update sent less frequently

4

No update timer

Timer disabled

No periodic updates sent

5

Timer reset on manual update

Manual trigger resets timer

Next update delayed

6

Timer continues after manual update

Manual update does not reset timer

Next update sent as scheduled

7

Timer accuracy test

Measure interval precision

Update sent within 1 sec of expected time

8

Timer drift over time

Long uptime

Update interval remains consistent

9

Multiple interfaces

Updates sent on all interfaces

Each interface sends update

10

Interface down

Interface disabled

No update sent on that interface

11

Interface up

Interface enabled

Update sent

12

Valid routing table

Contains routes

Update includes all routes

13

Empty routing table

No routes

Update sent with no entries

14

Routing table change before update

Route added before timer expires

Change included in next update

15

Routing table unchanged

No changes

Same update sent

16

Update with valid checksum

Correct packet

Packet accepted

17

Update with invalid checksum

Corrupted packet

Packet discarded

18

Update with TTL = 255

Valid TTL

Packet accepted

19

Update with TTL = 1

TTL expired

Packet dropped

20

Update with valid source IP

Known router

Packet accepted

21

Update with spoofed source IP

Fake IP

Packet ignored

22

Update with valid destination

Broadcast address

Packet accepted

23

Update with invalid destination

Unicast or multicast

Packet ignored

24

Update with valid version

Version = 1

Packet processed

25

Update with invalid version

Version ? 1

Packet ignored

26

Update with valid command

Command = 2

Packet processed

27

Update with invalid command

Command ? 1 or 2

Packet ignored

28

Update with valid AFI

AFI = 2

Route accepted

29

Update with invalid AFI

AFI ? 2

Route ignored

30

Update with metric = 1

Valid route

Route accepted

31

Update with metric = 16

Unreachable route

Route marked unreachable

32

Update with metric > 16

Invalid metric

Route ignored

33

Update with duplicate routes

Same route repeated

Last entry used

34

Update with inconsistent metrics

Same route, different metrics

Lowest metric used

35

Update with valid IP

192.168.1.0

Route accepted

36

Update with invalid IP

300.0.0.0

Route ignored

37

Update with loopback IP

127.0.0.0

Route ignored

38

Update with multicast IP

224.0.0.0

Route ignored

39

Update with broadcast IP

255.255.255.255

Route ignored

40

Update with default route

0.0.0.0

Route accepted

41

Update with private IP

10.0.0.0

Route accepted

42

Update with public IP

8.8.8.0

Route accepted

43

Update with route to self

Own IP

Route ignored

44

Update with valid UDP port

Port = 520

Packet accepted

45

Update with invalid UDP port

Port ? 520

Packet ignored

46

Update with authentication field

Not supported in RIPv1

Field ignored

47

Update with next hop field

Not supported in RIPv1

Field ignored

48

Update with route tag

Not supported in RIPv1

Field ignored

49

Update with max entries

25 routes

All processed

50

Update with no entries

Empty update

Packet processed

No Authentication - Testcases

No Authentication - Test Cases

#

Test Case

Description

Expected Result

1

RIPv1 packet without authentication

Standard RIPv1 format

Packet accepted

2

RIPv1 packet with authentication field

Field manually added

Field ignored

3

RIPv2 packet with plain text authentication

Sent to RIPv1 router

Packet ignored

4

RIPv2 packet with MD5 authentication

Sent to RIPv1 router

Packet ignored

5

RIPv1 router configured for authentication

Configuration attempt

Ignored or error

6

RIPv1 router receives authenticated update

Auth field present

Field ignored

7

RIPv1 router sends update without auth

Standard behavior

Packet accepted

8

RIPv1 router sends update with auth field

Field added manually

Field ignored

9

Auth field in routing entry

Entry contains auth

Ignored

10

Auth field in header

Header contains auth

Ignored

11

Auth field with valid checksum

Packet checksum valid

Field ignored

12

Auth field with invalid checksum

Packet corrupted

Packet discarded

13

Auth field with TTL = 255

Valid TTL

Field ignored

14

Auth field with TTL = 1

TTL expired

Packet dropped

15

Auth field with spoofed source

Fake IP

Packet ignored

16

Auth field with valid source

Known router

Field ignored

17

Auth field with valid port

UDP port 520

Field ignored

18

Auth field with invalid port

Port ? 520

Packet ignored

19

Auth field with valid version

Version = 1

Field ignored

20

Auth field with invalid version

Version ? 1

Packet ignored

21

Auth field with valid command

Command = 2

Field ignored

22

Auth field with invalid command

Command ? 1 or 2

Packet ignored

23

Auth field with valid AFI

AFI = 2

Field ignored

24

Auth field with invalid AFI

AFI ? 2

Packet ignored

25

Auth field with valid metric

Metric = 1

Field ignored

26

Auth field with invalid metric

Metric > 16

Packet ignored

27

Auth field with route to private IP

10.0.0.0

Field ignored

28

Auth field with route to public IP

8.8.8.0

Field ignored

29

Auth field with route to loopback

127.0.0.0

Field ignored

30

Auth field with route to broadcast

255.255.255.255

Field ignored

31

Auth field with route to multicast

224.0.0.0

Field ignored

32

Auth field with route to default

0.0.0.0

Field ignored

33

Auth field with duplicate routes

Same route repeated

Field ignored

34

Auth field with inconsistent metrics

Same route, different metrics

Field ignored

35

Auth field with valid IP

192.168.1.0

Field ignored

36

Auth field with invalid IP

300.0.0.0

Packet ignored

37

Auth field with empty routing table

No routes

Field ignored

38

Auth field with max entries

25 routes

Field ignored

39

Auth field with route tag

Not supported in RIPv1

Field ignored

40

Auth field with next hop

Not supported in RIPv1

Field ignored

41

Auth field with periodic update

Every 30 sec

Field ignored

42

Auth field with rapid update

Every 5 sec

Field ignored

43

Auth field with delayed update

Every 5 min

Field ignored

44

Auth field with valid interface

Interface up

Field ignored

45

Auth field with disabled interface

Interface down

No update sent

46

Auth field with valid checksum and TTL

Valid packet

Field ignored

47

Auth field with invalid checksum and TTL

Corrupted packet

Packet discarded

48

Auth field with valid command and AFI

Valid packet

Field ignored

49

Auth field with invalid command and AFI

Invalid packet

Packet ignored

50

Auth field with mixed RIPv1/RIPv2 routers

RIPv1 in mixed network

Auth field ignored by RIPv1

  • Reference links