免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1407 | 回复: 0
打印 上一主题 下一主题

ipconfig/ifconfig [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-08 13:56 |只看该作者 |倒序浏览
Windows系统下使用ipconfig得到计算机的IP地址配置情况,在Linux/Unix下一般使用ifconfig
一、运行—CMD,在命令提示符下:
C:Documents and Settingslxiang>ipconfig /?
USAGE:
    ipconfig [/? | /all | /renew [adapter] | /release [adapter] |
              /flushdns | /displaydns | /registerdns |
              /showclassid adapter |
              /setclassid adapter [classid] ]
where
    adapter         Connection name
                   (wildcard characters * and ? allowed, see examples)
    Options:
       /?           Display this help message
       /all         Display full configuration information.
       /release     Release the IP address for the specified adapter.
       /renew       Renew the IP address for the specified adapter.
       /flushdns    Purges the DNS Resolver cache.
       /registerdns Refreshes all DHCP leases and re-registers DNS names
       /displaydns  Display the contents of the DNS Resolver Cache.
       /showclassid Displays all the dhcp class IDs allowed for adapter.
       /setclassid  Modifies the dhcp class id.
The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.
For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.
For Setclassid, if no ClassId is specified, then the ClassId is removed.
Examples:
    > ipconfig                   ... Show information.
    > ipconfig /all              ... Show detailed information
    > ipconfig /renew            ... renew all adapters
    > ipconfig /renew EL*        ... renew any connection that has its
                                     name starting with EL
    > ipconfig /release *Con*    ... release all matching connections,
                                     eg. "Local Area Connection 1" or
                                         "Local Area Connection 2"
一般使用ipconfig /all得到计算机的计算机名称,计算机的网卡型号,网卡的地址,计算机配置的IP地址,子网掩码,网关地址,DNS服务器地址
二、在Linux下在shell中输入:ifconfig -a ,得到地址配置情况
[root@srun2 FreeBSD]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:30:48:28:B6:86  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18672312 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7884849 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:2156943357 (2057.0 Mb)  TX bytes:2125880712 (2027.3 Mb)
          Interrupt:54 Base address:0x3000 Memory:fc220000-fc240000
eth1      Link encap:Ethernet  HWaddr 00:30:48:28:B6:87  
          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:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:22 Base address:0x5400 Memory:fc401000-fc401038
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:764986 errors:0 dropped:0 overruns:0 frame:0
          TX packets:764986 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:185250810 (176.6 Mb)  TX bytes:185250810 (176.6 Mb)


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/11430/showart_55802.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP