vmware+centos set static ip address

版权声明:本文为博主原创文章,转载请注明原文链接 https://blog.csdn.net/qq_36922927/article/details/84316649

usually using DHCP,but every time you start up your centos os,dhcp may distribute a different ip for your CENTOS!

First step:

vmware disable DHCP but allow NAT pattern

please be care for IP(G) as follow,

it will be used in configure script.

Second step:reboot your centos OS and modify some scripts to configure

 

cd /etc/sysconfig/network-scipts

modify : vi ifcfg-ens33

Third step:restart your network service

service network restart

 Fourth step ,check ip:

ip addr

you'll find the static ip setted during Second step appeared!!

so try to reboot your CENTOS to find whether the ip would be changed!

Fifth step:test cmd ping

ping baidu:

on your windows OS ping  this  static ip.

completely oj8k!

some concepts:

gate mask:网关路由器的ip

dns:address of dns server,dns server can translate your domain name into ip address

权威定义:1,是一个由分层的DNS服务器实现的分布式数据库

                2,一个使得主机能够通查询分布式数据库的应用层协议

net mask:to help judge whether ip1 and ip2 are in the same network

ip address:every computer(device)  has an unique id(like id-card number) during the same network 

猜你喜欢

转载自blog.csdn.net/qq_36922927/article/details/84316649
今日推荐