[Abstract] test your knowledge of IP addresses

Source: Internet
Author: User
Tags decimal to binary dedicated ip

Interview Question 1: Which of the following statements is true ().
A. Class C address is the IP address used by the LAN.
B. The network IDs of Class A addresses are 128
C. The network ID cannot start with a number 0 or 127
D. You cannot use all 0 or all 1 Host IDS.
Resolution:
This question is about the division and composition of IP addresses.
Option A indicates that the class C address is the IP address used by the lan. It must be incorrect because only the segment 192.168.0.0/16 in the class C address is used for the LAN, other IP addresses are still used for the Internet.
Option B also indicates that the network ID of address a is 128. Although the network ID of a Class address is only the first eight-bit group, and the first is fixed to 0, the remaining seven digits are theoretically 128 (27) at most ). However, if the first eight bits are all 0 (00000000), they cannot be assigned as IP addresses because they are network addresses. If the other eight bits are in the first eight bits, the last seven bits are all 1 (01111111) it cannot be assigned as an IP address because it is reserved for loop testing. Therefore, only 126 instances are available.
Option C indicates that the network ID cannot start with a number 0 or 127. This is exactly the unicast IP address addressing rule, so it is correct.
Option D indicates that the host ID cannot be all 0 or all 1, which is also the unicast IP address addressing rule, so it is also correct.
Answer: c d.
 
Interview Question 2: The following is a special address ().
A. 10.0.0.1 B. 172.31.254.1 C. 192.168.0.16
D. 172.33.25.220 E. 196.168.0.1
Resolution:
This question is the examinee's understanding of the three types of IP addresses used for the IP address segment of the LAN, which is also frequently obtained during the interview.
To determine whether an IP address is a dedicated IP address, you must check whether it belongs to the IP address segment of A, B, and C.
The IP address segment 10.0.0.0/8 (10.0.0.0, 255.0.0.0) belongs to a dedicated IP address. This is the address prefix representation, and the address segment is 10.0.0.1 ~ 10.20.255.254.
The address segment of Class B address 172.16.0.0/12 (172.16.0.0, 255.240.0.0) belongs to a dedicated IP address. This is the address prefix representation, and the other representation is 172.16.0.1 ~ 172.31.255.254.
The CIDR Block 192.168.0.0/16 (192.168.0.0, 255.255.0.0) belongs to a dedicated IP address. This is the address prefix representation, and the other representation is 192.168.0.1 ~ 192.168.255.254.
Compare the IP addresses in the above options to see if they are in the range of the above three private IP address CIDR blocks to quickly obtain the correct answer to this question.
Answer: a B C.
 
Interview question 3: the IP address reserved for the Self-loop test is ().
A. 164.0.0.0 B. 130.0.0.0 C. 200.0.0.0 D. 127.0.0.0
Analysis: This question is easy to get the correct answer, but it can only be memorized.
Answer: D.
 
