<>IP the address is ? effect

IP the address is IP A unified address format provided by the protocol , It assigns a logical address to each network and host on the Internet , To shield the difference of physical address . common IP address , Divided into IPv4 And IPv6 Two categories
IPv4 The address is expressed in dotted decimal ,X.X.X.X (X It means a 10 Base ) example :
every last X Corresponding to 8 Binary , Count Reg 32 bit; every last X corresponding 1 Bytes ;X The value range is 0 --255 ;
structure : Network bit + Host bit
IP Address is used to uniquely identify an online device within a certain range ;( All devices that need internet access , Must have IP address )

<>IP Address classification (IPv4)

IP Addresses fall into five categories , The number of addresses that can be accommodated is different :
A Class reserved for government agencies ( reach
B Class assigned to medium-sized companies ( reach
C Class is assigned to anyone who needs it ( reach
D Class for multicast (—
E Class for experiments (—
A,B,C Among the three categories IP address = network address + Host address , and D,E The two types do not distinguish between network address and host address
Special instructions :
(1)A In class 10.X.X.X Is a private address ;127.X.X.X Is a reserved address
(2)B In class Is a private address
(3)C In class 192.168.X.X Is a private address

<> Subnet mask

Network address can be simply understood as network segment , The host address is the address of the corresponding different hosts in the network segment .
Subnet mask is used to distinguish IP Network bit and host bit in address , Must be with IP address , One to one correspondence , Appear in pairs ;
Subnet mask and IP The same address is 32 Bit address , Then IP The network address can be obtained by summing the address and subnet mask ( Network segment ).
In subnet mask 1 Corresponding IP Bits in address , Call it network bit ;
In subnet mask 0 Corresponding IP Bits in address , Called host bit .
Subnet mask characteristics :

* And IP Address to address correspondence ;
* 1 and 0 Always continuous , Will not cross ;
* Always on the left 1, Always on the right 0;
e.g. IP Address is, Subnet mask is Binary representation : IP address : 11000000 10101000
00001010 00000010 Subnet mask : 11111111 11111111 11111111
11110000( indicate IP Address before 28 Bit indicates network bit , after 4 Bit is host bit ) IP The address and mask are summed : 11000000 10101000 00001010
00000000 So this IP The network where the address is located is, Host ID is 2.
An address :XX.XX.XX.128/25,/25 Is another form of mask , Indicates continuous 25 individual 1, Remaining use 0 Supplement .
(1) Host number : Host number + network number =32,32-25=7
(2) network address : When 7 Bit host numbers are all 0, that is XX.XX.XX.128
(3) Broadcast address : When 7 Bit host numbers are all 1, that is XX.XX.XX.255
(4) Number of available addresses :7 Bit host number yes 2 7 2^7 27 Kinds of results , But remove the network address and broadcast address , Namely : 2 7 − 2 = 126 2^7-2=126 27−2=
126, That is, there can be 126 Hosts .

©2019-2020 Toolsou All rights reserved,
Solve in servlet The Chinese output in is a question mark C String function and character function in language MySQL management 35 A small coup optimization Java performance —— Concise article Seven sorting algorithms (java code ) use Ansible Batch deployment SSH Password free login to remote host according to excel generate create Build table SQL sentence Spring Source code series ( sixteen )Spring merge BeanDefinition Principle of Virtual machine installation Linux course What are the common exception classes ?