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-br0
File 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.