Changing the Linux CMP (C50) Default Bridge Subnet
search cancel

Changing the Linux CMP (C50) Default Bridge Subnet

book

Article ID: 244994

calendar_today

Updated On:

Products

AppNeta

Issue/Introduction

By default the Linux CMP (C50) uses the subnet of 17.x.0.0/16 for it's default bridge subnet for CMP (C50) deployments, this could cause IP Conflicts within your network if it overlaps.

Cause

Docker uses a set pool of default subnets for it's Default Bridge and user generated bridge networks.

Resolution

In order to get around this potential IP Address Conflict it is possible to modify the default bridge network subnets that Docker uses, the following steps will outline what needs to be done.

It is recommended that this be performed prior to deploying any CMP's on your host otherwise you will likely need to redeploy the CMP entirely.

 

1. You will need to either modify or create the following file using your preferred CLI Text Editor (i.e. vi, vim or nano):

/etc/docker/daemon.json

2. Add the following to the file mentioned above and modify the subnet and size as desired (Note: you can remove the bip line if it's not required/conflicting):

{
  "bip": "10.200.0.1/24",
  "default-address-pools":[
    {"base":"192.168.15.0/16","size":24}
  ]
}

The bip line refers to the docker0 bridge interface, this is Docker's Default Bridge interface and must end in .1 of the desired subnet for it to work.

The default-address-pools are the subnets that will be used for the eth0 interface of the CMP.  The base subnet value tells Docker what the overall subnet range that can be used, in this example we used 192.168.15.0/16.  The size value is the netmask that the User Generated Bridge Networks will have.

3. Save the file and restart docker:

sudo systemctl restart docker

 

Assuming that the file has been correctly formatted and Docker restarts without issue, you should now deploy or re-deploy your CMP.

You can also attempt restarting the existing CMP after changing into the CMP Directory:

sudo docker-compose -f mp-compose.yaml stop
sudo docker-compose -f mp-compose.yaml pull && sudo docker-compose -f mp-compose.yaml up -d

 

Once the CMP is deployed again you should see output similar to the following if the above has been completed successfully:

root@test:~/cmp-appneta# docker network ls
NETWORK ID     NAME                  DRIVER    SCOPE
a6f9613e811f   bridge                bridge    local
ac502a78b98d   cmp-appneta_default   bridge    local
0a2916d849dd   host                  host      local
bcf8aa3c1557   none                  null      local
root@test:~/cmp-appneta# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.222.254 0.0.0.0         UG        0 0          0 ens3
10.200.0.0      0.0.0.0         255.255.255.0   U         0 0          0 docker0
192.168.15.0    0.0.0.0         255.255.255.0   U         0 0          0 br-ac502a78b98d
192.168.222.0   0.0.0.0         255.255.255.0   U         0 0          0 ens3
192.168.222.254 0.0.0.0         255.255.255.255 UH        0 0          0 ens3