Configure static IP addresses for CentOS in bridging mode in VMware

Source: Internet
Author: User

Configure static IP addresses for CentOS in bridging mode in VMware
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 ).

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.