mac vmware fusion10 nat 模式网络配置

1.虚拟机选择 nat 模式
  虚拟机-->网络适配器-->网络适配器设置-->连接网络适配器(对勾)-->与我的 mac共享

2.vmnet1 & vmnet8 的配置文件位于 "/Applications/Vmware Fusion.app/Contents/Library" , 可修改默认地址也,vmnet8 还可以添加映射端口。

# cd /Library/Preferences/VMware\ Fusion
# cat networking
VERSION=,
answer VNET_1_DHCP yes
answer VNET_1_DHCP_CFG_HASH 6345810A7A91B075370FF0B472FA9334687AEB5A
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_SUBNET 172.19.173.0
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_8_DHCP yes
answer VNET_8_DHCP_CFG_HASH 42662E369263BA0C7E405795C5A7F90C25D878FD
answer VNET_8_HOSTONLY_NETMASK 255.255.255.0
answer VNET_8_HOSTONLY_SUBNET 172.19.73.0
answer VNET_8_NAT yes
answer VNET_8_VIRTUAL_ADAPTER yes # cat vmnet1/dhcpd.conf
# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet1.
#
# This file was automatically generated by the VMware configuration program.
# See Instructions below if you want to modify it.
#
# We set domain-name-servers to make some DHCP clients happy
# (dhclient as configured in SuSE, TurboLinux, etc.).
# We also supply a domain name to make pump (Red Hat .x) happy.
# ###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####
# Modification Instructions: This section of the configuration file contains
# information generated by the configuration program. Do not modify this
# section.
# You are free to modify everything else. Also, this section must start
# on a new line
# This file will get backed up with a different name in the same directory
# if this section is edited and you try to configure DHCP again. # Written at: // ::
allow unknown-clients;
default-lease-time ; # default is minutes
max-lease-time ; # default is hours subnet 172.19.173.0 netmask 255.255.255.0 {
range 172.19.173.128 172.19.173.254;
option broadcast-address 192.168.173.255;
option domain-name-servers 192.168.173.1;
option domain-name localdomain;
default-lease-time ; # default is minutes
max-lease-time ; # default is hours
}
host vmnet1 {
hardware ethernet :::C0::;
fixed-address 192.168.173.1;
option domain-name-servers 0.0.0.0;
option domain-name "";
}
####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" ####### # cat vmnet8/dhcpd.conf
# Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8.
#
# This file was automatically generated by the VMware configuration program.
# See Instructions below if you want to modify it.
#
# We set domain-name-servers to make some DHCP clients happy
# (dhclient as configured in SuSE, TurboLinux, etc.).
# We also supply a domain name to make pump (Red Hat .x) happy.
# ###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####
# Modification Instructions: This section of the configuration file contains
# information generated by the configuration program. Do not modify this
# section.
# You are free to modify everything else. Also, this section must start
# on a new line
# This file will get backed up with a different name in the same directory
# if this section is edited and you try to configure DHCP again. # Written at: // ::
allow unknown-clients;
default-lease-time ; # default is minutes
max-lease-time ; # default is hours subnet 192.168.73.0 netmask 255.255.255.0 {
range 192.168.73.128 192.168.73.254;
option broadcast-address 192.168.73.255;
option domain-name-servers 192.168.73.2;
option domain-name localdomain;
default-lease-time ; # default is minutes
max-lease-time ; # default is hours
option netbios-name-servers 192.168.73.2;
option routers 192.168.73.2;
}
host vmnet8 {
hardware ethernet :::C0::;
fixed-address 192.168.73.1;
option domain-name-servers 0.0.0.0;
option domain-name "";
option routers 0.0.0.0;
}
####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" ####### # cat vmnet8/nat.conf
# VMware NAT configuration file [host] # NAT gateway address
ip = 192.168.73.2
netmask = 255.255.255.0 # VMnet device if not specified on command line
device = vmnet8 # Allow PORT/EPRT FTP commands (they need incoming TCP stream ...)
activeFTP = # Allows the source to have any OUI. Turn this on if you change the OUI
# in the MAC address of your virtual machines.
allowAnyOUI = # Controls if (TCP) connections should be reset when the adapter they are
# bound to goes down
resetConnectionOnLinkDown = # Controls if (TCP) connection should be reset when guest packet's destination
# is NAT's IP address
resetConnectionOnDestLocalHost = # Controls if enable nat ipv6
natIp6Enable = # Controls if enable nat ipv6
natIp6Prefix = fd15:4ba5:5a2b:::/ [tcp] # Value of timeout in TCP TIME_WAIT state, in seconds
timeWaitTimeout = [udp] # Timeout in seconds. Dynamically-created UDP mappings will purged if
# idle for this duration of time = no timeout, default = ; real
# value might be up to % longer
timeout = [netbios]
# Timeout for NBNS queries.
nbnsTimeout = # Number of retries for each NBNS query.
nbnsRetries = # Timeout for NBDS queries.
nbdsTimeout = [incomingtcp] # TCP 端口映射
# Use these with care - anyone can enter into your VM through these...
# The format and example are as follows:
#<external port number> = <VM's IP address>:<VM's port number>
# = 172.16.3.128: [incomingudp] # UDP 端口映射
# UDP port forwarding example
# = 172.16.3.0:

3.查找子网掩码和 dns 地址

  mac ->系统偏好设置->网络->高级
    NETMASK=255.255.254.0(子网掩码)
    DNS1=172.19.160.145
    DNS2=172.19.160.146
