fbpx
维基百科

ifconfig

ifconfig(interface configuration的缩写)是在类Unix作业系统中于命令行界面(CLI)下或系统配置脚本中用于配置、控制及查询TCP/IP网络接口的系统管理工具。ifconfig最初于4.2BSD中作为BSD TCP/IP协议族的一部分出现。

用法 编辑

ifconfig的常见用途包括设置接口的IP地址子网掩码,以及禁用与启用接口。[1]在启动时,许多类Unix作业系统通过调用ifconfig的shell脚本初始化网络接口。作为交互工具,系统管理员经常使用其来显示并分析网络接口参数。下面的样例输出展示了一Linux主机(接口eth0)和OpenBSD主机上的ural0活跃接口状态:

 eth0 Link encap:Ethernet HWaddr 00:0F:20:CF:8B:42 inet addr:217.149.127.10 Bcast:217.149.127.63 Mask:255.255.255.192 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2472694671 errors:1 dropped:0 overruns:0 frame:0 TX packets:44641779 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1761467179 (1679.7 Mb) TX bytes:2870928587 (2737.9 Mb) Interrupt:28 
 ural0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:0d:0b:ed:84:fb media: IEEE802.11 DS2 mode 11b hostap (autoselect mode 11b hostap) status: active ieee80211: nwid ARK chan 11 bssid 00:0d:0b:ed:84:fb 100dBm inet 172.30.50.1 netmask 0xffffff00 broadcast 172.30.50.255 inet6 fe80::20d:bff:feed:84fb%ural0 prefixlen 64 scopeid 0xa 

当前状态 编辑

开放的伯克利软件套件UNIX作业系统(如NetBSDOpenBSDFreeBSD)仍在活跃地开发ifconfig,并将其功能扩展到包含无线网络接口设置、VLAN中继、操控硬件功能(如TSO或硬件检验和计算)及设置桥接与隧道接口等。

Solaris曾经使用ifconfig来进行所有网络相关的配置,但自Solaris 10引入dladm来进行链路层(OSI模型第二层)配置后,ifconfig就仅能被用于进行IP(OSI模型第三层)配置。并且用户被建议使用ipadm而不是ifconfig来配置IP因为ifconfig所作出的配置不是持久的。[2]

在旧的Linux发行版中,ifconfig与route命令一同使用,用于连接计算机到网络及定义不同网络间的路由。Linux上的ifconfig是net-tools软件包的一部分。[3]

现代Linux发行版正淘汰ifconfig与route,用iproute2取代過時的net-tools,[4]然而至今仍有许多发行版还未完全替换。[5]

相关工具 编辑

Microsoft WindowsWindows 9x都提供winipcfg给出当前IP信息的图形化显示。基于Windows NT内核微软作业系统均有提供ipconfig,一个与ifconfig类似的命令。ipconfig也可控制Windows DHCP客户端

Mac OS X中,ifconfig是IPConfiguration的封装,可于命令行控制BootP和DHCP客户端。由于ifconfig工作在协助管理网络设置的系统框架之下,不推荐使用ifconfig更改OS X的网络设置。要在命令行中更动Mac OS X的网络设置,应使用/usr/sbin/ipconfig或/usr/sbin/networksetup。

iwconfig,Wireless tools for Linux的一部分,名字即来源于ifconfig,用于管理在Linux的ifconfig最初范围外的无线网络接口。iwconfig可修改如无线网络的SSIDWEP密钥的无线网络专有设置,并与iwlist协同工作。Linux也包含iwspy以读取无线连接的信号、噪音与质量。

其它配置以太网适配器的相关工具包括适用Linux的ethtool、mii-tool、mii-diag,以及适用于Solaris的dladm show-link

Solaris也提供ipadm来管理IP配置。

