In order to learn more about the TCP/IP protocol, I have read a lot of relevant information recently and collected the following records for later use and convenience:
What does IP address, subnet mask, default gateway, and DNS server mean?
(1) Problem Analysis
001. Q: What is the difference between IP address, subnet mask
and one to distinguish between.
According to 255.255.0.0 (11111111,11111111,00000000,00000000), the front of the 16-bit is the network number, according to the subnet mask is based on the longest match, then now in the 17-bit 0 and one-zone divided into two. Then you can divide the
places, while the number of hosts is too small, therefore, the host addresses it provides become increasingly scarce. Currently, in addition to using NAT to allocate reserved addresses within an enterprise, a high-category IP address is usually further divided, to form multiple subnets, which can be used by different user groups. This is mainly to effectively use the IP address in the case of network segmentation. By taking the high part of the host number as the
All the calculation and application of the subnet mask are based on the binary, so we should focus on the binary form of The netmask. Generally, we can view the IP attribute in decimal format. in order to make it easier for users to watch, in fact, computers use binary methods to calculate and use subnet masks,
A common IP address is composed of a network ID and
host bit 1 address, representing the broadcast of this network, such as 192.168.1.255/24 (/24 indicates that the network bit is 24 bits, That is, the subnet mask is 255.255.255.0)B. Private IP AddressRFC1918 set three private address, as an internal network use, divided into three categories: Class A: 10.0.0.0-10.255.
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, subnet mask, default gateway, DNS server, wha
own gateway, and then the gateway forwards the data packet to the gateway of Network B, the gateway of Network B is then forwarded to a host of Network B. The same is true for packet forwarding from Network B to Network. Therefore, only the IP address of the gateway can communicate with each other through the TCP/IP protocol. Which machine is the IP address? The IP address of a gateway is the IP address of a device with the routing function. A device with the routing function has a router and a
A few words to master subnet mask, IP address, host number, network number, network address, broadcast address1, 191.172.16.10.33/27 in the/27 that is, the subnet mask is 255.255.255.224 that is 27 full 12. From the subnet mask 25
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)));$bits =strpos (Decbin (Ip2long ($mask)), "
Subnet Mask and IP address operation subnet mask: function: divide an IP address into two parts: network address and host address. Once the subnet mask is set, the network address and host address are fixed. Calculation: Convert t
number.
In this way, the purpose of dividing subnets is achieved.
In this case
Because we need to divide two subnets
Then you need to expand a single bit to indicate the network number.
The remaining part must be able to represent the machine number.
Like this, you must ensure that there are six digits behind it.
The first two digits are used to differentiate subnets.
The first two and three bytes represent a
The IP address consists of 32 bits, divided into four segments, consisting of a network number and a host number. Also divided into a b C D e Five address, where a B class C address for distribution to the global network users, D E class is a special address.1, Class A address 1.0.0.0 to 126.255.255.255Only the first paragraph is the network number, and the remaining three paragraphs are the host number. In binary notation, there are 8 bits, or one byte is the network number, and 24 bits, or thr
Subnet Mask calculation:
Decimal Turn binary:Decimal:23-> 111,010 Binary2|23---12|11---12|5---12|2---02|1---10Move the remainder from bottom to top, from high to Low: 10111
Binary goto decimal:Binary:11011-> 272 binary system1 (24) + 1 (23) + 0 (22) + 1 (21) + 1* (20) = 16 + 8 + 0 + 2 + 1 = 27From right to left, 2 of the N power operation, n increments from 0, and then multiplies each
Because to do the static address configuration JS Check, find a lot of information found on the internet is about ip,mask validity check, no ip,submask,gateway logic judgment, write down the code for the needs of people reference.Popularization of Gateway address knowledge:is to proceed with the operation 1 with 1 with a 0 for 0,0 and 0 for 0. First, the IP and subnet masks are expanded 10.70.64.223
Because to do static address configuration JS Check, find a lot of data found online are about ip,mask validity check, no ip,submask,gateway logical judgment, write down the code for the needs of the people reference.
Popularization of Gateway address knowledge:
1th: Proceed with the operation 1 with 1 1,1 with 0 for 0,0 and 0 for 0. First, expand the IP and subnet masks10.70.64.223 00001010.01000110.0100
1. How many subnets will be generated
The X power of 2-2 (X represents the mask bit, that is, the part of the binary system that is 1. In the current network,-2 is no longer required and can be used in all, however, you need to add the corresponding configuration commands. For example, you can use all the commands by adding the IP subnet zero command to the Cis
Write the code in half yesterday, suddenly thought, before the test is manually input subnet mask, so think how to automatically get the subnet mask, so on Google, found that there is really something, maybe I am more stupid, can not understand other people's Code, Also because the code found rarely commented (this may
networks.4. Class DClass D addresses start at 111 0. This represents a eight-bit group from 2 2 4 ~ 2 3 9. These addresses are not used for standard I P addresses.Instead, a Class D address refers to a set of hosts that are registered as members of the multicast team. Multicast teams and emailThe allocation list is similar. Just as you can use the Assign list to publish a message to some people, you canMulticast addresses send data to some hosts. Mul
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.