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. SQL基础教程(第2版)第8章 SQL高级处理:练习题

    本题中 SELECT 语句的含义是“按照商品编号(product_id)的升序进行排序, 计算出截至当前行的最高销售单价”.因此,在显示出最高销售单价的同时,窗口函 数的返回结果也会变化.这恰好和奥运 ...

  2. 自动化运维工具ansible中常用模块总结

    1.yum模块: name:要操作的软件包名字,可以是一个url或者本地rpm包路径,如name=nginx update_cache:更新软件包缓存,如update_cache=yes则更新软件包缓 ...

  3. UML-架构分析-基础

    1.何时开始架构分析? 最好在第一次迭代前开始.因为,架构分析的失败会导致高风险.如:必须支持英语.在一秒响应时间内支持500个并发事务. UP是迭代和进化的(不是瀑布式的),所以架构分析和开发工作齐 ...

  4. usr/sbin/inetd

    root 4 0.0 1344 1204? S 17:09 0:10 /usr/sbin/inetd 运行 Internet 超级 服务器,它负责监听 Internet sockets 上的连接,并调 ...

  5. 201503-1 图像旋转 Java

    思路: 观察输入和输出可以发现,第三列输出为第一行,第二列输出为第二行,第一列输出为第三行.循环即可 import java.util.Scanner; //得分80,本题最高需要输入100W次,因为 ...

  6. BeanFactory和ApplicationContext的区别(Bean工厂和应用上下文)

    https://blog.csdn.net/qq_20757489/article/details/88543252 https://blog.csdn.net/pythias_/article/de ...

  7. MyBatis从入门到精通(第2章):MyBatis XML方式的基本用法【insert用法、update用法、delete用法】

    2.4  insert 用法 2.4.1  简单的 insert方法 在接口 UserMapper.java 中添加如下方法. /** * 新增用户 * @param sysUser * @retur ...

  8. 关于live2D的使用

    <script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidge ...

  9. 【转】 java类的加载和执行顺序

    1.先执行Test类的静态代码块后执行Test类的main方法,说明要执行类的方法需要先加载这个类. 2.在创建ClassB的对象时,先去加载了父类ClassA.说明加载子类时如果没有加载父类,会先加 ...

  10. 14 微服务电商【黑马乐优商城】:day04-ES6语法入门

    day01-springboot(理论篇) :day01-springboot(实践篇) day02-springcloud(理论篇一)  :day02-springcloud(理论篇二)  :day ...