IP address

xiaoxiao2021-03-06  80

[Network Basics] == - IP Address Dressing - == Why do we have to learn two? Oh, it is not a dead stupid computer. It only knows 0 and 1. So we have to communicate with the computer. . When the computer is to process IP operations, it is finally carried out in a binary. The rules of our human beings are in the 10th, which is from 0 to 9 to return to zero. When we go back to zero, the Bit and BYTE we discussed earlier are the eight-in-one, 0 to 7 is a circle. Zero will enter a number of sixteen bits from 0 to 15 back to zero one, but use numbers 15 easy and ten in-one, in the sixteenth to 15, from 10 to 15 Letters A to F instead, so we usually see the hexadecimal arrangement from 0 to F. I know that the above arithmetic rules I believe that it is not difficult to understand that the second bind is not even the same. From 0 to 1 to a circle back to 0. Then let's take a look at the comparison between the seventeen continuous increasing ten-in-one and sixteen-in-one numbers will be such a ten into the second bin. 10 2 3 11 3 4 100 4 5 101 5 6 110 6 7 111 7 8 1000 8 9 1001 9 101010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F 16 10000 10 If you want to carry out two-in-one and ten-in-one conversion in the list Finding the corresponding number is the easiest way, but as you have just seen the sixteen numbers have such a long list, if you want to find thousands of numbers, it is not easy. However, we see the ten-in digits that we see on the IP address will not exceed 255 values. We can first list 27 26 25 24 23 22 21 20 128 64 32 16 8 4 2 When we have to change the ten in two, we will find the column corresponding to the number. Bit (the method is to find the two values ​​of the fields and take the right) Fill in the opposite fields 1 and then continue to look for the next column and then fill in 1 until the rest of the number, fill in the other fields. It is possible to get on. For example, we have to convert the 220 10-in-one digits to the binary we found 128 this column is the most suitable (because the left side of the 128 is 256, 220 is demonstrated between them, the right is 128). Then we fill in the 128 column 1 Continue the remainder 92 We found 64 this column is the most appropriate, then in the 64 field, 1 Continue number 28 We found 16 this column is the most suitable in 16 This field is also filled in 1 Continue number 12 We found 8 this column is the most appropriate, then fill in the 8 fields, 1 Continue number 4 We found 4 this column just right, this is, it is best to find the situation. Then, in the field, it is also filled with 1 because there is no other than the other to fill in 0 is right. The result is as follows 128 64 32 16 8 4 2 1 1 0 1 1 0 0 If we want to convert the binary conversion into a 10-in-one column, it is more simple to make the binary number from the right left order. The sum of the numbers that will be added to the number of 1 will be fill in the field. Of course, this is a manual method. If you have a binary counter or use the WINDOW's small abacus for conversion more easy. If you still don't know how to use Windows's small calculation, you can use the "Start / Program / Accessible Application / Small Occup" and pull down the "View" menu to determine "Engineering" has been selected and click " Ten Granses "Enter the value to click" Two Get "to get the conversion value. The logical operation logic is a compulsory unit of Microcomputer ArchitaRe. We only need to know a few of the most basic operations, you can have an AND one or there. One is Not. Only the same results in the two parties participating in the binary and the two parties are the same (0 or 1), otherwise it is 0, which is only one 1, and the result will be 1 otherwise 0. Its situation is 0 and 0 = 0 1 and 1 = 1 0 and 1 = 0 Here you can't figure out that there is a 1 participating and the results will be the other party (regardless of 0 or 1), and everything with 0 participation is an operation. The result will be 0. There is only one part to 0 in the binary OR operation. Otherwise, it will be 1. Its situation is 0 or 0 = 0 1 or 1 = 1 0 or 1 memory method Anyone who has 0 participated in the operation has the other party and as long as there is 1 participating OR operation, it will be 1.

