In Linux, only the host mode is under IP

Source: Internet
Author: User

Yesterday in the project to contact with the Hadoop, need to use Linux to operate, have been in contact before, roughly forget, in the equipment of the virtual machine, the IP ping encountered the problem, the mode is only the host mode, today to share, so that their future encounter, can also be resolved, Also hope to help the new contact with the virtual machine friends.

Open the Network Sharing Center and change the adapter settings-->, right-click the Open property,

This is the IP I gave to set and so on.

Then right-click the local Area Connection,

Open the share, tick the Allow-----box to select just the VMware Network Adapter VMnet1 This,

Next. is to set up the IP in the virtual machine,

Everyone, as I refer to an item open on the line, IP set to the same network segment as the IP just under Windows,

Enter virtual machine

1) Modify the file/etc/udev/rules.d/70-persistent-net.rules

Will name=eth0 that paragraph commented out, can also be deleted, the following new generation of eth1 or something else, the following is the new generation of network card content, attr{address}== "00:0c:29:d1:3c:a7", is my local network card address, write down D1 : 3c:a7 these 6 bits,

Save exit.

2) Copy 00:0c:29:d1:3c:a7 to modify/etc/sysconfig/network-scripts/ifcfg-eth0

The address at the back of the hwaddr= is modified to 00:0c:29:d1:3c:a7

IP set to the IP you want to be in the same band as the Gateway

Save exit.

3): Reboot restart, ifconfig

OK, end.

The article on Baidu similar too much, but I do not copy the meaning, I just for their own virtual machine to do with the mind, thank you.

Wangzai Moving Bricks

In Linux, only the host mode is under 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.