CentOS configuration of static IP addresses in VMware Bridge Mode

Source: Internet
Author: User
To solve this problem, we used the NAT mode when configuring a hadoop cluster under a virtual machine. However, there is another physical host in the LAN, we hope this physical host can communicate with the virtual machine. Then I decided to use the Bridged method and put them all in a network segment. The configuration of VMware is omitted here. in the bridging mode, the bridging Nic is the Nic you are using to access the internet. for example, if there are two NICs and the Wireless NIC is used to access the internet, select a wireless network card.

To solve this problem, we used the NAT mode when configuring a hadoop cluster under a virtual machine. However, there is another physical host in the LAN, we hope this physical host can communicate with the virtual machine. Then I decided to use the Bridged method and put them all in a network segment.

The configuration of VMware is omitted here. in the bridging mode, the bridging Nic is the Nic you are using to access the internet. for example, if there are two NICs and the Wireless NIC is used to access the internet, select a wireless network card.

Disable NetworkManager first

$ sudo chkconfig NetworkManager off$ sudo service NetworkManager stopStopping NetworkManager daemon:                            [  OK  ]
$ Cd/etc/sysconfig/network-scripts # enter the configuration folder $ sudo vim ifcfg-eth0DEVICE = "eth0" BOOTPROTO = "static" IPADDR = 192.168.1.111 # Your IP address NETMASK = 255.255.255.0HWADDR = "00: 0C: 29: B3: C2: 49 "# mac address IPV6INIT =" no "NM_CONTROLLED =" yes "ONBOOT =" yes "TYPE =" Ethernet "BRIDGE =" br0 "# point to the bridge configuration file GATEWAY = 192.168.1.110 # the gateway must be set to ipDNS1 = 192.168.1.1 of the VMware host machine.

Createifcfg-br0File and write configuration content

$ sudo vim ifcfg-br0DEVICE="br0"BOOTPROTO="static"ONBOOT="yes"IPADDR=192.168.1.111TYPE="Bridge"GATEWAY=192.168.1.1DNS1=192.168.1.1

Restart the network

sudo service network restart

This should be done.

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.