All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Basic Routing
Date: Wed, 05 Nov 2008 09:24:00 -0600	[thread overview]
Message-ID: <4911BA90.2020901@riverviewtech.net> (raw)
In-Reply-To: <4910E22A.4070705@amfes.com>

On 11/04/08 18:00, Daniel L. Miller wrote:
> I guess here's a Linux specific question - as opposed to the more 
> general IP/routing discussion we've been having.

'k

> Given a Linux box with multiple networks on one or more interfaces 
> (192.168.0.1 on eth0, 192.168.5.1 on eth0:0, 172.26.0.1 on eth1, etc.) - 
> and just adding a "1" to /proc/sys/net/ip_forward - will this magic box 
> be able to forward packets between the networks without further 
> configuration?  Or will this require NAT statements from iptables (and 
> no, this is NOT an opportunity to tell me about 
> ipchains/ebtables/other-Linux-networking-specialty-program-kernel-interface-I-didn't-mention)? 

The simple act of enabling IP forwarding (/proc/sys/net/ipv4/ip_forward) 
will allow your Linux box to forward or route traffic between said 
networks (as long as there is no IPTables / etc. to block it).

The problem that you will run in to is whether or not systems on said 
networks will know how to get to systems on the other said networks. 
Will they have a route (default or other wise) that tells them to use 
the Linux router, or will you have to establish routes manually.

Just because you can get a packet somewhere does not mean that you will 
be able to get the reply.

> Ok fine - if you can recommend a tool to make this easier - I'd be 
> delighted to hear about it.  Right now my configuration tool is firehol.

You need to enable IP forwarding (like above) and make sure that each 
system knows that it can reach the other subnets via the Linux router.

So if all the systems are using the Linux router as the /Default 
Gateway/ then things are fine.  If they are not, you need to establish a 
route.  You can either establish routes on all systems, or put one on 
the /Default Gateway/ of each subnet.  Putting the route on the /Default 
Gateway/ in each subnet will cause systems to send traffic to their 
/Default Gateway/ (because the packet is not to their local subnet) 
which will then send it to the router which will then send it to the 
appropriate system.  (This is somewhat sub-optimal, but it will work 
reliably.)

In the end it really comes down to systems /knowing how/ to reach the 
other systems, which is what routing, specifically routes do.



Grant. . . .

  parent reply	other threads:[~2008-11-05 15:24 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02 16:15 Basic Routing Daniel L. Miller
2008-11-02 17:03 ` Rob Sterenborg
2008-11-02 18:43   ` Daniel L. Miller
2008-11-02 19:53     ` Rob Sterenborg
2008-11-03  1:59       ` Daniel L. Miller
2008-11-02 20:04     ` Grant Taylor
2008-11-02 20:51     ` Grant Taylor
2008-11-03  1:52       ` Daniel L. Miller
2008-11-03  2:34         ` Grant Taylor
2008-11-03 19:29           ` Daniel L. Miller
2008-11-03 19:39             ` Daniel L. Miller
2008-11-03 20:26               ` Grant Taylor
2008-11-05  0:00                 ` Daniel L. Miller
2008-11-05  5:21                   ` Rob Sterenborg
2008-11-05 15:56                     ` Grant Taylor
2008-11-05 18:22                       ` Rob Sterenborg
2008-11-05 18:30                         ` Grant Taylor
2008-11-05 19:49                           ` Rob Sterenborg
2008-11-05 15:24                   ` Grant Taylor [this message]
2008-11-03 23:40               ` Amos Jeffries
2008-11-04 23:13             ` Grant Taylor
2008-11-04 23:53               ` Daniel L. Miller
2008-11-05 12:24                 ` John Haxby
2008-11-05 17:31                   ` Grant Taylor
2010-09-20 21:40                     ` Daniel L. Miller
2010-09-20 23:41                       ` Jan Engelhardt
2010-09-21  3:34                       ` Grant Taylor
2008-11-05 17:17                 ` Grant Taylor
2008-11-02 19:06   ` Grant Taylor
2008-11-03 10:54     ` Pascal Hambourg
2008-11-03 16:35       ` Grant Taylor
  -- strict thread matches above, loose matches on Subject: below --
2014-10-04  1:10 Basic routing John Smithee
2014-10-04  1:24 ` John Smithee
2014-10-04  8:50   ` George Botye
2014-10-04  1:34 ` Neal Murphy
2014-10-04  2:52   ` John Smithee
2014-10-04  3:05     ` Dennis Jacobfeuerborn
2014-10-04  5:02     ` Neal Murphy
2014-10-04  7:04     ` John Lister
2014-10-04 11:06       ` John Smithee
2014-10-04 13:56         ` Thomas Bätzler
2014-10-04 15:07           ` John Smithee
2014-10-04 17:44             ` John Smithee
2014-10-05 15:41               ` John Lister
2014-10-06  9:41               ` André Paulsberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4911BA90.2020901@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.