POX+wiki.docx
《POX+wiki.docx》由会员分享,可在线阅读,更多相关《POX+wiki.docx(92页珍藏版)》请在冰豆网上搜索。
![POX+wiki.docx](https://file1.bdocx.com/fileroot1/2022-11/23/9d493128-705c-4911-9fbb-a5a2e964a5a1/9d493128-705c-4911-9fbb-a5a2e964a5a11.gif)
POX+wiki
1.Pages
POXWiki
Skiptoendofmetadata
∙
∙Attachments:
2
∙Addedby AliAl-Shabibi,lasteditedby MurphyMcCauley onMar05,2015 (viewchange)
∙showcomment
Gotostartofmetadata
Icon
AsPOXiscontinuallyevolving,thingsonthispagemaynotalwaysreflectexactlythestateofanyparticularbranchinthePOXcoderepository. Ifyou'reusinganoldbranch,youmayfindithelpfultoviewaversionofthispagefromthepast(e.g.aroundthetimeyourbranchwascurrent). Ifyou'reusingthenewestbranchandthingswrittenherearen'tright,feelfreetofixthemormentionitonthemailinglistorforum.
(
Aversionofthisdocumentin BrazilianPortuguese ismaintainedindependently.)
∙InstallingPOX
∙Requirements
∙GettingtheCode/InstallingPOX
∙SelectingaBranch/Version
∙PyPySupport
∙InvokingPOX
∙ComponentsinPOX
∙StockComponents
∙py
∙forwarding.hub
∙forwarding.l2_learning
∙forwarding.l2_pairs
∙forwarding.l3_learning
∙forwarding.l2_multi
∙forwarding.l2_nx
∙forwarding.topo_proactive
∙openflow.spanning_tree
∙openflow.webservice
∙Example:
Getlistofconnectedswitches
∙Example:
Makingahubusingthewebservice
∙web.webcore
∙messenger
∙GettingStartedwiththeMessengerComponent
∙openflow.of_01
∙openflow.discovery
∙openflow.debug
∙openflow.keepalive
∙proto.pong
∙proto.arp_responder
∙info.packet_dump
∙proto.dns_spy
∙proto.dhcp_client
∙proto.dhcpd
∙misc.of_tutorial
∙misc.full_payload
∙misc.mac_blocker
∙misc.nat
∙misc.ip_loadbalancer
∙misc.gephi_topo
∙log
∙DisablingtheConsoleLog
∙LogFormatting
∙LogOutput
∙log.color
∙log.level
∙samples.pretty_log
∙tk
∙host_tracker
∙datapaths.pcap_switch
∙DevelopingyourownComponents
∙The"ext"directory
∙Thelaunchfunction
∙ASimpleExample
∙MultipleInvocation
∙POXAPIs
∙WorkingwithPOX:
ThePOXCoreobject
∙RegisteringComponents
∙DependencyandEventManagement
∙WorkingwithAddresses:
pox.lib.addresses
∙TheEventSystem:
pox.lib.revent
∙HandlingEvents
∙EventHandlers
∙ListeningToanEvent
∙AutomaticallySettingListeners
∙CreatingYourOwnEventTypes
∙RaisingEvents
∙BindingtoComponents'Events
∙AdvancedTopicsinEventHandling
∙EventsWithMultipleListeners
∙RemovingListenersandOne-TimeEvents
∙WeakEventHandlers
∙Workingwithpackets:
pox.lib.packet
∙Ethernet(ethernet)
∙IPversion4(ipv4)
∙TCP(tcp)
∙tcp_optclass
∙Example:
ARPmessages
∙ConstructingPacketsfromScratchandReadingPacketsfromtheWire
∙Threads,Tasks,andTimers:
pox.lib.recoco
∙UsingNormalThreads
∙ExecutingCodeintheFutureusingaTimer
∙Workingwithsockets:
ioworker
∙Workingwithpcap/libpcap:
pxpcap
∙Buildingpxpcap
∙UsingpxpcapwitholderversionsofPython
∙UsingpxpcapwithPyPy
∙OpenFlowinPOX
∙DPIDsinPOX
∙DPIDsinMininet
∙CommunicatingwithDatapaths(Switches)
∙ConnectionObjects
∙GettingaReferencetoaConnectionObject
∙TheOpenFlowNexus–core.openflow
∙OpenFlowEvents:
RespondingtoSwitches
∙ConnectionUp
∙ConnectionDown
∙PortStatus
∙FlowRemoved
∙StatisticsEvents
∙PacketIn
∙ErrorIn
∙BarrierIn
∙OpenFlowMessages
∙ofp_packet_out-Sendingpacketsfromtheswitch
∙ofp_flow_mod-Flowtablemodification
∙Example:
Installingatableentry
∙Example:
Clearingtablesonallswitches
∙ofp_stats_request-Requestingstatisticsfromswitches
∙Example-WebFlowStatistics
∙MatchStructure
∙PartialMatchesandWildcards
∙ofp_matchMethods
∙Definingamatchfromanexistingpacket
∙Example:
MatchingWebTraffic
∙OpenFlowActions
∙Output
∙Enqueue
∙SetVLANID
∙SetVLANpriority
∙SetEthernetsourceordestinationaddress
∙SetIPsourceordestinationaddress
∙SetIPTypeofService
∙SetTCP/UDPsourceordestinationport
∙Example:
SendingaFlowMod
∙Example:
SendingaPacketOut
∙Nicira/OpenvSwitchExtensions
∙ExtendedPacketInMessages
∙MultipleTableSupport
∙FlexibleFlowSpecifications(AKANiciraExtendedMatch)
∙Usingnx_match
∙TheLearnAction
∙AdditionalInformation
∙AbouttheOpenFlowComponent'sInitialization
∙OVSDBinPOX
∙Transactions
∙GettingdatawithSELECT
∙Modifyingdata:
INSERT,UPDATE,DELETE,andMUTATE
∙Locks
∙Miscellaneous
∙WaitingforconditionsandmonitoringchangeswithWAITandMONITOR
∙Third-PartyTools,Tutorials,Etc.
∙POXDesk:
APOXWebGUI
∙OpenFlowTutorial
∙SDNHubPOXControllerTutorial
∙OpenFlowSwitchTutorial
∙StatisticsCollectorExample
∙RipL:
DatacenterTopologieswithPOXandMininet
∙DirectServerReturnLoadBalancer
∙CodingConventions
∙FAQs
∙WhatversionsofOpenFlowdoesPOXsupport?
∙Whatdoesthe'Fieldsignoredduetounspecifiedprerequisites'warningmean?
∙Itriedtoinstallatableentrybutgotadifferentone. Why?
∙Whatisa"datapath"?
WhatisaDPID?
∙HowdoIcreateafirewall/blockTCPports?
∙HowcanIchangetheOpenFlowportfrom6633?
∙HowcanIhavesomecomponentsstartautomaticallyeverytimeIrunPOX?
∙HowdoIgetswitchestosendcompletepacketpayloadstothecontroller?
∙HowcanIcommunicatebetweencomponents?
∙HowcanIusePOXwithMininet?
∙I'mseeingmanypacket_inmessagesandforwardingisn'tworking;whatgives?
∙DoesPOXsupporttopologieswithloops?
∙Switcheskeepdisconnecting(especiallywithPantou/referenceswitch). Help?
∙Whydoesn'ttheopenflow.webservicecomponentwork?
∙Whataretheselogmessagesfromthepacketsubsystem?
∙IInstalledIP-BasedTableEntriesButPing/TCPDoesn'tWork. Whynot?
∙DoesPOXsupportPython3?
∙I'dliketocontribute. CanI?
Doyouhaveprojectideas?
∙What'sthiswarninglike"core:
Stillwaitingon1component(s)"?
∙Whydoesn'tPOX'sdiscoveryusethenormalLLDPMACaddress?
∙What'sagoodstrategyfordebuggingaproblemwithmyPOX-basedcontroller?
∙I'vegotaproblem/bug!
Canyouhelpme?
InstallingPOX
Quickstart
Icon
OneofPOX'sdesignpointsistobeeasytoinstallandrun. However,especiallyifthisisallverynewtoyou,therearetimeswhenyoureallywanttojustbeabletodivestraightintoaworkingconfiguration. Ifthisdescribesyou,youmaywanttoskipinstallingPOXaltogetherandinsteaddownloadavirtualmachineimagewithPOXandsoftwareOpenFlowswitchespreinstalledandreadytogo. Youcantotallydothis!
UsuallytheswitchesareprovidedbyatoolknownasMininet,whichallowsforcomplexsoftwareOpenFlownetworkstoberunonasinglemachine–orwithinasinglevirtualmachine.
TheofficialMininetVMscomewithPOXinstalled(andcanbeeasilyupgradedtothelatestversion),sotheyarecertainlyoneoption. Thisoptionistheoneassumedbythe StanfordOpenFlowTutorial,whichyoumaywanttofollowifyou'relookingforacrashcourseonOpenFlowandPOX.
Anotheroptionisthe SDNHubPOXTutorial whichhasitsownpreconfiguredVM.
Requirements
POXrequiresPython2.7. Inpractice,italsomostlyrunswithPython2.6,andtherehavebeenafewcommitsaroundMarch2013toimprovethissomewhat,butnobodyispresently really tryingtosupportthis. See thisFAQentry forthestoryonPython3support. IfallyouhaveisPython2.6,youmightwanttolookintoPyPy(seebelow)orpythonbrew.
POXofficiallysupportsWindows,MacOS,andLinux(thoughithasbeenusedonothersystemsaswell). AlotofthedevelopmenthappensonMacOS,soitalmostalwaysworksonMacOS. OccasionallythingswillbreakfortheotherOSes;thetimeittakestofixsuchproblemsislargelyafunctionofhowquicklyproblemsarereported. Ingeneral,problemsarenoticedonLinuxfairlyquickly(especiallyforbigproblems)andnoticedonWindowsratherslowly. Ifyounoticesomethingnotworkingorthatseemsstrange,pleasesubmitanissueonthegithubtrackerorsendamessagetothepox-devmailinglistsothatitcanbefixed!
POXcanbeusedwiththe"standard"Pythoninterpreter(CPython),butalsosupports PyPy (seebelow).
GettingtheCode/InstallingPOX
ThebestwaytoworkwithPOXisasa git repository. Youcanalsograbitasatarballorzipball,butsourcecontrolisgenerallyagoodthing(ifyoudowanttodothis,takealookatthe Versions/Downloadspage atNOXRepo.org).
POXishostedon github. IfyouintendtomakemodificationstoPOXitself,youmightconsider makingyourowngithubfork ofitfromthe POXrepositorypage. Ifyoujustwanttograbitquicklytorunorplayaroundwith,youcansimplycreatealocalclone:
$gitclone
$cdpox
SelectingaBranch/Version
ThePOXrepositoryhasmultiplebranches. Specifically,ithasatleastsome release branchesandatleastone active branch. Thedefaultbranch(whatyougetifyoujustdotheabovecommands)willbethemostrecentreleasebranch. Releasebranchesmaygetminorupdates,butarenolongerbeingactivelydeveloped. Ontheotherhand,activebranches are beingactivelydeveloped. Intheory,releasebranchesshouldbesomewhatmorestable(bywhichwemeanthatifyouhavesomethingworking,wearen'tgoingtobreakit). Ontheotherhand,activebrancheswillcontainimprovements(bugfixes,newfeatures,etc.). Whetheryoushouldbaseyourworkononeortheotherdependsonyourneeds. Onethingthatmayfactorintoyourdecisionisthatyou'llprobablygetbettersupportonthemailinglistifyou'reusinganactivebranch(lotsofanswersstartwith"upgradetotheactivebranch").
ThemainPOXbranchesarenamedalphabeticallyafterfish. Youcanseetheoneyou'recurrentlyonwith gitbranch. Asofthiswriting,thebranchesandtheapproximatedatesduringwhichtheywereundergoingactivedevelopmentare:
∙angler(June2011-March2013)