Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
63 ratings:
 2.53 out of 5   

Archived: Setting Computers on the Same Subnet

This document has been archived and is no longer updated by National Instruments

Primary Software:
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: N/A

I am trying to get my computers on the same subnet, but I'm not sure what that means. How do I set up my computers to be on the same subnet?

Refer to the Subnet Calculator example to calculate your subnet based on your IP Address and Subnet Mask.

This is a four part explanation:
  1. A detailed explanation of how a subnet mask works
  2. An explanation of how to query your computer's IP address and subnet mask
  3. The procedure to set your computer's IP Address and subnet mask statically
  4. LabVIEW subnet calculators.

Part 1: How does the subnet mask actually work?

The subnet mask is a 4 part string of numbers just like the IP Address. Most of the time, it looks like this: The purpose of the subnet mask is to define what numbers of the IP Address should be the same for the computers to be on the same subnet. When it comes down to it, it's all binary. Wherever there is a 1, this means that the numbers must be the same on the two (or however many) IP addresses. Here is an example that will help to bring this concept to light:

Lets say that the Subnet Mask is To analyze this, we must first convert this to binary format:

1111 1111 . 1111 1111 . 1000 0000 . 0000 0000

Looking at the first number 1111 1111, there is a 1 in every spot. This means that the bits of the IP Addresses must be the same in every spot. In other words, the numbers must be the exact same. The second number is the same way.

Looking at the third number 1000 0000, there is a 1 in the 8th spot. This means that only the 8th binary digits of the IP Addresses must be the same. So, if we have a number like 131 (which is 1000 0011) for one IP address, then for another computer to be on the same IP address it has to have the 8th number be a 1 (that is the only constraint). This means that 255 (which is 1111 1111), 128 (which is 1000 0000), etc will be on the same subnet. This is shown because if you align these 3 numbers, they each have one thing in common: the 8th number is the same for each.

1000 0011
1111 1111
1000 0000

Part 2: How do I find out what my computer's current IP Address and subnet mask are?

To do this, you follow these instructions:
  1. Go to the command prompt usually found at Start»Programs»Accessories.
  2. Once the command prompt comes up, type in ipconfig.

After this, it should return your computer's IP Address and Subnet Mask.

Part 3: How can I set my computer's IP Address and subnet mask?

To set your computer IP address statically:
  1. Select Control Panel»Network Connections. Right click on Local Area Connection and select properties.
  2. Once you are inside the Local Area Connection properties, go to the General Tab and select Internet Protocol (TCP/IP) and click on properties.
Once you have done this, you will be left with a window that will allow you set your IP statically (which allows you to set it) or with DHCP (which allows the network to set it dynamically).

Part 4: Are there any tools to calculate a subnet?

Yes.  Refer to the Subnet Calculator and IP Address Subnet Verification example LabVIEW programs.

Related Links:
KnowledgeBase 4CDENRCY: How to Network FieldPoint to a Host Computer with Ethernet
KnowledgeBase 1XGF6R4U: I Cannot Connect to My LabVIEW Real-Time Target on the Network
KnowledgeBase 27K9UNKN: How Do I Connect to a LabVIEW Real-Time (RT) Target with a Crossover Cable?
Developer Zone Example: Subnet Calculator
Developer Zone Example: IP Address Subnet Verification


Report Date: 12/13/2005
Last Updated: 08/12/2014
Document ID: 3SC9P5IH

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit