mac
Type | Byte sequence |
---|---|
DHCP option number | not applicable |
ISC dhcpd syntax | hardware ethernet |
iPXE> show net0/mac net0/mac:hex = 52:54:00:12:34:56
iPXE> chain http://boot.ipxe.org/demo/boot.php?mac=${net0/mac}
iPXE> ifclose net0 iPXE> set net0/mac 02:00:69:50:58:45 iPXE> ifopen net0
iPXE> clear net0/mac
# in /etc/dhcpd.conf host example1 { hardware ethernet 52:54:00:12:34:56; fixed-address 192.168.0.100; }
Specifies the MAC address used to identify the network device in all transmitted and received packets.
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 ifclose
and 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 hexhyp settings type. For example:
iPXE> echo ${net0/mac:hexhyp} 52-54-00-12-34-56