The easiest way to operate in NOT is involved in the result of NOT. NOT 0 = 1 NOT 1 = 0 As for other NAND or NOR operations, only NOT and AND AND NOT and OR are compiled together. I know the IP address. After a round of "brainwashing", we finally talked about the IP address. If your machine is now connected to the Internet and uses the IP protocol (I think you should do this, otherwise, how to see my article). I assume that you are using the Windows system. So now, please press "Start" and "Execute", please use the keyboard to enter "Winipcfg" and "OK". At this time, you should see a window running out and displaying the IP number currently used by your machine on the "IP Address" section. Perhaps a group of numbers such as 139.175.152.254 However, what do you mean about the representative of this group? If I can say that I can say this is the IP number of B Class and I belongs to Seed.net Road. How can I know Haha Waiting for your article? You can also tell me more IP class and identification code as the IP address you have seen is "." Separate ten-in number. We call each set of numbers. The format such as "OCTET" is called "dotted quad". In fact, each group is an 8-bit-binary number (using a 10-input habit of being able to move to human habits) is a 32-bit IP address is also an IP V4 (Version 4) version of the address. IP V6 (IP address using 128-bit) is also like a fire. If you remember that the IPX address mentioned in front of the Internet is discussed, you should know that the INTERNAL address is used to identify the host and the External address is used to identify the network. The IP address actually there is such a function only to place the identification code of the network and the identification code of the host on a single IP address. However, let us know the classification of the IP address before distinguishing between NET ID and HOST ID: If we use the IP address to be expressed in two bits, each OcTet is 8-bit if it is not 8-bit, Fill in the left of 0 until it is full. At this time, you look at the leftmost number is what is the beginning of the "0". This IP starts with "0" is a Class IP if it is "10" this is a b class IP if it is "110" is the beginning of the IP of class, I know why we learn the second-in-one in the beginning, if you don't know how to convert you, you can still die from 1 to 126 IP is a class of 128 to 191 The beginning of the IP is B class and then starts with 192 to 223 for C Class. Obviously, it is easy to see IP Class to identify IP Class. You don't think it is good. After we know the Class of the IP, we can know the IP NET ID and HOST ID A class's IP use of the first set of numbers. Make net ID The rest of the three groups of Host ID b class IP uses the front two sets of numbers to do the NET ID, the other two groups do the Host ID C class IP uses the front three sets of numbers to do the NET ID. The remaining group is from the Host ID In the figure below, you can easily distinguish between three different IP classs, why we need to divide the IP level, this is for the original IP management needs. If you want to form a single IP network, then you have to assign the same NET ID to all hosts and each host's Host ID must be unique, saying that no two host IDs will be the same. Your network also wants to connect on the Internet or other network, then the NET ID you use must also be unique. Otherwise, it will cause a sudden. It is better than your phone number if it is 1234567 (Host ID), others will not use this number in the same area number (NET ID), but you don't keep it in other area prices, there are 1234567 this number, but if Taipei is used Don't use 02 in Area Code 02. No matter how the entire area number is added, it must be unique. The same truth must be unique on the Internet. There is a very special NET ID 127 (ie, the binary 0111111) is to reserve it to the host loop test it cannot be applied to the actual network. In addition, there is a rule that we must also comply with the two-in-one when the Host ID is specified, can not be all 0, and it is not all 1.

When the Host ID is 0, it refers to the network itself identification code and the address of the broadcast packet is transmitted to the entire domain broadcast address. It is clear that a Class network can be allocated Host ID is more than how much more than C Class. Let us calculate the number of NET IDs that can be divided and the number of Host ID inside each level will know because a class first bit must be 0, so we have only 7 bit of 8 BITTECTs in the head. . Then 27 = 128 minus 0 and 127 this NET ID can not be used. Then we can actually only divide 126 A Class's network. Each A class of the network can be assigned a 24 (the number of HOST IDs that can be used), that is, 16,777,216 HOST IDs, because the binary number cannot be all 0 or 1, so actually available The host has only 16,777,214. Because C Class is subtracted from 110 to minus 3 BIT, it can be divided into 21 (24-3) of 2 21 (24-3), which is 2,097,152 NET IDs and then each Class C can be divided. 28 = 256 - 2 = 254 Host ID. Ok, try this yourself to calculate how many NET IDs and each NET ID can be divided? *** OST ID Number. (TIPS should not forget that the ID cannot be 0 or 1). Then come to the list of the list of lists, the number of hosts, the number of hosts, using the number of applications A 0 126 16, 777, 214 1.xxx to 126.xxx national B 10 16, 384 16, 382 128.xxx to 191.xxx multinational organization C 110 2,097,152 256 192. XXX to 223.xxx Enterprise Organization D 1110 - - 224.- to 239.- Special Use E 1111 - - 240.- to 255.- Retaining Messing Net Mask We have to know Net Mask (network mask or Weighten a network mask). Here, I have to explain one thing to everyone, IP and Net Mask must be a pair of IP and Net Mask when we use the IP address division, but we can use when we use the level IP address. The preset Mask is like a Class of Mask is 255.255.0.0.0.0.0.0.0.0. This means, see 255 is more difficult to understand if you convert it to the binary, it is easy to understand 255 = 11111111 (8 1). Then when you look at these Net Mask and the grade IP, you will find a phenomenon ~~ Any IP part corresponding to 1 is that NET ID is why the corresponding part of 0 is Host ID Haha ~ ~ It should be a worthy discovery ~~~ I think your mood is not Ya's original Columbus to send the American continent. However, since we have already divided the level, we use the mask, we don't use it. Ok, oh ~~~ You are so smart and admire admire, but you don't forget the computer is a stupid and stupid machine. Please tell me how the computer recognizes the NET ID and HOST ID. Will not Let me tell you how to remember the logical operation of And and Not. If I forgot to turn over the tutoring, I will see it. When the computer gets a pair of IP and Mask (both binary numbers), the computer first uses an operation to use an operation to find the NET ID.

