Path: utzoo!attcan!uunet!cs.utexas.edu!usc!ucsd!ucbvax!IBM.COM!RWOUNDY From: RWOUNDY@IBM.COM ("Rich Woundy") Newsgroups: comp.protocols.tcp-ip Subject: IP Addresses (Subnets) Message-ID: <061490.181425.rwoundy@ibm.com> Date: 15 Jun 90 20:59:42 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 98 X-Unparsable-Date: Thu, 14 Jun 90 18:16:02 ET >From: sdd.hp.com!uakari.primate.wisc.edu!ark1!volleydog!rhott@ucsd.edu (The >VolleyDog) >Subject: IP Addresses (Subnets) >I have a quick question, hopefully you will not flame to loudly with >regard to viewing RFCs. I looked through RFC 950 to try to determine >how to specify a host when using a subnet. In my particular instance e >have a class B network. I am interested in how one would specify >addresses when a subnet of 6 bits is used. > >Suppose I want the 300th host on the 1 subnet of a class B network wit >a netmask of 255.255.252! Should I specify the IP address as >128.38.1.300 or 128.38.253.44 > >I guess my overall question is: Should I specify the addressing using >the 3rd octet field in the dot notation as the subnet or as the 3rd >octet of the 32 bit field? > >Thanks, > Bob Hott Bob, Per RFC 1117, you should specify the addressing using the 3rd octet of the 32 bit address. The 32 bit address of the 300th host on subnet 1 on network 128.38 should be (by my reading/implementation of RFC 950): NNNNNNNN NNNNNNNN SSSSSSHH HHHHHHHH N = network,S = subnet,H = host bits 10000000 00100110 00000101 00101100 N = "128.38",S = 1,H = 300 128 . 38 . 5 . 44 Dotted Decimal Notation The 6 bit subnet mask you chose allows you to have subnets numbered 1 to 62 (see bottom of page 6 in RFC 950). As another illustration, note the example (p. 13 bottom, RFC 950) of the same subnet mask for network 128.99. Address 128.99.4.123 specifies host 123 on subnet 1 on class B network 128.99.0.0. > From: Frank Kastenholz > From RFC 1117 (Internet Numbers): > : > One commonly used notation for internet host addresses divides the > 32-bit address into four 8-bit fields and specifies the value of eah > field as a decimal number with the fields separated by periods. Ths > is called the "dotted decimal" notation. For example, the internet > address of VENERA.ISI.EDU in dotted decimal is 010.001.000.052, or > 10.1.0.52. > > So, the correct number is 128.38.253.44. > > This is not an "official standard" but it is common usage to the degre that > no one does anything different. > > Frank Kastenholz > Racal Interlan If this is "common usage", then a router literally following RFC 950 will handle 128.38.253.44 as net 128.38.0.0, subnet 63 ("252"), host 300 ("1.44"), assuming the router is privy to the subnet mask. See RFC 1122 (Requirements for Internet Hosts -- Communication Layers), pp. 30-31 (condensed here): IP addresses are not permitted to have the value 0 or -1 for any of the , , or fields, except in the special cases listed here as either , or ,, (a) 0,0 (b) 0, (c) -1,-1 (d) ,-1 (e) ,,-1 (f) ,-1,-1 (g) 127, {See caveats in RFC for cases (a)-(g)} Note that subnet 63 is equivalent to -1 in the description above. > From: Doug Nelson > The best answer is "none of the above". If your netmask is 255.255.25.0, > and you are on the first subnet of network 128.38, then your address rnge > begins with 128.38.0.0, and ends with 128.38.3.255 (the latter being yur > subnet broadcast address). So, if your first host was numbered 128.381.1, > then your 300th host would be 128.38.2.44. > > Doug Nelson > Network Software Manager > Michigan State University Interpreting RFC 950 literally again, 128.38.2.44 specifies host # 556 on subnet 0 on network 128.38.0.0. The host number space on subnet 1 of network 128.38.0.0 would be from 128.38.4.1 to 128.38.7.254. If my answer seems brain-dead, please notify myself and the list. Otherwise, we're likely to retain three interpretations of the RFCs to answer a straightforward question. Bob, this was obviously not a dumb question to ask. -- Rich Richard Woundy, IBM Advanced Solutions Development, Milford, CT Flames to: rwoundy@ibm.com Disclaimer: IBM nor any other corporation or entity takes responsibility for the irresponsible things quoted in this message.