LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-19-2020, 04:49 AM   #1
tooreply
LQ Newbie
 
Registered: Jul 2019
Posts: 7

Rep: Reputation: Disabled
Multiple Network Adapters Assigned with Same Subnet IP Addresses


We have 2 Network Adapters (each vm) assigned with the same subnet IP addresses on Azure SLES 12.x on two VMs, as this is requriement by client application team. However, we were facing some network communications issues (unable to reach) between two servers. Communication is fine if we disabled one of the network adpater on both servers.

So, we have kept some routing entries in /etc/init.d/after.local file to resolve this.



ip route add default via 170.162.92.1 dev eth0 table 101
ip route add default via 170.162.92.1 dev eth1 table 102
ip rule add from 170.162.92.71 lookup 101 pref 10100
ip rule add from 170.162.92.107 lookup 102 pref 10101



But after this when we see the routing table, we are seeing eth1 is the first entry in the list. Just I would like know community members opinion on this if we face any issues in future because of this as we are going deploy pacemaker cluster on this for SAP HANA.




#ip route list
default via 170.162.92.1 dev eth0 proto dhcp
168.63.xxx.xxx via 170.162.92.1 dev eth0 proto dhcp
169.254.xxx.xxx via 170.162.92.1 dev eth0 proto dhcp
170.162.92.0/24 dev eth1 proto kernel scope link src 170.162.92.107
170.162.92.0/24 dev eth0 proto kernel scope link src 170.162.92.71




#route -n

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 170.162.92.1 0.0.0.0 UG 0 0 0 eth0
168.63.xxx.xxx 170.162.92.1 255.255.255.255 UGH 0 0 0 eth0
169.254.xxx.xxx 170.162.92.1 255.255.255.255 UGH 0 0 0 eth0
170.162.92.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
170.162.92.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
 
Old 06-19-2020, 07:19 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
I can't remember exactly where I found the information but you'll likely want to set your NICs up so that the server replies on the same NIC that the request came in.
 
1 members found this post helpful.
Old 06-23-2020, 02:38 AM   #3
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,157

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
I am not really sure whether you are looking for sub-interface configuration.

Check out this link: http://cgi.linuxfocus.org/~guido/scr...fig-howto.html

From site above:

Quote:
Sub-interfaces and multiple networks on one interface

It is possible to access multiple local networks via the same physical interface by just creating a sub interface.

Such a sub-interface is just a different name and endpoint for the same physical interface.

You can simply put a colon after the physical interface name

ifconfig eth0:0 192.168.6.5/24 up

Last edited by JJJCR; 06-23-2020 at 02:38 AM. Reason: edit
 
  


Reply

Tags
linux, pacemaker, routing



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
web access works from same subnet but not from different subnet linuxandtsm Linux - Newbie 2 11-27-2012 02:23 PM
dvd has no URL assigned, so I can't play dvd's(no url assigned is the error message) Zych Linux - Newbie 3 08-01-2010 07:26 AM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 13 02-24-2008 08:16 PM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 1 02-09-2008 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration