All of lore.kernel.org
 help / color / mirror / Atom feed
* Routing rule for two gateways.
@ 2002-09-20  2:19 Sundaram
  2002-09-20  8:47 ` Dharmendra.T
  0 siblings, 1 reply; 8+ messages in thread
From: Sundaram @ 2002-09-20  2:19 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

Routing rule for two gateways.

 

I have two Linux netfilter gateways for my network  (1) 192.168.1.10, (1) 192.168.1.100 public IP in the external interface. Inside LAN I am running ftp server (192.168.1.50) with default gateway as 192.168.1.10. From Internet using Fist gateway public IP address I was able to access the ftp server, but using second gateway public IP address I was not able to access the ftp server.

 

Where I need to set the routing, so that I can access the ftp server using both gateway.

 

Thanks in advance 

-SR

 


[-- Attachment #2: Type: text/html, Size: 1972 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Routing rule for two gateways.
  2002-09-20  2:19 Routing rule for two gateways Sundaram
@ 2002-09-20  8:47 ` Dharmendra.T
  2002-09-23 13:42   ` Sundaram Ramasamy
  0 siblings, 1 reply; 8+ messages in thread
From: Dharmendra.T @ 2002-09-20  8:47 UTC (permalink / raw)
  To: Sundaram, netfilter

Hi Sundaram,
 I think you can specify both the gws as the default gateways and can connect 
from internet using both the gateways.
Regards,
Dharmendra.T
Linux Security Expert
www.nsecure.net
dharmu@nsecure.net
On Friday 20 September 2002 07:49, Sundaram wrote:
> Routing rule for two gateways.
>
>
>
> I have two Linux netfilter gateways for my network  (1) 192.168.1.10, (1)
> 192.168.1.100 public IP in the external interface. Inside LAN I am running
> ftp server (192.168.1.50) with default gateway as 192.168.1.10. From
> Internet using Fist gateway public IP address I was able to access the ftp
> server, but using second gateway public IP address I was not able to access
> the ftp server.
>
>
>
> Where I need to set the routing, so that I can access the ftp server using
> both gateway.
>
>
>
> Thanks in advance
>
> -SR

-- 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Routing rule for two gateways.
  2002-09-20  8:47 ` Dharmendra.T
@ 2002-09-23 13:42   ` Sundaram Ramasamy
  2002-09-23 14:14     ` Antony Stone
  0 siblings, 1 reply; 8+ messages in thread
From: Sundaram Ramasamy @ 2002-09-23 13:42 UTC (permalink / raw)
  To: netfilter; +Cc: dharmu

What is the Linux command and syntax to set two default gateway.

Thanks


----- Original Message -----
From: "Dharmendra.T" <dharmu@nsecure.net>
To: "Sundaram" <sun@percipia.com>; <netfilter@lists.netfilter.org>
Sent: Friday, September 20, 2002 4:47 AM
Subject: Re: Routing rule for two gateways.


> Hi Sundaram,
>  I think you can specify both the gws as the default gateways and can
connect
> from internet using both the gateways.
> Regards,
> Dharmendra.T
> Linux Security Expert
> www.nsecure.net
> dharmu@nsecure.net
> On Friday 20 September 2002 07:49, Sundaram wrote:
> > Routing rule for two gateways.
> >
> >
> >
> > I have two Linux netfilter gateways for my network  (1) 192.168.1.10,
(1)
> > 192.168.1.100 public IP in the external interface. Inside LAN I am
running
> > ftp server (192.168.1.50) with default gateway as 192.168.1.10. From
> > Internet using Fist gateway public IP address I was able to access the
ftp
> > server, but using second gateway public IP address I was not able to
access
> > the ftp server.
> >
> >
> >
> > Where I need to set the routing, so that I can access the ftp server
using
> > both gateway.
> >
> >
> >
> > Thanks in advance
> >
> > -SR
>
> --
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Routing rule for two gateways.
  2002-09-23 13:42   ` Sundaram Ramasamy
@ 2002-09-23 14:14     ` Antony Stone
  2002-09-23 22:02       ` Rasmus Bøg Hansen
  0 siblings, 1 reply; 8+ messages in thread
From: Antony Stone @ 2002-09-23 14:14 UTC (permalink / raw)
  To: netfilter

On Monday 23 September 2002 2:42 pm, Sundaram Ramasamy wrote:

> What is the Linux command and syntax to set two default gateway.

The question does not make sense.   You can have two (or more) gateways, but 
only one of them can be the default.

Default means "the one to use when there is no reason to use any other".

Although it is perfectly possible to type on a Linux machine:

route add default gw 192.168.0.1
route add default gw 172.16.0.1
route add default gw 10.0.0.1

And produce a routing table with three "default gateways" listed, only one of 
them will ever get used, because the Linux routing table works on a "first 
match" basis, so all packets will match the same entry and go out by that 
route.

Antony.

-- 

Never write it in Perl if you can do it in Awk.
Never do it in Awk if sed can handle it.
Never use sed when tr can do the job.
Never invoke tr when cat is sufficient.
Avoid using cat whenever possible.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Routing rule for two gateways.
  2002-09-23 14:14     ` Antony Stone
@ 2002-09-23 22:02       ` Rasmus Bøg Hansen
  2002-09-23 22:13         ` Antony Stone
  0 siblings, 1 reply; 8+ messages in thread
From: Rasmus Bøg Hansen @ 2002-09-23 22:02 UTC (permalink / raw)
  To: Antony Stone; +Cc: netfilter

On Mon, 23 Sep 2002, Antony Stone wrote:

> On Monday 23 September 2002 2:42 pm, Sundaram Ramasamy wrote:
>
> > What is the Linux command and syntax to set two default gateway.

> The question does not make sense.   You can have two (or more) gateways, but
> only one of them can be the default.

You'll find on http://www.lartc.org/howto/lartc.rpdb.multiple-links.html
that this is not entirely true - you can use multipath routes (but this
require support compiled into the kernel). However this has nothing to
do with iptables/netfilter at all.

/Rasmus

-- 
-- [ Rasmus "Møffe" Bøg Hansen ] ---------------------------------------
The reason we come up with new versions is not to fix bugs.
                                              -- Bill Gates
----------------------------------[ moffe at amagerkollegiet dot dk ] --



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Routing rule for two gateways.
  2002-09-23 22:02       ` Rasmus Bøg Hansen
@ 2002-09-23 22:13         ` Antony Stone
  2002-09-23 23:32           ` Rasmus Bøg Hansen
  2002-09-24  3:14           ` Sundaram
  0 siblings, 2 replies; 8+ messages in thread
From: Antony Stone @ 2002-09-23 22:13 UTC (permalink / raw)
  To: netfilter

On Monday 23 September 2002 11:02 pm, Rasmus Bøg Hansen wrote:

> On Mon, 23 Sep 2002, Antony Stone wrote:
> > On Monday 23 September 2002 2:42 pm, Sundaram Ramasamy wrote:
> > > What is the Linux command and syntax to set two default gateway.
> >
> > The question does not make sense.   You can have two (or more) gateways,
> > but only one of them can be the default.
>
> You'll find on http://www.lartc.org/howto/lartc.rpdb.multiple-links.html
> that this is not entirely true - you can use multipath routes (but this
> require support compiled into the kernel).

Um....   Although I agree that multipath routing can certainly be done, I 
still don't think this is the same as "two default routes" (for the reason I 
gave above).

In fact on the webpage you quote it shows how to set up two routes with 
specific routing tables for each.   Once that is done, one of them is 
designated to be the default route.   One of them......

It is certainly possible to have two (or more) routes from a network of 
computers to the Internet.   However for each machine in the network, or for 
each gateway router, there can only be one default route.

Antony.

-- 

All matter in the Universe can be placed into one of two categories:

