1.查看系统内核
cat /etc/redhat-release
Lunix查看系统内核 固定Ip

Lunix查看系统内核 固定Ip

2.CentOS固定ip
固定ip
vim /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=none #启用静态IP地址
ONBOOT=yes #开启自动启用网络连接
IPADDR=192.168.21.130 #设置IP地址
PREFIX=24 #设置子网掩码
GATEWAY=192.168.21.2 #设置网关
DNS1=8.8.8.8 #设置主DNS
DNS2=8.8.4.4 #设置备DNS

systemctl restart network # 重启网络服务

3.Redhat固定ip
vim /etc/sysconfig/network-scripts/ifcfg-eth0
注意如果错误执行:export PATH="$PATH:/sbin"
Lunix查看系统内核 固定Ip
service network restart
service iptables status
service iptables stop

相关文章:

  • 2021-11-12
  • 2022-12-23
  • 2021-11-19
  • 2021-07-07
  • 2021-12-13
  • 2021-06-06
  • 2021-07-05
  • 2022-12-23
猜你喜欢
  • 2022-02-22
  • 2021-08-04
  • 2022-03-07
  • 2022-12-23
  • 2021-12-03
  • 2022-02-11
  • 2021-12-05
相关资源
相似解决方案