Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] How to find the MAC address
Date: Thu, 19 Apr 2012 19:42:14
Message-Id: 20120419214002.3484034f@weird.wonkology.org
1 Hi there!
2
3 How am I supposed to find the MAC address of an ethernet interface? I used
4 to call ifconfig and grep for HWaddr, but this does not work any more.
5
6 I found the 'old-output' USE flag for sys-apps/net-tools, which brings
7 back the old behaviour in order not to break old scripts, but I'd like to
8 know what the new method is that scripts should use.
9
10 Here's how the output looked before and now:
11
12 Old output:
13 eth0 Link encap:Ethernet HWaddr bc:5f:f4:19:ad:18
14 inet addr:192.168.2.42 Bcast:192.168.2.255 Mask:255.255.255.0
15 inet6 addr: fe80::be5f:f4ff:fe19:ad18/64 Scope:Link
16 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
17 RX packets:11027476 errors:0 dropped:0 overruns:0 frame:0
18 TX packets:8002728 errors:0 dropped:0 overruns:0 carrier:1
19 collisions:0 txqueuelen:1000
20 RX bytes:11763889583 (10.9 GiB) TX bytes:1006570663 (959.9 MiB)
21 Interrupt:49
22
23 New output:
24 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
25 inet 192.168.2.42 netmask 255.255.255.0 broadcast 192.168.2.255
26 inet6 fe80::be5f:f4ff:fe19:ad18 prefixlen 64 scopeid 0x20<link>
27 ether bc:5f:f4:19:ad:18 txqueuelen 1000 (Ethernet)
28 RX packets 10791981 bytes 11413935608 (10.6 GiB)
29 RX errors 0 dropped 0 overruns 0 frame 0
30 TX packets 7867427 bytes 996505563 (950.3 MiB)
31 TX errors 0 dropped 0 overruns 0 carrier 1 collisions 0
32 device interrupt 49
33
34 Wonko

Replies

Subject Author
Re: [gentoo-user] How to find the MAC address Michael Mol <mikemol@×××××.com>
Re: [gentoo-user] How to find the MAC address Michael Orlitzky <michael@××××××××.com>
Re: [gentoo-user] How to find the MAC address Neil Bothwick <neil@××××××××××.uk>
[gentoo-user] Re: How to find the MAC address James <wireless@×××××××××××.com>
Re: [gentoo-user] How to find the MAC address Kfir Lavi <lavi.kfir@×××××.com>