[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Content of /etc/ethers



On Wed, Jan 3, 2024 at 6:58 PM Greg Wooledge <greg@wooledge.org> wrote:
> What's not really stated anywhere is *why* these library functions
> exist.  I don't see many practical application for a library function
> that reads a text file full of MAC addresses and hostnames, looks up
> one of them, and spits out the other half of the line it's on.  You'd
> get more usefulness just doing "grep somename /etc/ethers".
>
> The Debian ethers(5) page references arp(8), so one might conclude
> that this file is intended to augment/prettify the output of "arp" so
> that it contains hostnames in addition to (or instead of) MAC addresses.
> But the main use of the "arp" command has always been to find out the MAC
> address of a host whose IP address you already know (or can get from DNS),
> but whose MAC address is not currently known.  So, if you've already got
> a text file full of these MAC addresses, why would you even need to run
> the arp command in the first place?

IPv4 and IPv6 are not the only network protocols that can be used on
Ethernet.  Nor were they the first, and definitely not the only ones
on unix-like systems.

One can do raw ethernet packets.  Or IPX, NetBIOS (used by SMB,
Lantastic, and others), AppleTalk, Banyan's VINES, PPPoE, DECnet, ,
probably XNS.

Probably many I missed, and perhaps some future enet based protocols
that are not inet based.

Reading https://en.wikipedia.org/wiki/Xerox_Network_Systems:
> XNS also helped to validate the design of the 4.2BSD network subsystem by providing a second protocol suite, one which was significantly different from the Internet protocols; by implementing both stacks in the same kernel, Berkeley researchers demonstrated that the design was suitable for more than just IP.

The getent(1) support ethers, so you can probably use that to test any
information you put in there.  As mentioned in the getent man page,
ethers is one of the databases supported by NSS.

mrc


Reply to: