9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Plan 9 ipmask
@ 1998-06-08 13:20 Elliott.Hughes
  0 siblings, 0 replies; 2+ messages in thread
From: Elliott.Hughes @ 1998-06-08 13:20 UTC (permalink / 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 a kernel compiled from the source on the CD,
by the way. do i need/is there a patch? or am i being
stupid?

-- 
http://users.ch.genedata.com/~enh/




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [9fans] Plan 9 ipmask
@ 1998-06-08 16:51 forsyth
  0 siblings, 0 replies; 2+ messages in thread
From: forsyth @ 1998-06-08 16:51 UTC (permalink / 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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-06-08 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-08 13:20 [9fans] Plan 9 ipmask Elliott.Hughes
1998-06-08 16:51 forsyth

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).