This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

CONFIG_ETH_NATIVE_POSIX_MAC_ADDR

MAC address for the interface

Type: string

Help

Specify a MAC address for the ethernet interface in the form of
six hex 8-bit chars separated by colons (e.g.:
aa:33:cc:22:e2:c0).  The default is an empty string, which
means the code will make 00:00:5E:00:53:XX, where XX will be
random.

Direct dependencies

!ETH_NATIVE_POSIX_RANDOM_MAC && ETH_NATIVE_POSIX && NET_L2_ETHERNET

(Includes any dependencies from ifs and menus.)

Default

  • “”

Kconfig definition

At drivers/ethernet/Kconfig.native_posix:117

Included via Kconfig:8Kconfig.zephyr:40drivers/Kconfig:20drivers/ethernet/Kconfig:54

Menu path: (Top) → Device Drivers → Ethernet Drivers → Native Posix Ethernet driver

config ETH_NATIVE_POSIX_MAC_ADDR
    string "MAC address for the interface"
    default ""
    depends on !ETH_NATIVE_POSIX_RANDOM_MAC && ETH_NATIVE_POSIX && NET_L2_ETHERNET
    help
      Specify a MAC address for the ethernet interface in the form of
      six hex 8-bit chars separated by colons (e.g.:
      aa:33:cc:22:e2:c0).  The default is an empty string, which
      means the code will make 00:00:5E:00:53:XX, where XX will be
      random.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)