macsch.com">
usenix.ORG, math.ams.org">tvd
math.ams.org
macsch.com (Todd Williams)
usenix.ORGAt -0400:pm on Thu Aug 5 1993, Todd Vander Does <tvdmath.ams.org> said: > > We are considering subnetting to provide a logical distribution of our > hosts. Subnet for traffic or security reasons, not just to make things look pretty. > We do not have a current space crunch. We will be increasing > from 75 hosts to 100 in the next year. The proposal is to create five > subnets dividing them according to one of two schemes. The first is > to divide them by system style - Computers, X terminals, PCs, Misc. > The second proposal is to create subnets for each organizational > division, e.g, Executive, Fiscal, Publishing, Marketing. Under this > organization of assigning IP addresses we will be able to view our > host tables with greater comprehension. We will be able to keep new > hosts organized, rather than having Visual X terminals scattered among > Macs or NCDs. So you want to subnet just to make your hosts file look pretty? You don't need to subnet to do that. > There is a loyal opposition to this plan that believe that subnetting is > for functional purposes, not organizational purposes. That depends what kind of "organization" you are talking about. > Their stance is that organizing host files by type is unnecessary. They are correct. > Assign the next number to the next host added to the net. If you want to "organize" your hosts file, just reserve blocks of addresses: x.y.z.1-49 for PC's, x.y.z.50-99 for Mac's, x.y.z.100-149 for Xterms, etc. > Use subnetting if the address space gets too full, Subnetting doesn't give you more address space; it gives you less. > to provide filtering or some other concrete objective. > Use tools to provide different views of the host tables, e.g., > grep Visual /etc/hosts. The whole idea of subnetting IMHO is to reduce traffic on the network; it is necessary for large networks due to the CSMA/CD nature of Ethernet. Single-segment ethernet does not scale well after a certain point. The thing to do then is to split the segment into logical sections based on the traffic expected between each machine. Sometimes this is very simple: if you have a network with 100 engineering workstations doing development and 100 PC's in accounting running a client-server database application, it should be obvious how to subnet. Often, however, things are not so lucid. One excellent explanation of "how to subnet" can be found in Hal Stern's "Managing NFS and NIS", I think. You make a directed graph of all nodes(!), and assign a value to each link between nodes. High values are given for file-serving, etc., and lower values given for various other things. Then you draw a line where the proposed subnet boundary is to be, and tally the value of the links you severed. Low numbers indicate that you have subnetting "correctly". Note that subnetting by hardware type isn't necessarily absurd. In my example above, all the workstations are using for one thing, and all the PC's for another--this is somewhat typical. As for your mention of using grep(1) on the hosts table, I agree. When you have hundreds or thousands of lines in /etc/hosts, it's often difficult to remember what each hostname is. The way I handle this is to add several comment fields at the end of each line, giving hardware type, software/OS type, "owner", location, administrator, etc. My current hosts file might look something like this: 1.2.3.111 uunet # Sun670MP SunOS413 IS_Dept (Comp_Room1) [JFB] 1.2.3.112 ittvax # NCD19c Dennis_Ritchie (Holmdel-125B.23) [DMR] 1.2.3.113 gateway # CiscoAGS Net_Dept (Phone_Closet1) [JFB] This makes my hosts file quite *W*I*D*E*, but using tools or slick command- line incantations, I can quickly "query" this "database" to list all the Xterminals, tell you how many routers I have, find the name of John Doe's machine, or see who's in charge of the machines in the phone closet. If you use DNS, you can add informational fields like this, too. It's gotten so confusing here that I've considered putting all this info into a big database (like, a real one on Oracle or something), and then having an SQL report that will produce a hosts file for me. Remember that there are drawbacks to subnetting -- you are complicating things. If an ugly hosts file is the worst of your problems, be happy. Todd Williams UNIX Systems Supervisor todd
macsch.com (213) 259-4973 MacNeal-Schwendler Corp. ("MSC"), 815 Colorado Blvd., Los Angeles, CA 90041 "Solaris 2.0 -- It's enough to make you leave the company." -Rob Kolstad
lokkur.dexter.mi.us>