Tip & How-To about Computers & Internet

How to Calculate an IP v4 Subnet

An IP address is a specific address assigned to a computer across a network, allowing computers to communicate with one another. When IP Version 4 debuted, there were far less computers on the web. IP v4 only contains 4,294,967,296 possible addresses, including subnet number and broadcast addresses. Now, there are many more devices on the web and because of this, subnetting (as well as NAT) was developed as a way of maximizing usable addresses.


The Parts of an IP Address:

IP addresses contain 4 octets, 8 bits each. For example,

192.168.1.1 in binary is

11000000.10101000.00000001.00000001


The Mask:

A Subnet Mask tells a computer what part of the address declares a subnet so it knows when the destination address is on the same network or needs to be routed to a different one. For example,

The subnet mask 255.255.255.0 in binary is

11111111.11111111.11111111.00000000

when applied to 192.168.1.1 or

11000000.10101000.00000001.00000001

The first 24 bits are the subnet. So, all addresses in 192.168.1.xxx are part of the same subnet. When a computer with address 192.168.1.2 wants to communicate with a computer with address 192.168.1.3 The information does not need to be routed because the computers are on the same network. However when a computer with address 192.168.1.2 wants to communicate with microsoft.com or 207.46.232.182, the data must be sent to the default gateway to be routed.

The area that is not covered by the mask (in this case, the last octet) are used by the network. The lowest possible number of .00000000 or 192.168.1.0 is the subnet number and the highest possible number of .11111111 or 192.168.1.255 is the broadcast address. These particular addresses cannot be issued to devices on a network. This leaves 254 addresses on 192.168.1.0 that can be assigned to devices on that network. The default gateway (the router) can be assigned any address in that space. However, it is typically assigned the first address (192.168.1.1 in this case)


One more example:

Ip address of 10.101.75.150 with subnet mask of 255.255.252.0 or,

IP:00001010.01100101.01001011.10010110
SM:11111111.11111111.11111100.000000000

00001010.01100101.010010 00.00000000 or 10.101.72.0 is the lowest address (aka subnet number) and

00001010.01100101.010010 11.11111111 or 10.101.75.255 is the highest number (aka broadcast address)

Any number in between is assignable to a device on the network.


The Easy Way (without binary):

Always look or the odd octet (the one that isn't 255 or 0) in the subnet mask.

255.255.252.000

in this case is 252. Subtract that number from 255 and you have 3 (or as I like to call it the magic number)

find the same octet from the IP address:

010.101.075.150
255.255.252.000

in this case is 75. Find the multiples of the magic number that this octet is between. In this case, 75 is a multiple of 3, so the numbers we are looking for would be 75 and the previous multiple 73.

So far we have,

10.101.73.xxx and
10.101.75.xxx

fill the X's for the low number with 0 and
fill the X's for the high number with 255 and you have,

10.101.73.0 (subnet number) and
10.101.75.255 (broadcast address)

All addresses in between are usable. As confusing as it all may sound, all takes is practice. "Practice makes perfect." Try making up your own IP address and Subnet mask and calculate the range to find the subnet number and broadcast address. In time you will have it down to a science.

Posted by on

Computers & Internet Logo

Related Topics:

Related Questions:

2 Answers

address ip reset


Your IP address is a series of numbers that identify your specific computer on the Internet.
If, for some reason, you want to change your IP address, you can do so without going into the command prompt.Click "Start," "Control Panel," "Network and Internet" and "Network and Sharing Center."
Click "Change adapter settings."
Right-click the network you want to change and click "Properties."
Click the "Networking" tab.
Put a check either next to Internet Protocol Version 6 (TCP/IPv6) or Internet Protocol Version 4 (TCP/IPv4) and click "Properties."
Click the radio button next to Obtain an IP Address Automatically if you want Windows to assign one, or click "Use the following IP address" to manually change it.
Enter the requested information and click "OK."

Oct 26, 2013 | Computers & Internet

1 Answer

change ip address


Your IP address is a series of numbers that identify your specific computer on the Internet.
If, for some reason, you want to change your IP address, you can do so without going into the command prompt.Click "Start," "Control Panel," "Network and Internet" and "Network and Sharing Center."
Click "Change adapter settings."
Right-click the network you want to change and click "Properties."
Click the "Networking" tab.
Put a check either next to Internet Protocol Version 6 (TCP/IPv6) or Internet Protocol Version 4 (TCP/IPv4) and click "Properties."
Click the radio button next to Obtain an IP Address Automatically if you want Windows to assign one, or click "Use the following IP address" to manually change it.
Enter the requested information and click "OK."

Jul 31, 2013 | Logitech QuickCam Computers & Internet

1 Answer

how to configure router & switch


You shouldn't have to configure anything except the PC's should have IP and gateway set to auto.

Here is how it works:

A router connects two separate networks and manage the traffic between them.

In most home network applications the router connects your local group of computers and devices known as the LAN with the Internet, commonly called the WAN or Wide Area Network.

The router usually assigns unique Local IP addresses to all of the devices connected to it via a service known as DHCP. The addresses assigned by your router are private addresses http://en.wikipedia.org/wiki/Private_net... and are not routable across the Internet.

Dynamic Host Configuration Protocol (DHCP) is an auto configuration protocol used on IP networks. Computers that are connected to IP networks must be configured before they can communicate with other computers on the network. DHCP allows a computer to be configured automatically, eliminating the need for intervention by a network administrator. It also provides a central database for keeping track of computers that have been connected to the network. This prevents two computers from accidentally being configured with the same IP address. http://en.wikipedia.org/wiki/Dynamic_Hos...

Your cable or DSL modem will get a Public WAN IP address from your ISP's DHCP service. These public IP addresses are leased in blocks by your ISP and are Internet routeble. The modem is connected to the WAN port on your router. The router will manage the traffic between the devices on the LAN and the Internet.

If your 5 port switch is connected to one of the router's LAN ports and router's DHCP is on then it will configure the clients attached to It automatically.

Feb 04, 2013 | Computers & Internet

2 Answers

whats an ip address


An Internet Protocol address (IP address) is usually a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication.[1] An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: "A name indicates what we seek. An address indicates where it is. A route indicates how to get there."
The designers of the Internet Protocol defined an IP address as a 32-bit number[1] and this system, known as Internet Protocol Version 4 (IPv4), is still in use today. However, due to the enormous growth of the Internet and the predicted depletion of available addresses, a new addressing system (IPv6), using 128 bits for the address, was developed in 1995,[3] standardized as RFC 2460 in 1998,[4] and is being deployed worldwide since the mid-2000s.
IP addresses are binary numbers, but they are usually stored in text files and displayed in human-readable notations, such as 172.16.254.1 (for IPv4), and 2001:db8:0:1234:0:567:8:1 (for IPv6).
The Internet Assigned Numbers Authority (IANA) manages the IP address space allocations globally and delegates five regional Internet registries (RIRs) to allocate IP address blocks to local Internet registries (Internet service providers) and other entities.

Apr 01, 2011 | Sony Playstation 3 (PS3) Console

Not finding what you are looking for?

584 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Loading...