2 Nics with 2 different Gateway

Issues related to configuring your network
vijaydsk
Posts: 5
Joined: 2020/03/05 12:16:35

Re: 2 Nics with 2 different Gateway

Post by vijaydsk » 2023/04/12 03:54:16

Hello team,
I could able to fix the issue.
The following is what I did...
Create a new file

nano /etc/sysconfig/network-scripts/route-eth2 (your 2nd NIC name)

Insert the following text based on the 2nd network IP Pool
10.22.55.42/24 via 10.22.55.41

Save the file and restart the machine.

That's it.
Now I could able to reach both the networks

User avatar
jlehtone
Posts: 4548
Joined: 2007/12/11 08:17:33
Location: Finland

Re: 2 Nics with 2 different Gateway

Post by jlehtone » 2023/04/13 06:39:42

vijaydsk wrote:
2023/04/12 03:54:16
Hello team,
I could able to fix the issue.
The following is what I did...
The data that you show does look inconsistent.
What is the output of these:

Code: Select all

nmcli d s
ip ro
ip ru
ip ro sh table rt1
ip ro sh table rt2

User avatar
TrevorH
Site Admin
Posts: 33263
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: 2 Nics with 2 different Gateway

Post by TrevorH » 2023/05/25 17:10:22

CentOS Linux release 7.7.1908 (Core)
Nothing to do with this but do not run 3 year old unpatched versions.

yum update
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply