Your web hosting partners since 2004.
Buy now »

Resolving Two Network Interfaces Issue on CentOS7

Introduction

Network connectivity issues are common in server environments, often requiring systematic troubleshooting to identify and resolve the root cause. In this article, we'll explore a scenario where two network interfaces on a Linux server were experiencing connectivity problems and the steps taken to diagnose and resolve the issue.

Problem Description

The server in question has two network interfaces, em1 and em2, each configured with static IP addresses. However, when bringing up one interface, the other became unreachable, causing connectivity problems.

Troubleshooting Steps

  1. Check Network Interface Configuration: Verify the configuration of both network interfaces (em1 and em2) in their respective configuration files located in /etc/sysconfig/network-scripts/.
  2. Verify IP Routing: Use the ip route command to check the routing table and ensure that the default gateway and network routes are correctly configured for both interfaces.
  3. Check Network Interface Status: Use the ip link show command to check the status of the network interfaces (em1 and em2) to ensure they are both up and running.
  4. Check ARP Table: Use the arp -n command to check the ARP table and verify the MAC addresses associated with the IP addresses of both interfaces.
  5. Check Firewall Rules: Use the iptables -L command to check the firewall rules and ensure that there are no rules blocking traffic between the network interfaces.

Solution

After thorough troubleshooting, the issue was identified to be related to the rp_filter parameter in the Linux kernel. By setting the rp_filter parameter to 2 for both em1 and em2 using the sysctl command, source validation by reverse path was enabled, resolving the connectivity issues.

sysctl -w net.ipv4.conf.em1.rp_filter=2
sysctl -w net.ipv4.conf.em2.rp_filter=2

Conclusion

Network connectivity issues on Linux servers can be complex and require systematic troubleshooting to identify and resolve. By following the troubleshooting steps outlined in this article and understanding the underlying kernel parameters, administrators can effectively diagnose and resolve network connectivity issues to ensure smooth operation of their servers.

References

Last updated: 2020-02-01

« Go Back

Order now »

Amazing as usual no problems, just what you'd expect from a top class provider.