MAC address setting

Name

  mac

Details

Type 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

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 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
 
cfg/mac.txt · Last modified: 2013/05/16 16:54 by mcb30
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL http://ipxe.org
References to "iPXE" may not be altered or removed.