MAC headers in layer 2 mode
In LAN environments, data packets find their destination through Media Access Control (MAC) addresses in their MAC header.
MAC address handling as shown in Figure 1) applies to non-mainframe environments and a mainframe environment with an OSA-Express adapter where the layer2 option is enabled.
The layer2 option keeps the MAC addresses on incoming packets. Incoming and outgoing packets are complete with a MAC header at all stages between the Linux® network stack and the LAN as shown in Figure 1. This layer2-based forwarding requires unique MAC addresses for all concerned Linux instances.
In layer 2 mode, the Linux TCP/IP stack has full control over the MAC headers and the neighbor lookup. The Linux TCP/IP stack does not configure IPv4 or IPv6 addresses into the hardware, but requires a unique MAC address for the card.
When Linux is running as a z/VM guest, the qeth device driver obtains a MAC address for each L2 device from the z/VM host. No configuration is necessary.
When Linux is running in an LPAR and you work with a directly attached OSA adapter in QDIO mode, you should assign a unique MAC address.
To assign a MAC address, add a line MACADDR='<MAC
address>'
to the configuration file
/etc/sysconfig/network-scripts/ifcfg-<if-name>.
Alternatively, you can set the MAC address by issuing the command:
ip link set addr <MAC address> dev <interface>
For OSX CHPIDs, you cannot set your own MAC addresses. Linux uses the MAC addresses defined by the Unified Resource Manager.
For HiperSockets connections, a MAC address is generated. For most purposes the generated address is adequate. However, you can change the address by using the ip command if you need to.