Linux-修改IP地址
step 0: check the iptables、selinux
service iptables iptables
sestatus -v
step 1: backup the network configuration files
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak
cp /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1.bak
cp /etc/sysconfig/network /etc/sysconfig/network.bak
cp /etc/resolv.conf /etc/resolv.conf.bak
step 2: update ip address,mask
vi /etc/sysconfig/network-scripts/ifcfg-eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth1
step 3: update the gateway
vi /etc/sysconfig/network
step 4: update the dns
vi /etc/resolv.conf
step 5: restart the network services
service network restart
/etc/init.d/network restart
文章末尾固定信息
我的微信
微信号已复制
我的微信
微信扫一扫


评论