[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
一、桥接模式
通过桥接模式网络连接,虚拟机中的虚拟网络适配器可连接到主机系统中的物理网络适配器,在桥接模式下,虚拟机ip
地址需要与主机在同一个网段,如果需要联网,则网关与DNS 需要与主机网卡一致。 但是桥接模式有个问题就是当你转变办公的地方时(外部网络改变了),虚拟机的IP 地
址和网关也要手动改变,很麻烦。
二、nat模式
使用 NAT 模式网络时,虚拟机在外部网络中不必具有自己的 IP
地址。主机系统上会建立单独的专用网络。在默认配置中,虚拟机会在此专用网络中通过 DHCP
服务器获取地址。虚拟机和主机系统共享一个网络标识,此标识在外部网络中不可见。在NAT 模式中,主机网卡直接与虚拟 NAT 设备 相连,然后虚拟 NAT
设备与虚拟 DHCP 服务器一起连接在虚拟交换机VMnet8上。
三、仅主机模式
Host-Only 模式其实就是 NAT 模式去除了虚拟 NAT 设备,然后使用 VMware Network Adapter
VMnet1虚拟网卡连接 VMnet1 虚拟交换机来与虚拟机通 信的,Host-Only 模式将虚拟机与外网隔开,使得虚拟机成为一个独立的系
统,只与主机相互通讯。
四、静态ip地址配置(Linux)
vi /etc/sysconfig/network-scripts/ifcfg-ensxxx
TYPE = "Ethernet" PROXY_METHOD = "none" BROWSER_ONLY = "no" # 把默认得 dhcp 修改为
none 或者 static, 表示设置静态 IP 地址 BOOTPROTO = "none" DEFROUTE = "yes"
IPV4_FAILURE_FATAL = "no" NAME = "ens32" UUID =
"eca2f15c-eacc-48cf-9eea-9251567a4b18" DEVICE = "ens32" # 设置为 yes ONBOOT = "yes"
# 静态 ip 地址得配置,参考物理主机得 IP 配置 IPADDR = 192 .168.1.188 GATEWAY = 192 .168.1.254
NETMASK = 255 .255.255.0 DNS1 = 8 .8.8.8 DNS2 = 114 .114.114.114