On 09/08/2016 20:01, Gordon Messmer wrote:> On 08/08/2016 04:05 AM, Levente Birta wrote: >> Can I add this in any config files (ex: route-enp2s0)? > > > Yes. Add a route file for each interface, and set up rules to send > packets out the corresponding physical interface: > > https://blogs.oracle.com/networking/entry/advance_routing_for_multi_homed >Yes, but no :) I do all this and working on LAN ... all traffic go in/out on the proper interface ... the problem is when I try to access the internet on the second interface .... If I add "#route add default gw 192.168.1.1 dev enp3s0" all is good, but cannot add that in route-iface file or with "ip route" .... Thanks Levi
On 8/9/2016 11:51 AM, Birta Levente wrote:> > I do all this and working on LAN ... all traffic go in/out on the > proper interface ... the problem is when I try to access the internet > on the second interface ....how do you try and access the 'internet on the second interface' when its all the same subnet?? its the same internet, isn't it? -- john r pierce, recycling bits in santa cruz
On 08/09/2016 11:51 AM, Birta Levente wrote:> If I add "#route add default gw 192.168.1.1 dev enp3s0" all is good, > but cannot add that in route-iface file or with "ip route" ....Are you using the "network" or the "NetworkManager" service to configure your network? I haven't verified that the route-<interface> files are supported by NetworkManager. If you are using the older "network" service, then you might be getting the syntax of the route-<interface> file wrong. If you included the contents of your ifcfg-<interface> and route-<interface> files, we could check. Generally, I'm quite certain that the document I provided describes how to accomplish specifically what you're trying to accomplish.
On 09/08/2016 23:08, Gordon Messmer wrote:> On 08/09/2016 11:51 AM, Birta Levente wrote: >> If I add "#route add default gw 192.168.1.1 dev enp3s0" all is good, >> but cannot add that in route-iface file or with "ip route" .... > > > Are you using the "network" or the "NetworkManager" service to configure > your network? I haven't verified that the route-<interface> files are > supported by NetworkManager. > > If you are using the older "network" service, then you might be getting > the syntax of the route-<interface> file wrong. If you included the > contents of your ifcfg-<interface> and route-<interface> files, we could > check. >I'm using older network service ... I hate NetworkManager :) And all that content was included in the original post, but a copy/paste is not a problem: route-enp2s0: 192.168.1.0/24 dev enp2s0 src 192.168.1.12 table t2 default via 192.168.1.1 dev enp2s0 table t2 route-enp3s0: 192.168.1.0/24 dev enp3s0 src 192.168.1.13 table t3 default via 192.168.1.1 dev enp3s0 table t3 rule-enp2s0: from 192.168.1.12/32 table t2 to 192.168.1.12/32 table t2 rule-enp3s0: from 192.168.1.13/32 table t3 to 192.168.1.13/32 table t3 -- Levi
On 09/08/2016 22:16, John R Pierce wrote:> On 8/9/2016 11:51 AM, Birta Levente wrote: >> >> I do all this and working on LAN ... all traffic go in/out on the >> proper interface ... the problem is when I try to access the internet >> on the second interface .... > > > how do you try and access the 'internet on the second interface' when > its all the same subnet?? its the same internet, isn't it? > >Same internet, yes, but I want through different WAN connection For example can be postfix binded to different interfaces. But in this case I want to monitor the two WAN connection with ping. And with ping the ICMP packets can be sent on different interfaces. -- Levi