TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Questions: History of Ifconfig

10 点作者 MatrixInfo将近 5 年前
I&#x27;m writing an article on the development history of ifconfig, and some remnants of earlier protocols that remain in the command defaults. Specifically, in BSD and Linux, we&#x27;ve found that there are some defaults in the subnet mask parameters that can bite an admin if they don&#x27;t know about them.<p>These defaults derive from the old classful network address system of the late 80s-early 90s. I&#x27;m trying to understand why those behaviors haven&#x27;t been removed since classful networks went away. I think I understand in the case of Linux: Classful networks ended in 1993, and support for net-tools in Linux ended in 2001.<p>I&#x27;ve seen hints though that development for net-tools continues to the present in BSD. So my questions are...<p>1) Is net-tools&#x2F;ifconfig still in development for BSD? 2) If not, then when did it end? 3) If so, then do you have any idea why it&#x27;s still using defaults based on classful networks?

3 条评论

sigjuice将近 5 年前
Which BSDs did you try and what is the precise behavior of subnet mask parameters that you had a problem with? It would be best if you could include the exact ifconfig command, the output from running the command and what was the expected outcome.<p>1) Yes, there is active development. BSDs don&#x27;t have net-tools as a separately developed package.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;commits&#x2F;master&#x2F;sbin&#x2F;ifconfig" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;commits&#x2F;master&#x2F;sbin&#x2F;ifconfig</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;freebsd&#x2F;freebsd&#x2F;commits&#x2F;master&#x2F;sbin&#x2F;ifconfig" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;freebsd&#x2F;freebsd&#x2F;commits&#x2F;master&#x2F;sbin&#x2F;ifcon...</a>
sigjuice将近 5 年前
It turns out the ifconfig command does not provide any default subnet mask parameters. That is done inside the kernel. Changing the kernel would break backwards compatibility.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;blob&#x2F;0970cb57551e0e8df6688f8a475400ea57aba548&#x2F;sys&#x2F;netinet&#x2F;in.c#L664" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;blob&#x2F;0970cb57551e0e8df6688f8a...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;torvalds&#x2F;linux&#x2F;blob&#x2F;cb8e59cc87201af93dfbb6c3dccc8fcad72a09c2&#x2F;net&#x2F;ipv4&#x2F;devinet.c#L1173" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;torvalds&#x2F;linux&#x2F;blob&#x2F;cb8e59cc87201af93dfbb...</a>
cpach将近 5 年前
There was a thread about ifconfig earlier this year: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22626346" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22626346</a>