Linux中Bonding原理英文原版.docx
- 文档编号:17079596
- 上传时间:2023-07-21
- 格式:DOCX
- 页数:58
- 大小:54.24KB
Linux中Bonding原理英文原版.docx
《Linux中Bonding原理英文原版.docx》由会员分享,可在线阅读,更多相关《Linux中Bonding原理英文原版.docx(58页珍藏版)》请在冰点文库上搜索。
Linux中Bonding原理英文原版
bonding
∙networking[1]
TheLinuxbondingdriverprovidesamethodforaggregating
multiplenetworkinterfacesintoasinglelogical
bonded[2]interface.
Thebehaviorofthebondedinterfacesdependsuponthemode;generally
speaking,modesprovideeitherhotstandbyorloadbalancingservices.
Additionally,linkintegritymonitoringmaybeperformed.
Thebondingdriveroriginallycamefrom
DonaldBecker's[3]
beowulf[4]patchesforkernel2.0.
Ithaschangedquiteabitsince,and
theoriginaltoolsfromextreme-linuxandbeowulfsiteswillnotwork
withthisversionofthedriver.
Fornewversionsofthedriver,updateduserspacetools,and
whotoaskforhelp,pleasefollowthelinksattheendofthisfile.
Contents
∙1Installation
o1.1Configureandbuildthekernelwithbonding
o1.2InstallifenslaveControlUtility
∙2BondingDriverOptions
∙3ConfiguringBondingDevices
o3.1Configurationwithsysconfigsupport
▪3.1.1UsingDHCPwithsysconfig
▪3.1.2ConfiguringMultipleBondswithsysconfig
o3.2Configurationwithinitscriptssupport
▪3.2.1UsingDHCPwithinitscripts
▪3.2.2ConfiguringMultipleBondswithinitscripts
o3.3ConfiguringBondingwith/etc/net
o3.4ConfiguringBondingManually
▪3.4.1ConfiguringMultipleBondsManually
∙4QueryingBondingConfiguration
o4.1BondingConfiguration
o4.2Networkconfiguration
∙5SwitchConfiguration
∙6802.1qVLANSupport
∙7LinkMonitoring
o7.1ARPMonitorOperation
o7.2ConfiguringMultipleARPTargets
o7.3MIIMonitorOperation
∙8PotentialSourcesofTrouble
o8.1AdventuresinRouting
o8.2EthernetDeviceRenaming
o8.3PainfullySlowOrNoFailedLinkDetectionByMiimon
∙9SNMPagents
o9.1Promiscuousmode
∙10ConfiguringBondingforHighAvailability
o10.1HighAvailabilityinaSingleSwitchTopology
o10.2HighAvailabilityinaMultipleSwitchTopology
▪10.2.1HABondingModeSelectionforMultipleSwitchTopology
▪10.2.2HALinkMonitoringSelectionforMultipleSwitchTopology
∙11ConfiguringBondingforMaximumThroughput
o11.1MaximizingThroughputinaSingleSwitchTopology
▪11.1.1MTBondingModeSelectionforSingleSwitchTopology
▪11.1.2MTLinkMonitoringforSingleSwitchTopology
o11.2MaximumThroughputinaMultipleSwitchTopology
▪11.2.1MTBondingModeSelectionforMultipleSwitchTopology
▪11.2.2MTLinkMonitoringforMultipleSwitchTopology
∙12SwitchBehaviorIssues
o12.1LinkEstablishmentandFailoverDelays
o12.2DuplicatedIncomingPackets
∙13HardwareSpecificConsiderations
o13.1IBMBladeCenter
o13.2JS20networkadapterinformation
o13.3BladeCenternetworkingconfiguration
o13.4Requirementsforspecificmodes
o13.5Linkmonitoringissues
o13.6Otherconcerns
∙14FrequentlyAskedQuestions
o14.1IsitSMPsafe?
o14.2Whattypeofcardswillworkwithit?
o14.3HowmanybondingdevicescanIhave?
o14.4Howmanyslavescanabondingdevicehave?
o14.5Whathappenswhenaslavelinkdies?
∙15CanbondingbeusedforHighAvailability?
∙16Whichswitches/systemsdoesitworkwith?
o16.1WheredoesabondingdevicegetitsMACaddressfrom?
∙17ResourcesandLinks
∙18History
Installation
Mostpopulardistrokernelsshipwiththebondingdriver
alreadyavailableasamoduleandtheifenslaveuserlevelcontrol
programinstalledandreadyforuse.Ifyourdistrodoesnot,oryou
haveneedtocompilebondingfromsource(e.g.,configuringand
installingamainlinekernelfromkernel.org),you'llneedtoperform
thefollowingsteps:
Configureandbuildthekernelwithbonding
Thecurrentversionofthebondingdriverisavailableinthe
drivers/net/bondingsubdirectoryofthemostrecentkernelsource
(whichisavailableonkernel.org[5]).
Mostusers"rollingtheirown"willwanttousethemostrecentkernelfromkernel.org.
Configurekernelwith"makemenuconfig"(or"makexconfig"or
"makeconfig"),thenselect"Bondingdriversupport"inthe"Network
devicesupport"section.Itisrecommendedthatyouconfigurethe
driverasmodulesinceitiscurrentlytheonlywaytopassparameters
tothedriverorconfiguremorethanonebondingdevice.
Buildandinstallthenewkernelandmodules,thencontinue
belowtoinstallifenslave.
InstallifenslaveControlUtility
Theifenslaveuserlevelcontrolprogramisincludedinthe
kernelsourcetree,inthefileDocumentation/networking/ifenslave.c.
Itisgenerallyrecommendedthatyouusetheifenslavethat
correspondstothekernelthatyouareusing(eitherfromthesame
sourcetreeorsuppliedwiththedistro),however,ifenslave
executablesfromolderkernelsshouldfunction(butfeaturesnewer
thantheifenslavereleasearenotsupported).Runninganifenslave
thatisnewerthanthekernelisnotsupported,andmayormaynot
work.
Toinstallifenslave,dothefollowing:
#gcc-Wall-O-I/usr/src/linux/includeifenslave.c-oifenslave
#cpifenslave/sbin/ifenslave
Ifyourkernelsourceisnotin"/usr/src/linux,"thenreplace
"/usr/src/linux/include"intheabovewiththelocationofyourkernel
sourceincludedirectory.
Youmaywishtobackupanyexisting/sbin/ifenslave,or,for
testingorinformaluse,tagtheifenslavetothekernelversion
(e.g.,nametheifenslaveexecutable/sbin/ifenslave-2.6.10).
IMPORTANTNOTE:
Ifyouomitthe"-I"orspecifyanincorrectdirectory,you
mayendupwithanifenslavethatisincompatiblewiththekernel
you'retryingtobuilditfor.Somedistros(e.g.,RedHatfrom7.1
onwards)donothave/usr/include/linuxsymbolicallylinkedtothe
defaultkernelsourceincludedirectory.
BondingDriverOptions
Optionsforthebondingdriveraresuppliedasparametersto
thebondingmoduleatloadtime.Theymaybegivenascommandline
argumentstotheinsmodormodprobecommand,butareusuallyspecified
ineitherthe/etc/modules.confor/etc/modprobe.confconfiguration
file,orinadistro-specificconfigurationfile(someofwhichare
detailedinthenextsection).
Theavailablebondingdriverparametersarelistedbelow.Ifa
parameterisnotspecifiedthedefaultvalueisused.Wheninitially
configuringabond,itisrecommended"tail-f/var/log/messages"be
runinaseparatewindowtowatchforbondingdrivererrormessages.
Itiscriticalthateitherthemiimonorarp_intervaland
arp_ip_targetparametersbespecified,otherwiseseriousnetwork
degradationwilloccurduringlinkfailures.Veryfewdevicesdonot
supportatleastmiimon,sothereisreallynoreasonnottouseit.
Optionswithtextualvalueswillaccepteitherthetextname
or,forbackwardscompatibility,theoptionvalue.E.g.,
"mode=802.3ad"and"mode=4"setthesamemode.
Theparametersareasfollows:
arp_interval
SpecifiestheARPlinkmonitoringfrequencyinmilliseconds.IfARPmonitoringisusedinanetherchannelcompatiblemode(modes0and2),theswitchshouldbeconfiguredinamodethatevenlydistributespacketsacrossalllinks.IftheswitchisconfiguredtodistributethepacketsinanXORfashion,allrepliesfromtheARPtargetswillbereceivedonthesamelinkwhichcouldcausetheotherteammemberstofail.ARPmonitoringshouldnotbeusedinconjunctionwithmiimon.Avalueof0disablesARPmonitoring.Thedefaultvalueis0.
arp_ip_target
SpecifiestheIPaddressestouseasARPmonitoringpeerswhenarp_intervalis>0.ThesearethetargetsoftheARPrequestsenttodeterminethehealthofthelinktothetargets.Specifythesevaluesinddd.ddd.ddd.dddformat.MultipleIPaddressesmustbeseparatedbyacomma.AtleastoneIPaddressmustbegivenforARPmonitoringtofunction.Themaximumnumberoftargetsthatcanbespecifiedis16.ThedefaultvalueisnoIPaddresses.
downdelay
Specifiesthetime,inmilliseconds,towaitbeforedisablingaslaveafteralinkfailurehasbeendetected.Thisoptionisonlyvalidforthemiimonlinkmonitor.Thedowndelayvalueshouldbeamultipleofthemiimonvalue;ifnot,itwillberoundeddowntothenearestmultiple.Thedefaultvalueis0.
lacp_rate
Optionspecifyingtherateinwhichwe'llaskourlinkpartnertotransmitLACPDUpacketsin802.3admode.Possiblevaluesare:
∙slowor0
RequestpartnertotransmitLACPDUsevery30seconds.
∙fastor1
RequestpartnertotransmitLACPDUsevery1secondThedefaultisslow.
max_bonds
Specifiesthenumberofbondingdevicestocreateforthisinstanceofthebondingdriver.E.g.,ifmax_bondsis3,andthebondingdriverisnotalreadyloaded,thenbond0,bond1andbond2willbecreated.Thedefaultvalueis1.
miimon
SpecifiestheMIIlinkmonitoringfrequencyinmilliseconds.Thisdetermineshowoftenthelinkstateofeachslaveisinspectedforlinkfailures.AvalueofzerodisablesMIIlinkmonitoring.Avalueof100isagoodstartingpoint.
Theuse_carrieroption,below,affectshowthelinkstateisdetermined.SeetheHighAvailabilitysectionforadditionalinformation.Thedefaultvalueis0.
mode
Specifiesoneofthebondingpolicies.Thedefaultisbalance-rr(roundrobin).
Possiblevaluesare:
∙balance-rror0
Round-robinpolicy:
Transmitpacketsinsequentialorderfromthefirstavailableslavethroughthelast.Thismodeprovidesloadbalancingandfaulttolerance.
∙active-backupor1
Active-backuppolicy:
Onlyoneslaveinthebondisactive.Adifferentslavebecomesactiveif,andonlyif,theactiveslavefails.Thebond'sMACaddressisexternallyvisibleononlyoneport(networkadapter)toavoidconfusingtheswitch.
Inbondingversion2.6.2orlater,whenafailoveroccursinactive-backupmode,bondingwillissueoneormoregratuitousARPsonthenewlyactiveslave.OnegratutiousARPisissuedforthebondingmasterinterfaceandeachVLANinterfac
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Linux Bonding 原理 英文原版