# Adding NICs / Default Gateway

**URL:** <https://forums.suse.com/t/adding-nics-default-gateway/28873>\
**Category:** SLES Networking\
**Created:** [November 1, 2016, 2:23pm UTC](https://forums.suse.com/t/adding-nics-default-gateway/28873 "2016-11-01T14:23:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![duwallace](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@duwallace](https://forums.suse.com/u/duwallace)\
**Post date:** [November 1, 2016, 2:23pm UTC](https://forums.suse.com/t/adding-nics-default-gateway/28873/1 "2016-11-01T14:23:23Z")

</div>

SLES 11 SP4

Currently only have 1 NIC defined to my server and doing a route command shows that Default Gateway is associated with eth0. I configured 2 additional NICs with IPs in the same subnet as eth0, though when doing this the Default Gateway became associated with eth2. Is there a way like editing routes in /etc/sysconfig/network to indicatre eth0 is to be used for the Default Gateway?

All IPs use the same Gateway as they are in the same subnet and I do need traffic in and out for the IP on eth0 to use eth0 and the same for the other interfaces eth1 and eth2. Will this require “Split Access” setup with routing table and rules?

Thanks,  
Duane

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [November 1, 2016, 3:12pm UTC](https://forums.suse.com/t/adding-nics-default-gateway/28873/2 "2016-11-01T15:12:02Z")

</div>

Could you help me understand why you have multiple IPs on the same network  
using different devices? There may be a great reason, but, in my  
experience, it is usually not needed, or can be done better ways using  
other technologies (bonding) to achieve business goals (higher throughput  
to a box).

Other than that, you could use policy-based routing, I believe, to force  
one NIC over another, but I think that’s probably overkill. Linux is  
pretty clever, so you may even find that if one NIC is down, another on  
the same network will magically/automatically be used for data to the  
target network. This gets really interesting in case like yours when the  
kernel sees any addresses for the entire system as being on whatever  
network device, though the details of that mess are eluding me right now.  
Anyway, knowing more details of your business goals may help.

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…

---

<div class="post-metadata">

**Author:** ![duwallace](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@duwallace](https://forums.suse.com/u/duwallace)\
**Post date:** [November 2, 2016, 2:03pm UTC](https://forums.suse.com/t/adding-nics-default-gateway/28873/3 "2016-11-02T14:03:43Z")

</div>

[QUOTE=ab;34991]Could you help me understand why you have multiple IPs on the same network  
using different devices? [/QUOTE]

The initial request was to have eth1 with an IP on a different subnet, the same as a group of print devices that this server will communicate with. eth2 was another interface for another server to communication on.

Master Server A is talking to Client A on eth0. Adding another NIC interfaces to Client A so that eth1 can be used so that Client A can talk to the print devices on eth1 and the Master Server A on etho to separate traffic.

So primarily trying to insure that Master Server talks to Client A on eth0 at IP of 10.0.0.19 and that printers and Client A communicate on eth1 at 10.0.0.82.Would add a route for printer network 10.10.10.0 /24 to use eth1.

Just when adding that next NIC the default gateway move to eth1 and I can no longer ping 10.0.0.19 from the Master A.

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [November 2, 2016, 3:04pm UTC](https://forums.suse.com/t/adding-nics-default-gateway/28873/4 "2016-11-02T15:04:20Z")

</div>

I’m not positive, but I think I am correct in believing you can work  
around this with the rp\_filter (reverse path filter) setting via sysctl or  
the /proc filesystem. See TID# 7007649  
([https://www.suse.com/support/kb/doc?id=7007649](https://www.suse.com/support/kb/doc?id=7007649)) or RFC 3704  
([https://www.ietf.org/rfc/rfc3704.txt](https://www.ietf.org/rfc/rfc3704.txt)) for more information.

–  
Good luck.

If you find this post helpful and are logged into the web interface,  
show your appreciation and click on the star below…
