kail-linux如何使用NAT连接修改静态IP
1、Contos修改静态IP
vi /etc/sysconfig/network-scripts/ifcfg-ens33, 标记红色处可能序号会变动
Kail时候NAT连接如何修改静态IP
百度后/etc/network/interfaces修改静态ip,修改后不生效
最终解决办法
nmcli
NetworkManager 的命来配置网络接口生效
查看 相当于cat
nmcli device show
IP静态地址更新
sudo nmcli con mod "Wired connection 1" ipv4.addresses "192.168.203.11/24"
网关设置
sudo nmcli con mod "Wired connection 1" ipv4.gateway "192.168.203.1"
DNS设置
sudo nmcli con mod "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4"
设置 IP 配置方法为手动
sudo nmcli con mod "Wired connection 1" ipv4.method manual
关闭
sudo nmcli con down "Wired connection 1"
重新激活
sudo nmcli con up "Wired connection 1"
原文地址:https://blog.csdn.net/weixin_43372364/article/details/140616178
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!