in reply to Re^2: Adding an Entire Class B IP Range to an Array
in thread Adding an Entire Class B IP Range to an Array

That program prints '192.168.1.255', '192.168.2.0', etc. Is that what you wanted?

... 192.168.1.254 192.168.1.255 192.168.2.0 192.168.2.1 ... 192.168.2.254 192.168.2.255 192.168.3.0 192.168.3.1 ...

Replies are listed 'Best First'.
Re^4: Adding an Entire Class B IP Range to an Array
by Golo (Friar) on Apr 02, 2005 at 14:07 UTC
    if the op wants to treat an entire class B as one subnet (a mask of 255.255.0.0), the range goes from 192.168.0.0 (net-address) to 192.168.255.255 (broadcast). All other addresses like '192.168.1.255' and '192.168.2.0' are fine.

    update: just read the op again and you're right, the question was only asking for 1 - 254, which looks like he really wants to subnet a class B into class C nets (throwing away two of them).