When it comes to local networks, you have the freedom to use any IP address you want for your network since it doesn't need to communicate on the internet with other devices. However, the RFC specified a range for private IP addresses (such as 10.x.x.x and 192.168.0-255.x). Why a range would be needed if the communication outside the local network uses a public IP address?. If I had a router with an interface g0/0 connected to the local network with the IP address 192.168.0.1 or 244.18.42.9, it doesn't make a difference because NAT will translate the IP addresses to a public address that will be the representative of the local network no matter what private IP address it has.
RFC 1918 provides address ranges that you can safely use within a private network without any danger that these same addresses might be used on the public Internet.
Any node within your network needs to be able to address any destination it requires. If your local network uses the same address range (subnet) that some public servers do (e.g
244.18.42.0/24), that address range would be attempted to be sent to internally, without ever reaching the actually intended destination. As a result, such a server (e.g.
244.18.42.73) cannot be connected to from your network.
If your network doesn't connect to the Internet or doesn't require any services from it, then you could of course use any address/subnet you like. That however would effectively prevent your network to be easily connected to the Internet at a later time (been there, seen that, not recommended).
Since there's sufficient address range in RFC 1918 spaces for pretty much anything there's no good reason to do ignore proper private address allocation.
Why do we need private addresses such as RFC1918?
Well, say for instance you configure your local network with your router interface
184.108.40.206/24. You configure your clients with DHCP of range
Everything will work fine, your clients in your local network will be able to contact each other. You can even S-NAT these addresses to your WAN-interface IP.
The problem however, say one of your clients on your other LAN network (
192.168.0.0/24) is using
220.127.116.11 as DNS (google DNS). Your router will always send that packet out of its own
connected interface, because that will always be the shortest path.
Also your clients in
18.104.22.168/24 network itself will never forward packets to the router interface, as the clients will try to ARP for
This is one reason why you have a set of RFC1918 addresses to use on your local network. Because no one is supposed to own these on public routed Internet.