Introduction
WhetheryouuseyoursmartphoneorPCtosurftheInternet,yourmobilephoneorPCwillbeassignedanIPaddress,andthemobilephoneorPCwillusethisIPaddresstocommunicatewiththeInternetCommunicateandexchangeinformationwithothernetworksontheInternet.TherearetwomajortypesofIPaddresses,IPv4andIPv6,andmostoftheIPaddressesusedareIPv4addresses.
Features
IPv4istheabbreviationofInternetProtocolversion4,whichmeansthefourthversionoftheIPprotocol.ThevastmajorityofcommunicationtrafficontheInternetisencapsulatedintheformatofIPv4datapackets.IPv4isdescribedindetailinIETFpublicationRFC791.
IPv4uses32-bitbinaryaddresses,sothereareonlyabout4.3billionaddresses.Initially,everyuserconnectedtotheInternethastobeassignedanIPv4address.Therefore,therearefewerandfewerunassignedIPv4addresses,resultingintheproblemofIPv4addressexhaustion.InordertofundamentallysolvetheproblemofIPv4addressexhaustion,IPv6cameintobeing.
IPv4isusuallywrittenindotteddecimalnotation,suchas192.168.0.1,wherethenumbersarealldecimalnumbers,separatedbysoliddots.
AnIPv4addresscanbedividedintotwoparts:networkaddressandhostaddress.Thenetworkaddresscanbedescribedinthefollowingform:192.168.0.0/16,wherethenumberaftertheslashindicatesthatthelengthofthenetworkaddresspartis16Bit,thiscorrespondsto2bytes,thatis,thenetworkaddresspartis192.168.0.0.
Classification
InordertofacilitatethemanagementofIPaddresses,accordingtothefirstbyteoftheIPv4address,IPv4addressescanbedividedintothefollowingfivecategories.
- TypeA:0~127 
- TypeB:128~191 
- ClassC:192~223 
- ClassD:224~239,multicastaddress 
- ClassE:240~254,reservedforresearchandtestuse 
TherearesomeaddresssegmentsintheIPv4addressthathavespecialuses.ThedescriptionoftheseaddresssegmentsandtheirusesisshowninTable1.
Table1
| Scope | Description | 
| 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 | PrivatenetworkIPv4address,whichcanbeusedforhome,officeandTheinternalLANoftheenterprise.TheoriginalintentionofdesigningprivatenetworkIPv4addressesistoalleviatetheproblemofIPv4addressexhaustion. | 
| 169.254.0.0/16 | Link-local,Linklocaladdressisonlymeaningfulinacertainnetworksegment,therouterwillnotforwardIPpacketswiththeaddressofLink-local. | 
| 127.0.0.0/8 | Loopback,usedforloopbacktest | 
| 224.0.0.0/4 | IPmulticastaddress | 
| 240.0.0.0/4 | Reservedforresearchtestuse | 
| 255.255.255.255 | Broadcastaddress | 
Relateddifferences
ThedifferencebetweenIPv4addressandIPaddressThespecificdifferencesareasfollows:
1.IPv4isaversion,andIPisabigconcept,andtheyareessentiallydifferent.
2.TheIPv4addressistheintranetIPoftheradioandtelevisionnetwork.

3.ThedifferencebetweenClassA,ClassB,andClassCaddressesinIPaddresses.ThelengthoftheIPaddressdeterminestheIPv4addressspaceanddeterminesthelimitedaddress.
4.IPincludesprivatenetworkIP,publicnetworkIP,IPv4,IPv6.
