[CentOS] Need help with Linux networking interfaces and NIC bonding

Thu Oct 4 08:07:20 UTC 2018
Anand Buddhdev <anandb at ripe.net>

On 04/10/2018 07:44, Sean Son wrote:

Hi Sean,


> 1) Whenever I ping any of the devices on our network, from this server, the
> traffic goes out from the management port. I do not want the traffic to go
> out of the management port. I want it to go out through the active port of
> the NIC bond.  How do I configure the networking so that all primary
> network traffic flows to and from the NIC bonded interfaces?  I only want
> the management port to be used for SSH purposes and well, management of the
> server.

When the server *originates* traffic, it will use the main routing
table, and that's why traffic goes out of em1. There's no rule telling
the server that when the traffic is initiated by the server, it must
consult a different routing table, t1.

One way to ensure that all the monitoring traffic goes through bond0, is
to configure every service with an explicit source address. However,
some services allow this, and some don't, so this quickly becomes

What you probably want to do is to invert your rules and routes, so that
the bond0 interface is in the main table, and you put your management
interface, em1, into another table (t1). Then, when you ssh into the
server, it will use em1, but all other traffic will use bond0 by default.