1

I have a Portainer VM with 3 interfaces attached (eth0-eth2). I would like the containers to request IP from the DHCP Server that is located on each interface at x.x.x.1.

Lets take as an example eth0:

The subnet of this interface is 172.16.0/27 and I would like my containers get in IP in the range of 172.16.0.17-30. Under Portainer networks, I added another network with the following settings:

  • Name: 172Config
  • Driver: macvlan Parent card: eth0 Subnet: 172.16.0/27
  • Gateway: 172.16.1
  • IP Range: 172.16.16/28 ( I would like half of the subnet hosts to be provided to containers

Then I added another network:

  • Name: 172Network
  • Driver: macvlan
  • Macvlan configuration: Selected creation and then 172Config
  • Enable manual container attachment : True

Then I attached 172Network to a new httpd container but it doesnt work. I get the correct IP on the containers but I cant ping or establish any kind of connection to them. Any Portainer guru can advice whats the right way to do this?

2 Answers 2

2

The above configuration was correct. I had to set Promiscuous mode and Forged transmits to 'Accept' under the ESXi vSwitch security options. Once I've done that everything started working as expected and my firewall was able to list the new DHCP Leases.

0

The above configuration was correct. I had to set Promiscuous mode and Forged transmits to 'Accept' under the ESXi vSwitch security options. Once I've done that everything started working as expected and my firewall was able to list the new DHCP Leases.

Had the same issue and modifying my vSwitch on my ESXi host was indeed the fix.

My forged transmits and promiscuous mode were set to reject but immediately after changing these to accept I was able to ping the IP I had set up in Portainer as well as my container application being able to accept connections over the exposed port.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .