FAQ-如何查看存储设备的IP地址和MAC地址

发布时间:  2014-10-10 浏览次数:  327 下载次数:  0
问题描述
如何查看存储设备的IP地址和MAC地址?
解决方案
1、使用SSH工具登录到debug模式。

2、输入ip a命令,查询存储设备的IP地址和MAC地址。
Storage:~ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP>mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/16 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: sit0: <NOARP>mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0
3: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP>mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
    link/ether 78:1d:ba:cc:c7:6b brd ff:ff:ff:ff:ff:ff
4: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP>mtu 1500 qdisc pfifo_fast master bond0 qlen 1000
    link/ether 78:1d:ba:cc:c7:6b brd ff:ff:ff:ff:ff:ff
5: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP>mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 78:1d:ba:cc:c7:69 brd ff:ff:ff:ff:ff:ff
    inet 129.22.242.4/16 brd 129.22.255.255 scope global eth2
    inet 172.168.128.102/16 brd 172.168.255.255 scope global eth2:1
    inet6 2002:8116:93d:b:7a1d:baff:fecc:c769/64 scope global dynamic
       valid_lft 2591901sec preferred_lft 604701sec
    inet6 fec0::b:7a1d:baff:fecc:c769/64 scope site dynamic
       valid_lft 2591901sec preferred_lft 604701sec
    inet6 fec0::11/10 scope site tentative flags 08
       valid_lft forever preferred_lft forever
    inet6 fe80::7a1d:baff:fecc:c769/64 scope link
       valid_lft forever preferred_lft forever
6: eth3:<BROADCAST,MULTICAST>mtu 1500 qdisc noop qlen 1000
    link/ether 78:1d:ba:cc:c7:68 brd ff:ff:ff:ff:ff:ff
7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP>mtu 1500 qdisc noqueue
    link/ether 78:1d:ba:cc:c7:6b brd ff:ff:ff:ff:ff:ff
    inet 127.127.127.11/24 brd 127.127.127.255 scope global bond0
    inet6 fe80::7a1d:baff:fecc:c76b/64 scope link
       valid_lft forever preferred_lft forever
8: bond1: <BROADCAST,MULTICAST,MASTER>mtu 1500 qdisc noop
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
9: bond2: <BROADCAST,MULTICAST,MASTER>mtu 1500 qdisc noop
    link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff

说明:
以bond0为例:“link/either”后面的“78:1d:ba:cc:c7:6b”是MAC地址,“inet”后面的“127.127.127.11”是IP地址。

END