4.修改Centos7中ifcfg-xxx文件
  vi /etc/sysconfig/network-scripts/ifcfg-ens33
  增加或修改
  BOOTPROTO="static",
  IPADDR="172.19.163.11",
  NETMASK="255.255.255.0",
  DNS1="172.19.160.145",
  DNS2="172.19.160.146",
  GATEWAY="172.19.163.2",
  ONBOOT="yes"
5.重启网络(失败reboot linux 重启 vmware)
  service network restart

mac vmware fusion10 nat 模式网络配置的更多相关文章

  1. 【转载】VMware虚拟机NAT模式网络配置图文教程

    原文:https://blog.csdn.net/dingguanyi/article/details/77829085 一.引言 在Windows上搭建集群实验环境时,为能够让集群结点之间相互通信, ...

  2. 虚拟机(VMWare)NAT 模式,配置静态IP上网的问题

    问题描述: 感觉问题解决了回过头来想就很简单,但是没解决就怎么也找不到问题,知识储备捉襟见肘.针对这个问题我好长时间才弄好,各种找资料,也证明本人筛选有用博客的能力比较低,先让我哭会去…… 在虚拟的实 ...

  3. Vmware在NAT模式下网络配置详解

    Vmware在NAT模式下网络配置详解 Linux中的网络配置对于接触Linux不久的小白菜来说,还是小有难度的,可能是不熟悉这种与windows系列迥然不同的命令行操作,也可能是由于对Linux的结 ...

  4. VMware虚拟CentOS 6.5在NAT模式下配置静态IP地址及Xshell远程控制配置

    VMware虚拟CentOS 6.5在NAT模式下配置静态IP地址及Xshell远程控制配置 标签: LinuxXshellCentOS 2016-10-15 04:58 127人阅读 评论(0) 收 ...

  5. VMware虚拟机 NAT模式 配置静态ip

    前言:Ubuntu 16.04 VMware虚拟机 NAT模式 配置静态ip,这个问题困扰我好长时间,桥接的静态ip我会了,然而用NAT 的方式配置集群会更好.(NAT 方式客户机之间的通讯不经过路由 ...

  6. Mac下Virtual Box Host-Only网络配置

    Mac下的虚拟机其实有很多,Parallels.VMware Fusion.Virtual Box都不错,Parallels是目前试过感觉最好的,Fusion装64位系统驱动支持似乎不完善,而且混合模 ...

  7. Mac VMware fusion nat 外网映射

    当我们在使用VMware fusion NAT模式时,相当于形成了一个虚拟的局域网VLAN,这时虚拟机可以对外通信,但是nat对外隐藏了内网,外网访问虚拟机的时候就会遇到问题,比如ping ,ssh ...

  8. VMWare-Linux NAT模式联网配置

    VMWare-Linux NAT模式联网配置   摘自:https://blog.csdn.net/a56112777/article/details/83053566 (注意使用root用户) 1. ...

  9. VMware虚拟机NAT模式无法上外网

    VMware虚拟机NAT模式无法上外网排错思路 1,确保三种模式只有一种在连接 2,确保ip配置正确 配置的子网跟DHCP必须是同一网段 3,确保网关配置正确 网关不管怎么配,一定不要配192.168 ...

随机推荐

  1. 18 12 18 给服务器添加logging 日志功能

    Python中有个logging模块可以完成相关信息的记录,在debug时用它往往事半功倍 1. 日志级别 日志一共分成5个等级,从低到高分别是: DEBUG INFO WARNING ERROR C ...

  2. webview HttpClient 怎么保持会话session统一

      cookies session均为key---value的形式展示,  1.    session是存储在服务端,并有一块区域控件存储用户信息,主要是为了判断该用户是否登录,在客户端采用httpC ...

  3. Windbg 实践之符号篇

    How to display the size value 1)一开始不会加载,chksym 了一下就加载了. 2) 新版本已经可以显示size的大小了 3)?? 显示变量的类型 4)x std::v ...

  4. ci框架与smarty的整合

    ci框架与smarty的整合 来源:未知    时间:2014-10-20 11:38   阅读数:108   作者:xbdadmin [导读] Ci 和 smarty 的完美结合 Ci 结合 sma ...

  5. CPU压力测试--限制到指定范围

    作用:增加CPU使用率到指定范围 1.书写shell脚本增加CPU压力 #! /bin/bash # filename cputest.sh endless_loop() { echo -ne &qu ...

  6. javaweb05 文件的上传一

    2.使用fileupload组件完成文件的上传应用 1).需求: I. 上传 >在upload.jsp页面上使用jQuery实现"新增一个附件","删除附件&quo ...

  7. iPhone到底能不能充一整夜电?

    其实在国内,手机充电一直是个"玄学问题".早在多年前就有大神向小白敦敦教导,"新买的手机要将电用完,并充12个小时,如此反复三次才能延长手机电池寿命".甚至直到 ...

  8. String,StringBuffer与StringBuilder的区别与选择

    三者的区别 String:不可变类,一旦一个对象被建立的时候,包含在这个对象中的字符串序列是不可变的,直到这个对象被销毁.StringBuffer:可变字符序列的字符串.当其对象被创建的时候,可以用a ...

  9. h5-应用级缓存

    1.html代码及css代码 <!DOCTYPE html> <!--manifest="应用程序缓存清单文件的路径 建议文件的扩展名是appcacje,这个文件的本质就是 ...

  10. java 单利模式设计原理,饿汉式懒汉式,开发中推荐饿汉式

    单例模式的设计:  1 //Single类进内存,对象还没有存在,只有调用了getInstance方法时,才建立对象. //对象是方法被调用时,才初始化,也叫做对象的延时加载.成为:懒汉式. //Si ...