HighTechTalks DotNet Forums  

Subnet Calculations

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss Subnet Calculations in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Shaggyh
 
Posts: n/a

Default Subnet Calculations - 10-22-2004 , 08:06 PM






hi newbie here
wondering if anyone can help me

im trying to program
a simple Subnet Calculator for Class C IPv4 addresses.



The calculator should calculate subnet information for specified IPv4 Class
C network addresses only (ignore Class A and B). The user should input the
IP address for the Class C network, the number of network bits in the
address (since it could be a subnetted address already), and the number of
bits to borrow for subnetting.



e.g.

192.168.10.0 - Class C IP network address

24 - number of network bits in address

2 - number of bits to borrow



The system should calculate and display the following information for each
generated subnet: subnet address(slash format) and valid host address range.



e.g.

192.168.10.0/26 192.168.10.1..192.168.10.62

192.168.10.64/26 192.168.10.65..192.168.10.126

192.168.10.128/26 192.168.10.129..192.168.10.190

192.168.10.192/26 192.168.10.193..192.168.10.254



Assume all subnets are useable i.e. subnet 0 and last subnet are both
useable. All hosts are useable except the first (subnet address) and last
(broadcast address).



is there anyone out there who has some code r knows where to begin?

all help welcome



thanks







Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.