Interview question 4: Convert 11100100.10011101.10011.111110011 to the dotted decimal format, and convert 235.168.20.12 address to the dotted binary format.
Resolution:
This is actually a problem of mutual conversion between binary and decimal. It is easy to get the correct answer if you have mastered the method.
The binary conversion method is to convert the values to decimal places to the power of two corresponding bits (the power of the digit is 0, add the power of 2 in each 8-bit group. For example, 11100100.10011101.10010011.111110011 in this question can be expressed:
1x27 + 1x26 + 1x25 + 0x24 + 0x23 + 1x22 + 0x21 + 0x20. 1x27 + 0x26 + 0x25 + 1x24 + 1x23 + 1x22 + 0x21 + 1x20. 1x27 + 0x26 + 0x25 + 1x24 + 0x23 + 0x22 + 1x21 + 1x20. 1x27 + 1x26 + 1x25 + 1x24 + 0x23 + 0x22 + 1x21 + 1x20
The result is as follows: (128 + 64 + 32 + 0 + 0 + 4 + 0 + 0 ). (128 + 0 + 0 + 16 + 8 + 4 + 0 + 1 ). (128 + 0 + 0 + 16 + 0 + 0 + 2 + 1 ). (128 + 64 + 32 + 16 + 0 + 0 + 2 + 1) = 224.157.147.243.
To convert decimal to binary, divide the corresponding decimal group by 2, and then sort the remainder from the back to obtain binary. If the remainder is less than 8 digits, add 0 to the front. For example, in question 235.168.20.12, divide "235" by the remainder of 2 (11-1), and then take the remainder from the bottom up to get 11101011, Which is exactly 8 bits, you don't need to fill the front with 0. In the same way, we can obtain the binary values of the following three groups: 10101000, 00010100, and 00001100. The binary value is 11101011. 10101000.00010100.20.1100.

Figure 11-1 binary conversions of 235
Answer:
The dot decimal representation of 11100100.10011101.10011.1110011 is 224.157.147.243, And the dot decimal format of 235.168.20.12 is 11101011. 1010101000.00010100.20.1100.
 
Interview question 5: expressed as 1080: 0000: 0000: 0000: 0008: 0800: 0514: 200C: 123a and 0000: 0000: 0000: a001: 0000: 0612: 421f two IPv6 addresses.
Resolution:
This is a question about IPv6 address representation. However, there are still few questions about this in the interview of network administrators. After all, IPv6 is not widely used yet.
When expressing and writing IPv6 addresses, use a colon to divide 128 bits into eight 16-bit segments. Here, the 128 bits indicate that an IPv6 address contains 128 binary numbers. After being converted to a hexadecimal number, each segment contains 4 hexadecimal numbers. In IPv6 address rules, you can use overlapping colons to replace 0 of the 16 consecutive bits (equivalent to 0 for each segment) in the address to reduce the number of digits, making writing and reading easier. This is the compressed zero representation.
For example, in the address 1080: 0000: 0000: 0000: 0008: 200C: 123a in this question, 0800: 1080: 0008: 200C: 123a is obtained after the address is compressed with zero.
But 0514: 0000: 0000: a001: 0000: 0000: 0612: 421f cannot be compressed with zero representation to get 0514: a001: 0612: 421f, instead of 0514 :: a001: 0000: 0000: 0612: 421f, or 0514: 0000: 0000: a001: 0612: 421f. Because the compressed 0 representation can only be used once in one address.
Answer:
1080: 0000: 0000: 0000: 0008: 200C: 123a and 0800: 0514: 0000: a001: 0000: 0000: 0000: 0612: the representation of the 421f IPv6 addresses in the compressed zero representation is: 1080: 0008: 0800: 200C: 123a and 0514: a001: 0000: 0000: 0612: 421f, or 0514: 0000: 0000: a001: 0612: 421f.
 
Interview question 6: The network ID and host ID of 172.16.49.31/16 are ().
A. 172, 16.49.31 B. 172.16, 49.31
C. 172.16.49, 31 D. 172.16.49.31, 172.16.49.31
Resolution:
This question describes the expression of the IPv4 address prefix and the understanding of the network ID and host ID. To express an IP address, you can use either the address + subnet mask or the address prefix. Otherwise, you cannot determine which network the IP address belongs, even more unable to know its network ID and host ID.
In fact, this is a very simple question. You don't need to calculate it at all. You just need to understand the meaning of the address prefix "/16. Because the network ID and host ID must be three standard IP addresses, the subnet address is divided because the network ID and host ID have an incomplete eight-bit group, therefore, it cannot be expressed in decimal format. Never complicate simple problems. In fact, this question is so simple.
The address prefix value represents the number of digits of the network ID in the address. In this question, "/16" indicates that the network ID of the IP address has 16 bits, and the first eight-bit group value of this IP address is 172, which is exactly within the B-class IP address range, therefore, 172.16.49.31/16 is a standard class B address. Therefore, it is easy to obtain that the network ID is 172.16 for the first two 8-bit groups, and the host ID is 49.31 for the last two 8-bit groups. That is, the correct answer to this question is B.
Answer: B.
 
Interview question 7: The network address of 125.3.54.56 without any subnet division is ().
A. 125.0.0.0 B. 125.3.0.0 C. 125.3.54.0 D. 125.3.54.32
Resolution:
As it has already been stated in the question that there is no subnet division, we only need to distinguish the three major IP address types A, B, and C. Because the network address is the IP address with the network ID unchanged and the host ID is all 0.
125.3.54.56 is a Class A address. In Class A addresses, the first eight-bit group is the network ID, and the last three eight-bit groups are the host ID. Set all the three eight-bit groups of 125.3.54.56 to 0 to obtain the network address 125.0.0.0.
Answer:.
 
Interview question 8: assume that an IP Address: 192.168.12.43 and the subnet mask is 255.255.255.128. The network address and broadcast address are respectively ().
A. 192.168.12.32 192.168.12.127
B. 192.168.0.0 255.255.255.255
C. 192.168.12.43 255.255.255.128
D. 192.169.12.0 192.168.12.127
Resolution:
This involves the division of subnets, because the subnet mask is 255.255.255.128, rather than the default subnet mask of the three standard IP addresses.
According to the subnet mask 255.255.255.255.128, it can be concluded that it is a new subnet formed by borrowing one digit from the host ID, because the subnet mask is the value where the network ID is set to 1 and the host ID is set to 0, the last eight-bit group here is 128, which is exactly the power of 2 of the highest 8th bits (27 ).
The network address is the binary logic and Operation Result of the IP address and subnet mask. The binary value of 192.168.12.43 is 111000000.10101000.20.1100.00101011. The binary value of 255.255.255.255.128 is 111111.11111111.111111.20.000. The network address is 192.168.12.0.
The broadcast address is the network address + the largest host ID. Note that the host ID is only the last seven digits. The broadcast address is 192.168.12.127.
Answer: D.
 
Interview Question 9: 172.16.10.32/24 represents ().
A. Network Address B. Host address C. multicast address D. broadcast address
Resolution:
This is the examinee's understanding of the IP address prefix representation.
"/24" indicates that the first 24 digits of the IP address are network IDs. According to the standard IP address classification, 172.16.10.32 is a Class B address. In Class B addresses, the network ID is the first 16 bits, so this is an IP address that has been re-divided by the subnet, and is exactly in the form of an octal Division (the last 32 is only the host ID ). It can clearly indicate a Host IP address, so the correct answer is B in the question.
In this question, the network address of the subnet where the 172.16.10.32/24 address is located is 172.16.10.0, and the broadcast address is 172.16.10.255. The Group plug-in address has a special address, which is in 224.0.0.0 ~ In the range of 239.00000000255.
Answer: B.
 
Interview question 10: Calculate the subnet network address and broadcast address with the IP address 15.16.193.6 and subnet mask 255.255.248.0.
Resolution:
Although this question is the same as the previous one, it involves both the network address and broadcast address, but it is much more difficult, because it is not the entire 8-bit group, this can be obtained from the subnet mask 255.255.248.0.
According to the IP address 15.16.193.6 and subnet mask 255.248.0, this subnet is a subnet formed by taking 5 digits in the 3rd eight-bit group. Because the binary value of the 3rd eight-bit group 248 in the subnet mask is 11111000.
The network address is the result of the value corresponding to the binary bit of the IP address and subnet mask. Therefore, the IP address and subnet mask are converted to binary values, and then the logic and operation are performed. The formula is as follows:
20171111.0002.16.11000001.00000110
. And 11111111. 11111111. 11111000.00000000
0000111. 0002.16.11000000.00000000
The network address is 0000111. 00010000.11000000. 00000000.. After the address is converted to the dot decimal number, 15.16.192.0 is obtained.
The broadcast address is obtained by adding the largest host ID to the network address. The host ID involves 3rd and 4th eight-bit groups. You can directly convert the network address in the binary format. In the network address binary format, set host ID to 1 to broadcast address. Because the network address is 0000111. 0002.16.112.1600.00000000: set all the three and 3rd eight-bit groups in the third eight-bit group to 1. If the other values are the same, the broadcast address is 4th. 0002.16.11000111.111111. After it is converted to the dot decimal number, 15.16.199.255 is obtained. This is the broadcast address of the subnet.
In fact, the broadcast address can also be obtained through another layer of its relationship with the network address, that is, the broadcast address of the previous subnet is the previous address of the network address of the next subnet. We have obtained that the network address of this subnet is 15.16.192.0 and that its subnet mask is 255.255.248.0. Therefore, the last non-full 0 8-bit group in the network address is 248, it is 8 different from the maximum value of 256. Therefore, in the network address of the next subnet, the value of the Eight-bit group should be a multiple of 8 (the value of the Eight-bit Group of the subnetwork is 192, is also a multiple of 8 ). The current IP address is 15.16.193.6, so the number of 3rd 8-digits in the network address of the next subnet must be greater than 193. In addition, if it is a multiple of 8, the nearest number is 200, in this way, the network address of the next subnet is 15.16.200.0, and the previous IP address is 15.16.199.255, which is the broadcast address of the previous subnet of 15.16.200.0.
As long as you understand the principle, it is very simple, because you can obtain the multiples of the next subnet network address based on the subnet mask, that is, the difference between the decimal value of the last Non-all 0 8-bit group and the maximum value of 256 in an 8-bit group. In this example, the difference between 248 and 256 is 8.
Answer:
The IP address is 15.16.193.6, And the subnet mask is 255.255.248.0. The subnet network address and broadcast address are 15.16.192.0 and 15.16.199.255, respectively.
 
Interview question 11: Convert the 172.28.20./ 20 prefix address to the dotted-decimal format, and calculate the available IP address range and number.
Resolution:
This question is the examinee's understanding of the IP address prefix representation.
The dot-decimal representation is actually in the decimal format of IP address + subnet mask.
172.28.htm/20 indicates that the first 20 digits are the network ID, and the last 12 digits are the host ID. The network subnet mask represented by this address is 11111111.11111111.11110000. 00000000. After being converted to decimal, The 255.255.240.0 is obtained.
In this way, we can obtain the decimal representation of 172.28.133/20 in the form of 172.28.133 and 255.255.240.0.
Then, based on the above results, the network address and broadcast address of the subnet are obtained according to the method described above: 172.28.0.0 and 172.28.15.255.
Finally, obtain the address range and number based on the network address and broadcast address.
The IP address range for the host is 172.28.0.1 ~ 172.28.15.254, the total number is 16 (the last 2nd 8-bit groups are from 0 ~ 15) × 254 (number of all available Host IP addresses in the last 1st 8-bit groups) = 4064. This is the number of available IP addresses.
 
Answer:
The available IP address range of this subnet is 172.28.0.1 ~ 172.28.15.254, the number of available IP addresses is 4 064.
 
Interview Question 12: Each subnet in the 192.168.2.16/28 subnet can accommodate a maximum of () hosts.
A. 16 B. 8 C. 15 d. 14 E. 7
Resolution:
To calculate how many hosts can be accommodated, you need to know the subnet mask of the subnet. Because the number of hosts can be obtained from the number of Host IDS in the subnet mask.
192.168.2.16/28 is a subnet allocated to 4th eight-bit groups by four digits (because the three eight-bit groups have a total of 24 digits ). The subnet mask of this subnet is obtained in binary format:
11111111.111111.1111111111.11110000
The subnet mask of the subnet is obtained after being converted to the dotted-decimal format.
The preceding vertex-Based Binary subnet mask shows that the host ID in the subnet has only four digits. The maximum number of IP addresses is 24 = 16. However, this includes the subnet network address and broadcast address. In fact, there are only 14 IP addresses available for the host, that is, answer D.
Answer: D.

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/lycb_gz/archive/2008/09/17/2942669.aspx

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.