ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Solaris10 网卡管理常用命令

Solaris10 网卡管理常用命令

原创 Linux操作系统 作者:cqubityj 时间:2008-11-21 13:26:44 0 删除 编辑

1. dladm show-dev
显示系统上已经安装的网卡设备
root@ocs00biiitf001:~ #> dladm show-dev
e1000g0         link: up        speed: 100   Mbps       duplex: full
e1000g1         link: down      speed: 0     Mbps       duplex: half
e1000g2         link: down      speed: 0     Mbps       duplex: half
e1000g3         link: unknown   speed: 0     Mbps       duplex: half

2. dladm show-link
显示系统上连接情况
root@ocs00biiitf001:~ #> dladm show-link
e1000g0         type: non-vlan  mtu: 1500       device: e1000g0
e1000g1         type: non-vlan  mtu: 1500       device: e1000g1
e1000g2         type: non-vlan  mtu: 1500       device: e1000g2
e1000g3         type: non-vlan  mtu: 1500       device: e1000g3

3. 使用ndd设置或获取网卡参数
root@ocs00biiitf001:~ #> ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
        inet 10.0.17.70 netmask ff000000 broadcast 10.255.255.255
        ether 0:14:4f:46:28:96
e1000g1: flags=1000803 mtu 1500 index 3
        inet 0.0.0.0 netmask ff000000
        ether 0:14:4f:46:28:97
root@ocs00biiitf001:~ #> ndd /dev/e1000g0 \? (显示所有网卡参数)
?                             (read only)
autoneg_cap                   (read only)
pause_cap                     (read only)
asym_pause_cap                (read only)
1000fdx_cap                   (read only)
1000hdx_cap                   (read only)
100T4_cap                     (read only)
100fdx_cap                    (read only)
100hdx_cap                    (read only)
10fdx_cap                     (read only)
10hdx_cap                     (read only)
adv_autoneg_cap               (read and write)
adv_pause_cap                 (read only)
adv_asym_pause_cap            (read only)
adv_1000fdx_cap               (read and write)
....
root@ocs00biiitf001:~ #> ndd /dev/e1000g0 link_duplex (取某个参数值)
2
ndd -set可以设置参数值

4. kstat显示网卡内核统计数据
root@ocs00biiitf001:~ #> kstat -m e1000g -i 0
module: e1000g                          instance: 0    
name:   e1000g0                         class:    net
        brdcstrcv                       31510
        brdcstxmt                       1310
        collisions                      0
        crtime                          218.740947758
        ierrors                         0
        ifspeed                         100000000
        ipackets                        284636
        ipackets64                      284636
        multircv                        176827
        multixmt                        0
        norcvbuf                        0
        noxmtbuf                        0
        obytes                          34093045
        obytes64                        34093045
        oerrors                         0
        opackets                        77928
        opackets64                      77928
        rbytes                          33972528
        rbytes64                        33972528
        snaptime                        252720.925488114
        unknowns                        0

module: e1000g                          instance: 0    
name:   mac                             class:    net
        adv_cap_1000fdx                 1
        adv_cap_1000hdx                 0
        adv_cap_100fdx                  1
        adv_cap_100hdx                  1
        adv_cap_10fdx                   1
        adv_cap_10hdx                   1
        adv_cap_asmpause                1
        adv_cap_autoneg                 1
......

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/228190/viewspace-498311/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-19

  • 博文量
    133
  • 访问量
    426779