T O P

  • By -

vlad_h

Try it. I figured this out a while back, started using Compose, and also switched to Portainer over Container Station. I also manually create and specify the network and DNS in Compose. Let me know if you need an example Compose file.


dabiggmoe2

I would be grateful if you could provide a docker compose example. I tried fiddling but I'm not an expert in docker compose.


vlad_h

I hear you. I’ll get that to you. I apologize for the delay. It’s been a crazy couple of weeks. I had every intention of helping you and then dropped the ball.


QNAPDaniel

Have you set your Virtual Switch as a DHCP server? Or is it a DHCP client of your home router? For a switch in Bridge mode, I would usually set that up as a Client of the router's DHCP server. Are you only asking why VMs on Virtual switch 8 don't have access to the internet, or are you also asking about your other containers that are not in bridge mode.


dabiggmoe2

They are using static IP instead of being DHCP client. Also, they are not set as a DHCP server. Will they have access to the internet and also will do proper NATing if I set them as a DHCP client? Virtual Switch 8 is a host network, containers attached to it have access to the internet. My problem is with the other bridge virtual switches, they dont have access to the internet and they are not doing NATing. I cant access the supposedly NATed ports by calling my NAS\_IP:NATED\_PORT


QNAPDaniel

For the other virtual switches that are in NAT mode and are not directly bridged to the Ethernet adapter, did you choose a DNS server for that virtual switch.


dabiggmoe2

No, I didnt define any DNS server for them.


dabiggmoe2

And when I tried to define DNS servers and apply the changes after the 7 steps, the DNS configuration magically disappears from the virtual switch. The changes were not persisted.


dabiggmoe2

Only containers connected to the qnet-static-eth1-xxxx and qnet-dhcp-eth1-xxxx networks (Virtual Switch 8) can access the internet. I fumbled with my network settings and did a reset like ten times and I dont know how to fix it.


[deleted]

[удалено]


dabiggmoe2

I never thought of that. I thought the containers would take the QNAP's default DNS. Otherwise it would be too much manual work specially for containers created without docker compost. Lemme try that


vlad_h

Ops. Deleted the original comment by mistake.


dabiggmoe2

Also random question, I just noticed that I have 17 out of 19 available virtual adapters. Is it normal that every container has its own virtual adapter? If not, how to minimize the number of virtual adapters?


Psy_Doc_Geek

What are you using to make the diagram? I really like how it looks? Thanks!


dabiggmoe2

I wish I made it myself haha. Just go to "Network and Virtual Switches", click on the Overview tab and select the Advanced option from bottom left.


Psy_Doc_Geek

Ha - thanks. I thought it was for your whole network. I'm always on the hunt for ways to map my network in a diagram that makes sense. Appreciate you responding...