In linux, how does one solve the problem that IP addresses do not change in different local networks ?, Linuxip
Problem description
When we use linux in different environments, we will find a problem: we call the ifconfig command anywhere, and the address we query is this address. For example, when I was at school, I used the ifconfig command to query the ip address 172.18.250.149. When I call this command again at home, I will find that it is still the URL. So the question is, why are the IP addresses assigned to us the same in different places? When we use this ip address for ftp services, we will find that this ip address is unavailable?
Problem Solving
In fact, the linux Nic In the virtual machine cannot automatically identify your current environment. For example, when you are at school and when you return home, the virtual opportunity thinks you are still at school, because it does not have the ability to update itself. We can restart the NIC to reset it and re-Identify the network. We can use the following command
Service network restart
After entering this command, the entire network can be restarted.