The simplest way to connect to the INTERNET in VMware

Source: Internet
Author: User
The simplest method for connecting to the INTERNET under VMware-Linux Enterprise Application-Linux server application information. The following is a detailed description. Writted by woflman revised at 2007.7.9

I started to learn about LINUX's cousin. After searching for the Internet for a long time, I didn't get the Redhat 9 online in VMware,

Now I write out the most commonly used method, so that the novice can save a little time to search. Steps are as follows:

1. Select Ethernet network connection as NAT when starting the Virtual Machine


2. on the terminal, type dhclient and assign the dhcp sever of VMware to redhat 9.

# Dhclient
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems consortings.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

Listening on LPF/eth0/00: 0c: 29: c2: fc: c5
Sending on LPF/eth0/00: 0c: 29: c2: fc: c5
Sending on Socket/fallback
DHCPDISCOVER on eth0 to define limit 255 port 67 interval 8
DHCPOFFER from 192.168.80.254
DHCPREQUEST on eth0 to register 255.255.255 port 67
DHCPACK from 192.168.80.254
Bound to 192.168.80.130 -- renewal in 826 seconds.; this is the 192.168.80.130.


3. If you want to use services such as SSHD, SMB. VSFTP, you 'd better fix this IP address.

In the terminal # cd/etc/sysconfig/network-scripts/

# Vi ifcfg-eth0 if you have two NICs, it may also be ifcfg-eth1, please confirm which is the Internet,

DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
IPADDR = 192.168.80.130
NETMASK = 255.255.255.0
NETWORK = 192.168.80.0
BROADCAST = 192.168.80.255
GATEWAY = 192.168.80.2

Note that the above BOOTPROTO = static
GATEWAY = 192.168.80.2 this GATEWAY exists here, but there is no more GATEWAY in # more/etc/hosts. This is very important. Either of them can have only one


This may not be your IPADDR, but NAT gateways under VMware generally use

Modify 192.168.x.2 as needed.

4. # Ifdown eth0

# Ifup eth0

Or # service network restart



5. # ping-c 3 www.sina.com.cn
PING jupiter.sina.com.cn (218.30.66.101) 56 (84) bytes of data.
64 bytes from 218.30.66.101: icmp_seq = 0 ttl = 128 time = 47.7 MS
64 bytes from 218.30.66.101: icmp_seq = 1 ttl = 128 time = 36.4 MS
64 bytes from 218.30.66.101: icmp_seq = 2 ttl = 128 time = 44.0 MS

--- Jupiter.sina.com.cn ping statistics ---
3 packets transmitted, 3 bytes ed, 0% packet loss, time 11053 ms
Rtt min/avg/max/mdev = 36.453/42.766/47.791/4.723 MS, pipe 2


If the above picture appears, congratulations! You are on the Internet.

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.