miked Working the technologies in local government.

AWS Static MAC

AWS Static MAC

There are times when you want to run a workload on an EC2 instace in AWS and there is licensing that is tied to the hardware (MAC or IP Address or something). AWS doesn’t provide the ability to choose a static MAC. One of the things that people may not realize is that things are very different into today’s world of the VPC. Back in EC2-Classic days, IP addresses and MACs could and did change every  time an instance was stopped and started (after the point you actually could stop and start – thanks EBS).

One of the ways that people would combat wanting to get a static MAC (in actually just a MAC that would survive stops, starts, and reboots, was to deploy an Elastic Network Interface (ENI). The ENI holds onto its MAC. In today’s world when deploying into VPC, all interfaces are treated as ENIs. So when you deploy an EC2 instance into a VPC, its primary network interface, being an ENI, will retain its private IP address and MAC address until it is terminated (destroyed).

Auto assigned public addresses can, and probably will, change on stop and start. To counter that, you can provision and assign an Elastic IP address (EIP). There is no charge when the IP is assigned but cost does incur when you have in EIP sitting idle. AWS wants precious IPv4 addresses to be used and not squandered.

The long and short is while you cannot have a static MAC, the MAC will stick with an EC2 instance until it is terminated.

comments powered by Disqus