Re: Multihomed hosts and virtual web hosts

Will Partain <[email protected]> Tue, 06 May 2003 21:08:08 +0100
Newsgroups gmane.comp.sysutils.ark.devel
Message-ID <[email protected]>
Joel S writes:

> This looks great.

(sample bits available before I go home...)

> Moving the netmask and broadcast address into a prototype reduces
> duplication, but the network interface device name, hme0, probably is the
> wrong key.  A network may serve various Suns connected via hme0, qfe2, le0,
> or other devices.  The same network may also have HP boxes, Linux boxes,
> etc. connected via other network devices.
> 
> The netmask and broadcast address can be derived from a CIDR network
> description (192.168.1.0/24 in the example).  Given a particular host IP
> address, 192.168.1.1 for example, and a list of CIDR network descriptions,
> it should be possible to select the relevent network and compute the
> appropriate network and broadcast addresses.
> 
> Now where should we list the networks?

Off-the-cuff ARK philosophical answer: if thinking about 'em
occupies a fair chunk of your day, then it should be a
"thing" type (like host, package, license, website, ...).
That would suggest a 'network' type in Sidai...

If, on the other hand, you don't spend much time with
networks (perhaps because you have a very simple networking
world), then you just park the info somewhere faintly
sensible.  In the Sidai case to date, that's in *hosts*.

So: I'm willing to talk about a Sidai 'network' type, but
for now I'm hacking it into "hosts"...  Here's the idiomatic
hack that I'm using to avoid your objection...

In the host/ALL.xml prototype, I put:

<common-network-interface><table>
  <entry name="broadcast">130.209.240.255</entry>
  <entry name="gateway">130.209.240.48</entry>
  <entry name="netmask">255.255.0.0</entry>
  <entry name="network">130.209.240.0</entry>
</table></common-network-interface>

Then in the sun-ultra10.xml prototype (hme0 interface, by
default), I say:

<network-interfaces>
  <param name="hackhackhack">ignore me</param>
  <table>
  <entry name="hme0"><table>
    <entry name="broadcast">@self:common-network-interface:broadcast@</entry>
    <entry name="gateway">  @self:common-network-interface:gateway@</entry>
    <entry name="netmask">  @self:common-network-interface:netmask@</entry>
    <entry name="network">  @self:common-network-interface:network@</entry>
  </table></entry>
</table></network-interfaces>

And, finally, for an individual machine, it's just:

<network-interfaces><table>
  <entry name="hme0"><table>
    <entry name="ip-address">130.209.242.53</entry>
  </table></entry>
</table></network-interfaces>

I wish there was a way to get rid of that very last
"hme0"...

My verdict, which you're welcome to laugh at :-) [*], is that
it's not too bad.

Will

[*] My main reason for posting ugly hacks is so that
Jonathan will come out and fix them :-)


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com