While trying to setup the Redhat Linux machine with two interfaces to install vCloud Director into it, I had some funny problem with my network cards configuration. I have not installed vCloud Director yet at that time, so I was sure it is some Redhat Linux or networking problem rather than vCloud Director in specific. The problem I had, that I was able to ping one of the two NICs IPs from a different subnet, where I could not get the second NIC which I was planning to use for vCloud Director Remote Console to ping. Other machines within the same subnet were able to ping both NICs IPs, while machines from other subnets can only ping the IP of the first NIC.
I checked my network cards configurations and confirmed it had a gateway configured into them, as that seemed to me to be nothing but a routing/default gateway configuration problem. After fuzzing for few hours with this problem and trying every trick that is known to mankind with routing on Linux, I landed on the following post How To Install vCloud Director on RHEL 6.2 – No GUI by Kenny Coleman which explain the solution to the same problem.
Seems after Kenny had spent a good time trying to fix the problem assuming it was a routing or default gateway problem like I did, he found out that RHEL6 by default has reverse path filtering. It will filter outbound packets on an interface where it thinks they should have arrived on. in our case, the remote console IP is on the same subnet as the vCloud IP. While Kenny have done a great job documenting that as a part of his vCloud Director on RHEL 6.2 blog post, I thought it was kinda hidden in that long post & wanted to create a post just for this specific problem that I am pretty sure many of us not only in the VMware Community but other Redhat users will hit.
Below is the commands to disable the reverse path filtering on RHEL 6 or in our context How to get the vCloud Director Remote Console IP to Ping in Redhat 6.2:
echo ‘net.ipv4.conf.eth0.rp_filter = 0’ >> /etc/sysctl.conf
echo ‘net.ipv4.conf.eth1.rp_filter = 0’ >> /etc/sysctl.conf
echo ‘net.ipv4.conf.lo.rp_filter = 0’ >> /etc/sysctl.conf
sysctl -p
Hope this help, & happy pinging to your vCloud Director Remote Console IP.
5 responses to “How to get Redhat 6.2 Linux Second NIC to Ping”
ping -i command can also be used to ping with one interface.
Regards
Scott
Hi Scott,
I have not tried this, but not sure how would do that do trick. Is not the -i just is to change the TTL (Time to live). It will be great if you can shed some more light on this & if you can check it being the correct flag.
Thanks,
Eiad
Or you can do it for all the eth´s directly by:
sysctl -w “net.ipv4.conf.default.rp_filter=0”
sysctl -w “net.ipv4.conf.all.rp_filter=0”
Phew! Wow this was a hard one to track down. This works for CentOS 7 for all you googlers.
Thank you 🙂
it worked , wao, i tried this on a rhel6.4 Virtual machine..