这是一个关于 IPv4 子网的规范问题。
有关的:
子网划分是如何工作的,您是如何手动或在头脑中完成的? 有人可以从概念上和几个例子来解释吗?Server Fault 有很多子网划分作业问题,因此我们可以使用答案将它们指向 Server Fault 本身。
对于挂载 Infiniband 卡的服务器,当我使用该ifconfig
命令时,我收到以下警告:
Ifconfig uses the ioctl access method to get the full address
information, which limits hardware addresses to 8 bytes.
Because Infiniband address has 20 bytes, only the first 8 bytes
are displayed correctly.
Ifconfig is obsolete! For replacement check ip.
Run Code Online (Sandbox Code Playgroud)
我应该停止使用ifconfig
吗?它是否已被弃用以支持该ip
命令?还是会在近期更新?
注意:这个问题和答案是关于GNU/Linux 的“主要”发行版的。不应假定该信息适用于所有发行版,尤其不适用于其他操作系统。
以下是我的 ifconfig 输出
eth0 Link encap:Ethernet
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:28 Base address:0x2000
eth1 Link encap:Ethernet
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:36497 errors:0 dropped:0 overruns:0 frame:14515
TX packets:44884 errors:1352 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20781745 (20.7 MB) TX bytes:17776225 (17.7 MB)
Interrupt:17 Base address:0xc000
lo Link encap:Local Loopback
inet addr:127.0.0.1 …
Run Code Online (Sandbox Code Playgroud)