[CentOS] Gateway question

Mon Aug 8 11:05:33 UTC 2016
Levente Birta <blevi.linux at gmail.com>


There is a Centos 7 up-to-date box with 2 interfaces, let's say - enp2s0, on enp3s0. Default gateway on enp2s0.

The gateway is pfsense, IP is with 2 WAN connections

On the gateway the outgoing traffic is routed by source ip to different 
WAN, to WAN1 and to WAN2

On the centos box are set all the route and routing rules:

route-enp2s0: dev enp2s0 src table t2
default via dev enp2s0 table t2

route-enp3s0: dev enp3s0 src table t3
default via dev enp3s0 table t3

from table t2
to table t2

from table t3
to table t3

All work when I add
#route add default gw dev enp3s0

And that way I have :

# ip route show
default via dev enp3s0
default via dev enp2s0 dev enp2s0  scope link  metric 1002 dev enp3s0  scope link  metric 1003 dev enp2s0  proto kernel  scope link  src dev enp3s0  proto kernel  scope link  src

But how can I add achieve this only with ip route command ... without route?
Can I add this in any config files (ex: route-enp2s0)?