When RIP router sends update to routers, why it is limited to use only 512 bytes
of UDP data. Why not more than that, even when it has a 1500 byte MTU. How is the maximum of 512 bytes determined?
Routing – why RIP sending only maximum of 512 bytes of data
protocol-theoryriproutingudp
Related Solutions
Am I right in saying that an Ethernet frame MTU is 1526 while the MTU at the IP layer is 1500?
The Ethernet MTU is 1500 bytes, meaning the largest IP packet (or some other payload) an Ethernet frame can contain is 1500 bytes. Adding 26 bytes for the Ethernet header results in a maximum frame (not the same as MTU) of 1526 bytes.
Does the MTU change at each phase of encapsulation, or is the term "MTU" only meant to define the maximum size of a packet at layer 3?
The MTU is often considered a property of a network link, and will generally refer to the layer 2 MTU. The limits at layer 3 are far higher (see below) and cause no issues.
The length of an IP packet (layer 3) is limited by the maximum value of the 16 bit Total Length field in the IP header. For IPv4, this results in a maximum payload size of 65515 (= 2^16 - 1 - 20 bytes header). Because IPv6 has a 40 byte header, it allows for payloads up to 65495. And IIRC using the Jumbo Payload header extension, IPv6 could allow packets up to 4 GB...
When setting up a TCP connection, a Maximum Segment Size (MSS) is agreed upon. This could be considered an MTU at layer 4, but it is not fixed. It is often set to the largest payload that can be sent in a TCP segment without causing fragmentation, thus reflecting the lowest layer 2 MTU on the path. With an ethernet MTU of 1500, this MSS would be 1460 after subtracting 20 bytes for the IPv4 and TCP header.
IPv6 Fragmentation
Only IPv6 hosts can fragment (ref RFC 2460 - IPv6 Specification, Section 4.5):
4.5 Fragment Header
The Fragment header is used by an IPv6 source to send a packet larger
than would fit in the path MTU to its destination. (Note: unlike
IPv4, fragmentation in IPv6 is performed only by source nodes, not by
routers along a packet's delivery path -- see section 5.
IPv4 Fragmentation
IPv4 hosts optionally may fragment (ref RFC 1122 - Internet Host requirements, Section 3.3.3), and IPv4 routers must perform fragmentation.
Quoting RFC 1122 - Internet Host requirements, Section 3.3.3:
3.3.3 Fragmentation
Optionally, the IP layer MAY implement a mechanism to fragment
outgoing datagrams intentionally.
Quoting RFC 1812 - IP Router Requirements, Section 4.2.2.7
4.2.2.7 Fragmentation: RFC 791 Section 3.2
Fragmentation, as described in [INTERNET:1], MUST be supported by a
router.
Example:
It's fairly easy to illustrate how hosts fragment... for instance ping an internet host with a very large ping size (>1500 bytes)...
In terminal 1:
[mpenning@Bucksnort ~]$ ping -c 1 -s 65507 4.2.2.2
In terminal 2:
[mpenning@Bucksnort ~]$ sudo tshark -n -i eth0 icmp
1 0.000000 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=0)
2 0.000058 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=1480)
3 0.000071 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=2960)
4 0.000081 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=4440)
5 0.000094 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=5920)
6 0.000105 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=7400)
7 0.000116 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=8880)
8 0.000124 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=10360)
9 0.000133 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=11840)
10 0.000143 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=13320)
11 0.000152 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=14800)
12 0.000162 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=16280)
13 0.000172 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=17760)
14 0.000181 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=19240)
15 0.000191 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=20720)
16 0.000201 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=22200)
17 0.000211 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=23680)
18 0.000221 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=25160)
19 0.000230 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=26640)
20 0.000240 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=28120)
21 0.000250 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=29600)
22 0.000259 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=31080)
23 0.000269 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=32560)
24 0.000278 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=34040)
25 0.000288 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=35520)
26 0.000298 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=37000)
27 0.000308 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=38480)
28 0.000318 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=39960)
29 0.000327 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=41440)
30 0.000337 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=42920)
31 0.000352 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=44400)
32 0.000361 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=45880)
33 0.000372 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=47360)
34 0.000384 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=48840)
35 0.000394 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=50320)
36 0.000403 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=51800)
37 0.000411 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=53280)
38 0.000419 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=54760)
39 0.000428 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=56240)
40 0.000437 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=57720)
41 0.000446 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=59200)
42 0.000455 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=60680)
43 0.000466 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=62160)
44 0.000477 192.0.2.3 -> 4.2.2.2 IP Fragmented IP protocol (proto=ICMP 0x01,
off=63640)
45 0.000486 192.0.2.3 -> 4.2.2.2 ICMP Echo (ping) request
46 0.044402 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=0)
47 0.044439 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=1480)
48 0.044899 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=2960)
49 0.044910 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=4440)
50 0.044916 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=5920)
51 0.045149 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=7400)
52 0.045399 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=8880)
53 0.045409 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=10360)
54 0.045415 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=11840)
55 0.045649 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=13320)
56 0.045899 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=14800)
57 0.045908 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=16280)
58 0.045915 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=17760)
59 0.046148 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=19240)
60 0.046163 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=20720)
61 0.046402 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=22200)
62 0.046421 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=23680)
63 0.046650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=25160)
64 0.046668 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=26640)
65 0.046901 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=28120)
66 0.046918 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=29600)
67 0.047151 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=31080)
68 0.047171 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=32560)
69 0.047399 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=34040)
70 0.047418 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=35520)
71 0.047424 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=37000)
72 0.047650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=38480)
73 0.047900 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=39960)
74 0.048149 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=41440)
75 0.048165 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=42920)
76 0.048172 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=44400)
77 0.048178 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=45880)
78 0.048398 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=47360)
79 0.048650 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=48840)
80 0.048667 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=50320)
81 0.048674 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=51800)
82 0.048900 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=53280)
83 0.048922 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=54760)
84 0.049150 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=56240)
85 0.049174 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=57720)
86 0.049398 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=59200)
87 0.049649 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=60680)
88 0.049671 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=62160)
89 0.049677 4.2.2.2 -> 192.0.2.3 IP Fragmented IP protocol (proto=ICMP 0x01,
off=63640)
90 0.049683 4.2.2.2 -> 192.0.2.3 ICMP Echo (ping) reply
Best Answer
You can find this on Page 19 of RFC 1058: RIP, the maximum UDP payload of a RIP update is 512 bytes:
This means RIP can carry a maximum of 25 routes in a RIP update packet. When RIP was conceived, 512 bytes was a reasonable maximum