Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Sep 2009
Setup 2 NICs with access to the internet with 1 gateway
the following situation:
I have 1 root-server with 2 NICs, both having their own internet IP addresses:
eth0 = 8x.x.x.183 eth2 = 8x.x.x.205
gateway = 8x.x.x.1
How can this be setup ? With route / ip route / iptables ?
- Join Date
- Aug 2009
- Mumbai, India
Just a cross-query.. Having two NIC's with two gateways seems plausible enough, but you seem to have a config of two NIC and one gateway. Need to get your opinion about the logic behind it...
By sheer logic of traffic flow,
1) For traffic coming from the internet to local system / network, on the gateway you would need to configure a port based routing to the linux interface. Wonder if this would be effective, if at all possible, since you have a single gateway/ single uplink ( i assume ) to the gateway.
2) For traffic from the local network to the internet, you would have to configure the routes on individual systems.
3) I ideally don't see how you could configure policy based routing on the linux system itself for the given scenario and there would be no point doing so after the traffic has already hit an interface and you then feel it needs to have hit the other interface. I've not come across such an requirement.... so hope you understand the reason behind a cross query...
Just to answer your final query, policy based routing would require a combination of iptables and iproute since you would mark the packets with iptables and then route them through different routing tables with different default gateways....