VMware configures Linux virtual machine Access extranet

Source: Internet
Author: User
Tags nameserver

"Virtual Machine Version"

System version: Centos 6.8

"Connection Method"

 Network mode : bridging mode

PS: I prefer to use bridge, direct NAT is also possible

"Configuration Steps"

1. Configure the NIC

#配置命令

Vi/etc/sysconfig/network-scripts/ifcfg-eth0

#ONBOOT (indicates whether the network card is activated when the system starts, only the network card in the active state will be able to connect and communicate with the network)

#BOOTPROTO (This is to indicate what kind of routing protocol you use, there are three different ways of writing, if none and static means you are using static route, then you must fill in the next project IPADDR, NETMASK, gateway three options. If DHCP indicates that you are using dynamic routing protocols, the IPADDR, NETMASK, and gateway options do not have to be filled in. If you fill it out, the value you fill in will prevail)

#IPADDR IP Address

#NETMASK Subnet Mask

#GATEWAY Gateway

      

#配置完成后重启网卡

Service Network restart

2. Configure Virtual Machine Connection mode

Select Virtual Machine Right-click Settings, network adapter, custom->vmnet1 (bridging mode)

      

    

Select Physical network adapter----bridge mode----web editor--

      

      

Physical hosts ping virtual machines to see if they are connected

Win+r->cmd

        

3. Setting up the virtual machine DNS

3.1 Write directly when configuring the NIC

gateway=192.168.1.1

dns1=223.5.5.5

dns2=114.114.114.114

3.2 Written in the resolv.conf configuration file

# vi/etc/resolv.conf

NameServer 223.5.5.5

NameServer 114.114.114.114

        PS: Don't forget to restart the network service

       

4. Ping the Baidu URL in the virtual machine, test whether the same

      

 

VMware configures Linux virtual machine Access extranet

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.