RFCs for IP Address Usage in Network Documentation and Examples
Originally published on Hashnode.
Network documentation and topology examples should use address ranges
reserved for documentation, rather than globally routed addresses such as
1.1.1.1 or 1.2.3.4.
Two RFCs define standardized IP address ranges reserved specifically for
documentation and examples: RFC3849 and
RFC5737. RFC3849 outlines the use of the IPv6
address prefix 2001:DB8::/32, while RFC5737 outlines the use of
several IPv4 address blocks, including 192.0.2.0/24,
198.51.100.0/24, and 203.0.113.0/24. These addresses are not
intended for use in a production network but instead serve as
placeholders to ensure accurate and clear documentation.
RFC3849: IPv6 Address Prefix Reserved for Documentation
RFC3849 specifies the IPv6 address prefix
2001:DB8::/32 for use in documentation and example code, not in a
production network. For example, a network administrator might use the
IPv6 address 2001:DB8::1 in their documentation or example code to
represent a specific device or network location. This address would not
be used for actual network traffic, but rather as a reference point for
documentation purposes.
RFC5737: IPv4 Address Blocks Reserved for Documentation
RFC5737 outlines the use of several IPv4 address
blocks for use in documentation and example code. These address blocks
are similar to the IPv4 addresses outlined in
RFC5735 (which contains more special blocks such as
0.0.0.0/8), but are specifically for use in documentation and
examples.
The address blocks outlined in RFC5737 include:
-
192.0.2.0/24 -
198.51.100.0/24 -
203.0.113.0/24
Similarly, these address blocks are not intended for use in a production network, but rather as placeholders for documentation and examples.
Proper Use of Reserved IP Addresses
Using reserved IP addresses for documentation and examples is essential for a number of reasons. First, it ensures that these addresses are not used for general Internet routing, which can help to prevent routing issues and other network problems. Second, it helps to prevent confusion and technical issues that can arise when non-reserved addresses are used in documentation or example code.
In recent years, there have been cases where non-reserved IP addresses
have been used in documentation and examples, leading to confusion and
technical issues. In a recent YouTube video, Cloudflare’s Tom Strickx
highlighted this problem and encouraged operators to avoid addresses such
as 1.1.1.1 and 1.2.3.4, using the ranges specified in RFC5735,
RFC5737, and RFC3849 instead.
https://www.youtube.com/watch?v=SIb_wxO1wt0
Using reserved IP addresses in documentation and examples avoids unintended traffic to real networks and improves clarity for readers. RFC3849 and RFC5737 provide the standard address ranges for these use cases, and network operators and researchers should use them consistently in examples and documentation.