In linux, how does one solve the problem that IP addresses do not change in different local networks ?, Linuxip

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.