Networking Forums

Networking Forums > Computer Networking > Linux Networking > request for "/sbin/ifconfig -a" output (discover MAC Address)

Reply
Thread Tools Display Modes

request for "/sbin/ifconfig -a" output (discover MAC Address)

 
 
Nathan Thompson
Guest
Posts: n/a

 
      08-26-2005, 03:05 PM
If you can please post the output of the command "/sbin/ifconfig -a" along
with the output of "uname -a". I'm trying to develop an application to
parse the output of "/sbin/ifconfig -a" to discover the MAC Address for
Linux systems. This output will help me. Thank you in advance.


 
Reply With Quote
 
 
 
 
Lew Pitcher
Guest
Posts: n/a

 
      08-26-2005, 03:28 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nathan Thompson wrote:
> If you can please post the output of the command "/sbin/ifconfig -a" along
> with the output of "uname -a". I'm trying to develop an application to
> parse the output of "/sbin/ifconfig -a" to discover the MAC Address for


"/the/ MAC Address"?? What makes you think that, in a Linux system,
there is even /a/ MAC address, let alone /the/ MAC address? For that
matter, what makes you think that there is /a single/ MAC address in a
Linux system?

> Linux systems. This output will help me. Thank you in advance.


The easiest way is to do it yourself. Go get yourself a Linux system,
like TomsRootBoot (http://www.toms.net/rb/), cut a boot floppy (Toms
RootBoot is a single floppy standalone linux system; it doesn't install
on your hard disks, but has all the networking tools, and boots off of
the floppy), and boot Linux. Try the /sbin/ifconfig command and see what
the format of the output is.


- --

Lew Pitcher, IT Specialist, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFDDzUJagVFX4UWr64RAlz+AJ9tctiCVWZ7dEXX642VTL RNOLuLNQCfQ+G9
i8a1N4+RrtfZvVdy50/xanM=
=2pVC
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Nathan Thompson
Guest
Posts: n/a

 
      08-26-2005, 05:00 PM
Thank you for your feedback.

> "/the/ MAC Address"?? What makes you think that, in a Linux system,
> there is even /a/ MAC address, let alone /the/ MAC address? For that
> matter, what makes you think that there is /a single/ MAC address in a
> Linux system?


Yes, I know a Linux system can have more than one MAC address as seen below
in the output from my four Linux boxes I have tested. Most of my Linux
boxes have 2 network cards. I should have said MAC "Addresses".

I have the following versions of Linux installed:

Red Hat Linux release 7.2 (Enigma) - 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT
2001 i686 unknown
Red Hat Linux Advanced Server release 2.1AS (Pensacola) - 2.4.9-e.24 #1
Tue May 27 16:15:51 EDT 2003 i686 unknown
SuSE Linux 8.0 (i386) (VERSION = 8.0) - 2.4.18-64GB-SMP #1 SMP Wed Mar 27
13:58:12 UTC 2002 i686 unknown

I was hoping to get "/sbin/ifconfig -a" output from other Linux versions
which I do not have installed.

Thanks again.

linux1> /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:06:5B:ED:64:3A
inet addr:172.19.200.153 Bcast:172.19.255.255 Mask:255.255.0.0
inet6 addr: fe80::206:5bff:feed:643a/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:205962489 errors:0 dropped:0 overruns:0 frame:0
TX packets:1739815 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:147463307 (140.6 Mb) TX bytes:170871758 (162.9 Mb)
Interrupt:17

eth1 Link encap:Ethernet HWaddr 00:06:5B:ED:64:3B
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:16

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:52563 errors:0 dropped:0 overruns:0 frame:0
TX packets:52563 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3696688 (3.5 Mb) TX bytes:3696688 (3.5 Mb)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

linux2> /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:06:5B:ED:64:0B
inet addr:172.19.200.134 Bcast:172.19.255.255 Mask:255.255.0.0
inet6 addr: fe80::206:5bff:feed:640b/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:205959915 errors:0 dropped:0 overruns:0 frame:0
TX packets:1787236 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:219776952 (209.5 Mb) TX bytes:284620854 (271.4 Mb)
Interrupt:7

eth1 Link encap:Ethernet HWaddr 00:06:5B:ED:64:0C
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:5

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:49771 errors:0 dropped:0 overruns:0 frame:0
TX packets:49771 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3504783 (3.3 Mb) TX bytes:3504783 (3.3 Mb)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

linux3> /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:06:5B:ED:68:31
inet addr:172.19.200.31 Bcast:172.19.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:209964427 errors:0 dropped:0 overruns:0 frame:0
TX packets:4308862 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:880078717 (839.3 Mb) TX bytes:356620310 (340.0 Mb)

eth1 Link encap:Ethernet HWaddr 00:06:5B:ED:68:32
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
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

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:55031 errors:0 dropped:0 overruns:0 frame:0
TX packets:55031 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:3857094 (3.6 Mb) TX bytes:3857094 (3.6 Mb)

linux4> /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:10:4B:39:3F:40
inet addr:172.19.202.182 Bcast:172.19.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:82626662 errors:0 dropped:0 overruns:0 frame:0
TX packets:293137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:232403353 (221.6 Mb) TX bytes:22153604 (21.1 Mb)
Interrupt:10 Base address:0x1000

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:1294 errors:0 dropped:0 overruns:0 frame:0
TX packets:1294 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:107285 (104.7 Kb) TX bytes:107285 (104.7 Kb)

"Lew Pitcher" <(E-Mail Removed)> wrote in message
news:hyGPe.1828$(E-Mail Removed)...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Nathan Thompson wrote:
> > If you can please post the output of the command "/sbin/ifconfig -a"

along
> > with the output of "uname -a". I'm trying to develop an application to
> > parse the output of "/sbin/ifconfig -a" to discover the MAC Address for

>
> "/the/ MAC Address"?? What makes you think that, in a Linux system,
> there is even /a/ MAC address, let alone /the/ MAC address? For that
> matter, what makes you think that there is /a single/ MAC address in a
> Linux system?
>
> > Linux systems. This output will help me. Thank you in advance.

>
> The easiest way is to do it yourself. Go get yourself a Linux system,
> like TomsRootBoot (http://www.toms.net/rb/), cut a boot floppy (Toms
> RootBoot is a single floppy standalone linux system; it doesn't install
> on your hard disks, but has all the networking tools, and boots off of
> the floppy), and boot Linux. Try the /sbin/ifconfig command and see what
> the format of the output is.
>
>
> - --
>
> Lew Pitcher, IT Specialist, Enterprise Data Systems
> Enterprise Technology Solutions, TD Bank Financial Group
>
> (Opinions expressed here are my own, not my employer's)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (MingW32)
>
> iD8DBQFDDzUJagVFX4UWr64RAlz+AJ9tctiCVWZ7dEXX642VTL RNOLuLNQCfQ+G9
> i8a1N4+RrtfZvVdy50/xanM=
> =2pVC
> -----END PGP SIGNATURE-----



 
Reply With Quote
 
Walter Mautner
Guest
Posts: n/a

 
      08-26-2005, 10:45 PM
Nathan Thompson wrote:

> If you can please post the output of the command "/sbin/ifconfig -a" along
> with the output of "uname -a". I'm trying to develop an application to
> parse the output of "/sbin/ifconfig -a" to discover the MAC Address for
> Linux systems. This output will help me. Thank you in advance.


Ah well, here my Mandriva - German:
# ifconfig -a|grep ardware
eth0 Link encap:Ethernet Hardware Adresse 00:01:02:9F:EB:9D
eth1 Link encap:Ethernet Hardware Adresse 00:60:B0:FB:124
--
Longhorn error#4711: TCPA / NGSCP VIOLATION: Microsoft optical mouse
detected penguin patterns on mousepad. Partition scan in progress
*to*remove*offending*incompatible*products.**Reactivate*MS*software.
Linux woodpecker.homnet.at 2.6.12-mm2[LinuxCounter#295241,ICQ#4918962]
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      08-28-2005, 12:24 AM
In the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed)>, Nathan Thompson wrote:

>Yes, I know a Linux system can have more than one MAC address as seen below


or none at all.

>I have the following versions of Linux installed:


All three of those are obsolete.

>I was hoping to get "/sbin/ifconfig -a" output from other Linux versions
>which I do not have installed.


To what end? All of the Linux systems I've worked with use the same
basic format for that line. Look for the "Ethernet" keyword, as some
abbreviate the next keyword to 'HWaddr', while others may spell it out in
the local language. If you are trying to get a list of all MAC
address prefixes (properly OUI addresses), grab the current list from
http://standards.ieee.org/regauth/oui/oui.txt - use a wide browser
window, as the lines can be up to 150 characters wide. This list has
about 8400 entries, and is 52000 lines long (2.25 MBytes).

Old guy
 
Reply With Quote
 
Raymond Pasco
Guest
Posts: n/a

 
      08-29-2005, 08:46 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nathan Thompson wrote:
> If you can please post the output of the command "/sbin/ifconfig -a" along
> with the output of "uname -a". I'm trying to develop an application to
> parse the output of "/sbin/ifconfig -a" to discover the MAC Address for
> Linux systems. This output will help me. Thank you in advance.
>
>


What's wrong with /sbin/ifconfig -a | grep whatever?

- --
Ray (Our name is Legion, for we are many.)

Don't know what all this PGP stuff is? Ask me!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDEst2KwExTSbpHqgRAsmGAJ4y4MbRlqO/7S5Zv7pJplqkZWkU8gCeKnvY
WXib5Lt3JJA/nO2OHPTFook=
=pdhX
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
netstat -s output: "packets pruned" and "packets collapsed" roybatty Linux Networking 0 07-20-2007 08:44 PM
Re: SPEWS SLIMES "WindsorFox", "Kevin-!:?)", "Spin Dryer" get the cold shoulder at broadband ng! SneakyP Broadband 0 11-29-2005 10:46 PM
Attention Plus.net Re: SPEWS DOLTS "WindsorFox", "Kevin-!:?)", "SpinDryer" SPAM broadband newsgroup !:?) Broadband 0 11-28-2005 04:28 AM
"ifconfig eth0" command not showing the Gateway address, how can I verify on Linux system? santa19992000@yahoo.com Linux Networking 3 10-16-2005 04:48 PM
Cannot Use "ifconfig" nor "iwconfig" effectively Jeffrey D. Yuille Linux Networking 6 01-16-2005 05:22 PM



1 2 3 4 5 6 7 8 9 10 11