Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwaddress ether example must use dhcp #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
<h1>Set Fixed MAC</h1>
<p>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 <code>/etc/network/interfaces</code> file in a similar way as you would for setting a fixed IP address.</p>
<p>Edit it to look like this:</p>
<pre># interface file auto-generated by buildroot<br><br>auto lo<br>iface lo inet loopback<br><br>auto eth0<br>iface eth0 inet static<br> hwaddress ether 12:34:56:78:9A:BC<br> pre-up /etc/network/nfs_check<br> wait-delay 15<br> hostname $(hostname)<br><br></pre>
<pre># interface file auto-generated by buildroot<br><br>auto lo<br>iface lo inet loopback<br><br>auto eth0<br>iface eth0 inet dhcp<br> hwaddress ether 12:34:56:78:9A:BC<br> pre-up /etc/network/nfs_check<br> wait-delay 15<br> hostname $(hostname)<br><br></pre>
<p>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:</p>
<pre>printf '%02x:%02x:%02x:%02x:%02x:%02x\n' $((0x02)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256))</pre>
<p><span class="wysiwyg-color-red">But you need to make sure that the assigned MAC is not already used by any device on the network. </span></p>
Expand Down