[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Multiple Network Gateways

On 18/07/11 10:21, Volkan YAZICI wrote:
> [Before going with the rest of the reply, I'd like to thank who (lee,
> William Hopkins, Johannes Obermueller, Bonno Bloksma, Andrew McGlashan,
> Camaleón) sincerely answered to my question.]
> On Fri, 15 Jul 2011 23:31:05 +0200, "Bonno Bloksma" writes:
>> In here you have some duplicate information that is not needed. In the eth0
>> section the netmask together with the ip-address of
>> automaticaly defines the network and broadcast address you give in the next
>> lines. You can leave them out.
> They are added by the Debian installer, not me. But yep, you are right.
>> A gateway statement means: send ANYTHING for which there is no specific route in
>> the routing table to this address which can be reached via this interface. There
>> is usualy just one gateway statement in the entire interfaces file unless one
>> wants to do multiple gateway routing, which is usualy done with the more
>> flexible and sophosticate ip statement.
>> So the gateway statement in the eth1 section is what causes the problem. You do
>> NOT want the gateway statement there as that is NOT the address to send all
>> unspecified traffic to, that is what you want the eth0 interface to use the
>> address for.
>> The address and netmask statement together define which network is behind the
>> eth1 interface and which traffic should be send to the network behind that
>> interface. In this case that will automaticaly be all trafic for
>>, that is all trafic for 192.168.100.*
> So you mean that, via a configuration as follows
> --8<---------------cut here---------------start------------->8---
> auto lo
> iface lo inet loopback
> auto eth0
> iface eth0 inet static
>       address
>       netmask
>       gateway
>       dns-nameservers
>       dns-search ozun.int
> auto eth1
> iface eth1 inet static
>       address
>       netmask
> --8<---------------cut here---------------end--------------->8---
> all of my traffic will be routed through eth1. But the
> thing I don't understand here is that: Say I typed "ping".
> How will it know that it will need to use as a gateway to

It does not.
 iface eth1 inet static

tells the system that is on the network connected to eth1.

Reply to: