Configuring the IP Address for the Docker Interface

Network settings allows you to configure the network details for the appliance, such as, host name, default gateway, name servers, and so on.

From ESA v9.0.0.0, the default IP addresses assigned to the docker interfaces are between 172.17.0.0/16 and 172.18.0.0/16. If your have a VPN or your organization’s network configured with the IP addresses are between 172.17.0.0/16 and 172.18.0.0/16, then this might cause conflict with your organization’s private or internal network resulting in loss of network connectivity.

Note: Ensure that the IP addresses assigned to the docker interface must not conflict with the organization’s private or internal network.

In such a case you can reconfigure the IP addresses for the docker interface by performing the following steps.

To configure the IP address of the docker interfaces:

  1. Leave the docker swarm using the following command.

    docker swarm leave --force
    
  2. Remove docker_gwbridge network using the following command.

    docker network rm docker_gwbridge
    
  3. In the /etc/docker/daemon.json file, enter the non-conflicting IP address range.

    Note:

    You must separate the entries in the daemon.json file using a comma (,). Before adding new entries, ensure that the existing entries are separated by a comma (,). Also, ensure that the entries are enlisted in the correct as shown in the following example .

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

    Warning:

    If the the entries in the file are not mentioned in the format specified in step 3, then the restart operation for docker service fails.

  4. Restart the docker service using the following command.

    /etc/init.d/docker restart
    

    The docker service is restarted successfully.

  5. Check the status of the docker service using the following command.

    /etc/init.d/docker status
    
  6. Initialize docker swarm using the following command.

    docker swarm init --advertise-addr=ethMNG --listen-addr=ethMNG --data-path-addr=ethMNG
    

    The IP address of the docker interfaces are changed successfully.