1. things which need to be fixed
2. things which will need to be fixed once you've had a few minutes to play 
with them


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Routing rule for two gateways.
  2002-09-23 22:13         ` Antony Stone
@ 2002-09-23 23:32           ` Rasmus Bøg Hansen
  2002-09-24  3:14           ` Sundaram
  1 sibling, 0 replies; 8+ messages in thread
From: Rasmus Bøg Hansen @ 2002-09-23 23:32 UTC (permalink / raw)
  To: netfilter

On Mon, 23 Sep 2002, Antony Stone wrote:

> > You'll find on http://www.lartc.org/howto/lartc.rpdb.multiple-links.html
> > that this is not entirely true - you can use multipath routes (but this
> > require support compiled into the kernel).
>
> Um....   Although I agree that multipath routing can certainly be done, I
> still don't think this is the same as "two default routes" (for the reason I
> gave above).

Well, it will never be the same as true bundling - however close enough
to be useful.

> In fact on the webpage you quote it shows how to set up two routes with
> specific routing tables for each.   Once that is done, one of them is
> designated to be the default route.   One of them......

That's right, but with multipath routing the non-default route will be
used too.

> It is certainly possible to have two (or more) routes from a network of
> computers to the Internet.   However for each machine in the network, or for
> each gateway router, there can only be one default route.

It does not matter for the client machines if you have a dedicated
router, which is aware of multipath routing - but of course that router
needs to know of the different routes and how to use them.

/Rasmus

-- 
-- [ Rasmus "Møffe" Bøg Hansen ] ---------------------------------------
The reason we come up with new versions is not to fix bugs.
                                              -- Bill Gates
----------------------------------[ moffe at amagerkollegiet dot dk ] --





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Routing rule for two gateways.
  2002-09-23 22:13         ` Antony Stone
  2002-09-23 23:32           ` Rasmus Bøg Hansen
@ 2002-09-24  3:14           ` Sundaram
  1 sibling, 0 replies; 8+ messages in thread
From: Sundaram @ 2002-09-24  3:14 UTC (permalink / raw)
  To: Antony Stone, netfilter


See the following output :
This is from my Sun Solaris Machine, it takes two default gateway.

bash-2.03$ netstat -rn

Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0          192.168.1.130         U        1    430  hme0
224.0.0.0            192.168.1.130         U        1      0  hme0
default              192.168.1.200         UG       1   1579
default              192.168.1.1           UG       1   1678
127.0.0.1            127.0.0.1             UH       3  14767  lo0

Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use   If
--------------------------- --------------------------- ----- --- ------ ---
--
fe80::/10                   fe80::a00:20ff:fef0:d1ac    U       1      0
hme0
ff00::/8                    fe80::a00:20ff:fef0:d1ac    U       1      0
hme0
default                     fe80::a00:20ff:fef0:d1ac    U       1      0
hme0
::1                         ::1                         UH      1      0 lo0
bash-2.03$

I have to add the ip address to /etc/defaultroute file.

bash-2.03$ cat /etc/defaultrouter
192.168.1.200
192.168.1.1
bash-2.03$

Same thing is not possible in Linux??
Thanks
Sundaram



----- Original Message -----
From: "Antony Stone" <Antony@Soft-Solutions.co.uk>
To: <netfilter@lists.netfilter.org>
Sent: Monday, September 23, 2002 6:13 PM
Subject: Re: Routing rule for two gateways.


> On Monday 23 September 2002 11:02 pm, Rasmus Bøg Hansen wrote:
>
> > On Mon, 23 Sep 2002, Antony Stone wrote:
> > > On Monday 23 September 2002 2:42 pm, Sundaram Ramasamy wrote:
> > > > What is the Linux command and syntax to set two default gateway.
> > >
> > > The question does not make sense.   You can have two (or more)
gateways,
> > > but only one of them can be the default.
> >
> > You'll find on http://www.lartc.org/howto/lartc.rpdb.multiple-links.html
> > that this is not entirely true - you can use multipath routes (but this
> > require support compiled into the kernel).
>
> Um....   Although I agree that multipath routing can certainly be done, I
> still don't think this is the same as "two default routes" (for the reason
I
> gave above).
>
> In fact on the webpage you quote it shows how to set up two routes with
> specific routing tables for each.   Once that is done, one of them is
> designated to be the default route.   One of them......
>
> It is certainly possible to have two (or more) routes from a network of
> computers to the Internet.   However for each machine in the network, or
for
> each gateway router, there can only be one default route.
>
> Antony.
>
> --
>
> All matter in the Universe can be placed into one of two categories:
>
> 1. things which need to be fixed
> 2. things which will need to be fixed once you've had a few minutes to
play
> with them
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-09-24  3:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-20  2:19 Routing rule for two gateways Sundaram
2002-09-20  8:47 ` Dharmendra.T
2002-09-23 13:42   ` Sundaram Ramasamy
2002-09-23 14:14     ` Antony Stone
2002-09-23 22:02       ` Rasmus Bøg Hansen
2002-09-23 22:13         ` Antony Stone
2002-09-23 23:32           ` Rasmus Bøg Hansen
2002-09-24  3:14           ` Sundaram

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.