You can take the IP of your own computer to make us more than the IP you have seen in Winipcfg 139.175.152.254 is converted to the second part is 10001011.10101111101101011.1010111110 (At this time, you should know why I said that I said this is A b class IP is still not known to see what the first two bits is what this class is preset. .00000000.00000000 derived from 10001011.10101111.00000000.00000000 to change to ten into a bit is 139.175.0.0 This is NET ID. So how do you ask a Host ID? You can get Net Mask to make a NET Mask can get 00000000.0000000000.1111111111111111111 and then then do an AND operation to get a Host ID: 00000000.00000000.0110101011111110 Change to a decimal part of 0.0.152.254 . Simple, is it haha ​​~~ I see you smashing it ~~~ Don't worry about more IP examples to operate, you have to worry. There is also a way you need to specify the broadcast address (Broadcast) in addition to entering an IP address NetMask network address when we set up a network environment. I already know that if the Host ID is 0, it is a network address, and all of them is a broadcast address. In fact, the broadcast address can also get a first Net Mask do NOT operator can be drawn 00000000.00000000.11111111.11111111 IP and then do a OR operation can be obtained through a simple arithmetic Broadcast Address: 10001011.10101111.01101010.11111110 OR 00000000.00000000.11111111.11111111 come 10001011.10101111.11111111.11111111 It is 139.175.255.255. However, I always feel that there is a little improper because many nets have a certain node limit, such as Ethernet, usually connect up to 1,200 hosts. If you get a b class ID, don't you waste a lot of Host ID? Using a class is even more horrific. Sub-net mask is sent to the use of this "troubles of rich people". If you have just thought that the preset Net Mask is how much, then when you know the Sub-Net Mask's function, I dare to pay you no longer ignore Net Mask. The use of Sub-Net Mask is to use "borrow" or can be said to be "robbing" is from left to right. Some bits will be converted to the Sub-Net ID of the Host ID. That is, the "1" of the preset Net Mask has gradually increased the "0" of the "0" of Net Mask's "0". Such a result is of course possible to get more NET IDs to change a sentence you can divide a large IP network into more subnets and the number of hosts of each subnet is correspondingly reduced. Its situation will be to cut two (2 1 = 2) subnet if you borrow a Bit's Host ID to do a Sub-Net ID (2 1 = 2) Subnet If you use 2 bits, there are 4 subnets 3 Bit 8 4 bits 16 ..... When all Host IDs are borrowed out, you can get the maximum number of subnets but this is meaningless because there is no Host ID. How do you assign IP? Give the host, if your host ID is left, only one bit is not borrowed out, then you can only get 0 and 1 to the host ID, because these two IDs can not be used to assign Host. When you cut the network, you have to leave 2 bits to do the Host ID. This time you can only connect up to 2 hosts. (咦 22 is not equal to 4, but don't forget Host_ID can't be two 0 or Two 1 oh). Such a network is usually used in a router between the WAN and the LAN.

The applications in the LAN are usually at least 3 Bit to do Host_ID. In order to better understand the use of Sub-Net Mask, we still take a look at the Net Mask we know in the preset situation. 11111111.11111111.00000000.00000000 If we borrow Host ID Three of the three Bit let the original NET Mask and Sub-Net Mask will make an OR of the operation 11111111.11111111.00000000.000000000000000000.00000000000000000000000000 20000000.00000000 derived 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000.000000) It is such 255.255.224.0. Because only 3 BIT borrowed, cut into 8 subnets and their SUB-NET IDs added from 000 to 111. The original NET ID (100011111111.00000000.00000000) actual number of subnets Net ID has become 10001011.10101111.00000000.00000000 (139.175.0.0) 10001011.10101111.00100000.00000000 (139.175.32.0) 10001011.10101111.01000000.00000000 (139.175.64.0) 10001011.10101111.01100000.00000000 (139.175.96.0) 10001011.10101111.10000000.00000000 (139.175.128.0) 10001011.10101111.10100000.00000000 (139.175 .160.010101111.11000000.00000000 (139.175.192.0) 10001011.10101111111100000.00000000 (139.175.224.0) This time is the 16 BIST ID only 13 Bit is that only 2 in each subnet can only have 2 13 = 8, 192 - 2 = 8,190 Mainframes and their assignable numbers are between 00000.00000001 to 11111111111110, respectively. But we don't simply express it from 0.1 to 31.254, which we have to add each other Sub-NetID to the final IP number. The host number under Sub-Net ID 001 will be between 00100000.00000001 to 00111111.1111110, from 32.1 to 63.254, from 139.175.32.1 to 139.175.63.254. The host number under Sub-Net ID 100 will be between 10000000.000000001 to 10011111.11111110, is between 139.175.128.1 to 139.175.159.254 from 128.1 to 159.254. Understood it ~~~~ Headache yeah ~~~ Don't Complaint ~~ Yourself calculate the host number under the 110 Sub-Net ID is how much if your answer is not 139.175.192.1 to 139.175 .223.254 Then you need to leave the screen for a while to breathe the air (don't smoke) and then go back to see a few paragraphs in front of 5 minutes. When you reread, you must make sure that every concept is clearly read. Of course, you say that there is nothing to give up, anything, anyway, you will not deduct your money ~~~ IP actual use is good here, let us pay more about the above, the IP level, the beginning of the two bits, 010110, ABC grade IP is divided into two NET IDs and HOST IDs.

Preset Situation A Use the first OTECT to use three OTECT to use three OECT and do the Host ID; if you specify the NET ID and HOST ID, it is not possible. All 0 can not be 1 and the entire IP address must be unique NET Mask to calculate the NET ID and HOST ID to draw the IP and MASK with and the AND operation can be obtained by the NET ID. Mask first pass the NOT operation. IP Making the AND operation can derive the Host ID sub-net mask is "borrow" Host ID to use rules from left to right to cut a large number of networks into multiple smaller network. When IP is displayed, it must be added with the SUB-NET ID to be represented by a complete OTECT. Setting rules When we set the IP network, if you want to communicate directly, you have to use the same NET ID and different Host IDs. If you want to use a different NET ID (such as sub-net division), Host's host between the NET IDs can be successfully interoperable. When the computer is concluded by the AND operation, it will check if the source NET ID and the destination NET ID are consistent. If the package can be passed directly to the other party, otherwise, the package is passed to the Router or Default Gateway. I will in the future ARP and RIP will tell. Also, if you use Sub-Net technology to be very careful when assigning an IP address, it is very careful to avoid IP beyond the subnet and cannot communicate. For example, in the case where there is no division (for example using 255.255.0.0 Mask) 139.175.31.254 and 139.175.32.1 are all in their IP packets within the same network without ROUTER, but after borrowing After the three Bit subnets (Net Mask became 255.255.224.0) They were separated within two IP networks, they must use Router to pass the package. At the same time, some effective IP addresses have been used after Sub-Net to become all 0 or 1, which cannot be allocated to the host, for example, 139.175.63.255139.175.64.0, etc. (If you don't understand why it will be changed to a binary and then find out that the number of Host ID part after the subnet is cut, it is clear.) So when we design the network at the beginning, we have to have the responsibility And the distance will be divided into subnets early. Otherwise, all machines have set good and operated for a period of time, it will become abundant. If you want to redistribute the plan, what you do, and the visible problems encountered, and the problem is more than a hundred times big, the more you have, the more you want to reserve IP. When we have to connect the Internet, we must A first book Net ID If the ID has been used, you must use another ID. The institution responsible for the Internet IP book is called the Internet (NetWork Information Center) their network address is http://www.internic.net. Due to the Internet's explosive growth IP address, there is also a need to use the IP address of the book in many institutions. So we used the three levels of the three levels that were reserved to the private address for private sites. They were 10.0.0.0 - 10.255.255.255 172.16.0 - 178.0.0 - 192.168.255.255 Of course, the routing information of the limited private address cannot be spread out using private address as a source or destination address. The package cannot be transferred to a reference record for private address (such as DNS). Online network Road use However, it is precisely because of these restrictions When we use these private locations to set a network, there is no need to worry about the same address and other networks that use the same address. This gives us a big convenience for our IP network, for example, even if your current company has not even connected to the Internet but not in the future. If you use the public IP, if you don't have a book, you will be very likely to stand with others when you have access to the Internet. It is also a problem that IP is very headache if the previously analyzed IP is again replaced. At this time, we can use the private address to erect the network. When you want to connect to the integrating, we can use the IP conversion protocol such as NAT (Network Addresss Translation) to cooperate with the number of IPs.

转载请注明原文地址:https://www.9cbs.com/read-108726.html

New Post(0)