参考资料 编辑

  1. ^ Linux Network Administrators Guide Section 5.7. Interface Configuration for IP (页面存档备份,存于互联网档案馆
  2. ^ Comparison Map: ifconfig and ipadm Commands. [2020-04-15]. (原始内容于2016-10-16). 
  3. ^ . SourceForge.net. [2021-06-12]. (原始内容存档于2021-04-30) (英语). 
  4. ^ Gundersen, Tom. News: Deprecation of net-tools. [4 August 2011]. (原始内容于2020-11-27). 
  5. ^ https://fedorahosted.org/releases/i/n/initscripts/ (页面存档备份,存于互联网档案馆) release 9.24 still showing traces of invocations of ifconfig

外部链接 编辑

  • ifconfig(8)(页面存档备份,存于互联网档案馆), manpage for Linux net-tools ifconfig
  • ifconfig(8)(页面存档备份,存于互联网档案馆), manpage for the FreeBSD ifconfig
  • ifconfig(8), manpage for the OpenBSD ifconfig
  • ifconfig(8)(页面存档备份,存于互联网档案馆), manpage for the Solaris ifconfig
  • networksetup(8)(页面存档备份,存于互联网档案馆), manpage for the Mac OS X networksetup
  • for Windows
  • ipconfig(页面存档备份,存于互联网档案馆) for Windows on a technet.microsoft.com(页面存档备份,存于互联网档案馆
  • ip(页面存档备份,存于互联网档案馆), manpage for the Linux command ip
  • Debian net-tools(页面存档备份,存于互联网档案馆) page, which includes sources of the Linux version of ifconfig
  • net-tools future(页面存档备份,存于互联网档案馆) thread, from current maintainers

ifconfig, interface, configuration的缩写, 是在类unix作业系统中于命令行界面, 下或系统配置脚本中用于配置, 控制及查询tcp, ip网络接口的系统管理工具, 最初于4, 2bsd中作为bsd, ip协议族的一部分出现, 目录, 用法, 当前状态, 相关工具, 参考资料, 外部链接用法, 编辑的常见用途包括设置接口的ip地址和子网掩码, 以及禁用与启用接口, 在启动时, 许多类unix作业系统通过调用的shell脚本初始化网络接口, 作为交互工具, 系统管理员经常使用其来显示并. ifconfig interface configuration的缩写 是在类Unix作业系统中于命令行界面 CLI 下或系统配置脚本中用于配置 控制及查询TCP IP网络接口的系统管理工具 ifconfig最初于4 2BSD中作为BSD TCP IP协议族的一部分出现 目录 1 用法 2 当前状态 3 相关工具 4 参考资料 5 外部链接用法 编辑ifconfig的常见用途包括设置接口的IP地址和子网掩码 以及禁用与启用接口 1 在启动时 许多类Unix作业系统通过调用ifconfig的shell脚本初始化网络接口 作为交互工具 系统管理员经常使用其来显示并分析网络接口参数 下面的样例输出展示了一Linux主机 接口eth0 和OpenBSD主机上的ural0活跃接口状态 eth0 Link encap Ethernet HWaddr 00 0F 20 CF 8B 42 inet addr 217 149 127 10 Bcast 217 149 127 63 Mask 255 255 255 192 UP BROADCAST RUNNING MULTICAST MTU 1500 Metric 1 RX packets 2472694671 errors 1 dropped 0 overruns 0 frame 0 TX packets 44641779 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 1000 RX bytes 1761467179 1679 7 Mb TX bytes 2870928587 2737 9 Mb Interrupt 28 ural0 flags 8843 lt UP BROADCAST RUNNING SIMPLEX MULTICAST gt mtu 1500 lladdr 00 0d 0b ed 84 fb media IEEE802 11 DS2 mode 11b hostap autoselect mode 11b hostap status active ieee80211 nwid ARK chan 11 bssid 00 0d 0b ed 84 fb 100dBm inet 172 30 50 1 netmask 0xffffff00 broadcast 172 30 50 255 inet6 fe80 20d bff feed 84fb ural0 prefixlen 64 scopeid 0xa当前状态 编辑开放的伯克利软件套件UNIX作业系统 如NetBSD OpenBSD和FreeBSD 仍在活跃地开发ifconfig 并将其功能扩展到包含无线网络接口设置 VLAN中继 操控硬件功能 如TSO或硬件检验和计算 及设置桥接与隧道接口等 Solaris曾经使用ifconfig来进行所有网络相关的配置 但自Solaris 10引入dladm来进行链路层 OSI模型第二层 配置后 ifconfig就仅能被用于进行IP OSI模型第三层 配置 并且用户被建议使用ipadm而不是ifconfig来配置IP因为ifconfig所作出的配置不是持久的 2 在旧的Linux发行版中 ifconfig与route命令一同使用 用于连接计算机到网络及定义不同网络间的路由 Linux上的ifconfig是net tools软件包的一部分 3 现代Linux发行版正淘汰ifconfig与route 用iproute2取代過時的net tools 4 然而至今仍有许多发行版还未完全替换 5 相关工具 编辑Microsoft Windows的Windows 9x都提供winipcfg给出当前IP信息的图形化显示 基于Windows NT内核的微软作业系统均有提供ipconfig 一个与ifconfig类似的命令 ipconfig也可控制Windows DHCP客户端 在Mac OS X中 ifconfig是IPConfiguration的封装 可于命令行控制BootP和DHCP客户端 由于ifconfig工作在协助管理网络设置的系统框架之下 不推荐使用ifconfig更改OS X的网络设置 要在命令行中更动Mac OS X的网络设置 应使用 usr sbin ipconfig或 usr sbin networksetup iwconfig Wireless tools for Linux的一部分 名字即来源于ifconfig 用于管理在Linux的ifconfig最初范围外的无线网络接口 iwconfig可修改如无线网络的SSID和WEP密钥的无线网络专有设置 并与iwlist协同工作 Linux也包含iwspy以读取无线连接的信号 噪音与质量 其它配置以太网适配器的相关工具包括适用Linux的ethtool mii tool mii diag 以及适用于Solaris的dladm show link Solaris也提供ipadm来管理IP配置 参考资料 编辑 Linux Network Administrators Guide Section 5 7 Interface Configuration for IP 页面存档备份 存于互联网档案馆 Comparison Map ifconfig and ipadm Commands 2020 04 15 原始内容存档于2016 10 16 net tools download SourceForge net 2021 06 12 原始内容存档于2021 04 30 英语 Gundersen Tom News Deprecation of net tools 4 August 2011 原始内容存档于2020 11 27 https fedorahosted org releases i n initscripts 页面存档备份 存于互联网档案馆 release 9 24 still showing traces of invocations of ifconfig外部链接 编辑ifconfig 8 页面存档备份 存于互联网档案馆 manpage for Linux net tools ifconfig ifconfig 8 页面存档备份 存于互联网档案馆 manpage for the FreeBSD ifconfig ifconfig 8 manpage for the OpenBSD ifconfig ifconfig 8 页面存档备份 存于互联网档案馆 manpage for the Solaris ifconfig networksetup 8 页面存档备份 存于互联网档案馆 manpage for the Mac OS X networksetup ifconfig for Windows ipconfig 页面存档备份 存于互联网档案馆 for Windows on a technet microsoft com 页面存档备份 存于互联网档案馆 ip 页面存档备份 存于互联网档案馆 manpage for the Linux command ip Debian net tools 页面存档备份 存于互联网档案馆 page which includes sources of the Linux version of ifconfig net tools future 页面存档备份 存于互联网档案馆 thread from current maintainers ifconfig examples 取自 https zh wikipedia org w index php title Ifconfig amp oldid 73109757, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。