====== MAC address setting ====== ===== Name ===== mac ===== Details ===== ^ Type | [[:cfgtype:hex|Byte sequence]] | ^ DHCP option number | not applicable | ^ ISC dhcpd syntax | hardware ethernet | ===== Examples ===== === Display the MAC address of interface "net0" === iPXE> show net0/mac net0/mac:hex = 52:54:00:12:34:56 === Pass the MAC address to a server-side boot script === iPXE> chain http://boot.ipxe.org/demo/boot.php?mac=${net0/mac} === Set a user-defined MAC address for interface "net0" === iPXE> ifclose net0 iPXE> set net0/mac 02:00:69:50:58:45 iPXE> ifopen net0 === Restore the original MAC address for interface "net0" === iPXE> clear net0/mac === Configure a DHCP reservation in ISC dhcpd === # in /etc/dhcpd.conf host example1 { hardware ethernet 52:54:00:12:34:56; fixed-address 192.168.0.100; } ===== Description ===== Specifies the MAC address used to identify the network device in all transmitted and received packets. ===== See also ===== * ''[[:cmd:ifstat]]'' * ''[[:cmd:ifclose]]'' * ''[[:cmd:ifopen]]'' * [[:cfg|List of all iPXE settings]] ===== Notes ===== You should not normally need to change the MAC address. You should change the MAC address only while the interface is closed. You can close and re-open the interface using the ''[[:cmd:ifclose]]'' and ''[[:cmd:ifopen]]'' commands. Not all iPXE network card drivers support setting a user-defined MAC address. On unsupported cards you may see unexpected behaviour, such as a failure to receive packets destined for the user-defined MAC address. You can obtain the MAC address using a hyphen ("-") instead of a colon (":") as a separator by using the [[:cfgtype:hexhyp]] settings type. For example: iPXE> echo ${net0/mac:hexhyp} 52-54-00-12-34-56