How to make the VMware IP on the same network segment as the native IP

Source: Internet
Author: User

How to make the VMware IP on the same network segment as the native IPoriginal May 08, 2017 17:28:56
    • 1287
  • First verify that the native IP

    You can see the information:
    Native ip:192.168.1.162
    Gateway: 192.168.1.1
    DNS server: 192.168.1.1

    There are two types of virtual machine network adapters: VMnet1 and VMnet8.

  • View Virtual Machine network adapters

    1. To open the virtual Machine Workbench:

    2. Right-click under Target virtual machine, select settings, open the Virtual Machine Settings dialog box, and select network adapter
      My computer's virtual machine configuration starts with Nat mode, as shown in

    3. To view the properties of a network adapter, use the VMNET8 network adapter by default:


      As can be seen, the virtual machine IP is 192.168.232.1, and our native 192.168.1.162 is not in the same network segment, this is because the virtual machine is located in the network is generally considered local LAN.
      PS: Virtual machine IP Supplement: Assume that the virtual machine IP is 192.168.232.1, the virtual machine gateway is generally 192.168.232.2, 192.168.232.255 is generally broadcast IP,

  • After confirming the IP information of VMware and this machine, the question has not been answered, and we will then formally start the configuration,

    1. Change VMware's network adapter to "Bridging mode"

      Then click "OK" to save.
      Click on the "Advanced" button, you can see the MAC address of VMware is "00:0c:29:49:40:79", this information is placed first, then the table

    2. Configuring VMware's IP
      There is an episode that found a problem in the/etc/sysconfig/network-scripts directory and there is no Ifcfg-eth0 file, only Ifcfg-lo file
      Workaround:

      1. Create a Ifcfg-eth0 file

        Cd/etc/sysconfig/network-scripts
        Touch Ifcfg-eth0

      2. Editing a Ifcfg-eth0 file

        Name=eth0 file name
        Device=eth0 setting aliases
        ipaddr=192.168.1.188 the IP address you want to set
        netmask=255.255.255.0 Subnet Mask
        network=192.168.1.0 belongs to the network, and IP the same network, the general last one is 0
        gateway=192.168.1.1 Gateway
        broadcast=192.168.1.255 broadcast address, same network as IP, general last one is 255
        Whether the Onboot=yes is activated at startup, yes, or no
        Userctl=no whether a non-root user can control the device, yes or no
        Bootproto=static network allocation mode, static
        Hwaddr=00:0c:29:49:40:79 MAC address, in front of view virtual machine adapter properties, see

        After editing: Press ESC and enter ": Wq" after the carriage return to save;

      3. Set dns:vim/etc/resolv.conf

        NameServer 192.168.1.1

      4. Restart eth0 at boot:

        Vim/etc/rc.d/rc.local
        Write: Ifup eth0

      5. Restart Network Service

        Service Network restart

      6. Verify

        Ping the native ping 192.168.1.162 on the virtual machine
        Ping the virtual machine ping 192.168.1.188 on the host
        Ping the external network on the virtual machine, such as Ping www.baidu.com
        Can ping through, indicating that it has been configured.

        Open firewall

(go) How to make the VMware IP on the same network segment as the native IP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.