为什么设置静态IP就不用说了,搭建kubernetes 服务器各虚拟机设置静态IP。
相信很多同学直接设置
ens33网卡后,不能访问外网
问题就在子网掩码和dns
以上两个的value 通过终端获取
1、cat /Library/Preferences/VMware\ Fusion/vmnet8/nat.conf
# NAT gateway address
ip = 192.168.119.2
netmask = 255.255.255.0
- 只查看这个文件不要修改
NAT gateway address
:192.168.159.2Netmask
: 255.255.255.0
2、cat /Library/Preferences/VMware\ Fusion/vmnet8/dhcpd.conf
subnet 192.168.119.0 netmask 255.255.255.0 {
range 192.168.119.128 192.168.119.254;
option broadcast-address 192.168.119.255;
option domain-name-servers 192.168.119.2;
option domain-name localdomain;
default-lease-time 1800; # default is 30 minutes
max-lease-time 7200; # default is 2 hours
option netbios-name-servers 192.168.119.2;
option routers 192.168.119.2;
}
host vmnet8 {
hardware ethernet 00:50:56:C0:00:08;
fixed-address 192.168.119.1;
option domain-name-servers 0.0.0.0;
option domain-name "";
option routers 0.0.0.0;
}
- 这个文件只查看不要修改。
- range就是可选的静态ip的范围,192.168.119.128 至192.168.119.254
- option broadcast-address是广播地址:192.168.119.255
- option domain-name-servers就是DNS地址 192.168.119.2
- DNS server 就配置192.168.119.2 即可。
- hardware ethernet 表示 Mac 地址,
- fixed-address 表示 IP 地址
systemctl restart network重启即可
网络偏好DNS添加192.168.119.2
https://blog.csdn.net/hadues/article/details/129214087
标签:WMware,domain,option,IP,119.2,MAC,192.168,address,name From: https://www.cnblogs.com/buxiangxin/p/17768100.html