w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how to route 2 Nics with 2 public IP on same subnet running with same gateway

In Linux, routing is performed by looking at the destination address only, so a packet will follow whichever route can be used to reach the packet's destination, with no regard to the source address.

The behaviour you want requires choosing a route depending not only on the destination address, but also on the source address — this is sometimes called source-sensitive routing or SADR (source-address dependent routing). The most portable way of implementing source-sensitive routing under Linux is to define routing rules across multiple routing tables using the ip rule and ip route ... table ... commands.

This is described in detail in Section 4 of the Linux Advanced Routing and Traffic Control HOWTO





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.