Dynamically Updating Alternate MAC Addresses

You can use the ldm set-vnet command to perform an update on the alternate MAC address of a virtual network device dynamically. You can make this change when the update increases the total number of alternate MAC addresses of the virtual network device.

Both of the following commands are examples of dynamically adding an alternate MAC address to the vnet1 virtual network device on the ldg1 domain:

primary# ldm set-vnet alt-mac-addrs=+auto vnet1 ldg1

primary# ldm set-vnet auto-alt-mac-addrs=+1 vnet1 ldg1

The following ldm list output shows the MAC addresses that are associated with the vnet0 virtual network device on the ldg1 domain. 00:14:4f:f9:8a:c2 is the primary MAC address for vnet0 and 00:14:4f:f8:1c:a5 and 00:14:4f:f8:2c:22 are its two alternate MAC addresses.

primary# ldm list -o network ldg1
NETWORK
    NAME    SERVICE              MACADDRESS        PVID|PVLAN|VIDs
    ----    -------              ----------        ---------------
    vnet0   primary-vsw0@primary 00:14:4f:f9:8a:c2 1|--|--
                                 00:14:4f:f8:1c:a5
                                 00:14:4f:f8:2c:22

If you log in to the ldg1 domain, you can use the dladm show-phys -m command to view the MAC addresses that are associated with the net0 network device.

ldg1# dladm show-phys -m
LINK                SLOT     ADDRESS            INUSE CLIENT
net0                primary  0:14:4f:f9:8a:c2   yes   net0
                    1        0:14:4f:f8:1c:a5   no    --
                    2        0:14:4f:f8:2c:22   no    --

The dladm show-vnic command shows the alternate MAC address (00:14:4f:f8:2c:22) that is used to configure the virtual NIC:

ldg1# dladm show-vnic
LINK            OVER           SPEED  MACADDRESS        MACADDRTYPE IDS
vnic1           net0           0      0:14:4f:f8:2c:22  fixed       VID:0

While you can use the ldm set-vnet command to increase the number of alternate MAC addresses dynamically, you cannot update or remove existing alternate MAC addresses dynamically. If you modify or remove an alternate MAC address that is in use, the VNICs are left in an unusable state.

The following examples show the error you receive when attempting to dynamically remove or modify an existing alternate MAC addresses.

  • The following example shows that attempting to dynamically remove the 00:15:4f:f9:41:c4 alternate MAC address from vnet2 on the ldg1 domain fails with an error:

    primary# ldm set-vnet alt-mac-addrs=-00:15:4f:f9:41:c4 vnet2 ldg1
    Please perform the operation while the LDom is bound or inactive
  • The following example shows that attempting to modify an existing alternate MAC address with the auto value for vnet1 dynamically fails with an error:

    primary# ldm set-vnet alt-mac-addrs=auto vnet1 ldg1
    Please perform the operation while the LDom is bound or inactive