VMware虚拟机配置静态IP

1.查看IP信息

VMware虚拟机配置静态IP

2.配置IP信息

VMware虚拟机配置静态IP

3.更改网卡信息配置

vi /etc/sysconfig/network-scripts/ifcfg-ens33

TYPE=Ethernet
PROXY_METHOD=static
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=13acf4da-111f-4b61-84cd-348d9442784e
DEVICE=ens33
ONBOOT=yes
IPADDR= 设置静态ip
GATEWAAY=网段最后为2
NETMASK=255.255.255.0 子网掩码

4.重启网卡并验证IP

service network restart 

ping  www.baidu.com
PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=128 time=20.4 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=128 time=19.1 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=128 time=19.2 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=4 ttl=128 time=19.5 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=5 ttl=128 time=20.5 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=6 ttl=128 time=20.4 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=7 ttl=128 time=20.4 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=8 ttl=128 time=20.2 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=9 ttl=128 time=20.3 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=10 ttl=128 time=20.3 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=11 ttl=128 time=20.1 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=12 ttl=128 time=20.6 ms

上一篇:UVM tips and tricks


下一篇:【2】数据结构之列表、列表函数