ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Redhat 6.x同一主机两个网口设置同网段地址ping异常

Redhat 6.x同一主机两个网口设置同网段地址ping异常

Linux操作系统 作者:sDon 时间:2014-11-07 17:52:25 0 删除 编辑
源文地址:http://www.virtualizationteam.com/cloud/how-to-get-redhat-6-2-linux-second-nic-to-ping.html

How to get Redhat 6.2 Linux Second NIC to Ping

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.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/645199/viewspace-1324492/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-11-20

  • 博文量
    39
  • 访问量
    241222