IP address, subnet mask, network number, host number, network address, host address

Source: Internet
Author: User

IP address, subnet mask, network number, host number, network address, host address

IP Address: 4 Paragraph decimal, a total of 32 bits binary, such as: 192.168.1.1 binary is: 11000000|10101000|00000001|00000001

The subnet mask shows how many bits are network numbers and how many are host numbers: 255.255.255.0 binary is: 11111111 11111111 11111111 00000000

Network number 24 bits, that is all 1 host number 8 bit, that is all 0

129.168.1.1/24 this, 24 is to tell us that the network number is 24 bits, also is equivalent to tell us the subnet mask is: 11111111 11111111 11111111 00000000 namely: 255.255.255.0

172.16.10.33/27 in/27 that is, the subnet mask is 255.255.255.224 27 full 1, 11111111 11111111 11111111 11100000

One, according to the IP address and subnet mask to seek network address and broadcast address:

The IP address of a host is 202.112.14.137, and the mask is 255.255.255.224, which requires computing the network address and broadcast address of the network where the host resides.

1, according to the subnet mask can know how many bits of network number, the host number is how many bits!

255.255.255.224 Turn binary: 11111111 11111111 11111111 11100000

The network number has 27 bits, the host number has 5 bits

The network address is: Turn IP address into binary and subnet mask for and operation (logical multiplication: 0&0=0;0&1=0;1&0=0;1&1=1)

11001010 01110000 00001110 10001001

IP Address & Subnet mask

11001010 01110000 00001110 10001001

11111111 11111111 11111111 11100000

11001010 01110000 00001110 10000000

namely: 202.112.14.128

Broadcast address: The host bit of network address has 5 bits all become 1, 10011111 is 255 namely: 202.112.14.159

Number of hosts: 2^5-2=30

Second, according to the number of hosts per network subnet address planning and calculation subnet mask. This can also be calculated in accordance with the above principles. For example, if a subnet has 10 hosts, the IP address required for this subnet is:

10+1+1+1=13
Note: The first 1 plus refers to the gateway address required for this network connection, and the next two 1 refer to the network address and broadcast address respectively. Because 13 is less than 16 (16 equals 2 of 4), the host bit is 4 bits. and
256-16=240
So the subnet mask is 255.255.255.240.
If a subnet has 14 hosts, many people often make the mistake of still allocating a subnet with 16 address space and forgetting to assign an address to the gateway. This is wrong because:
14+1+1+1=17
17. Greater than 16, so we can only allocate subnets with 32 addresses (32 equals 2 of a 5-square) space. At this point the subnet mask is: 255.255.255.224

Third, the IP address is 128 36 • 199 3 Subnet mask is 255 255 • 240 0. Calculate the network address, broadcast address, address range, number of hosts.

1) Convert IP address and subnet mask to binary, subnet mask continuous 1 is the network address, followed by the host address, the dotted line before the network address, dashed after the host address
2) The IP address and subnet mask are performed and calculated as a result of the network address
3) The network address in the result of the operation is unchanged, the host address becomes 1, the result is the broadcast address
4) address range is all hosts included in this network segment
Network Address +1 is the first host address, broadcast address 1 is the last host address, which can be seen
Address range is: Network address + 1 to broadcast address-1

128.36.11000111.00000011

&255.255.11110000.00000000

128.36.11000000.00000000 that is: Network address 128.36.192.0 broadcast address: 128.36.11000000.00000000 the host bit 12 0 into 1 to:

128.36.11001111.11111111 namely: 128.36.207.255
The network range for this example is: 128 36 • 192 1 to 128 36 207 254
5) Number of hosts
Number of hosts =2^ bits number of hosts-2
Number of hosts =2^12-2=4094
Minus 2 because the host does not include network addresses and broadcast addresses.
From the above two examples can be seen whether the subnet mask is standard or special, computing network address, broadcast address, address number as long as the address is converted to binary, and then from the subnet mask to clear the continuous 1 is the network address, after the host address for the corresponding calculation can be.

Four, 206 110 4 0/18 are divided into 16 subnets, each subnet mask?

(Divided into 16 subnets, according to the subnet mask/18 means there are 18 1, the IP address from the host bit to borrow 4 bits to use as a network bit!) )

Subnet mask is 255.255.252.0

The number of hosts that each subnet can hold is 1024 units.

Detailed Answer:

206.110.1.0/18 by the last one/18, we can know that this IP has specified its network bit is 18 bits, its default subnet mask is 11111111.11111111.11 | 000000.00000000 (where 1 represents the network bit, 0 is the host bit)

We can see that the number of bits we can manipulate is the next 14 0, that is, we can divide the ground into several network bits as subnets, and then divide the subnets. The requirement is to cut into 16 subnets, we know that 2 of 4 is exactly equal to 16, which means that the number of bits in the subnet network is 4 bits, and that 14-4=10 is the host bit of the subnet. So the string of binary that I wrote above can become: 11111111.11111111.111111 | 00.00000000 (where 1 represents the network bit, 0 is the host bit)

The conversion to decimal is: 255.255.252.0 The number of hosts per subnet is 2 10 minus 2, or 1022 (all 0 all 1 removed)

IP address, subnet mask, network number, host number, network address, host address

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.