查看网卡:ip addr
修改网卡网络地址配置:vim /etc/network/interfaces
配置模板:
auto ${网卡名}
iface ${网卡名} inet ${static}
address ${IP}
netmask ${netmask}
gateway ${gateway}
auto ens37
iface ens37 inet static
address 10.10.100.31
netmask 255.255.255.0
gateway 10.10.100.2
然后重启网卡:systemctl restart networking或者/etc/init.d/networking restart
或重启设备(重启网卡报错就重启设备):reboot
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)