EVE-NG静态IP配置
通过以下命令进入IP配置界面
root@eve-ng:~# vi /etc/network/interfaces
修改pnet0的网卡IP
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
iface eth0 inet manual
auto pnet0
iface pnet0 inet static #dhcp变更为sataic
bridge_ports eth0
bridge_stp off
address 172.16.19.202
netmask 255.255.255.0
gateway 172.16.19.254
dns-nameserver 114.114.114.114
重启网卡以保证配置生效 ,以下2条命令可任意选其一使用
systemctl restart networking.service
/etc/init.d/networking restart
注意点
配置IP时需要注意不可误删除其他配置,否则会导致配置生效时报错
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
iface eth0 inet manual
auto pnet0
iface pnet0 inet static
bridge_ports eth0
bridge_stp off
address 172.16.19.202
netmask 255.255.255.0
gateway 172.16.19.254
dns-nameserver 114.114.114.114
# Cloud devices
iface eth1 inet manual
auto pnet1
iface pnet1 inet manua #配置时如果误删除l
bridge_ports eth1
bridge_stp off
iface eth2 inet manual
auto pnet2
iface pnet2 inet manual
bridge_ports eth2
bridge_stp off
iface eth3 inet manual
auto pnet3
iface pnet3 inet manual
bridge_ports eth3
bridge_stp off
iface eth4 inet manual
auto pnet4
iface pnet4 inet manual
bridge_ports eth4
bridge_stp off
iface eth5 inet manual
auto pnet5
iface pnet5 inet manual
bridge_ports eth5
bridge_stp off
导致重启网卡时报错
root@eve-ng:~# systemctl restart networking.service
Job for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "journalctl -xe" for details.
root@eve-ng:~# /etc/init.d/networking restart
Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "journalctl -xe" for details.
failed!
文章来源地址https://www.toymoban.com/news/detail-555518.html
文章来源:https://www.toymoban.com/news/detail-555518.html
到了这里,关于EVE-NG静态IP配置的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!