From 91cb7addf82969ffbca35796db153591f0b1a728 Mon Sep 17 00:00:00 2001 From: Roman Ivanov Date: Thu, 13 Apr 2023 16:33:55 -0700 Subject: [PATCH] hwaddress ether example must use dhcp --- Docs/Getting started/Baseboard Management Controller (BMC) .md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/Getting started/Baseboard Management Controller (BMC) .md b/Docs/Getting started/Baseboard Management Controller (BMC) .md index 6cbd776..8af71a4 100644 --- a/Docs/Getting started/Baseboard Management Controller (BMC) .md +++ b/Docs/Getting started/Baseboard Management Controller (BMC) .md @@ -149,7 +149,7 @@

Set Fixed MAC

If you prefer to manage IP assignments from your router instead of setting a fixed IP address, you can still set a fixed MAC address for the network interface on BMC. To do this, you need to edit the /etc/network/interfaces file in a similar way as you would for setting a fixed IP address.

Edit it to look like this:

-
# interface file auto-generated by buildroot

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
hwaddress ether 12:34:56:78:9A:BC
pre-up /etc/network/nfs_check
wait-delay 15
hostname $(hostname)

+
# interface file auto-generated by buildroot

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
hwaddress ether 12:34:56:78:9A:BC
pre-up /etc/network/nfs_check
wait-delay 15
hostname $(hostname)

This will assign a MAC address: 12:34:56:78:9A:BC to the interface. You can easily generate random MAC address for example with this one line script:

printf '%02x:%02x:%02x:%02x:%02x:%02x\n' $((0x02)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256))

But you need to make sure that the assigned MAC is not already used by any device on the network.