Hostaddressconcept
ThenetworkpartofanIPaddressiscalledanetworknumberornetworkaddress,andthehostcandirectlycommunicatewithdeviceswiththesamenetworknumber
Inthecaseofnoconnecteddevice,evenifthesamephysicalnetworksegmentisshared,communicationcannotbecarriedoutifthenetworknumberisdifferent,anditmustbeforwardedthroughadevicewitharoutingfunction.
ThenetworkaddressoftheIPaddressenablestheroutertoplacethepacketonthecorrectnetworksegment,andthehostnumberaftertheIPaddressnetworknumberenablestheroutertotransmitthepacketencapsulatedbythetwo-layerframetooneonthenetworkForaspecifichost,thehostnumberandMACaddressaremappedcorrectly.Thekeyissueinthisistousethesubnetmasktodetermineorobtainthenetworkaddressinformationoftheremotehost.Thepartafterthenetworkaddressisthehostaddress.
Thenetworkaddressesofthesamenetworkmustbethesame,butthehostaddressesofthesamenetworkmustbedifferent,sothatthehostsinthesamenetworkcancommunicatedirectly.Thenetworkinthiscaseiscalledaflatnetwork,suchas:192.168.1.1/24,and192.168.1.2/24,thenetworkIDisthesame,thehostIDisdifferent.Ifthecommunicationbetweenhostsonthesamenetworkmustbeforwardedthroughthedevice,thenetworkinthiscaseiscalledahierarchicalnetwork.
Typeofhostaddress
GuidebyIPaddressBit(highestbit)todistinguishdifferenttypesofIPaddresses:
(Note:nisthenetworknumberbit,histhehostnumberbit)
ClassAaddress
Aclassaddress:0nnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
AclassAaddresshasa7-digitnetworknumber,so126classAnetworkscanbedefined{2^7-1(thenetworknumbercannotbeall0)-1(Thenetworknumbercannotbeall1,and127istheloopbackaddress)}Thenumberofhoststhateachnetworkcanhaveis16777214{2^24-2(Thehostbitscannotbeall0orall1)}
Decimalrepresentationrange:1.0.0.1-127.255.255.255,anynetworkaddressbetween0and127isaclassAaddress.
ClassBaddress
ClassBaddress:10nnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
ClassBaddresshasa14-bitnetworknumber,so16382BscanbedefinedClassnetwork{2^14-2}
Thenumberofhoststhateachnetworkcanhaveis65534{2^16-2}
Thedecimalrepresentationrange:128.0.0.1-191.255.255.255,anynetworkaddressbetween128and191isaclassBaddress.
C-typeaddress
C-typeaddress:110nnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
C-typeaddresshas21-bitnetworknumber,so2097152CscanbedefinedClassaddress{2^21-2}
Thenumberofhoststhateachnetworkcanhaveis254{2^8-2}
Thedecimalrepresentationrange:192.0.0.1-223.255.255.255,anynetworkaddressbetween192and223isaclassCaddress.
ClassDaddress
ClassDaddress:1110xxxx.xxxxxxxx.xxxxxxxx.xxxxxxxx
ClassDaddressisusedformulticast,thefirst4digits1110guide,theback28bitsarethemulticastaddressID.
Decimalrepresentationrange:224.0.0.0-239.255.255.255
ClassEaddress
ClassEaddress:alwaysleadwith1111fourdigits
ClassEaddressesareusedforresearchpurposes.
Decimalrepresentationrange:240-
IPaddressesareuniformlyallocatedbyInterNIC(InternetInformationCenter)toensuretheuniquenessofIPaddresses.However,thereisatypeofIPaddressthatcanbeuseddirectlyinthecorporateintranetwithoutapplyingforit.ThisisPrivateAddress.PrivateAddresswillnotbeforwardedbyanyrouterontheINTERNET.ToaccesstheINTERNET,itmustbeconvertedthroughNAT/PATtoapublicIP.Formaccess.
Theseprivateaddressesare:
10.0.0.0-10.255.255.255(aClassAaddress)
172.16.0.0-172.31.255.255(16BClassaddress)
192.168.0.0-192.168.255.255(256ClassCaddresses)
Anynetworkaddressbetween224and239inthefirstoctetisagroupBroadcastaddress
AnyprivateIPnetworkcanbeused,including:
1ClassAaddress(10.0.0.0),
16ClassBaddresses(From172.16.0.0to172.31.0.0)
256ClassCaddresses(from192.168.0.0to192.168.255.0)
anyaddressincluding