ifconfig accepting hostname as ipv4 address

Kevin Oberman kob6558 at gmail.com
Sat Jun 9 21:29:05 UTC 2012


On Sat, Jun 9, 2012 at 12:37 AM, Garrett Cooper <yanegomi at gmail.com> wrote:
> On Sat, Jun 9, 2012 at 12:23 AM, Wojciech Puchar
> <wojtek at wojtek.tensor.gdynia.pl> wrote:
>>> input.
>>> Moreover, ifconfig em0 some_valid_fqdn/MASK silently ignores it, so you
>>> can't set valid CIDR address using this notation.
>>>
>>> Classful era has ended more than 10 years ago, do we still want to keep
>>> this behavior?
>>>
>> were not aware of that option, and it is rather stupid option - you should
>> work on addresses not names when configuring network
>
>    I agree that it's not the best configuration in the world, as it
> would only work 100% if a machine had proper DNS records or a
> definitive hosts file.
>    There are already enough bugs with static IP configurations and
> hostnames as-is *I'm looking at you mountlate* -- no sense to
> introduce more potentially buggy interoperability that only works in a
> handful of niche cases.

The idea was that you could enter all of the local interface names in
/etc/hosts and than just put the names into the ifconfig commands. It
was handy for keeping track of what port connected where on systems
that had numerous interfaces, though this was more common in the day
of async serial lines and modems.

I'll admit that I have mixed feelings about its practicality today,
though it does not hurt anything, as far as I can tell.
-- 
R. Kevin Oberman, Network Engineer
E-mail: kob6558 at gmail.com


More information about the freebsd-hackers mailing list