questionAfter the company migrated the server, the docker0 bridge created by default conflicted with the company's external network gateway. This results in the external network being unable to connect to the server. SolutionModify the default configuration file /etc/docker/daemon.json to configure Docker. If not created directly 1. Shut down the docker servicesystemctl stop docker 2. Modify bip{ "bip": "192.168.0.1/24", # Modify here.... } 3. Restart Dockersystemctl restart docker Docker shutdown, restart, and start commandssudo service docker stop # Shut down or sudo systemctl stop docker sudo service docker restart # Restart or sudo systemctl restart docker sudo service docker start # Start sudo systemctl start docker # Start Supplement: Modify the default ip of docker0 When the Docker service is started, a docker0 bridge is created by default (with a docker0 internal interface on it), which connects other physical or virtual network cards at the kernel layer, putting all containers and the local host on the same physical network. By default, Docker specifies the IP address and subnet mask of the docker0 interface, allowing the host and container to communicate with each other through the bridge. It also gives the MTU (the maximum transmission unit allowed to be received by the interface), which is usually 1500 Bytes, or the default value supported by the host network routing. These values can be configured when the service is started. You can edit the /etc/docker/daemon.json file and add the content "bip": "ip/netmask" [Do not use the same network segment as the host] [root@localhost /]# vi /etc/docker/daemon.json {"bip":"192.168.100.1/24"} The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. If there are any mistakes or incomplete considerations, please feel free to correct me. You may also be interested in:
|
<<: Use a diagram to explain what Web2.0 is
>>: Detailed explanation of the properties and instance usage of hasOwnProperty in js
This article example shares the specific code of ...
Problem Description 1. Database of the collection...
The installation and configuration methods of MyS...
MySQL backup Cold backup:停止服務進行備份,即停止數據庫的寫入Hot ba...
Table of contents Preface introduce 1. Mechanism ...
I have been researching Linux recently and tried ...
Scenario simulation: The operation and maintenanc...
Version update, the password field in the origina...
Preface Reduce is one of the new conventional arr...
Generally, on national days of mourning, days of ...
Table of contents 1. Introduction to NFS 2. NFS C...
In the process of making web pages, we often use f...
vmware workstations starts the virtual machine er...
First, let’s think about a question: To insert su...
Before talking about data responsiveness, we need...