Solution for connecting ubuntu 10.04 to the Internet on vmwarevm

Source: Internet
Author: User
Tags domain name server

On the vmwarevm, ubuntu 10.04 cannot be connected to the Internet. Solution: ubuntu 10.04 was recently installed on the vmwarevm. The network encountered a problem and it took several days to complete the problem. In the first place, you can ping the Internet. I don't know why I can't ping the Internet. I can't even connect to svn. After several days of exploration, I finally found some solutions to the problem. The general steps are as follows: 1. To ensure that the network adapter has successfully obtained the IP address, if the IP address is not obtained, run sudo ifconfig eth0 upsudo/etc/init. d/networking restart run the preceding two commands and use ifconfig to view the IP address, you can view the configuration file/etc/network/interfaces. The general configuration is as follows: auto loiface lo inet loopback auto eth0iface eth0 inet dhcp auto eth1iface eth1 inet staticaddress 10.1.1.100gateway 10.1.1.1netmask 255.255.0 A lo is a loopback network, and the second is eth0. ip addresses are obtained through dhcp, and the third eth1 is allocated through static ip addresses, this is used to communicate with the host machine windows 2. If an ip address has been obtained, You can ping an ip address of the same network segment to check whether the ip address can be successfully pinged. Generally, if the ip address of the ping exists, you can ping the IP address of an Internet IP address. If the IP address cannot be successfully pinged, the problem is generally caused by gateway settings. The solution is as follows: (1) view the gateway address on the windows Host Machine (2) run the route command to view the gateway information. If the gateway address displayed by the route command does not have the same gateway address as the one displayed on the windows host, run the following command to add the Gateway: route add default gw gateway address (this address is the gateway address viewed on the windows Host Machine) if the gateway address viewed by the route command has the same gateway address as that seen on the windows host machine, also run the "route add default gw gateway address" command, I I am confused that once I execute this command, I can immediately access the internet. Haha, but the "route add default gw gateway address" command is only effective for the moment, if the machine cannot be restarted, add the command to/etc/profile. The restart also takes effect. 3. If the IP address can be pinged to the Internet, but the domain name cannot be pinged, this is the Domain Name Server problem. You can view the file/etc/resolv. conf, the file content is generally as follows: nameserver 172.16.200.251nameserver 172.16.203.253nameserver is a keyword, followed by the Domain Name Server address, the domain name server address can also be found on the windows host machine. If there is no problem in the above three steps, but the network still cannot be accessed, then ...... Depending on the specific situation, it is estimated that there is a problem with the configuration in a certain step.
 

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.