centos7的安装与网络配置

一 安装虚拟机

centos7的安装与网络配置_第1张图片

二 配置静态IP

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

centos7的安装与网络配置_第2张图片
重启网卡

systemctl restart network

检查网络是否变更

ip addr

ping网络的方法

[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (39.156.66.18) 56(84) bytes of data.
64 bytes from 39.156.66.18 (39.156.66.18): icmp_seq=1 ttl=128 time=84.8 ms
64 bytes from 39.156.66.18 (39.156.66.18): icmp_seq=2 ttl=128 time=63.0 ms
64 bytes from 39.156.66.18 (39.156.66.18): icmp_seq=3 ttl=128 time=57.8 ms
64 bytes from 39.156.66.18 (39.156.66.18): icmp_seq=4 ttl=128 time=42.0 ms
^C
--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 42.086/61.949/84.848/15.306 ms
[root@localhost ~]# 

中止ping

ctrl+c

你可能感兴趣的:(linux,网络,linux,运维)