The reason: I connect the campus network can not automatically configure the network IP address is 127.0.0.1 has been installed centos cause I can not connect remotely tried many methods online no success so write about my method
Premise: This method works only on behalf of its own network only as a reference
Methods: To configure the network because the information so to find files under Linux in cd / etc / sysconfig / network-scripts / ifcfg-eth0 which kept the network initialization profile
So the first step is to check your network initialization configuration file is the same as the requirements
The second step to modify the network configuration file
The third part is to restart the network
The fourth part is to see whether the IP address configuration is successful
- The first step you have to cd / etc / sysconfig / network-scripts to move to the next / network-scripts directory and view the ifcfg-eth0 file in that directory
- (I was modified at the beginning of your might and I are not the same)
- The second step
- Modify ifcfg-eth0 file input vim ifcfg-eth0
Into the page
If you would vim command, then put your files into and I like the red box on the line has been on the line, if not, then
Then press i to enter edit mode and then after I modified the agreement by esc Exit Press :( colon) into the underlying mode --- Press wq (save and exit) on the line
This is the method to automatically configure the IP course, if you want to add a static IP address, then you need additional thing here is not elaborated
(UUID hwaddr do not change ah that is the identification information of your own computer)
Here is the meaning of information
- The third step enter service network restart to restart the network
- The fourth step to see if the amendment is successful shows IP address
如果出现 该信息 则说明成功 否则就是 失败了
我的是自动配置出来的 要是手动配置的参考!!!
https://jingyan.baidu.com/article/a65957f43ea80424e67f9bdd.html
通过在VM上的虚拟网络编辑器上获知ip地址 子网掩码 和 网关 后
去 cd /etc/sysconfig/network-scripts 目录下的ifcfg-eth0文件 手动配置相关信息
亲测可用
如果发现网络能够正常 访问到 但是 远程访问还是访问不到
那么 有可能就是 你的 VMware服务 没开》。。 我经常犯这个毛病 因为我将VMware的启动 设为了自启 所以容易忘。
。