Monday, November 03, 2008

[Networks] How to calculate a netmask

To say that I've been busy of late is somewhat of an understatement. Mind you, I've had time to create a presence over on StackOverflow, and to start "playing" MouseHunt on FaceBook.

I was responding to something over on StackOverflow: "
What’s the best way to convert from network bitcount to netmask?" and added my two-bob to the mix with the following bit of VBScript.
A few examples runs are as follows:
It's been ages since I did the Cisco coursework (never did sit the exam) so I'm not sure if it's totally correct.

The binary2hexadecimal and binary2decimal functions were interesting to write as I was trying to find simpler, more lateral ways of doing things.
© Copyright Bruce M. Axtens, 2008

No comments: