Subject: (IPng 7111) host vs router

From: Richard Draves <[email-masked]>
Date: Wed, 27 Jan 1999 23:07:05 -0800

I was thinking recently about the terms "host" and "router", particularly as
they are used in RFC 2461 (Neighbor Discovery).

A router is defined as a node that forwards packets not addressed to itself.
A host is defined as a node that's not a router.

I think it's pretty clear that a multi-homed node might behave as a router
on some interfaces and behave as a host on other interfaces. So host vs
router is really a property of an interface. However for simplicity we
normally say "host" instead of "interface acting as a host" and "router"
instead of "interface acting as a router".

In addition to forwarding packets, routers typically also send Router
Advertisements ("advertise").

I think it's pretty clear that forwarding and advertising are separate and
orthogonal properties of an interface. You can have an interface that
forwards without advertising, or advertises without forwarding. See section
6.2.5.

Because being a router is equated with forwarding, this means you can have a
router that doesn't advertise or a host that does advertise. (When a host
sends a Router Advertisement, the router lifetime in the RA will be zero.)

Then in section 6.2.6, the spec says
   A host MUST silently discard any received Router Solicitation messages.

But surely a node that is not forwarding but is advertising should be
allowed to respond to Router Solicitations? It would seem very strange to be
sending unsolicited Router Advertisements and be prohibited from sending
solicited Router Advertisements.

In section 6.2.2, the spec says
   The term "advertising interface" refers to any functioning and
   enabled multicast interface that has at least one unicast IP address
   assigned to it and whose corresponding AdvSendAdvertisements flag is
   TRUE.  A router MUST NOT send Router Advertisements out any interface
   that is not an advertising interface.

Since advertising is orthogonal to forwarding (being a host or a router),
shouldn't the last prohibition apply to hosts as well as routers?

In section 6.2.2, the spec says
   A router MUST join the all-routers multicast address on an
   advertising interface.  Routers respond to Router Solicitations sent
   to the all-routers address and verify the consistency of Router
   Advertisements sent by neighboring routers.

In section 6.2.5, talking about an interface ceasing to advertise, the spec
says
   In such cases the router SHOULD transmit one or more (but not more
   than MAX_FINAL_RTR_ADVERTISEMENTS) final multicast Router
   Advertisements on the interface with a Router Lifetime field of zero.
   In the case of a router becoming a host, the system SHOULD also
   depart from the all-routers IP multicast group on all interfaces on
   which the router supports IP multicast (whether or not they had been
   advertising interfaces).  In addition, the host MUST insure that
   subsequent Neighbor Advertisement messages sent from the interface
   have the Router flag set to zero.

I find the description of the all-routers multicast address to be confusing.
Wouldn't it be simpler to say that an advertising interface (whether or not
it is forwarding, ie, is a host or a router) MUST join the all-routers
multicast address, and an interface that ceases to advertise SHOULD depart
from it (whether or not it is forwarding)? That seems to be the right
definition, given how the all-routers multicast address is used, although it
makes the name "all-routers" a little strange :-).

Now whenever I look at the spec and see something about what a router or a
host should or should not do, I wonder if it means forwarding interfaces or
advertising interfaces or what.

Rich
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [email-masked]
--------------------------------------------------------------------

---

From: Steve Deering <[email-masked]>
Date: Wed, 27 Jan 1999 23:48:25 -0800

> instead of "interface acting as a router".

Rich,

This nuance is mentioned in the base IPv6 spec, as a footnote in
Section 2 (Terminology):

   Note: it is possible, though unusual, for a device with multiple
   interfaces to be configured to forward non-self-destined packets
   arriving from some set (fewer than all) of its interfaces, and to
   discard non-self-destined packets arriving from its other interfaces.
   Such a device must obey the protocol requirements for routers when
   receiving packets from, and interacting with neighbors over, the
   former (forwarding) interfaces.  It must obey the protocol
   requirements for hosts when receiving packets from, and interacting
   with neighbors over, the latter (non-forwarding) interfaces.

> orthogonal properties of an interface.

I disagree that those properties are orthogonal.  Only router (forwarding)
interfaces are (or ought to be) allowed to send Router Advertisements.
I thought that was explicitly stated somewhere (it's been a loooong time
since I've read the ND spec).  As I recall, the Neighbor Advertisement has
a router/host flag specifically for the purpose of allowing a former
routing interface (i.e., an interface that was recently in forwarding mode)
to be able to indicate that it is no longer a forwarding interface,
something it cannot do via Router Advertisments because sending a router
advertisement implies that the sender is a router (forwarder).

> You can have an interface that forwards without advertising, or advertises
> without forwarding. See section 6.2.5.

Then that's a bug.  Forwarding without advertising is OK, but advertising
when not enabled for forwarding is not OK.

> sends a Router Advertisement, the router lifetime in the RA will be zero.)

That lifetime field is the remaining time that the sender may be
considered a *default* router.  A Router Advertisement carrying a
zero lifetime means the sender is able to forward packets, but must
not be used as anyone's default router, i.e., it is only to be used as
a result of Redirects or manual configuration.

> solicited Router Advertisements.

I contend that hosts (non-forwarding interfaces) should never send
Router Advertisements, in which case, the above strangeness does not
occur.

> shouldn't the last prohibition apply to hosts as well as routers?

Since the predicate of that sentence is false, no.

> makes the name "all-routers" a little strange :-).

All becomes un-strange if you retrict Router Advertisements to routers only.

> advertising interfaces or what.

Forwarding interfaces.

Steve

---

From: Thomas Narten <[email-masked]>
Date: Thu, 28 Jan 1999 07:18:13 -0500

Couple of small clarifications.

