1. 程式人生 > >vmware+centos set static ip address

vmware+centos set static ip address

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