ubuntu16.04和18.04的桥接模式和.NAT模式配置

桥接模式
ubuntu16.04和18.04的桥接模式和.NAT模式配置

第一步
vi /etc/network/interfaces
ubuntu16.04和18.04的桥接模式和.NAT模式配置

auto lo
iface lo inet loopback
auto ens33
iface ens33 inet static
address 192.168.18.208
netmask 255.255.255.0
gateway 192.168.18.1
dns-nameserver 114.114.114.114

注意桥接时网段需要与外网一致,
ubuntu16.04和18.04的桥接模式和.NAT模式配置改完以后重启虚拟机,ifconfig查看是否修改ok。

.NAT配置

第一步
vi /etc/network/interfaces
ubuntu16.04和18.04的桥接模式和.NAT模式配置auto lo
iface lo inet loopback
auto ens33
iface ens33 inet static
address 192.168.148.128
netmask 255.255.255.0
gateway 192.168.148.2
dns-nameserver 114.114.114.114
ubuntu16.04和18.04的桥接模式和.NAT模式配置VMware的编辑选项下可找到虚拟网络设置,子网ip网段需要和静态ip统一网段。

相关文章:

  • 2021-07-02
  • 2021-11-23
  • 2021-12-12
  • 2021-08-30
  • 2022-12-23
  • 2021-11-23
  • 2021-08-22
猜你喜欢
  • 2021-11-23
  • 2021-09-26
  • 2021-03-26
  • 2021-07-08
  • 2021-10-28
相关资源
相似解决方案