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 |