stackencapsulationEachrouteadd
routeadd 时间:2021-05-24 阅读:(
)
TCP/IPnetworkingTCP/IPAnetworkingprotocolsuiteUseseveralprotocols,mainonesaretcpandip.
IPstandsforInternetProtocolTCPstandsforTransmissionControlProtocol.
ThenativelanguageoftheInternetSupportedbymostOSs(Unix,MacOS,Windows,Netware,etc)DefinesauniformprogramminginterfacetodifferenttypesofnetworkhardwareTCP/IPandInternet1969ARPAnetExperimentalpacket-switchingnetworkStudyrobust,reliable,vendor-independentdatacommunicationVerysuccessful1975ARPAnetbecameoperationnetworkDevelopmentcontinuingTCP/IPwasdeveloped1983TCP/IPprotocolswereadoptedasMilitaryStandardsTCP/IPwasimplementedinBerkeleyUnix.
ARPAnetwasdividedintoMILNETandARPAnetTCP/IPandInternet1985NSFNetConnectedtothethenexistingInternet(MILNETplusARPAnet)LinkedtogetherthefiveNSFsupercomputercentersWantedtoextendthenetworktoeveryscientist1987newNSFNetbackboneFasterThree-tieredtopology:backbone,regionalnetworks,andlocalnetworks.
TCP/IPandInternet1990ARPAnetpassedoutofexistence1995NSFnetceaseditsroleasaprimaryInternetbackbonenetworkTodayInternetisbuildbycommercialproviders.
InfrastructureisbeingcreatedbyNationalnetworkprovider,callertier-oneprovidersRegionalnetworkproviderLocalaccessanduserservicesisprovidedbyInternetServiceProviders(ISPs)NetworkAccessPoints(NAPS):majorinterconnectionpointsTCP/IPandInternetHowtheinternetismanagedtodayCommercialforceSeveralorganizationInternetCorporationforAssignedNamesandNumbers(ICANN)www.
icann.
orgInternetEngineeringTaskForce(IETE)www.
ietf.
orgInternetSociety(ISOC)www.
isoc.
orgTCP/IPandInternetNetworkstandardsanddocumentationRequestforComments(RFC)Over4000hasbeencreatedFYSTDBCPDispatchcentralforRFC-relatedmatterswww.
rfc-editor.
orgNetworkingRoadMapTCP/IPcomponentsIP,theInternetProtocolroutesdatapacketsfromonemachinetoanotherICMP,theInternetControlMessageProtocolProvidesseveralkindsoflow-levelsupportforIPErrormessageRoutingassistanceDebugginghelpARP,theAddressResolutionProtocolTranslatesIPaddressestohardwareaddressesNetworkingRoadMapUDP,theUserDatagramProtocolDeliversdatatospecificapplicationsonthedestinationmachineProvides"unverified","besteffort"transportforindividualmessagesTCP,theTransmissionControlProtocolDeliversdatatospecificapplicationsonthedestinationmachineProvidesreliable,flowcontrolled,errorcorrectedconversationbetweenprocessesontwohosts.
TCP/IPnetworkmodelUTPcopper,fiber,radiawavesARP,DeviceDriversIPICMPTCPUDPARPSSH,FTP,WEBDNS,QuakeTraeroutePhysicallayerLinkLayerNetworkLayerTransportLayerApplicationLayerPacketsandencapsulationDatatravelsonanetworkintheformofpacketsEachpacketconsistsofAheader–whereitcamefromandwhereit'sgoing,protocolinfo,checksum,etc.
Apayload-dataAsapackettravelsdowntheprotocolstackencapsulationEachprotocoladdsitsownheaderinformationEachprotocol'sfinishedpacketbecomesthepayloadpartofthepacketgeneratedbythenextprotocol.
Onareceivingmachine,theencapsulationisreversedasthepackettravelsbackuptheprotocolstack.
PacketsandEncapsulationExample:AtypicalnetworkpacketEthernetheaderIPheaderUDPheaderApplicationdataEthernetCRCUDPpacket(108bytes)IPpacket(128bytes)Ethernetframe(146bytes)AddressingPacketsaddressingPacketsmustbeproperlyaddressedinordertoreachtheirdestinationAddressingschemesMAC(mediaaccesscontrol)addressesforhardwareIPaddressesforsoftwareHostnamesforpeoplePorts16bitnumberAddressparticularprocessesorservicesWell-knownportsaredefinedin/etc/servicesUnixsystemsrestrictaccessportunder1024toroot.
AddressingAddresstypesUnicast–addressesthatrefertoasinglehost(interface)Multicat–addressesthatidentifyagroupofhostsBroadcast–addressesthatincludeallhostsonthelocalnetworkIPaddressesFourbyteslongNetworkpartandhostpartWrittenasdecimalnumbers,oneforeachbyteseparatedbyperiodsWhen127isthefirstbyteofanaddress,itdenotesthe"loopbacknetwork"Lookbackaddress127.
0.
0.
1-localhostAddressingIPaddressclassesThetraditionalclassdeterminewhichbytesoftheaddresswereinthenetworkportionandwhichwereinthehostportionA1-126N.
H.
H.
HVeryearlynetworkB128-191N.
N.
H.
Hlargesites(65536)C192-223N.
N.
N.
H(256)D224-239MultipleaddressesE240-254ExperimentaladdressesAddressingSubnettingandnetmasksHostportionofanaddressis"borrowed"toextendthenetworkportionThisreassignmentisdonebyusingifconfigcommandtoassociateanexplicit"subnetmask"withanetworkinterface.
EachbitofthenetmaskthatcorrespondstothenetworkportionofanIPaddressissetto1,hostbitsaresetto0ThedivisionofnetworkpartandhostpartneednotfallonabyteboundaryNetworkbitsmustbecontiguousandmustappearatthehighorderendoftheaddressesAddressingNotationIpaddressnetmaskIpaddress/lengthofthenetworkpart128.
138.
243.
0/26Example128.
138.
243.
100/24NetmaskNetworkBroadcast128.
138.
243.
100/26100=01100100NetmaskNetworkBroadcastUseipcalctogetthevalues.
AddressingTheIPaddresscrisisFundamentalproblemswiththeoriginalclassallocatingschemeRunoutofBclassesRoutingtableweregrowingsolargeIPaddresswereallocatedonafirst-com,first-servedbasiswithnolocalityofreferencesolutionsShortterm:ClasslessInter-DomainRouting(CIDR)IPV6:extendtheaddressto16bytes665,570,793,348,866,943,898,599addressesAddressingAddressallocationRegionalIPaddressregistriesARINNorthandSouthAmericaAPNICAsia/PacificregionRIPEEuropeandsurroundingareasPrivateaddressesPacketsbearingprivateaddressescannotgetintointernetIPaddressreservedforprivateuse10.
0.
0.
0/8172.
16.
0.
0/12192.
168.
0.
0/16RoutingRoutingistheprocessofdirectingapacketthroughthemazeofnetworksthatstandbetweenitssourceanditsdestination.
Routinginfoisstoredinatableinthekernel.
Examineituse"netstat–r"ConfiguredynamicallyConfigurestatically#routeadd–net132.
236.
220.
64netmask255.
255.
255.
192132.
236.
212.
6#routeadddefault132.
236.
227.
1ARPTheaddressResolutionProtocoldiscoversthehardwareaddressassociatedwithaparticularIPaddress.
APRusesbroadcastpackets,cannotcrossnetworks"Doesanyoneknowthehardwareaddressfor128.
138.
116.
4"Checkthearpcachetablewitharpcommand#/usr/sbin/arp–aRARPReversetranslationQueryacentralservertodiscoveritsownaddressNeedconfigurationAdditionsofmachinestoanetworkBasicstepsareAssignaIPaddressandhostnameSetupthenewhosttoconfigureitsnetworkinterfacesatboottimeSetupadefaultrouteandperhapsfancierroutingPointtoaDNSnameserver,toallowaccesstotherestoftheInternet.
DebuggingAlwaystorebootifchangesaffectbootingAssigninghostnamesandIPaddressesMappinghostnamestoIPHostsfileNISorNIS+DNSOrCombinationaboveHostsfile/etc/hostsEachlinestartwithIP,continueswithvarioussymbolicnamesbywhichthataddressisknown.
EntriesLocalhost,gateway,specialhosts,…ReplicatesamehostsfileonmachinesConfigurehostnameCommandhostnamerunattheboottimeConfigurationfileAssigninghostnamesandIPaddressesConfigurenetworkinterfaces:ifconfigEnableordisablenetworkinterfaceSetIPaddressSetsubnetmaskSetotheroptionsRunattheboottime(usecommandwiththevaluefromconfigurefiles)Format$ifconfiginterfaceaddressoptions…up|downEx:#ifconfigeth0128.
138.
240.
7network255.
255.
255.
0upAssigninghostnamesandIPaddressesInterfacename:IdentifiesthehardwaretowhichthecommandappliesTwoorthreecharacterdevicenamefollowedbyanumber.
Theloopbackinterfaceisnamedlo0ThecommoninterfacenamesareIe0,le0,ln0,we0,hme0,eri0,lan0,…Displaytheinterfaces$netstat–iDisplaythesettingofinterfaces$ifconfig–aAssigninghostnamesandIPaddressesConfigurethenetworkinterfaceTheifconfigcommandssupportmanyoptionsSpecifyaddressSpecifynetmask,otherwiseitusesaddressclass(A,B,C)SpecifybroadcastDefaultcanbecalculatedfromIP+netmaskSomesitessetittoavoidcertaintypesofdenialofserviceattacks.
Notgood.
ActivateordeactivatethedevicedriverUsekeyworkup,down.
Ifconfigallowsyoutoconfigureainterfacecardbyhand,butthevalueisonlyinkernel.
Tomakeitsurvivethereboot,changetherightconfigurationfileConfigurestaticroutesCommandroutedefinesstaticroutesStaticroutewillstayintheroutingtableinmostcaseconfigurethedefaultroutingwhenaddingahosttolocalnetworkRoutingisperformedatwhatlayerThepackets'destinationIPiscomparedwiththeroute,ifitmatches,thepacketisforwardedtothe"nextgateway"IPaddressassociatedwiththatrouteRoutingaddedwhenconfiguretheinterface-PacketsdestinedforhostonadirectoryconnectednetworkDefaultrouteisinvokedwhenthereisnoroutethatmatchesthedestinationaddress.
ConfigurestaticroutesTheformat:#routeop[type]destinationgateway[hop-count]WhereOp:add,delete,get,change,flush,monitorDestination:hostaddress,networkaddress,orthekeyword"default"(0.
0.
0.
0)Gateway:amachinetowhichpacketsshouldbeforwardedMustbeonadirectlyconnectednetworkForwardingcanonlybeperformedonehopatatimeType:-net,-hostChecktheroutingtable:#netstat-nrConfigurestaticroutesdefaultroute#routeadddefaultgateway_ip_addressChangetheconfigurefileSolaris:/etc/defaultrouterHp-UX:/net/rc.
config.
d/netconfRedhat:/etc/sysconfig/networkConfiguringDNSToconfigureamachineasaDNSclientConfigure/etc/resolv.
confListDBSdomainsthatshouldbesearchedtoresolvenamethatareincompleteLinetheIPaddressesofthenameserverstocontactfornamelookupsExample:[ruihong@dafinn~]$more/etc/resolv.
confsearchcs.
mtu.
educsl.
mtu.
edumtu.
edunameserver141.
219.
152.
253nameserver141.
219.
152.
254ConfiguringDNSConfiguretheserviceswitchfileWhichonetakeeffect/etc/hosts,NIS,DNSSolaris,Hp-UX,Redhat:/etc/nsswitch.
confExample:hosts:filesnisdnsClause:[NOTFOUND=return]NetworkconfigurationfilesbysystemAll/etc/hosts/etc/recolv.
confSolaris/etc/hostname.
ifname/etc/nodename/etc/defaultrouter/etc/inet/netmasks/etc/inet/hostsHP-UX/etc/rc.
config.
d/netconfRedHat/etc/sysconfig/networkNetwork-scripts/ifcfg-ifnamePracticeCheckIPaddress/netmask/broadcastrouteArptableHostnameDNSModifyHostnameDnsresearchlistPingwoprDnsserversRemotedefaultroutePingwoprAddthedefaultroutebackagainRebootDHCPDynamicHostConfigurationProtocolDistributenetworkandadministrativeparameterstoDHCPclient,includeIPaddressandnetmasksGatewaysDNSnameserversSysloghostsWINsServers,Xfontservers,proxyservers,NTPserversTFTPservers(forloadingabootimage)Andmore…DHCPHowDHCPworksClientsends"WhoamI"DHCPDISCOVERmessageTobroadcast255.
255.
255.
255With0.
0.
0.
0asitsownaddressServerrespondswithOFFERmessagesClientsendsbackaREQUESTmessagesServerrespondswithACKorNAKClientrenewtheleasebysendinganotherREQUESTmessage
瓜云互联一直主打超高性价比的海外vps产品,主要以美国cn2、香港cn2线路为主,100M以内高宽带,非常适合个人使用、企业等等!安全防护体系 弹性灵活,能为提供简单、 高效、智能、快速、低成本的云防护,帮助个人、企业从实现网络攻击防御,同时也承诺产品24H支持退换,不喜欢可以找客服退现,诚信自由交易!官方网站:点击访问瓜云互联官网活动方案:打折优惠策略:新老用户购买服务器统统9折优惠预存返款活动...
CloudCone发布了2021年的闪售活动,提供了几款年付VPS套餐,基于KVM架构,采用Intel® Xeon® Silver 4214 or Xeon® E5s CPU及SSD硬盘组RAID10,最低每年14.02美元起,支持PayPal或者支付宝付款。这是一家成立于2017年的国外VPS主机商,提供VPS和独立服务器租用,数据中心为美国洛杉矶MC机房。下面列出几款年付套餐配置信息。CPU:...
快云科技已稳步运行进两年了 期间没出现过线路不稳 客户不满意等一系列问题 本司资质齐全 持有IDC ICP ISP等正规手续 有独特的网站设计理念 在前几天刚是参加过魔方系统举行的设计大赛拿获最佳设计奖第一名 本公司主营产品 香港弹性云服务器,美国vps和日本vps,香港物理机,国内高防物理机以及美国日本高防物理机 2020年的国庆推出过一款香港的回馈用户特惠机 已作为传家宝 稳定运行 马上又到了...
routeadd为你推荐
画风不同神情相同的各种支持route请务必阅读正文之后的免责条款部分solutionssb重要产品信息指南支持ipad支持ipad支持ipad甘肃省政府采购ipad如何上网如何用手机流量在IPAD上上网
便宜vps 域名备案中心 域名停靠一青草视频 已经备案域名 过期已备案域名 域名交易网 免费动态域名 naning9韩国官网 openv 百度云100as 免备案cdn 线路工具 512m内存 eq2 长沙服务器 小米数据库 91vps cdn加速原理 佛山高防服务器 四核服务器 更多