33 votes

How to view your computer's MAC address using 'ifconfig'?

First, your computer doesn't have a MAC address. Each network card has a MAC address. So if your machine has a wireless card and an Ethernet card, it'll have two MAC addresses. On Linux, either of ...
dr_'s user avatar
  • 29.4k
31 votes
Accepted

Why assign MAC and IP addresses on Bridge interface

Because a bridge is an ethernet device it needs a MAC address. A linux bridge can originate things like spanning-tree protocol frames, and traffic like that needs an origin MAC address. A bridge ...
larsks's user avatar
  • 33.9k
23 votes

Find the IP address of a newly-booted Raspberry Pi

Assuming not too large a network range you can force the ARP table to be populated before you look through it. These examples are for a typical home network on 192.168.1.0-255 nmap -sn 192.168.1.0/24 ...
Chris Davies's user avatar
23 votes
Accepted

How to find unspoofed MAC address of NIC

This answer is about Linux. ifconfig is obsolete and doesn't have access to a kernel API able to provide it this information. This information has been able to be retrieved for a long time with ...
A.B's user avatar
  • 35.4k
19 votes
Accepted

Command-line tool to obtain OUI vendor info from MAC address?

I do not think there is an automated tool to do what you ask, but can be done by working directly on files oui.txt. First of all it identifies the file downloaded, for example: root@kalilloX:~# ...
LilloX's user avatar
  • 1,226
17 votes
Accepted

How to stop MAC address from changing after disconnecting?

NetworkManager will reset your MAC address during the Wi-Fi scanning. To permanently change your MAC address: Edit your /etc/NetworkManager/NetworkManager.conf as follows: [main] plugins=ifupdown,...
GAD3R's user avatar
  • 66.3k
15 votes

Why assign MAC and IP addresses on Bridge interface

The bridge device listed with your other networking devices does not represent the virtual bridge, it represents a virtual NIC that is connected to the bridge. If you had a physical bridge connected ...
11_22_33's user avatar
  • 141
14 votes

Why assign MAC and IP addresses on Bridge interface

Yes, the bridge interface acts as an additional port. After man 5 systemd.netdev: A bridge device is a software switch, and each of its slave devices and the bridge itself are ports of the switch.
ciastek's user avatar
  • 257
14 votes

How to find unspoofed MAC address of NIC

This answer is about NICs in general. Nothing about that MAC address is "unreal". In general, nothing guarantees that any network card does have any ROM that contains a unique MAC address. ...
Marcus Müller's user avatar
13 votes
Accepted

Cloned system + network interfaces

First three octets in a MAC address uniquely identify the manufacturer of the device. Udev rules allow you to match any number of characters with an asterisk. Thus, you can write a generic rule that ...
Alexander Batischev's user avatar
13 votes

How to view your computer's MAC address using 'ifconfig'?

For many linux systems ipconfig doesn't show the mac anymore. If that is the case for you, try: ip -a link
Gabriel Fair's user avatar
10 votes

Command-line tool to obtain OUI vendor info from MAC address?

A similar answer to the one of LilloX, but using nMap (if installed in the system): luis@balanceador:~$ locate nmap-mac-prefixes /usr/share/nmap/nmap-mac-prefixes luis@balanceador:~$ grep 0024A5 -i /...
Sopalajo de Arrierez's user avatar
10 votes
Accepted

How to view your computer's MAC address using 'ifconfig'?

The command that you want on MacOS, FreeBSD, and TrueOS is: ifconfig -a link OpenBSD's ifconfig doesn't have this. Further reading ifconfig. Mac OS 10 Manual Pages. Apple corporation. 2008. ...
JdeBP's user avatar
  • 68.4k
8 votes

Find the IP address of a newly-booted Raspberry Pi

This is an indirect but sufficient answer. I realized that if I know the hostname for the Raspberry Pi then I can use ssh [email protected]. That worked.
pitosalas's user avatar
  • 637
8 votes
Accepted

Loop through MAC addresses, how to handle both numbers (0-9) and letters (a-f) in a "for" loop

Just add another brace expansion for the letters: for i in {2..9} {a..f} do grep "Node${i}\|01, source address = 00:00:00:00:00:0${i}" t1.txt > t2.txt done Note that this is likely ...
terdon's user avatar
  • 241k
7 votes

Resolving MAC Address from IP Address in Linux

arping arping -I <interface> -c 1 <host> The command should return the MAC address in the response. Something like, $ arping -I eth0 -c1 192.168.1.2 ARPING 192.168.1.2 from 192.168.1.5 ...
hookman's user avatar
  • 71
7 votes
Accepted

How can I make Linux generate different MAC addresses for different bridge devices which are on different PCs?

Browsing in Internet I found this bug report on systemd-udev related to Debian 11 bridges: systemd-udev interferes with MAC addresses of interfaces it's not supposed to do #21185: ash.in.ffho.net:~# ...
A.B's user avatar
  • 35.4k
7 votes

How to find unspoofed MAC address of NIC

This answer is specific to FreeBSD. The MAC addresses of the NICs that were identified during the most recent boot are recorded in /var/run/dmesg.boot: $ grep 'Ethernet' /var/run/dmesg.boot em0: ...
Jim L.'s user avatar
  • 7,922
6 votes
Accepted

Change MAC address of network interface on lower level

Background /proc and /sys filesystems are just a view of kernel structures, both filesystems reside in memory. Although both filesystems are writable (well, some of the files in there are writable) ...
grochmal's user avatar
  • 8,647
6 votes
Accepted

FreeBSD static ARP entry when link cycles

Becoming friends with FreeBSD You seem to be on a partially correct path. I presume you have a lot of knowledge on Unix but not so much an actual FreeBSD system. The reason I am guessing this is you ...
Claus Andersen's user avatar
6 votes
Accepted

Delete illegal router from network

Routers often have multiple virtual network interfaces, and the MAC address that gets assigned to these is made by flipping some bits of the hardware MAC address. So the "illegal router" you ...
dirkt's user avatar
  • 32.1k
5 votes

Add vlan to interface with unique mac - different syntax for different Linux distros

You can assign VLAN MAC address with ip command: # ip link add link <interface> name <vlan interface name> address <mac> type vlan id <vlan ID> Example: # ip link add link ...
raspi's user avatar
  • 1,376
5 votes

Command-line tool to obtain OUI vendor info from MAC address?

Cross-Distro Fully Automated Solution: The following script automates the process and works across all Linux distros because it has no dependencies on specialized packages. It simply parses the ...
F1Linux's user avatar
  • 2,446
5 votes
Accepted

Forcing HWADDR to correct itself in ifcfg-eth0 network script on boot CentOS 7

The easiest solution is probably to disable the "predictable device naming" behavior by setting the following options on your kernel command line: biosdevname=0 net.ifnames=0 With this in place, the ...
larsks's user avatar
  • 33.9k
5 votes

How to view your computer's MAC address using 'ifconfig'?

Instead of using ifconfig, you can use ip command. ip -brief link will show following output. lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> enp1s0 DOWN ...
Krishna's user avatar
  • 181
5 votes
Accepted

How to find MAC address on RHEL 7.3?

The command ip link shows the MAC address on all interfaces.
Johan Myréen's user avatar
5 votes

How to stop MAC address from changing after disconnecting?

If other methods cannot solve the problem, you can try to edit /etc/NetworkManager/conf.d/30-randomize-mac-address.conf [connection-mac-randomization] ethernet.cloned-mac-address=permanent wifi.cloned-...
fishyman's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible