?
Solved

How do I get a list of MAC address, including ones that do not have IP addresses bound?

Posted on 2012-03-28
5
Medium Priority
?
304 Views
Last Modified: 2012-06-27
How do I get a list of MAC address, including ones that do not have IP addresses bound?

ifconfig appears to only return MAC address if they have IP addresses. I need to get all of the MAC addresses, regardless of whether or not are bound.

In Windows, this is easily done with the getmac, but I have not been able to find the UNIX/Linux equivalent.
0
Comment
Question by:Mister_Tog
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 1000 total points
ID: 37778573
ip a
0
 
LVL 1

Author Comment

by:Mister_Tog
ID: 37778609
ip a appears to just return address that have IP addresses, like ifconfig -a. I need to return ethernet addresses that do not have an IP address bound.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 37778648
Well, it always showed me all the MAC.

How about this?
ip maddr show
0
 
LVL 21

Accepted Solution

by:
Papertrip earned 1000 total points
ID: 37778874
Which OS are you running?  Both ip a and ifconfig -a show interfaces that do not have an IP assigned on RHEL -- note eth1 in the following example.  Issuing just ifconfig without the -a however will only show interfaces that are up.

[root@phx1mmail1 ~]# 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/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 1c:c1:de:e5:51:10 brd ff:ff:ff:ff:ff:ff
    inet 10.190.3.105/26 brd 10.190.3.127 scope global eth0
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 1c:c1:de:e5:51:12 brd ff:ff:ff:ff:ff:ff

[root@phx1mmail1 ~]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 1C:C1:DE:E5:51:10  
          inet addr:10.190.3.105  Bcast:10.190.3.127  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56068823208 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47944747928 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:21919365848940 (19.9 TiB)  TX bytes:23347617517672 (21.2 TiB)
          Interrupt:130 Memory:f8000000-f8012800 

eth1      Link encap:Ethernet  HWaddr 1C:C1:DE:E5:51:12  
          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:138 Memory:f6000000-f6012800 

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:3163770555 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3163770555 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:355390764000 (330.9 GiB)  TX bytes:355390764000 (330.9 GiB)

[root@phx1mmail1 ~]# 

Open in new window

0
 
LVL 1

Author Closing Comment

by:Mister_Tog
ID: 37789449
It looks like you are right, ifconfig -a works. I should not that "ip a" doesn't seem to work on Solaris.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question