Debian6 net Internet in host Win7,vmware

Source: Internet
Author: User
Tags nameserver

A long time ago is the net way to the Internet, recently reload the virtual machine after not to go to the net, get a half-day to succeed, must be noted to avoid later forget

Here's how to find it online, but the 2nd step doesn't need

Original Address http://www.cnblogs.com/sophine/archive/2012/04/26/2471227.html

1. Set the network connection to NAT in the installed virtual machine now

2. Set the following in the WIN7 computer's local connection:(no need for this step, skip)

3, in the VMware nerwrk Adapter VMnet8 set the IP to 192.168.137.1 ( this IP is in the win 7 Ifconfig View learned. This IP is set at its own discretion ) as follows:

4. After selecting Virtual Netword Editor in VMware Virtual machine, enter:

Set the gateway IP for VMnet8 to 192.168.137.2, such as:

To set the gateway IP in NAT Setting:

5. Set Ubuntu temporary effective IP via the ifonfig command.

(1). In the terminal: Ping 192.168.137.2, the test can be connected, or may not be connected. If not, set the IP by ifconfig, see steps b and C for details.

However, this method can only take effect temporarily, if restart Uunutu,ip, will change.

(2). Set the network card temporary IP
sudo ifconfig eth0 192.168.137.128 netmask 255.255.255.0

This sets the IP address and subnet mask of the NIC Eth0

(3). Set Gateway sudo route add default GW 192.168.137.2

(4). Ping the gateway to ping it.

(5). Set DNS modification/etc/resolv.conf in which to add
NameServer 192.168.137.2
NameServer 127.0.0.1

Complete.

6. Configure the static Ubuntu IP address for the network card (permanent IP, restart the computer will not be lost)interfaces and resolv.conf files must be changed .

(1) Open the file you want to edit interfaces

It's the directory is/etc/network/interfaces

sudo vi/etc/network/interfaces

Or: sudo

Gedit/etc/networking/interfaces at this point, you can write the contents of the file in a text editor to facilitate

(2) Change the contents of the document to:

Auto

Eth0

Iface

Eth0 inet Static

Address

192.168.137.128

Netmask 255.255.255.0

Gateway

192.168.137.2

(3) Configuring DNS

Sudo

gedit/etc/resolv.conf//Use this statement to open a file that is configured for DNS modification

NameServer

192.168.137.2

(4) Use the following command to make the network settings effective

Sudo

/etc/init.d/networking restart

Related Article

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.