In VMware, the static IP address and vmwarecentos are configured for CentOS in the bridge mode.

Source: Internet
Author: User

In VMware, the static IP address and vmwarecentos are configured for CentOS in the bridge mode.
1) set the virtual machine to use the bridge mode.

Open the new virtual machine and click the network adapter. Select the bridge mode.



2) set the working mode of VMware to bridging.

In the VMware menu, choose Edit> Virtual Network editor ]. Select VMnet0. In Bridge Connection mode, the bridge is connected to a wireless network or a local connection. Because I use a notebook and bridge to the wireless network, the bridge is connected to [1X1 11b/g/n Wireless LAN PCI Express half Mini Cart adapter ].



3) query the LAN gateway.

In windows, open cmd. Enter in cmd. Ipconfig/all. You can find the gateway of [1X1 11b/g/n Wireless lan pci Express half Mini Cart adapter. For example, the gateway is 192.168.1.1.



4) configure the Virtual Machine gateway. Open the centos command line.

# Vi/etc/sysconfig/network



5) configure the CentOS static IP address.

Here we assume that the static IP address is 192.168.1.211. Use Google's free dns: 8.8.8.8.

DEVICE = eth0
HWADDR = 00: 0C: 29: CB: 47: 28
TYPE = Ethernet
UUID = ea0bc70a-c20a-4507-b2ed-f9091a160f8c
ONBOOT = yes
NM_CONTROLLED = yes
# BOOTPROTO = dhcp
BOOTPROTO = static
IPADDR = 192.168.1.211
NETMASK = 255.255.255.0
IPV6INIT = no
DNS1 = 8.8.8.8


6) restart the NIC.

# Service network restart


7) check whether the network is normal.

1) can ping the Internet from the VM. (Can I ping www.baidu.com ).



2) Can the local host ping the VM in cmd. (Can ping 192.168.1.211 ).



Copyright:

1) original works, from "CleverCode blog", Please note the following original address when reprinting; otherwise, the copyright will be held legally liable.

2) original address: http://blog.csdn.net/clevercode/article/details/45935073 (reprint must indicate the address ).

3) Linux commonly used software installation and configuration-Directory: http://blog.csdn.net/clevercode/article/details/45740431 (directory continuous updates, please add to favorites ).

4) blog column address (Linux commonly used software installation and configuration): http://blog.csdn.net/column/details/linuxsoftwareinstall.html (blog continues to increase, Attention Please favorites ).

5) Welcome to my blog for more highlights: http://blog.csdn.net/clevercode.





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.