BIGIP_LTM_iRule.ppt_第1页
BIGIP_LTM_iRule.ppt_第2页
BIGIP_LTM_iRule.ppt_第3页
BIGIP_LTM_iRule.ppt_第4页
BIGIP_LTM_iRule.ppt_第5页
已阅读5页,还剩40页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

BIG IPV9 0iRule F5Producttraining 20 4 06 BasicReview 3 25 04 VirtualServertoPoolMembers Internet 172 16 20 4 8080 172 16 20 1 80 172 16 20 2 4002 172 16 20 3 80 VirtualServer 216 34 94 17 80 PoolMembers Mapsto ProfileDependencies Somecan tbecombinedinVS Somedependentonothers ThinkintermsofOSIModel TCP HTTP Cookie UDP FTP L3Network L2DataLink L1Physical TrafficFlow BigPicture VirtualServer NAT SNAT Clientside Nodeside AddressTranslation AddressnotTranslated ForwardingVS TransparentVS WhatisLayer7Switching ApplicationDataorientedEg HTTPURL HTTPHeader DelaybindingrequiredExtramemorybuffersessionExtraprocessingpower ASIC CPU WhatisiRule AniRuleisascriptthatyouwriteifyouwanttomakeuseofsomeoftheextendedcapabilitiesoftheBIG IPthatareunavailableviatheCLIorGUI basedontheToolCommandLanguage Tcl programmingstandard Architecture TM OS Howconsolidationisachieved ReacttoaSingleCommunication OneDirection PacketBased LegacyApproach TMOSArchitecture SSL Compression ClientSide ServerSide TCPExpress Server TCPExpress Caching Microkernel TMOSTrafficPluginsHigh performanceNetworkingMicrokernelPowerfulApplicationProtocolSupportiControl ExternalmonitoringandcontroliRules NetworkProgrammingLanguage HighPerformanceHW iRules Client iControlAPI TCPProxy OneConnect XML RateShaping TrafficShield WebAccel 3rdParty iRulebasicelement EventdeclarationOperatorsiRulescommand BasiciRuleFormat Eventdeclarations Operators iRulecommands Eventdeclarations Eventdeclarations when eventtype Anexample whenCLIENT ACCEPTED if IP addr IP remote addr equals10 1 1 80 poolmy pool1 Eventtypes GlobaleventsHTTPeventsSSLeventsAuthenticationeventsReferrencetoLTM config guide pdfpage302 303 table13 2 Eventtypes GlobalEvents CLIENT ACCEPTEDCLIENT DATALB SELECTED beforesendtoserver LB FAILED nonodeavailableforthisvs SERVER CONNECTEDSERVER DATARULE INITCLIENT CLOSEDSERVER CLOSED NomatterwhatL7iRules GlobalEventcantakeeffective CLIENT ACCPTED CLIENT DATA LB SELECTED LB FAILED SERVER ACCPTED SERVER DATA CLIENT CLOSED SERVER CLOSED RULE INIT START L7Eventtypes HTTPEvents HTTP REQUESTHTTP REQUEST DATAHTTP RESPONSEHTTP RESPONSE DATAHTTP RESPONSE CONTINUE HTTP REQUEST HTTP REQUEST DATA HTTP RESPOND HTTP RESPOND DATA START HTTP RESPOND CONTINUE TMOSArchitecture Server iRules Client ClientSideEventClient acceptClient dataCache requestDNS requestHTTP REQUESTHTTP REQUEST DATARTSP REQUEST ServerSideEventServer connectServer dataCache responseDNS responseHTTP RESPONSEHTTP RESPONSE DATARTSP RESPONSE Operator ComparetwooperandsTCLstandardEg RelationalOperatorsEg Contains matches equals end withLogicalOperatorsEg and or not iRulescommand Statementcommandactiontaken eg Usepool SNAT logQuerycommandqueryinfo data eg HTTP header IP remote addrDatamanipulationcommandperformdatamanipulation eg HTTP headerremove HTTP headeraddUtilitycommandParsingandmanipulatingcontent eg Decode uri iRuleEvents GlobalEvents L3 4ClientAccepted Syn SynAck AckServerData htmlpagetoclientHTTPEvents L7 HTTPrequestorHTTPresponseSSLEventsClientSSLhandshakeAuthenticationEventsAuthFailure ProfileDependencies Somecan tbecombinedinVS Somedependentonothers ThinkintermsofOSIModel TCP HTTP Cookie UDP FTP iRuleConcepts Syntax iRulesOftenSelectPoolBasicSyntaxIf then else whenEVENT if conditional statementaction when condition true Example1 Layer7contentswitching ruleBrowserType whenHTTP REQUEST if HTTP uri ends with jpg poolcache pool else poolmain pool ruleBrowserType whenHTTP REQUEST if HTTP headerUser Agent contains MSIE poolIE pool elseif HTTP headerUser Agent contains Mozilla poolMz pool Example2 Layer3IPdecision whenCLIENT ACCEPTED if IP addr IP client addr equals10 10 10 10 poolmy pool whenHTTP REQUEST if IP hops 10 COMPRESS disable Example3 Layer4decision whenCLIENT ACCEPTED if TCP client port 1000 poolslow pool else poolfast pool whenRULE INIT arrayset active clients whenCLIENT ACCEPTED setclient ip IP remote addr if infoexists active clients client ip if active clients client ip 5 rejectreturn else incr active clients client ip else set active clients client ip 1 whenCLIENT CLOSED if infoexists active clients client ip incr active clients client ip 1if active clients client ip 0 unset active clients client ip ConfiguringiRules CreateRule ConfiguringiRules CreatePoolsfirstCreateRulenextThenpointVStoRule DevCentral OfficiallysupportedbymarketingCommunityismostlymadeupofvolunteersespeciallythosefromF5ProductDevelopment WhataboutSupport WhatcanDevCentraldobetter Havingtroublesearching Checkthisout RulesWiki Labsetup ConnectWiFiSSID MaskedRiderWEP ab12cd34efChannel 6IPaddress192 168 0 1 253 24BIGIPv9192 168 0 254Adminlogon admin f5trainingTrainingwebserver192 168 20 1 3 Lab1 BasicSetup Internet 192 168 0 x 24 192 168 20 1 80 192 168 20 2 80 192 168 20 3 80 Purpose setupbasicloadbalanceconfiguration Step1 createapoolincluding3trainingserverStep2 createavirtualServerwithyournameasdescriptionandbindyourownpoolasresourceStep3 testthevirtualserverandcheckthestatistic Lab2 loggingiRule Internet 192 168 0 x 24 192 168 20 1 80 192 168 20 2 80 192 168 20 3 80 Purpose logcustominformationbyiRules Step1 createaiRuletologclientsourceIPaddressandsourceportStep2 addyouriRuleintoVirtualserverStep3 accessthevirtualserverandchecktheBIGIPlogbycommand tail f var log ltm grep whenCLIENT ACCEPTED loglocal0 TCPsession IP client addr TCP client port Lab3 poolselection Internet 192 168 0 x 24 192 168 20 1 80 192 168 20 2 80 192 168 20 3 80 Purpose selectadedicatedpoolforaspecificClient Step1 createanewpoolcreateaiRuletoselectayourname2poolforyourIPaddressStep2 addyouriRuleintoVirtualserverStep3 accessthevirtualserverandchecktheBIGIPlogbycommand tail f var log ltm grepStep4 askyourclassmatetoaccessyourVSandcheckthelog whenCLIENT ACCEPTED if IP addr IP client addr equals poolyourname2loglocal0 TCPsession IP client addr TCP client port selectedyourname2pool else poolyournameloglocal0 TCPsession IP client addr TCP client port selecteddefaultpool Lab4 Objecttypeswitching Internet 192 168 0 x 24 192 168 20 1 80 192 168 20 2 80 192 168 20 3 80 Purpose selectadedicatedpoolforaspecificClient Step1 createanewpoolcreateaiRuletoselectayourname2poolforyourIPaddressStep2 addyouriRuleintoVirtualserverStep3 accessthevirtualserverandchecktheBIGIPlogbycommand tail f var log ltm grepStep4 askyourclassmatetoaccessyourVSandcheckthelog whenHTTP REQUEST seturi HTTP uri loglocal0 TheURIis uri if uriends with gif poolyourpool else HTTP uri poolyourpool2 Lab5 manipulateHTTPHeader Internet 192 168 0 x 24 192 168 20 1 80 192 168 20 2 80 192 168 20 3 80 Purpose rewriteWEBserverHeaderforsecuritythread Step1 installaHTTPwatchStep2 accessyourVSandcheckthehttpheader server valueStep3 createaiRuletorewriteServerresponseHTTPheader server toyourname Step4 addyouriRuleintoVirtualserverStep5 accessthevirtualserverandchecktheBIGIPlogbycommand tail f var log ltm grep whenHTTP RESPONSE loglocal0 OriginalServertypeis HTTP headerServer HTTP headerreplace Server F5 server loglocal0 HEADERmodifiedis HTTP headerServer Lab6 SelectiveSNATaddress Internet 192 168 0 x 24 192 168 20 1 80 192 168 20 2 80 192 168 20 3 80 Purpose specifyaSNATaddressforaselectedsourceIPaddresswhenaccessVS Hints search snat irulescommandandexampleatWiki ThankYou iRuleV4vsV9 WhatcanV9reallydothatV4can t Uselessruleformorefunctionality Rulescanbewrittentoutilizedynamicdata eg apoolnamecancomefromaheaderorcookie CompleteuniversalpersistencePersistencerecordscanbeaddedbasedondatafromtheresponse AbilitytomaintainstateSessiontablecantrackarbitraryinformationforaperiodoftime Variablescanreferencedataforthelifeoftheconnection Globalvariablescanreferencedataindefinitely WhatcanV9reallydothatV4can t Manipulatetheresponse Insertorremoveheadersandcookiesintheresponse Sanitizeheaders

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论