Networking Forums

Networking Forums > Computer Networking > Windows Networking > determine subnet and host number

Reply
Thread Tools Display Modes

determine subnet and host number

 
 
bill tie
Guest
Posts: n/a

 
      10-22-2008, 10:28 AM
This is the scenario:

I'm not a network administrator. I use one machine in the network.

Using standard utilities available on the machine or programmatically,
- is it possible to determine what subnet my machine is in? And how?
- is it possible to determine the range of IP addresses that machines/hosts
in the subnet can have? And how?

Thank you.

 
Reply With Quote
 
 
 
 
Meinolf Weber
Guest
Posts: n/a

 
      10-22-2008, 10:54 AM
Hello bill,

If you teype in a command prompt "ipconfig /all" without the quotes you get
the ip address and the subnet mask. If your subnet mask is 255.255.255.0
you can have up to 254 clients in that subnet.

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm


> This is the scenario:
>
> I'm not a network administrator. I use one machine in the network.
>
> Using standard utilities available on the machine or programmatically,
> - is it possible to determine what subnet my machine is in? And how?
> - is it possible to determine the range of IP addresses that
> machines/hosts
> in the subnet can have? And how?
> Thank you.
>



 
Reply With Quote
 
bill tie
Guest
Posts: n/a

 
      10-22-2008, 11:11 AM
Meinolf,

Thank you for your note.

Ultimately, I would like to write a program that if/when executed on any
machine it will determine the subnet and the address range.

Hence, I'm looking for a generalized/universal way of establishing things.

 
Reply With Quote
 
JohnB
Guest
Posts: n/a

 
      10-22-2008, 08:28 PM
As Meinolf said, you have to first use Ipconfig to determine your IP
address and Subnet Mask.

After you have that information, to determine the address range, you'd use
this procedure;

- subtract the mid-range octet of the subnet mask from 256. For example the
mid-range octet in this subnet 255.255.240.0 is 240

- In the case of 255.255.255.0, the mid-range octet is 255. In the case of
255.255.255.128, it's 128

Say for example you had an IP address of 172.16.2.55 and a subnet mask of
255.255.0.0, you would subtract 255 from 256. 256-255=1
Your subnet address ranges would therefore be:
172.16.0.0 - 172.16.0.255
172.16.1.0 - 172.16.1.255
172.16.2.0 - 172.16.2.255
172.16.3.0 - 172.16.3.255
and so on....
And from there you can see which of those subnets *your* IP address is
located in.

Say you had an IP address of 192.168.1.129 and a subnet mask of
255.255.255.192
256-192=64
Subnet address ranges:
192.168.1.0 - 192.168.1.63
192.168.1.0 - 192.168.1.63
192.168.1.0 - 192.168.1.63





"bill tie" <(E-Mail Removed)> wrote in message
news:29B8790C-9E21-4946-8CAB-(E-Mail Removed)...
> Meinolf,
>
> Thank you for your note.
>
> Ultimately, I would like to write a program that if/when executed on any
> machine it will determine the subnet and the address range.
>
> Hence, I'm looking for a generalized/universal way of establishing things.
>



 
Reply With Quote
 
JohnB
Guest
Posts: n/a

 
      10-22-2008, 08:35 PM
I somehow clicked on send before I finished the post. The last part should
have been:


Say you had an IP address of 192.168.1.129 and a subnet mask of
255.255.255.192
256-192=64
Subnet address ranges:
192.168.1.0 - 192.168.1.63
192.168.1.64 - 192.168.1.127
192.168.1.128 - 192.168.1.191
192.168.1.192 - 192.168.1.255





 
Reply With Quote
 
Phillip Windell
Guest
Posts: n/a

 
      10-27-2008, 03:58 PM
This isn't something that you would have an Application do,...the
Application should just blindly dump packets on the Window's Networking
Components and let the Windows Networking Components figure out what to do
with it. When Applications start messing with that, then it often means
trouble.


--
Phillip Windell
www.wandtv.com

The views expressed, are my own and not those of my employer, or Microsoft,
or anyone else associated with me, including my cats.
-----------------------------------------------------

"bill tie" <(E-Mail Removed)> wrote in message
news:29B8790C-9E21-4946-8CAB-(E-Mail Removed)...
> Meinolf,
>
> Thank you for your note.
>
> Ultimately, I would like to write a program that if/when executed on any
> machine it will determine the subnet and the address range.
>
> Hence, I'm looking for a generalized/universal way of establishing things.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
abnormal (excessive) number of arp requests on subnet? Rahul Linux Networking 9 07-13-2010 10:49 PM
Re: Reserved addresses in subnet & Number of subnets unruh Windows Networking 0 01-11-2010 03:56 AM
Configuring Acer Access Point at host end of subnet? Fred Goldstein Wireless Internet 0 02-14-2004 07:39 PM
Re: Cannot ping host in another subnet M. Swope Linux Networking 1 06-24-2003 10:34 PM
Re: Cannot ping host in another subnet Michael Heiming Linux Networking 1 06-24-2003 06:36 PM



1 2 3 4 5 6 7 8 9 10 11