2

I'm playing with a FreeBSD VM. I'm more accustomed to Linux, which doesn't need /etc/networks as far as I'm aware.

Nik Clayton's FreeBSD Network Administrators Guide says this about the /etc/networks file:

"Just as with a host's IP address, you should sometimes use a symbolic name for network numbers, too. Therefore, the hosts file has a companion called /etc/networks that maps network names to network numbers, and vice versa."

It goes on to give an example of use, but it doesn't explain when or why the /etc/networks file would ever be used.

I notice "man 5 networks" at the FreeBSD website mentions DARPA, which suggests it's a very old file format. The Linux edition mentions netstat and route, which are still used on FreeBSD. This suggests there might be some sort of dynamic routing use for /etc/networks the same way we use /etc/hosts in combination with DNS?

Is there a purpose to /etc/networks? Or is it just a legacy artifact of old FreeBSD versions that hasn't been removed yet?

3
  • 2
    The same /etc/networks file is present on Linux. But yes, it looks obsolete; network classes have been deprecated since the early 1990s. As this is more of a history question, I've voted to migrate this question to our sister site Unix & Linux. – Michael Hampton Aug 2 '20 at 14:26
  • I would suggest that it's a legacy from the old classful network addressing architecture. – Richard Smith Aug 2 '20 at 14:27
  • If it helps, I also vote to migrate the question. Good call, sir. – Adam J Richardson Aug 3 '20 at 15:28

Browse other questions tagged or ask your own question.