Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!sdd.hp.com!wuarchive!rice!rice!sun-spots-request From: jms@tardis.tymnet.com (Joe Smith) Newsgroups: comp.sys.sun Subject: Re: How do I subnet a class B network Keywords: Networks Message-ID: <1990Oct7.231615.4530@rice.edu> Date: 7 Oct 90 21:30:00 GMT Sender: sun-spots-request@rice.edu Organization: Sun-Spots Lines: 56 Approved: Sun-Spots@rice.edu Originator: spots@walhalla.rice.edu X-Sun-Spots-Digest: Volume 9, Issue 340, message 3 X-Refs: Original: v9n310 In article <1990Sep4.232423.17162@rice.edu> jmorris@mwunix.mitre.org (John R. Morris) writes: >I have some 4/110s and one 4/280 which were on a class B network. The >4/280 now has two ethernet interfaces and I want to make it a router, >isolating all of my machines from the class B network. I can't seem to do >it correctly and Sun-support is not very fast/helpful answering questions. >-------| |--------- > | ---------- | >rest | | my > of ------|sun4/280|---------- little >world | | corner > B | ---------- | C >-------| |--------- > >On the 4/280 (running Sun OS 4.1) can I do the following:? > ie0 (rest of world, Class B) > inet 128.29.22.1 netmask 255.255.0.0 broadcast 128.29.255.255 > ie1 (my little corner, Class C?) > inet 128.29.22.7 netmask 255.255.255.0 broadcast 128.29.22.255 >If not, why? Should I change the IP address on the class B side to >128.29.23.1 I'm told I should change the netmask to 255.255.255.0 on both >sides but I don't know why. Purpose of netmask: When a packet is destined for an IP address and the local host has multiple IP interfaces, the netmask is used to determine which interface to send the packet to. foreach interface do network1 = destination_address AND interface_netmask network2 = interface_address AND interface_netmask if ( network1 equals network2 ) then send packet though this interface break out of loop endif endfor no match, go consult the routing tables. With ie0 having a netmask of 255.255.0.0, then all addresses in the form of 128.29.*.* will match, and nothing nothing will go out ie1. Simply setting setting ie1's host address to 128.29.23.1 won't help; that address still matches 128.29.*.*. You will have to set the netmask on both interfaces to 255.255.255.0. This will make addresses in the form 128.28.22.* go to ie0, addresses in the form 128.28.23.* go to ie1, and all other addresses will be compared against the routing tables. This last part includes addresses valid on your class B network (such as 128.28.19.*) as well as addresses outside your network (such as 128.83.*.*). The route daemon does its thing automatically when it detects more than one IP interface; you don't have to do anything other than set the network address and netmask up properly. Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms PO Box 49019, MS-C41 | BIX: smithjoe | 12 PDP-10s still running! "POPJ P," San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."