Welcome to the Linux Foundation Forum!
Routing between two networks that have duplicate IP addresses
theprofoundgeek
Posts: 1
in Networking
On a linux box we have three network interfaces, they look like below
| CentOS 6 Server
| ---------> eth0 (DHCP (192.168.1.x) Default Gateway, connects to a wired internet,
|----------> eth2 (IP : (10.165.11.139) GW to be used : (10.165.11.137), connects to a network A
|----------> eth3 (IP : (10.150.114.190) GW to be used: (10.150.114.191), connects to a network B
Problem here is that both network A and network B have nodes with same IP, example :
10.232.130.171
10.232.130.172
10.232.131.100
route-eth1 file looks like:
10.232.130.0/24 via 10.165.11.137
10.232.131.0/24 via 10.165.11.137
route-eth2 file looks like:
10.232.130.0/24 via 10.150.114.189
10.232.131.0/24 via 10.150.114.189
so pinging 10.232.130.171 will always route it thru eth1 and not eth2 tried with application which binds with interface (asterisk PBX), incoming connection from above IP work fine, but any response to it is sent via eth1, hence rejected.
I tried source based routing but that wont ping past gateway
ip rule add from 10.165.11.139 lookup net1 ip route add 10.232.130.0/23 via 10.165.11.137 dev eth2 table net1 ip rule add from 10.150.114.190 lookup net2 ip route add 10.232.130.0/23 via 10.150.114.189 dev eth3 table net2
# ip route show table net2 10.232.130.0/23 via 10.150.114.189 dev eth3 # ping -I eth3 10.232.130.170 PING 10.232.130.170 (10.232.130.170) from 10.150.114.190 eth3: 56(84) bytes of data. From 10.150.114.190 icmp_seq=2 Destination Host Unreachable From 10.150.114.190 icmp_seq=3 Destination Host Unreachable
Any pointers how to resolve this?
0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 750 Linux Foundation IT Professional Programs
- 373 Cloud Engineer IT Professional Program
- 169 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 4 DevOps & GitOps IT Professional Program
- 99 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 1 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 3 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 1 Open Source Best Practice Training
- 1 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 955 Programming and Development
- 310 Kernel Development
- 627 Software Development
- 983 Software
- 375 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)