0

Our application is a combination of 4 different applications. The graphics part is running on a host and other 3 applications are running on 3 different VMs. Which uses bridge networking.

eg. Graphics app1 - 192.168.2.201 (Base Machine/HOST)
    Application 2 - 192.168.2.202 (VM1)
    Application 3 - 192.168.2.203 (VM2)
    Application 4 - 192.168.2.204 (VM3)

Which is running fine.

But, to get advantage of containers, we want to shift our VM applications into docker container. But in docker, when we are using Bridge Networking, it doesn't take IPs in HOST network, obviously because, Bridge network ID is not same as host. And application fails to run.

How can we achieve the Bridge Networking with same network ID (say 192.168.2.0)? We cannot use Host networking.

Note: our application specifically wants IP in 192.168.2.0 network, otherwise it fails.

  • stackoverflow.com/questions/41376365/… Something like this maybe? – Levi Jan 10 '19 at 19:11
  • wants IP in 192.168.2.0 network? Is it hardcoded in the software? Would it be possible to change the code? – 030 Jan 12 '19 at 15:39
1

I could have mentioned this in comment first but I need 50 reputation to comment and I just joined this yesterday,

So, may I know what you are trying to achieve? If I interpret correctly, you want to move your VMs to Docker and then make those docker interact with each other as well as with graphics which is running on host? So consider it this way, you have 4 IP addresses, how would you make the communicate if it is simple LAN? Similarly you do it here. Allow hosts from that IP to work here. You can customize docker0 bridge to have gateway and CIDRs of your choice by modifying daemon.json

Customize the Docker0 bridge

You can create your user defined networks too.

May be this will help you too? Docker Networking User Guide

You can even write your own network plugin.

| improve this answer | |
  • Yes @deosha, you interpreted it correctly, i'll check this... thanks – TPS Jan 11 '19 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.