I have a cluster with 1 login node and 100 computation nodes.

I can ping the external networks including google.com from the login node. However, I cannot from the computation nodes.

The computation nodes are all reachable (ping) from each other. They can also ping the login node. (and vice versa)

Where should I check first? (I am using CentOS 7)

The below is some info of my network status

enter image description here


Is net.ipv4.ip_forward set to 1 on the login node (which I assume is acting as a router for the compute nodes)? Have you set up NATing (i.e. is iptables -t nat -L empty)?

Check /etc/sysctl.conf for net.ipv4.ip_forward=1, and if it's not there, add it and run sysctl -p to source the changes you've made.

  • yes right. the login node acts as a route for compute nodes. I found that net.ipv4.ip_forward was set to 0. I changed it to 1 and the computes node can access the external networks now! (I don't know how it worked before). – syko Jan 16 '17 at 2:40
  • Additionally, 'iptables -t nat -L' shows no entry. But all the policy for (PREROUTING, INPUT, OUTPUT, POSTROUTING) is set to ACCEPT. – syko Jan 16 '17 at 2:41
  • You might also want to add -t nat -A POSTROUTING -o ens3 -j MASQUERADE to your iptables where ens3 is your public facing interface. – Travis DePrato Jan 16 '17 at 3:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.