当前位置:网站首页>Learn to divide subnets in an article

Learn to divide subnets in an article

2022-06-12 23:53:00 Sun Bujian 1208

IP Address and subnet Division

Towards the end of the term , Review computer network , An article teaches you to understand subnet partition .

Basic concepts

  • according to TCP/IP agreement , Connected to the Internet Every device on the must have a globally unique IP Address ( The logical address used by the network layer ) 32 The binary number of bits .

  • It is generally expressed in dotted decimal system : Every time 8 One by one , Convert to decimal , use "." separate

  • meaning : network number + Host number

32(bit) The binary number of bits :

image-20220612202810512

dotted decimal : Every time 8 Bit to a decimal number , use . separate

image-20220612202749453

IP Address meaning :

image-20220612202734815

IP Natural classification of addresses

IP Address type Binary fixed highest First byte Decimal range Binary system network number Binary system Host number
A class 00~1278 position 24 position
B class 1128~19116 position 16 position
C class 110192~22324 position 8 position
D class 1110224~239 Multicast uses
E class 11110240~255 Reserved for trial use

special IP Address

  • network address : The network address is used to represent the network where the device is located . The network number part is not change , The host number part is all “0”( Binary system ) Of IP The address is called the network address . Such as mainframe 129.5.1.1(B class ) The network address of your network is 129.5.0.0.

  • Broadcast address : The broadcast address is used to broadcast to all devices in the same network . network The network number remains unchanged , The host number part is all “1”( Binary system ) Of IP Address scale For broadcast address . Such as mainframe 129.5.1.1 ( B class ) the stay network Collateral Of wide seeding The earth site Just yes 129.5.255.255.

  • Loopback address : The device address in the network cannot be decimal 127 As the beginning ,127 open The address of the header is reserved for the system for diagnostic purposes , Called loopback address . If you use instructions : ping 127.0.0.1 Test whether the local network card works normally ( Loop test )

subject : Judge the following IP Classification of addresses

10.2.1.1 128.63.2.100 201.222.5.64 192.6.141.2 256.241.201.10

IP Address Category network address Broadcast address
10.2.1.1A10.0.0.010.255.255.255
128.63.2.100B128.63.0.0128.63.255.255
201.222.5.64C201.222.5.0201.222.5.255
192.6.141.2C192.6.141.0192.6.141.255

256.241.201.10 non-existent

Subnet mask

  • Subnet mask : Used to identify IP The number of digits of the network number in the address
  • 2 There are two ways to express :
    • 32 Bit binary number , In the subnet mask , Corresponding to the network number part, use binary “1” Express , The host number part is binary “0” Express . Such as IP Address 1.1.1.1 The subnet mask for is 255.0.0.0, Indicates the front of this address 8 Bit is the network number .
    • Network suffix method , namely “IP Address / Number of network numbers ” , Such as 138.96.0.1/18 surface Show that IP The network number of the network where the address is located 18 position , Host number 14 position .

image-20220612202145728

  • A network , The host number has x position , Then the network can be assigned to the host IP How many addresses ?
  • The network consists of 2 Of x The next address , Remove network address and broadcast address , That can be assigned to a host IP The address is 2 Of x Power -2 individual
    • for example , One C Class network , That can be assigned to a host IP The address is 2 Of 8 Power -2=254 individual

Subnet partition ( Topic actual combat )

Reasons for dividing subnets : Improve IP Address utilization .

image-20220612202849974

The core idea of subnet Division : The network number remains unchanged , Borrowing part of the host number to generate a new network .

image-20220612202916539image-20220612202605584image-20220612202622773image-20220612202636267image-20220612202655374image-20220612202707999
原网站

版权声明
本文为[Sun Bujian 1208]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206122347136192.html