PrefaceThis document is simply a logical algorithm, and how to compute network bits, host bits, and broadcast addresses in the case of known IP addresses and subnet masks. All steps are far from the most primitive binary way, the direct hit principle, please read carefully.1. Logic algorithmLogic and operations and logic or operations are used when computing network bits, host addresses, broadcast addresses
IP address, subnet mask, default gateway, what does the DNS server mean? IP address, subnet mask, default gateway, what does the DNS server mean?(a) problem analysis001. Q: IP address,
Tutorial on TCP/IP Subnet Mask
1. Default class A, B, and C addresses, subnet mask;
Ii. Role of subnet mask:
Code:IP address 192.20.15.5 11000000 00010100 00001111 00000101Subnet
Tutorial on TCP/IP Subnet Mask
1. Default class A, B, and C addresses, subnet mask;
Ii. Role of subnet mask:IP address 192.20.15.5 11000000 00010100 00001111 00000101Subnet Mask 255.255
Subnet Mask and IP address calculation network address and broadcast address conversion
IP Address: 202.112.14.20.Subnet Mask: Too Many Subnet MaskWhat is the network address a
IntroductionThis article describes what the IP address and its function and IP address composition, IP address classification, IP subnet partition, subnet mask, public address, private
What is an IP addressThe so-called IP address is a 32bit address assigned to each host connected to the Internet. In accordance with the TCP/IP protocol, IPs are represented by binary, each IP address is 32bit long and bits are converted to bytes, which is 4 bytes. For example, a binary form of the
Not much to say, directly on the code.
Package com.ckw.test;
Import Java.io.BufferedReader;
Import java.io.IOException;
Import Java.io.InputStreamReader;
Import java.util.*;
Import Java.util.Map.Entry;
public class Testofsubnetmask {map
The results are:
---------------------------------------------------------------Windows IP Configuration host name ............. : DADI primary DNS suffix ........... : node type ............: mixed
The Ip2long IP address is converted to an integer type.Long2ip integer data is converted to IP. The subnet mask is converted to a mask length mode:$slash _notation = strlen (Preg_replace ("/0/", "", Decbin (Ip2long ($subnet _mask)
The subnet mask is used to determine whether the IP addresses of any two computers belong to the same subnetwork.
The simplest understanding is that after the IP address and subnet mask of the two computers perform the and operat
IP address and subnet mask used for computingAfter knowing the IP address and subnet mask, you can calculate:1. Network Address2. broadcast address3. Address range4. Several hosts on this websiteExample 1: the
represents the different hosts within the network segmentAttention:Private IP is an IP address that everyone can access for use in the intranet.Let's explain what a subnet mask is, why put this concept with an IP address? Remember that because the
The subnet address and broadcast address are not given directly because the condition is given precedence. However, these two parameters require that we use the IP address and subnet mask to derive the subnet address and broadcast address. Ideas are as follows:1. The
method One:
First locate any other networked computer on the same LAN, and then double-click the Local Internet Protocol (TCP/IP) entry, and fill in the default gateway and subnet mask inside the computer.
Method Two:
1, find the same LAN other normal operation of the computer, click on the Win+r key combination, in the pop-up dialog box directly input cmd,
There are two ways to compute the subnet mask:
Method One: Use the subnet number to calculate:
1. First of all, the number of subnets from the decimal number into binary number;
2. Then, the number of digits of the binary number obtained by the statistic is set to n;
3. Finally, the subnet
/** * Get broadcast address * */public static String getbroadcastaddress (string subnet, string IP) {string[] ips = ip.split ("\ \."); string[] subnets = subnet.split ("\ \"); StringBuffer sb = new StringBuffer (), for (int i = 0; i Get the Java implementation of the broadcast address based on the IP address and subnet
IP address and subnet mask
1. IP Address:The Internet is formed by the interconnection of different physical networks. The computer communication between different networks must have a corresponding address ID, which is called an IP address.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.