> when not enabled for forwarding is not OK.

It is possible to send out RAs with a Lifetime of zero. In such cases,
the router has an "advertising interface". However, the router is not
forwarding packets or being a default router.  This allows a router to
send RA Options (e.g., prefix information) without having be a default
router.

> a result of Redirects or manual configuration.

Actually, the wording in the spec says that if you receive a RA with a
lifetime of zero, two things happen:

1) remove the router from the default list

2) update the neighbor cache so that all entries using that router
   perform next-hop resolution over again. In this case of a router
   being removed from the default list, another router will be
   selected.

Thomas

---

From: Steve Deering <[email-masked]>
Date: Thu, 28 Jan 1999 07:31:28 -0800

At 4:18 AM -0800 1/28/99, Thomas Narten wrote:
> forwarding packets or being a default router.

Forwarding packets and being a default router are two different things.
An RA Lifetime of zero is supposed to mean that the sender is not a
candidate to be a default router, but it may still be used as a non-
default router for nodes that have been redirected or configured to
use it for specific destinations (and thus it must have forwarding
enabled).  An interface that is configured to drop all non-self-
addressed packets is a host interface, and must not send any RAs.
The ability to set the RA Lifetime to zero was *not* intended to
allow hosts to send "proxy router advertisements".

> This allows a router to send RA Options (e.g., prefix information)
> without having be a default router.

Yes, but it must be serving as a *non*-default router, i.e., it must
have forwarding enabled.

>    being removed from the default list, another router will be

Step (2) needs to be conditional on step (1) happening.  That is, if
you receive an RA with a lifetime of zero from a router whose address
is present in your default list, then you do steps (1) and (2).  If you
receive an RA with a lifetime of zero from a router whose address is
*not* present in your default list, you should not perform step (1)
[because you can't] or (2) [because any entries using that router at
that point in time will necessarily be ones created by a Redirect or
manual config, and need not and should not be disturbed].

The case of a router becoming a non-router (i.e., forwarding being
turned off) is detected when an NA is received from an address
believed to be a router address (default or non-default), in which
the host/router flag set to "host".  That NA may be either unsolicited
or a consequence of the NUD process.

Do you agree?

Steve

---

From: Thomas Narten <[email-masked]>
Date: Thu, 28 Jan 1999 10:52:56 -0500

> Forwarding packets and being a default router are two different

Agreed.

> allow hosts to send "proxy router advertisements".

I'm not sure I agree entirely with the last part of this. I suspect
that everyone agrees that a router that is not a default router MUST
NOT send RAs with a non-zero lifetime. 

But should a host be allowed to send proxy advertisements with a
Lifetime of 0? Well, the document pretty clearly says a host MUST NOT
send RAs, so one could say the answer is no. But I don't see an
interoperability problem with proxy advertisements, and there doesn't
appear to be a way for a host receiving RAs to distinguish proxy
advertisements from non-proxy advertisements.

> Yes, but it must be serving as a *non*-default router, i.e., it must

Why? It only needs to have forwarding enabled if a host forwards
traffic to it. And the only way a host should be sending traffic to it
(that needs further forwarding) is if it has been redirected to that
router. The set of routers to which hosts should be redirected is a
problem for the routers to sort out. I would assume that the way
routers sort this out is via routing protocols.

I don't believe that routers can make the assumption that anyone
sending out RAs with a Lifetime of zero is a forwarding router. I.e.,
the mechanism routers use to figure out what other forwarding routers
there are is not based just on who is sending RAs. Indeed, knowing
that some router X is a forwarding router is not very useful by
itself. One needs to also know which destinations it is willing to
forward. So I don't think RAs with 0 lifetimes provide sufficient
information to other routers to justify a requirement that all routers
sending 0 lifetime RAs must forward packets.

> Step (2) needs to be conditional on step (1) happening.

The current text supports your interpretation.

> or a consequence of the NUD process.

Agreed.

Thomas

---

From: Jim Bound <[email-masked]>
Date: Thu, 28 Jan 1999 11:22:30 -0500

Rich,

We had many of these discussions.  The defined lines btw a host and
router are very clear.  If one starts doing router functions on a host
it gets unclear real fast.  All Host vendors who do routing today have
this problem and I too saw many of your issues with ND when it was first
architected when Bill Simpson was the only author.  So the issues are
inherent in the architecture of ND and its philosophy.  

The only real fix to realize that a Host tomorrow with IPv6 will really
have code to be a Router on one interface and a Host on another
interface.  

This is why I have basically given up on the need to justify anycast
addresses on large MP machines and clusters for Hosts.  Just make the
interfaces for that router interfaces and many of the issues you bring
up in the spec I don't think are issues anymore.

But this does add cost to engineering IPv6 Hosts if a Server is to be
more than robust desktop.

I will bring you mail to grenoble though and the ND spec.

p.s This will be a big issue for the diff serve work in process too
IMO!!!

/jim

---

From: Erik Nordmark <[email-masked]>
Date: Thu, 28 Jan 1999 09:47:38 -0800 (PST)

> send RA Options (e.g., prefix information) without having be a default

I just realized that this doesn't work in practise since the spec
states that when a host receives an RA that it should treat the
sender as being a router from the NUD perspective. (Section 6.3.4 setting of
IsRouter to TRUE.)

If a non-forwarding node sends Router Advertisements it would be
inconsistent since the NAs sent by the node would
have the Router flag cleared but the RAs it sends implicitly mean that
the Router flag is set.

So I think the note at the end of section 6.2.5 is incorrect since
we haven't worked out the details for non-forwarding advertising
interfaces. And I'd argue that adding more complexity to make this
work isn't worth the effort.

   Erik