The following figure shows the RIP packet format.
A RIP packet consists of the following fields:
Command
Indicates whether the packet is a request or a response message. The request asks the responding system to send all or part of its routing table. The response may be sent in response to a request, or it may be an unsolicited routing update generated by the sender.
Version
The RIP version used. This field can signal different potentially incompatible versions.
Must be zero
Not used in RIPv1. This field provides backward compatibility with pre-standard varieties of RIP. The default value is zero.
Address family identifier (AFI)
The AFI is the type of address. RIP can carry routing information for several different protocols. Each entry in this field has an AFI to indicate the type of address being specified. The IP AFI is 2.
Address
The IP address for the packet.
Metric
Specifies the number of hops to the destination.
Mask
Specifies the IP address mask.
Next hop
Specifies the IP address of the next router along the path to the destination.