Skip to main content

CentOS 7, 2 NIC ports, 2 subnets configured, but both not working simultaneously [Resolved]

I have set up a CentOS 7.6 server (Lenovo SR650 with x722 10 GbE card) and have tried to designate the two NIC ports (not 2 NICs, just 2 ports) to be on different subnets with different gateways etc. I have statically configured each interface (eno1, and eno2) to have separate IPs and Gateways, and added route-enoX and rule-enoX for both interfaces. And yet when I bring up the second port (eno2), I lose connection to eno1. I can SSH into the eno2 IP (different subnet), but can't SSH to eno1. If I bring eno2 down, I can then access eno1 again.

Although I do have some experience in network administration, I am not familiar with this problem.

Can anyone shed some light on this?

The configs below are for eno1, and eno2 is similar.

IFCFG-ENO1

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME=eno1
UUID=c82f3e2f-466b-4afb-95dd-492720551d2c
DEVICE=eno1
ONBOOT=yes
IPADDR=192.168.9.9
PREFIX=24
GATEWAY=192.168.9.1
DNS1=10.1.1.198
DNS2=10.1.1.189
ZONE=public

ROUTE-ENO1

default via 192.168.9.1 dev eno1 table 1
192.168.9.0/24 dev eno1 src 192.168.9.9 table 1

RULE-ENO1

from 192.168.9.9/32 table 1

IP ROUTE (includes eno2)

default via 192.168.9.1 dev eno1 proto static metric 100
default via 10.10.0.1 dev eno2 proto static metric 101
10.10.0.0/23 dev eno2 proto kernel scope link src 10.10.0.80 metric 101
192.168.9.0/24 dev eno1 proto kernel scope link src 192.168.9.9 metric 100

Question Credit: Saivan
Question Reference
Asked August 21, 2019
Posted Under: Network
39 views
2 Answers

You probably need:

ROUTE-ENO2

default via 10.10.0.1 dev eno2 table 2
10.10.0.0/23 dev eno2 src 10.10.0.80 table 1

RULE-ENO2

from 10.10.0.80/32 table 2

or something along the lines.

What is likely happening when you bring up eno2 is that traffic related to 10.10.0.80 which needs to go through the gateway is routed via 192.168.9.1 as this entry precedes 10.10.0.1 and is probably dropped there.


credit: Tomek
Answered August 21, 2019
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA