Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] How to find the MAC address Alex Schuster <wonko@×××××××××.org>