Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Subnet
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Determining the network prefix=== An IPv4 subnet mask consists of 32 bits; it is a sequence of ones (''1'') followed by a block of zeros (''0''). The ones indicate bits in the address used for the network prefix and the trailing block of zeros designates that part as being the host identifier. The following example shows the separation of the network prefix and the host identifier from an address ({{IPaddr|192.0.2.130}}) and its associated {{IPaddr||24}} subnet mask ({{IPaddr|255.255.255.0}}). The operation is visualized in a table using binary address formats. {| class="wikitable" style="margin:left;" ! ! Binary form ! Dot-decimal notation |- | IP address | <code>11000000.00000000.00000010.10000010</code> | 192.0.2.130 |- | Subnet mask | <code>11111111.11111111.11111111.00000000</code> | 255.255.255.0 |- | Network prefix | <code>11000000.00000000.00000010.00000000</code> | 192.0.2.0 |- | Host identifier | <code>00000000.00000000.00000000.10000010</code> | 0.0.0.130 |} The result of the [[bitwise AND]] operation of IP address and the subnet mask is the network prefix {{IPaddr|192.0.2.0}}. The host part, which is {{IPaddr|130}}, is derived by the bitwise AND operation of the address and the [[ones' complement]] of the subnet mask.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)