1目录05:18:41.591INFO[n.f.c.m.FloodlightModuleLoader:main]Loadingdefaultmodules05:18:44.867INFO[n.f.c.i.Controller:main]ControllerrolesettoMASTER05:18:44.881INFO[n.f.c.i.Controller:main]Flushswitchesonreconnect--Disabled05:18:51.513INFO[n.f.l.i.LinkDiscoveryManager:main]SettingautoportfastfeaturetoOFF05:18:53.839INFO[o.s.s.i.c.FallbackCCProvider:main]Clusternotyetconfigured;usingfallbacklocalconfiguration05:18:53.840INFO[o.s.s.i.SyncManager:main][32767]UpdatingsyncconfigurationClusterConfig[allNodes={32767=Node[hostname=localhost,port=6642,nodeId=32767,domainId=32767]},authScheme=CHALLENGE_RESPONSE,keyStorePath=/etc/floodlight/auth_credentials.jceks,keyStorePasswordisunset]05:18:55.020INFO[o.s.s.i.r.RPCService:main]ListeningforinternalfloodlightRPConlocalhost/127.0.0.1:664205:18:56.332INFO[n.f.c.i.Controller:main]Listeningforswitchconnectionson0.0.0.0/0.0.0.0:663305:19:03.787INFO[n.f.j.JythonServer:debugserver-main]StartingDebugServeron:6655packagemain.java.net.floodlightcontroller.mactracker;importjava.util.Collection;importjava.util.Map;importorg.openflow.protocol.OFMessage;importorg.openflow.protocol.OFType;importnet.floodlightcontroller.core.FloodlightContext;importnet.floodlightcontroller.core.IOFMessageListener;importnet.floodlightcontroller.core.IOFSwitch;importnet.floodlightcontroller.core.module.FloodlightModuleContext;importnet.floodlightcontroller.core.module.FloodlightModuleException;importnet.floodlightcontroller.core.module.IFloodlightModule;importnet.floodlightcontroller.core.module.IFloodlightService;importnet.floodlightcontroller.core.IFloodlightProviderService;importjava.util.ArrayList;importjava.util.concurrent.ConcurrentSkipListSet;importjava.util.Set;importnet.floodlightcontroller.packet.Ethernet;importorg.openflow.util.HexString;importorg.slf4j.Logger;importorg.slf4j.LoggerFactory;2publicclassMACTrackerimplementsIOFMessageListener,IFloodlightModule{protectedIFloodlightProviderServicefloodlightProvider;protectedSetmacAddresses;protectedstaticLoggerlogger;@OverridepublicStringgetName(){//TODOAuto-generatedmethodstubreturnMACTracker.class.getSimpleName();}@OverridepublicbooleanisCallbackOrderingPrereq(OFTypetype,Stringname){//TODOAuto-generatedmethodstubreturnfalse;}@OverridepublicbooleanisCallbackOrderingPostreq(OFTypetype,Stringname){//TODOAuto-generatedmethodstubreturnfalse;}@OverridepublicCollectionClass?extendsIFloodlightServicegetModuleServices(){//TODOAuto-generatedmethodstubreturnnull;}@OverridepublicMapClass?extendsIFloodlightService,IFloodlightServicegetServiceImpls(){//TODOAuto-generatedmethodstubreturnnull;}@OverridepublicCollectionClass?extendsIFloodlightServicegetModuleDependencies(){CollectionClass?extendsIFloodlightServicel=newArrayListClass?extendsIFloodlightService();l.add(IFloodlightProviderService.class);returnl;3}@Overridepublicvoidinit(FloodlightModuleContextcontext)throwsFloodlightModuleException{//TODOAuto-generatedmethodstubfloodlightProvider=context.getServiceImpl(IFloodlightProviderService.class);macAddresses=newConcurrentSkipListSetLong();logger=LoggerFactory.getLogger(MACTracker.class);}@OverridepublicvoidstartUp(FloodlightModuleContextcontext)throwsFloodlightModuleException{//TODOAuto-generatedmethodstubfloodlightProvider.addOFMessageListener(OFType.PACKET_IN,this);}@Overridepublicnet.floodlightcontroller.core.IListener.Commandreceive(IOFSwitchsw,OFMessagemsg,FloodlightContextcntx){//TODOAuto-generatedmethodstubEtherneteth=IFloodlightProviderService.bcStore.get(cntx,IFloodlightProviderService.CONTEXT_PI_PAYLOAD);LongsourceMACHash=Ethernet.toLong(eth.getSourceMACAddress());if(!macAddresses.contains(sourceMACHash)){macAddresses.add(sourceMACHash);logger.info(MACAddress:{}seenonswitch:{},HexString.toHexString(sourceMACHash),sw.getId());}returnCommand.CONTINUE;}}架构..................................................................................................................................................6开始..................................................................................................................................................64安装指导..................................................................................................................................6概述..................................................................................................................................6准备工作..........................................................................................................................6下载编译..........................................................................................................................6运行Floodlight.................................................................................................................7Eclipse设置......................................................................................................................7虚拟一个网络..................................................................................................................7下一步.....