1 / 17

Adding a New Routing Protocol

Adding a New Routing Protocol. Authors : Jeong GangHee Updated by Park YoonYoung. by Jeong - Ganghee. Step 1) Let QualNet know SRIP as a network layer protocol In the file include/ network.h. enum NetworkRoutingProtocolType { … ROUTING_PROTOCOL_SRIP , … }.

thu
Télécharger la présentation

Adding a New Routing Protocol

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Adding a New Routing Protocol Authors : JeongGangHee Updated by Park YoonYoung by Jeong - Ganghee Advanced Operating System – Spring 2012

  2. Advanced Operating System – Spring 2012 • Step 1) Let QualNet know SRIP as a network layer protocol • In the file include/network.h enumNetworkRoutingProtocolType { … ROUTING_PROTOCOL_SRIP, … } Make SRIP Recognized by QualNet

  3. Advanced Operating System – Spring 2012 • Step 2)Let QualNet know SRIP as a network layer protocol • In the file include/network.h enumNetworkRoutingAdminDistanceType { … ROUTING_ADMIN_DISTANCE_SRIP, … } Make SRIP Recognized by QualNet

  4. Advanced Operating System – Spring 2012 • Step 3) Let QualNet know SRIP as a network layer protocol • In the file include/trace.h enumTraceProtocolType { … TRACE_SRIP, … } Make SRIP Recognized by QualNet

  5. Advanced Operating System – Spring 2012 • Step 4) Let IP module know SRIP as an IP protocol • In the file libraries/developer/src/network_ip.h // EndIARP #defineIPPROTO_SRIP number //InsertPatch ROUTING_IPPROTO 211 Make SRIP Recognized by QualNet

  6. Advanced Operating System – Spring 2012 • Step 5) Have IP module recognize the five entry functions of SRIP • Have the file libraries/developer/src/network_ip.cppinclude routing_srip.h #include <stdio.h> #include <stdlib.h> #include <string.h> … //InsertPatch HEADER_FILES #include “routing_srip.h” Make SRIP Recognized by QualNet

  7. Advanced Operating System – Spring 2012 • Step 6) Have IP initialize SRIP if specified in the configuration file • In the file network_ip.cpp, function NetworkIpParseAndSetRoutingProtocolType() … else if (strcmp(protocolString, “SRIP”) == 0) { routingProtocolType = ROUTING_PROTOCOL_SRIP; } else if (strcmp(protocolString, “NONE”) == 0) Make SRIP Recognized by QualNet

  8. Advanced Operating System – Spring 2012 • Step 7) Have IP initialize SRIP • In the file network_ip.cpp, function IpRoutingInit() #endif // NETSEC_LIB case ROUTING_PROTOCOL_SRIP: { if(!NetworkIpGetRoutingProtocol(node, ROUTING_PROTOCOL_SRIP)) SripInit(node, (SripData**)&ip->interfaceInfo[i]->routingProtocol, nodeInput, i); else NetworkIpUpdateUnicastRoutingProtocoAndRouterFunction( node, ROUTING_PROTOCOL_SRIP, i): break; } Make SRIP Recognized by QualNet

  9. Advanced Operating System – Spring 2012 • Step 8) When the network layer receives an event for SRIP, dispatch it to SRIP’s event handling function • In the file network_ip.cpp, function NetworkIpLayer() // InsertPatch NETWORK_IP_LAYER caseROUTING_PROTOCOL_SRIP: { SripHandleProtocolEvent(node, msg); break; } Make SRIP Recognized by QualNet

  10. Advanced Operating System – Spring 2012 • Step 9) When IP receives an SRIP route advertisement packet, dispatch it to SRIP’s packet handling function • In the file network_ip.cpp, function DeliverPacket() caseIPPROTO_SRIP: { if(NetworkIpGetUnicastRoutingProtocolType(node, interfaceIndex) == ROUTING_PROTOCOL_SRIP) { SripHandleProtocolPacket(node, msg, sourceAddr); } else { MESSAGE_Free(node, msg); } break; } // InsertPatchNETWORK_HANDLE_PACKET Make SRIP Recognized by QualNet

  11. Advanced Operating System – Spring 2012 • Step 10) Call SRIP’s finalizing function when IP is terminating • In the file network_ip.cpp, function NetworkIpFinalize() // InsertPatchNETWORK_HANDLE_PACKET caseROUTING_PROTOCOL_SRIP: { SripFinalize(node); break; } Make SRIP Recognized by QualNet

  12. Advanced Operating System – Spring 2012 • Step 11) Put SRIP source files (routing_srip.h/cpp) into the directory libraries/developer/src/ • Edit libraries/developer/Makefile-common • Add routing_srip.cpp to DEVELOPER_SRCS macro as the following # # common sources #DEVELOPER_SRCS = \ $(DEVELOPER_SRCDIR)/adaptation_aal5.cpp \ $(DEVELOPER_SRCDIR)/routing_srip.cpp \ Compiling QualNet with SRIP

  13. Advanced Operating System – Spring 2012 cd $(QUALNET_HOME)/main nmake • Step 12) Rebuild QualNet executable: Compiling QualNet with SRIP

  14. Advanced Operating System – Spring 2012 • Step 13) In $(QUALNET_HOME)/scenarios/default directory, • copy default.config into srip.config, • then modify/add the following parameters: EXPERIMENT-NAMEsrip #… ROUTING-PROTOCOLSRIP SRIP-UPDATE-INTERVAL10s #… Creating a configuration file for SRIP

  15. Advanced Operating System – Spring 2012 • Step 14) In $(QUALNET_HOME)/bin directory, run qualnet on the SRIP configuration file: • Check srip.stat file to find SRIP’s statistics #cd $(QUALNET_HOME)/bin #qualnetsrip.config Testing the Protocol

  16. Advanced Operating System – Spring 2012 • Step 15) In $(QUALNET_HOME)/gui/settings/protocol-models directory, routing-protocols.prt file: • Update this xml file • Insert SRIP to Qualnet GUI tool <option value=“SRIP” name=“SRIP”> <variable Key=“SRIP-UPDATE-INTERVAL” type=“Time” name=“SRIP Updated” default=“8s” /> </option> Insert SRIP to GUI menu

  17. Advanced Operating System – Spring 2012 End

More Related