下载
加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 linux静态路由设置

linux静态路由设置.doc

linux静态路由设置

李清越
2017-10-20 0人阅读 举报 0 0 暂无简介

简介:本文档为《linux静态路由设置doc》,可适用于工程科技领域

linux静态路由设置Networktubecombat:theLinuxserverstaticroutingconfigurationofthe:staticrouteisafixedroutingtablesetintherouterStaticroutingdoesnotchangeunlessthenetworkadministratorintervenesBecausestaticroutingdoesnotreflectchangesinthenetwork,itiscommonlyusedinnetworkswithsmallnetworksizesandafixedtopologyTheadvantagesofstaticroutingaresimple,efficient,andreliableInallroutes,staticroutingisthehighestpriorityWhenthedynamicroutingconflictswiththestaticroute,thestaticrouteisbasedonthestaticrouteLinuxsupportstheroutingdaemon:Routed:supportRIPIroutingprotocolSupport:supportforRIP,BGP,EGP,OSPFfourroutingprotocolsZebra:supportsRIP,BGP,andOSPFroutingprotocolsCheckthekernelroutingtableLogontotheLinuxservertoviewtheroutingtableandusethecommand:route#therouteTheKernelIProutingtableDestinationGatewayGenmaskFlagsMetricmetricsRefUseIface*Ueth*,,loDefaultUGethaddressofclosedloop,asweknow,usingTCPIPprotocolofthecomputer,willhaveanIPaddress,confirmedbyIPaddresseachotherbetweeneachother,informationanddataInsomecases,wearetryingtodoatest(suchaswhetheranetworkcardisproperlyinstalled),orthereisnoothercomputerasthereceivingendAtthispoint,wecanusethismachinetoactasthesenderandreceiveroftheinformation,whichiscalledaclosedloopYoucanalsousetheequivalentcommand:netstatrTableistheroutecommandoutputoptionTheroutecommandformat:RoutecfvneeoptionThemainoptionsareasfollowsn:nodomainnamee:showingotherinformationv:displaydetailsf:displayingFIBinformationc:displayFIBcacheinformationAdd:increaseroutingDel:deletetheroutenet:routingisanetwork,notahosthost:routingtoahostnetmaskNm:specifiesthesubnetmaskforroutingGw:specifiesthegatewayforroutingTheroutecommand,forinstance:Addtheroutetothehost#routeaddhostdeveth:#routeaddhostgwAddtheroutetothenetwork#routeaddnetnetmasketh#routeaddnetnetmaskgw#routeaddnetethDeletetherouting#routedelhostdeveth:#routedelhostgw#routedelnetnetmasketh#routedelnetnetmaskgw#routedelneteth#routedeldefaultgwThreetypesofroutingsupportedbyLinuxThehostroutingTheFiagsfieldforhostroutingisH,andinthefollowingexample,themachinearrivesattheIPaddressatontherouterwithanIPaddressDestinationGatewayGenmaskFlagsMetricmetricsRefUseIfaceUHethNetworkroutingTheFiagsfieldfornetworkroutingisN,andinthefollowingexample,themachinewillbesenttothenetworktotherouterthathasaIPaddressDestinationGatewayGenmaskFlagsMetricmetricsRefUseIface,UNethThedefaultrouteThedefaultroute'sFiagsfieldisG,andinthefollowingexample,theIPaddressofthedefaultrouteisDestinationGatewayGenmaskFlagsMetricmetricsRefUseIfacethedefaultUGethTheapplicationinstanceconfiguresthestaticroutingWhenconfiguringthenetwork,youspecifythepaththatthepackagewillgothroughwhenthepacketisreceivedIntheLinuxsystem,provideacommandroutethatcansetthestaticrouteforthenetworkcardconfiguredfortheifconfigcommandThissetupistypicallyintroducedinetcrcdrcinet,whichisperformedwhenthesystemisbootedThenetworkstructureisasfollows:FigurenetworkstructureLinuxroutersincludethreenetworkCARDS:EthEhtEhtConnectingthreesubnetsseparately:SubnetASubnetBSubnetCInorderforthecomputersinthethreesubnetstocommunicatewitheachotherinthefollowingconfiguration:ThedefaultkernelconfigurationinRedHatLinuxalreadycontainstheroutingfunctionality,butitisnotenabledbydefaultwhenthesystemisstarted#echo>procsysipvipfowardConfigurethreenetworkinterfaces#ifconfigethdown#ifconfigethdown#ifconfigforethdown#ifconfigethup#ifconfigethup#ifconfigethupAddroutingoptions#routeaddneteth#routeaddneteth#routeaddnetethReviewtheroutingtable#therouteTheKernelIProutingtableDestinationGatewayGenmaskFlagsMetricmetricsRefUseIface*U,,,eth*U,,,eth*Ueth*,,,lTestthestaticrouteConfigurenetworkinterfacesandgatewaysonaLinuxcomputeronsubnetC:#ifconfigup#routeadddefaultgw#therouteTheKernelIProutingtableDestinationGatewayGenmaskFlagsMetricmetricsRefUseIface*Uet*,,loDefaultUGethConfigurenetworkinterfacesandgatewaysonaWindowscomputeronsubnetB,asshowninfigureFigureWindowscomputersconfigurenetworkinterfacesandgatewaysRoutingtestsfromaLinuxcomputerinsubnetC:First,theIPaddressinpingzinetworkBis#pingcPING()from:()bytesofdatabytesfrom:icmpseq=TTL=time=msbytesfrom:icmpseq=TTL=time=msbytesfrom:icmpseq=TTL=time=mspingstatistics)it'sagoodidea,received,percentpacketloss,timemsRTTminavgMaxmdev=ms,pipeUsethetraceroutecommand#tracerouteTracerouteto(),hopsMax,byte()msmsmsAtthispoint,theLinuxserver'sstaticroutingconfigurationiscomplete

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/7

linux静态路由设置

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利