9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: forsyth@caldo.demon.co.uk forsyth@caldo.demon.co.uk
Subject: [9fans] Plan 9 ipmask
Date: Mon,  8 Jun 1998 17:51:06 +0100	[thread overview]
Message-ID: <19980608165106.e7yGPKlwJ5FAXcJOSUWgoveYTbL-jWG541BBYoVPLl8@z> (raw)

>>does Plan 9 support an ipmask like 255.255.255.128?
>>for some reason it seems to ignore such an entry in
>>/lib/ndb/local and use 255.255.0.0 instead. it gets
>>the right ip and ipgw though, and they're all three on
>>the same line.

this is from memory, though i'll check later, but i believe
it's quite likely you've got the ipmask= entry at the wrong point in
the /lib/ndb file.  the ipmask= entry itself is an attribute
of the network address, not a particular node,
so it appears in the network's entry in the /lib/ndb file.

for example, if the ip network address is 144.32.0.0 and it has subnet mask
255.255.254.0, you might have an entry similar to:

ipnet=york-campus-net ip=144.32.0.0 ipmask=255.255.254.0
	ipgw=144.32.128.76
	fs=bigger
	ntp=rugby

given an address or (sub)network address for which the system needs
the ipmask, it first builds the default mask for that class of
IP address [A,B,C etc], applies that to the given address to get
the network address, looks in ndb for a (network entry) with that ip=,
finds the ipmask= entry there, if there is one, and can
then apply the new mask to find the network entry for the subnet(s).

for instance, i might declare:

ipnet=nine-net ip=144.32.96.0
	fs=p9fs
	auth=p9auth
	ipgw=144.32.96.64

note that there is a general method for expressing a network/subnet/node hierarchy
for attributes (see the description of $attribute at the end of ndb(6)).

in this example, given those two entries, bootp will tell machines in subnet 144.32.96.0
to use p9fs as file server by default,
with 144.32.96.64 as IP gateway, but (in the absence of other subnet entries),
machines in other subnets will be told to use 144.32.128.76 as gateway
(and fs=bigger).

in practice, each subnet must have an ipgw= gateway address on that subnet:
the gateway is the gateway to other subnets.  the ipgw= in the network's own entry
will be the address of the gateway to other networks on the Internet.




             reply	other threads:[~1998-06-08 16:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-08 16:51 forsyth [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-06-08 13:20 Elliott.Hughes

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=19980608165106.e7yGPKlwJ5FAXcJOSUWgoveYTbL-jWG541BBYoVPLl8@z \
    --to=forsyth@caldo.demon.co.uk \
    /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).