« All posts

Configuring Docker Macvlan and Ipvlan for Dedicated LAN IPs

Learn how to configure dedicated LAN IPs using Docker macvlan and ipvlan with step-by-step instructions.

A client had an old SIP recording device that needed its own IP and MAC address on the LAN. Since Docker's default bridge network was unsuitable for such network appliances, it was necessary to assign dedicated IPs to each container using macvlan or ipvlan. Macvlan assigns a unique MAC address to each container, while ipvlan shares the host's MAC address, providing a simpler setup.

To implement this configuration with Docker, it's crucial to first check the supported versions, identify the physical parent interface, and reserve an IP range for the containers. The choice between macvlan and ipvlan depends on network requirements; macvlan is necessary for distinct MAC addresses, while ipvlan offers lower maintenance and is a safer option for cloud environments.