Turn: Linux dual NIC configuration two IP at the same time there is only one reason

Source: Internet
Author: User

Root cause:

Reverse route checking is enabled by default on Linux

If 2 network cards are inside a LAN, then the server may find the gateway from eth0 or eth1, if a packet from eth0 into the gateway on eth1, then from the eth1 is out of the way, it will not pass. The reverse route check asks where it came from to go back.

Turn off reverse route checking (replace the network card name of the second third row, depending on your situation):

echo 0 >/proc/sys/net/ipv4/conf/all/rp_filter
echo 0 >/proc/sys/net/ipv4/conf/eth0/rp_filter
echo 0 >/proc/sys/net/ipv4/conf/eth1/rp_filter


Each boot automatically turns off the reverse route check, adding/etc/rc.local.

Turn: Linux dual NIC configuration two IP at the same time there is only one reason

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.