网络配置

独自空忆成欢 提交于 2019-11-30 09:32:34

虚拟机网络模式
Bridged(桥接模式)、NAT(网络地址转换模式)、Host-Only(仅主机模式)。

桥接模式
设置IP网关

vi /etc/network/interfaces

interfaces(5) file used by ifup(8) and ifdown(8)

auto lo
iface lo inet loopback
#the primary network interface
auto ens33
iface ens33 inet static
address 192.168.0.104
netmask 255.255.255.0
gateway 192.168.0.1
sudo /etc/init.d/networking restart

设置DNS

nameserver 192.168.0.1
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!