Centos7 配置静态IP地址
Centos7 配置静态、动态IP地址一、配置静态IP地址第一步:进入存放修改IP地址的目录: ```cd /etc/sysconfig/network-scripts/```第二步:修改ip地址的文件:```vim ifcfg-ens33```第三步:查看网关: 编辑--》虚拟网络编辑器第四步:修改静态IP地址和网关第五步:重启网络systemctl restart network第六步:测试:
·
Centos7 配置静态、动态IP地址
一、配置静态IP地址
第一步:进入存放修改IP地址的目录: cd /etc/sysconfig/network-scripts/
第二步:修改ip地址的文件:
vim ifcfg-ens32
或者是:
vim ifcfg-ens33
第三步:查看网关: 编辑–》虚拟网络编辑器
第四步:修改静态IP地址和网关
- 修改BOOTPROTO=static
- 添加以下内容:IP地址、子网掩码、网关、dns服务器
IPADDR=192.168.75.100
GATEWAY=192.168.75.2
NETMASK=255.255.255.0
DNS1=218.4.4.4
DNS2=8.8.8.8
- 关闭文本 esc : wq!
不会使用vim的请看:
1.先按一下“Esc”
2.输入冒号“:”
3.输入"wq!"
4.按“回车”
第五步:重启网络systemctl restart network
systemctl restart network
第六步:测试:
查看IP地址的命令:ifconfig
在win上面ping命令:
点击阅读全文
更多推荐
活动日历
查看更多
直播时间 2025-02-26 16:00:00


直播时间 2025-01-08 16:30:00


直播时间 2024-12-11 16:30:00


直播时间 2024-11-27 16:30:00


直播时间 2024-11-21 16:30:00


目录
所有评论(0)