[comp.protocols.tcp-ip] default routes in IP gateways

ljm@TWG.COM (Leo J McLaughlin) (12/22/89)

This note arises from a private discussion about installation of
routers.  The response seemed sufficiently useful to IP novices
to warrant distribution.

>>(paraphrased) defalt routes are bad.

>I am curious about your
>comment re the use of default routes. I am not a TCP guru, we are
>just getting into it here, but it seems to me that default routes
>are necessary, otherwise a router needs to know about ALL networks
>to which it can connect.

The primary problem is one of routing loops:

I set up

                      |
   A -- B -- C -- D --| great big wide world
                      |

with router B using C using D as its default gateway and you set up

					 |
                   great big wide world  |-- E -- F -- G -- H
					 |

with router G using F using E as its default gateway

If I send a packet from A to H and any of E, F, or G doesn't know that
H is behind it, the packet bounces back and forth over the Internet
until the TTL expires.

In practice this is a very easy topology to create.

  1) E and G, but not F under stand RIP. (The classic WIN/ROUTE example).

  2) 'Someone else' added G/H after you installed E and F. 

  3) 'Someone else' 'fixed' F's routing tables.


Or perhaps a simpler (common WIN/ROUTE customer) example:

  Novell -- A -- small -- B -- SLIP -- C -- small --D-- Novell
network 1      ethernet        link       ethernet     network 2

A's default is B,
B explicitly knows about A and has default of C
C explicitly knows about D and has default of B
D's default is C.

User on Novell network #1 mis-enters an internet address.
Just sit back and watch the phone bills.


Lastly, keep in mind that the errors in both of these examples are fairly
easy to spot and debug.  Much more complex and devious traps can be created
by adding additional adminstrative entities.


enjoy,
leo j mclaughlin iii
The Wollongong Group
ljm@twg.com

dls@mentor.cc.purdue.edu (David L Stevens) (12/22/89)

	Default routes aren't bad-- it's just the way you're using them!

	The "gateway-to-the-world" (GWTTW) needs to know all of the Internet
routes, but nothing on the local side has to; they can all have a trivial
routing table of a single default route pointing to the next closer local hop
to the GWTTW along with any backside nets or the like.

	In your example:

                      |
   A -- B -- C -- D --| great big wide world
                      |

	Give A, B and C the tiny routing table (using default routes for
everything to the right) and give D a full routing table with no default
route.
	No Internet bouncing and no big routing tables. Default routes
don't harm internets; people harm internets.

	Convenient, disposable, premoistened.

-- 
					+-DLS  (dls@mentor.cc.purdue.edu)

kwe@buit13.bu.edu (Kent England) (12/23/89)

In article <8912211854.aa21721@Obelix.TWG.COM> 
ljm@TWG.COM (Leo J McLaughlin) writes:
>
>I set up
>                      |
>   A -- B -- C -- D --| great big wide world
>                      |
>
>with router B using C using D as its default gateway and you set up
>
>					 |
>                   great big wide world  |-- E -- F -- G -- H
>					 |
>
>with router G using F using E as its default gateway
>If I send a packet from A to H and any of E, F, or G doesn't know that
>H is behind it, the packet bounces back and forth over the Internet
>until the TTL expires.

This assumes that the managers in the GBWW are using defaults.

>  1) E and G, but not F under stand RIP. (The classic WIN/ROUTE example).
>  2) 'Someone else' added G/H after you installed E and F. 
>  3) 'Someone else' 'fixed' F's routing tables.

You describe some pretty loose usage of default and make a lot of
implicit assumptions that static routes will be used liberally.
Certainly this sort of thing can be done, but it is really not state
of the art today.  Anyone hacking static routes with liberal use of
default everywhere is going to get what's coming to him.

Suppose that all your routers A thru D are running a common interior
protocol like RIP and are not using static routes.  Suppose the same
thing for E thru H.  In this case, the routers in the stub domains
should be able to reach anyplace within their stub domain without
resort to default.  Now, suppose that all of the routers in the two
stubs (A--D and E--H) use defaults pointing into the GBWW.  Further,
suppose that the routers in the GBWW backbone do not use default
routes (nor static).  This protects the backbone from forwarding any
packets that come in from one of the stubs for a net that is
temporarily unreachable in their own domain and limits useless default
forwarding to no further than the GBWW boundary.  In this situation,
the judicious use of default in the stub routing domains seems
reasonable to me and does not lead to great inefficiency and long
lasting routing loops.

	I don't say that what you say is untrue, just that the
judicious use of default is perfectly reasonable and that static
routes combined with defaults everywhere are the cause of more routing
woe than careful use of default.


	One of the reasons I don't like default is that unreachable
net datagrams have to travel all the way to some authoritative router
that does not have a default.  These days, almost everyone continues
to use the arpanet as a global default.  I sometimes wonder how much
useless traffic washes around The Great Default Net.  In my opinion,
no backbone or regional should use any defaults, but I know that
others disagree for good reason.  If you list every network known and
default, your default woes should be minimized and new networks will
come up more quickly.

	One reason default has to be used is that the list of nets is
so large that some non-obsolete routers can't hold them all.  Our
routers can't handle more than 762 routes today, so we just got to the
point where we were losing 30-40 nets and had to drop back to using
default.  You also don't want to pass 1k net updates across 9.6 and
56k serial lines.  There are also routers where no one ever needs to
know reachability to everywhere, so why put all the routes in the
table?  Keep the table small enough so that local people can tell if
their local nets are reachable without paging thru 1k of nets.

	We set up our p4200s on one class B subnetted.  We do not use
any subnet default routes, but we point a global net default to our
GBWW router, which should not use default and will stop all
unreachables right there.  No static routes.  If I want to know about
reachability, I ask the GBWW router how to get there.  If he says he
is using default, then I know there could be trouble.

	My advice to the novice reader is not to hack static routes
and realize that carefully constructed defaults are perfectly usable.

	Kent England, Boston University

ljm@TWG.COM (Leo J McLaughlin) (12/28/89)

>
>	No Internet bouncing and no big routing tables. Default routes
>don't harm internets; people harm internets.
>
>					+-DLS  (dls@mentor.cc.purdue.edu)

True enough, and an appropriate phraseology.  Default routes are a
powerful and quite useful tool, but they do allow the uninformed to
shoot themselves in the foot.

enjoy,
leo j mclaughlin iii
The Wollongong Group
ljm@twg.com