netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel L. Miller" <dmiller@amfes.com>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Basic Routing
Date: Mon, 03 Nov 2008 11:29:07 -0800	[thread overview]
Message-ID: <490F5103.8070409@amfes.com> (raw)
In-Reply-To: <490E633D.20103@riverviewtech.net>

Grant Taylor wrote:
>> 1.  Host 'A' realizes Host 'B' is not on its network
>
> This is what the net mask and subnets are all about in the IP stack 
> and has nothing to do with a router.  (Other than the fact the router 
> has its own IP stack and (sub)net mask(s) too.)
*dumbly nodding*  Ok.
>
>> 2.  Host 'A' contacts Router 'C' and asks it to get the information 
>> out and bring back the response.
>
> (As long as you are not talking about any form of proxying...)
>
> This is what routes are all about, with the /Default Gateway/ route 
> being special in such as it is the one used when no other routes match.
*dumbly nodding - slight eye glazing*  Um....ok.
>
>> 3.  Router 'C', via whatever magical method (DNS/hosts/etc.) figures 
>> out the router responsible for Host 'B's presence on the Internet.
>
> Eh.  Now you are sounding more and more like a proxy.  Routers only 
> pass IP packets based on routes.  Any DNS operation is the 
> responsibility of the application that generated the packet that is 
> now being routed by the router.
*significant eye glazing - jaw slack*  Um...er...maybe...
Rephrase - "Router C checks it's list of routes, figures out it's 
clueless with regard to the route for Router D, and passes the buck to 
Router C's default gateway"
>
>> 4.  Router 'C' contacts Router 'D', sends along the information, and 
>> tells Router 'D' to send any responses to ROUTER C, not Host A
>
> It's not so much that routers ""contact each other as it is that each 
> router hands off the IP packet to the next router for it to route to 
> the next and the next ... and you get the idea.  There is not really a 
> request that something be done.
*Excitedly* - That's it!  That's the part we need to talk about!  Router 
"hands off the IP packet to the next router to the next to the next" -

Router C has a route table -
192.168.0.0/24 dev eth0
2.3.4.5 dev eth1
default gateway 2.3.4.4

Router 2.3.4.4 (premise equipment from mysterious ISP)
mysterious routing table

Router 5.4.3.1 (premise equipment from other ISP)
more mysterious routing table

Router D has a route table -
10.0.0.0/8 dev eth0
5.4.3.2 dev eth1
default gateway 5.4.3.1

Does the above communication involve NAT?  No "hosts" or private 
networks involved - all public IP's between them (unless of course the 
packets traverse private IP ranges within the ISPs' networks before 
coming back out.
>
>> 5.  D, goes to B, comes back to D, and back to C
>
> You could be talking about IP packets flowing through networks or 
> proxy requests flowing from clients to the proxy and ultimately to the 
> destination server and back in reverse.
*Sheepishly* Assume for sake of argument I'm expressing myself poorly - 
no proxies involved in this discussion.  That would make it too simple.
>
>> 6.  Router C, on receiving a response from D, remembers that Host 'A' 
>> was waiting for this information and sends it on.
>
> This is is probably what you are thinking NAT does, which in some / 
> most ways is correct.  However, the same can be said about a proxy.
*Assertively* No proxy.
>
>> In essence, I believe I'm correct in this summary - however the tool 
>> used by Router C for "remembering" that Host A asked for the 
>> information, and that responses from Router D should come back to 
>> Router C, is NAT?
>
> Eh, not really.
>
> I'm going to go out on a limb here and think that you are thinking of 
> a network like this:
>
> +---+
> | B |
> +-+-+
>   :
>
>   :
> +-+-+       +---+
> | C +---+---+ A |
> +---+   |   +---+
>         |
>         |   +---+
>         +---+ D |
>             +---+
>
> I believe this is the sequence of events you are trying to make happen:
>
>  - Client A is trying to contact the server B by way of router C.
>  - Router C intercepts the request and hands it off to system D.
>  - System D then initiates the request to B by way of router C (and 
> many other intermediary routers).
>    (C does not intercept the request because it is from system D.)
>  - Server B replies back to D by way of (many other intermediary 
> routers and) router C.
>  - System D then replies back to router C.
>  - Router C then replies back to client A.
>
> Is this close to what you are wanting to happen?  (Let me know before 
> I explain how to make this happen.)
>
Um...no.  Too complicated.

A==>C<==Internet==>D<===B

Two offices on opposite sides of the world linked via Internet.
>> So does this mean that ANY connection of a private address space to 
>> the Internet MUST be performed via NAT?
>
> Yes.  In the scenario above (presuming that my picture above matches 
> what you have) Router C does NAT to convert the internal IP addresses 
> used on the internal LAN to that of the internet side of Router C so 
> that the packets will cross the internet.  Refer to the "Simple 
> Scenario" in my previous reply about NATing.
>
So the world's most expensive super-duper whatchamacallit (fill in the 
blank here with router, firewall, bridge, modem, magic cauldron), placed 
between giant corporate's network (using private address space) and the 
Internet - will perform NAT?  Somewhere somehow NAT (in particular, 
source NAT for outbound access from the private and destination NAT to 
provide services to Internet) must be performed?
-- 
Daniel

  reply	other threads:[~2008-11-03 19:29 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 [this message]
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
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=490F5103.8070409@amfes.com \
    --to=dmiller@amfes.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).