Home

NetSim Help - Index

image

Contents

1. Cancel B amp es z J alst E Calibri THEN A al General i F B G3 gt A FS E34 m 3 Delete Sl a Paste iB ZW F rad 9 48 398 Conditional Format Cell pata Sort amp Find amp Ne uhia a 0 Formatting as Table Styles Format 27 Filter Select Clipboard Font FI Alignment la Number E Styles Cells Editing B11 M fe Video n ee c D E F s H 1 PACKET_ID PACKET_TYPE CONTROL_PACKET_TYPE SOURCE_ID DESTINATION_ID TRANSMITTER_ID RECEIVER_ID APP_LAYER_ARRIVAL_TIME TRX_L 2 0 Video N A NODE 8 NODE 2 NODE 8 SWITCH 3 33333 333 3 0 Video N A NODE 2 NODE 8 NODE 2 SWITCH 3 33333 333 4 0 Video N A NODE 2 NODE 8 SWITCH 3 NODE 8 33333 333 5 0 Video N A NODE 8 NODE 2 SWITCH 3 NODE 2 33333 333 6 1 Voice N A NODE 8 NODE 2 NODE 8 SWITCH 3 40000 7 2 Voice N A NODE 8 NODE 2 NODE 8 SWITCH 3 40000 8 1 Voice N A NODE 8 NODE 2 SWITCH 3 NODE 2 40000 9 2 Voice N A NODE 8 NODE 2 SWITCH 3 NODE 2 40000 1 0 Video N A NODE 8 NODE 2 NODE 8 SWITCH 3 66666 667 11 o video Inia NODE 2 NODE 8 NODE 2 SWITCH 3 66666 667 Packet Trace Metrics PACKET_ID Specifies the ID of the Data Packet SEGMENT_ID Specifies the ID of the segment of the Data Packet PACKET_TYPE Specifies the type of Packet It can be Control Packet Custom Peer_to_peer E Mail DataBase FTP Video Voice HTTP CONTROL_PACKET_TYPE Specifies the type of Control Packet transmitted It
2. 2034 7O f a a aar D p F S H 3 1 PACKET_ID Y SEGMENT_ID PACKET_TYPE CONTROL_PACKET_TYPE SOURCE_ID DESTINATION_ID TRANSMITTER_ID 7 RECEIVER_ID 7 PACKET E 1 0 Data N A NODE 2 NODE 3 NODE 2 ROUTER 1 Success 13 1 0 Data N A NODE 2 NODE 3 ROUTER 1 NODE 3 Success Note In the trace file device IDs are shown not device names Wired Node 1 s ID is 2 so it is Shown as NODE 2 Wired Node 2 s ID is 3 so it is shown as NODE 3 Router 1 ID is 1 so it is shown as ROUTER 1 Device IDs are shown on the top of the device icon in the above scenario In a scenario source and destinations are fixed but transmitter and receiver are changed For example in the above scenario NODE 2 is the source and NODE 3 is the destination but when NODE 2 sending the packet to the ROUTER 1 then NODE 2 is the transmitter and ROUTER 1 is the receiver When ROUTER 1 sending the packet to the NODE 3 ROUTER 1 is the transmitter and NODE 3 is the receiver 52 Packet Animation NetSim provides the feature to play and record animations to the user Packet animation enables users to watch traffic flow through the network for in depth visualization and analysis User has the following options before running simulation e No animation e Record the animation and e Play and record animation while running simulation NetSim Simulation Configuration IP and ARP Configuration Simulation Time Simulation Time 0 t
3. FnRandomNo gt Win32 Add New Item DVR Resource Files Templates C Source Files Categories Visual C isual Studio installed templates Ur cida E C File cpp n Header File h Data Midi File idi 4 Module Definition File deF Resource f Component Class By Installer Class Web Utility My Templates Property Sheets Search Online Templates Creates a file containing C source code dvr c c Documents and Settings Muthukumar My Documents Visual Studio 2005 Projects DVRDYR ac _cereet_ amp lsolution Explorer jJResource View 6 Now Source file is created oft Visual Studio File Edit View Project Build Debug Tools Test Window Community Help FnRandomNo Global Scope v A A Solution DVR 1 project l S Gipvr Gi Header Files Gi Resource Files B E Source Files G dvr c lt i m gt K F Z F Solution Explorer Resource View Ready tnt Coli chi INS 144 7 Copy and paste the source code DVR Microsoft Visual Studio File Edit View Project Buld Debug Tools Test Window Community Help Ajr wedel E Global Scope v inc lude lt windows h gt inc lude lt stdio h gt include lt conio h gt include lt string h gt include lt malloc h gt
4. 1 3 1 1 3 1 1 1 3 1 13 11 1 111 1 88 88 8 8 11011101 1 1 13 1 11 131 1 8 8 1 13131 1 1311 1 1 1 3 1 1 1 3 1 1 3 1 1 13 1 11 1 3 11 13 131 1 13 11 1 Time Division Multiple Access Programming Guidelines This section guides the user to link his her own code for Time Division Multiple Access to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt which is in Temporary Directory The user program after executing the concept should write the required output to a file named Output with extension txt in Temporary Directory Note The Temporary Directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt 248 File Format Input File Format Output File Format The Input txt file contains Bandwidth Value gt No of time slots Value gt Time slot Length Value gt Guard Interval Value gt Example Band Width 100 gt TimeSlot 1 gt TimeSlotLength 100 gt Gua rdInterval 0 0 gt Guard Interval Value gt Bandwidth Value gt start time Value gt end time Value gt nouser Value gt channel no Value gt Bandwidth Value gt start
5. duration Data Rate JAME CAPTURE PACKETS Y Axis Packet s Received Total Packets Total Collisions Total Errors Packets Received Packets Dropped Single Collision Multiple Collision Alignment Error Errors Received Errors Transmitted signal Strength dBm 6 Copy a reasonably large file from one system to the other system Note The file should be large enough for the transfer to take sufficient time gt 20 seconds for the tool to analyze the network accurately Preparing to Copy Transfer data from one machine to another 7 As the file is getting transferred between systems start the traffic monitor by clicking the Start button 135 F NetSim Frames Capture Help fA Frames Capture Adapter Device NPF_ FSAFBD26 F97C 4412 9CD6 22B1BED1C64A Graph Type Bar Duration Seconds DURATION Input Remaining Network Ethernet 802 3 Data Rate 100 Mbps FRAME CAPTURE Packdt s Received PACKETS Y Axis Total Packets Total Collisions Total Errors Packets Received Packets Dropped Single Collision Multiple Collision Alignment Error Errors Received Errors Transmitted es ORS Frames Capture Help fA Frames Capture Adapter Graph Type Duration Seconds DURATION Input 60 Seconds Remaining 47 Seconds Network Ethernet 802 3 100000 Data Rate 100 Mbps 90000
6. 103 NetSim APIs NetSim provides a wide variety of APIs for protocol developers These are available in 1 packet h Packet related APIs Eg Create_Packet Copy_Packet Free_Packet etc stack h Network device link and event related APIs Eg Get_Device_IP Get_Connected_Link Add_Event etc list h Optimized list operation calls since NetSim uses lists extensively Eg Add_to_list Sort_list etc NetSim_Graph h This is used for plotting graphs using GNU plot 5 IP_Addressing h For setting amp getting IP address per the appropriate format Eg Convert_IP_to_string Compare_IP etc For detailed help please refer the appropriateheader h files inside NetSim_Standard src simulation include or read through the doxygen source code documentation available inside NetSim gt Help gt NetSim source code Help Include all the header h files from the include folder NetworkStack lib is a import library file and has the definitions for the functions present in the NetworkStack dll When developing new protocols users should create their own protocol h and declare all the protocol specific variables here Stack amp packet related variables should be used from stack h and packet h NetSim Network Stack calling individual Protocol Every protocol should provide the following APIs as hooks to the network stack int fn_NetSim_protocol_init conststru
7. 2 To begin with the experiment open NetSim A NetSim Simulation Programming Realtime Basics Utilities Help 3 Click on Real Time select Frame Capture The frame capture environment is now open F NetSim Simulation Programming Basics Utilities Help Frames Capture 133 The below figure shows the NetSim frame capture environment Adapter Graph Type Bar Duration DURATION Input Remaining Network Data Rate FRAME CAPTURE PACKETS Total Packets a Total Collisions Total Errors Packets Received Packets Dropped Single Collision Multiple Collision Alignment Error Errors Received Errors Transmitted yy nn 4 Select the adapter Frames Capture Help fA Frames Capture Graph Type Bar V Device NPF_ FSAFBD26 F97C 4412 9CD Duration Seconds DURATION Input Remaining Network Data Rate FRAME CAPTURE PACKETS Total Packets Total Collisions Total Errors Packets Received Packets Dropped Single Collision Multiple Collision Alignment Error Errors Received Errors Transmitted signal Strength Select the network adaptor 134 5 Select how long the traffic is to be monitored FA NetSim Frames Capture Dek Help 4 Frames Capture Adapter _ Device NPF_ FSAFBD26 F97C 4412 9CD6 22B18ED1C64a Graph Type Bar i Se l e ct t h e fra me Duration Seconds BURATOS ca ptu re Network Remaining
8. Problem 3 Apppath and I O path white spaces fae C Windows system32 cmd exe Microsoft Windows Version 6 1 7666 Copyright lt c gt 2669 Microsoft Corporation All rights reserved C Users P Sathishkumar gt cd C Program Files NetSim Standard8 7b2 bin C Program Files NetSim Standard8 7b2 bin gt NetSimCore exe apppath C Program F iles Net Sim Standards 6 spe in ape C Users P Sathishkumar AppData Local Te Solution If the folder name contains white space then mention the folder path within double quoteswhile specifying the folder name in the command prompt For example if app path containswhite space then the app path must be mentioned within double quotes in the command prompt Possible errors in Configuration xml Problem 1 Specific attributes in the Configuration file are highlighted with zigzag lines 72 If invalid input is given in the Configuration file then the corresponding attribute is highlighted in zigzag lines as shown in the figure given below lt LAYER TYPE NETWORK_LAYER gt lt Set Network Protocol properties gt lt Configure each layer gt lt Set Physical _Layer properties gt lt NETWORK_PROTOCOL IP_ADDRESS 192 168 0 4 NAME IPV4 SUBNI lt PROTOCOL NAME ARP SETPROPERTY true gt lt PROTOCOL PROPERTY ARP _RETRY_INTERVAL 10 ARP RETRY_LINI lt PROTOCOL gt lt LAYER gt lt INTERF ACE gt lt INTERFACE ID 2 INTERFACE TYPE ETHERNET gt lt
9. gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format The first line of the Input txt contains the number of nodes in the network following which the IP Addresses are assigned to each node ascending order The last two lines are the Source node IP Address and the Destination node IP Address respectively An example format of input txtis given below Number_of_Nodes 3 Nodel_IP_Address 192 168 1 1 Node2_IP_Address 192 168 1 2 Node3_IP_Address 192 168 1 3 Source_Node_IP_ Address 192 168 1 3 Destination_Node_IP_Address 192 168 1 1 The output file should contain two lines The first line has the details of the Source i e in which class it is present The second line has the result of the ARP i e whether destination is present in the class The second line has the flag value important that is used for the animation The result for the above is Source is Class C Destination is present in that class 2 153 Interface Source Code Interface Source code written in C is given and using this the user can write only the Address Resolution Protocol inside the function fnARP using the variables already declared To view the interface source code go
10. Create an event for phy out G FCH c pstruEventDetails gt dEventTime dTime 2 pstruBSPhy gt pstruSymbolParameter gt dSymbolDuration pstruEventDetails gt dPacketSize SCH_SIZE C Fragmer C Incumbe pstruEventDetails gt nEventType PHYSICAL_OUT_EVENT 6 OFDMA pstruEventDetails gt nSubEventType C PacketFe SS absense eg Oy igi C SCH c NULL Spectrur m fnpAddEvent pstruEventDetails Schedule next superfame event pstruEventDetails gt dEventTime dTime SCH_DURATION pstruEventDetails gt dPacketSize pstruEventDetails gt nEventType TIMER_EVENT pstruEventDetails gt nSubEventType TRANSMIT_SCH pstruEventDetails gt pPacket NULL FnpAddEvent pstruEventDetails Name fn_Ne Add to metrics File c use pstruBSMAC gt struBSMetrics nSCHSent FullName fn_Ne return 1 IsInjected False _declspec dllexport int fn_NetSim_CR_CPE_ProcessSCH NetSim PACKET pstruPac Line number siete Eeke T CPE MAC pstruCPEMAC DEVICE M pstruEventDetails gt nDeviceld pstruEventDetaiP gt nInterfacelId 7 100 WR Error List i Immediate Window 95 Viewing variables while debugging code To see the value of a variable when debugging hover the mouse over the variable name in the code A text box with variable contents appears If the variable is a structure and contains other variables then click on the plus sign which is there to the
11. Local User A User who has a normal privilege other than Admin can delete experiments only which are created by that particular user In the case of Internetworks Advanced Wireless Networks MANET BGP Networks Wireless Sensor Networks Personal Area Networks Cellular Networks LTE Networks and Cognitive Radio Networks the experiments can be saved by the user at any desired local on the computer These experiments cannot be deleted via NetSim and must be directly deleted from the computer 59 Analytics Under the Simulation menu click Analytics to view the Analytics screen This module is designed to enable comparison for different performance metrics A graphing engineer facilitates plotting of different performance metrics across the different experiments This can be used to infer trend how changes in input parameters affect network performance An explanation of the use of the different fields in the Analytics screen is detailed below User This Option can be used to compare different experiments created by a single user As Admin is a Super User he she can compare all the experiments created by all the users Things that cannot be done are gt gt User to User comparison cannot be made i e two or more different experiments created by two or more different users cannot be compared Experiments of a particular Network cannot be compared with experiments of other Networks In Tool Bar there are variou
12. Output with extension txt Note The temporary directory is navigated through the following step 163 Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Cryptographic_Technique Transposition BELOR gt Cryptographic_Method Decryption 1 gt 5 gt 2 gt 3 gt 4 gt Cipher_Text T gt O gt E gt T gt C gt S gt C gt TSE gt T gt TSOCETTECT Key_Text BLORE Interface Source Code Interface Source code written in C is given using this the user can write only the Transposition Decryption inside the function fnTranspositionDecryption using the variables already declared To view the interface source code go to NetSim Installation path src Programming TranspDecrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 164 Sample Scenarios Objective Encrypt and decrypt the message with the same key text using Transposition How to Proceed The objective can be executed in NetSim using the programming exercise available Under programming user has to select Cryptography gt Transpos
13. Peete a p Global array gres 32 Bit output 6bit 4 Bit conversion logic in each S Box Of the 6 input bits 4 bits 1 2 3 and 4 are used for identifying the S Box column 4 bits representing 16 columns and the remaining 2 bits 0 5 are used for identifying the S Box row 2 bits representing 4 rows The corresponding hexadecimal number is chosen from the S box Since each Hexadecimal number represents 4 bits in binary form the total output is of 32 bits 172 Input File Format Output File Format Cryptographic_Method Encryption The number of lines present depends on the number of Key_Text abcdef1234567890 iterations chosen The number of lines equals the number No_of_Iterations 1 of iterations plus one The last line of inputs gives the Data tetcos data encrypted data if encryption has been chosen else the decrypted data if decryption has been chosen The previous lines give the DES Key generated for encryption or decryption 11010101011111001001101011000010111001100001100 1616075733F724B40 Interface Source Code Interface Source code written in C is given using this the user can write only the DES Encryption inside the function fnDESEncryption using the variables already declared To view the interface source code go to NetSim Installation path src Programming DesEncrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows
14. The objective can be executed in NetSim using the programming exercise available Under programming user has to select Cryptography Advanced DataEncryptionStandard 1 Encryption Sample Inputs In the Input panel the following steps need to be done Output 2 Decryption SampleMode should be selected Encryption need to be selected Enter the Key Text in the provided field Only hexadecimal characters have to be entered Maximum of 16 characters can be entered in this field Characters more than 16 will be filled in the Data field Number of Iterations need to be selected The value ranges from 1 to 16 Data needs to be entered in this field that has to be encrypted Data can be entered only when the Enter Key Text field is filed with 16 hexadecimal characters Maximum of 1500 characters can be stuffed into this field Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Keyl i e if Iteration is 1 in binary format is obtained The corresponding Cipher text is obtained Click on Copy button and then on the Paste button to make use of the Cipher text for Decryption Once the sample experiment is done then Refresh button can be clicked to create New Samples Sample Inputs In the Input panel the following steps need to be done SampleMode should be selected 177 e Once the Encryption is done click on Copy and Paste buttons The encrypted data is fille
15. The results of the program should be written into the output file Output txt Window Size The Window Size for Selective Repeat is 7 Input File Format Output File Format Algorithm Selective_Repeat Data_File C Users P Sathishkumar Documents 1 Th txt gt Bit_Error_Rate 5 Sequence_Number 3 Window_Size 4 Valuel gt Value2 gt Value3 gt Value4 gt Types There are five types of formats of writing in the output file Each format is written in specific condition the types are explained below The condition of writing the types is explained in the algorithm Typel Valuel CNT Value 2 output of the slidingcount function Value 3 FRAMES Value 4 TRANSMIT Type2 Valuel DT Value 2 Frame number Value 3 Frame s Source address Value 4 Frame s Destination address Type3 Value 1 EV Value 2 Output of the intro_error function Value 3 Frame Source address Value 4 Frame s Destination address Typed 294 Value 1 ACK Value 2 POS Value 3 Acknowledgement frame s Source Address Value 4 Acknowledgement frame s Destination Address Types Value 1 DEL Value 2 count of frames being deleted Value 3 FRAME Value 4 DELETED Note The above convention to write into the Output Txt ismandatory Values in Quotes to be written into file Output Txt as it is including Case DT gt Frame No gt nodel gt nod
16. V Add these commands to the linker command line Compile Dela 0 a Enables a delay in milliseconds if make complains Bes y Xi about the makefiles time stamp Makefile generation IV Use fast but imperfect dependency generation Default X Cancel Help Input File Format Output File Format The data format in the input file is as follows Write the received message Server Input Protocol TCP Operation Server Client Protocol TCP Operation Client Destination IP 192 168 0 132 Ex 192 168 0 2 Requesting for the connection 260 lt Client IP Message gt Ex 192 168 0 2 Requesting for the connection Interface Source Code Interface source code written in C is given using this the user can write only the TCP Client function To view the interface source code go to NetSim Installation path src Programming SocketTCP c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP PC to PC Communication Socket Programming UDP Programming Guidelines This section guides the user to link his her own code for PC to PC Communication Socket programming to NetSim Pre Conditions The user program should read the input from text file named Input with extension txt The user program after executing the concept should write
17. after which next set of packets are aggregated to be sent 802 1lac MAC and PHY Layer Implementation Improvements in 802 1 lac compared to 802 11n Feature 802 11n 802 11ac Spatial Streams Up to 4 streams Up to 8 streams MIMO Single User MIMO Multi User MIMO Channel 20 40 80 and 160 20 and 40 MHz Bandwidth MHz optional BPSK QPSK 16QAM BPSK QPSK Modulation 64QAM and 256QAM 16QAM and 64QAM optional Max Aggregated 65536 octets 1048576 octets Packet Size MAC layer improvements include only the increment of number of aggregated packets from 64 to 1024 The MCS index for different modulation and coding rates MCS Index Modulation Code Rate 0 BPSK 1 2 1 QPSK 1 2 2 QPSK 3 4 3 16QAM 1 2 130 16QAM 3 4 64QAM 2 3 64QAM 3 4 64QAM 5 6 256QAM 3 4 256QAM 5 6 Receiver sensitivity for different modulation schemes in 802 llac for a 20MHz Channel bandwidth MCS Index Receiver Sensitivity in dBm 0 82 1 79 2 77 3 74 4 70 5 66 6 65 7 64 8 59 9 57 131 Number of subcarriers for different channel bandwidths Capacity relative to PHY Standard Subcarriers 20MHz in 802 11ac 802 11n 802 1 lac 2OMHz Total 56 52 Usable 4 pilot x1 0 802 11n 802 1 lac 4OMHz Total 114 108 Usable 6 pilot x2 1 802 11n 802 1 lac 80MHz Total 242 234 Usabl
18. e Select Selective Repeat as Algorithm e Create a Data file txt and save it on the disk e Select the path of the above created Data file txt which could be Maximum of 100000 bytes e Select Bit Error Rate BER as 104 5 from the drop down menu e Select Sequence number Bits as 3 from the drop down menu e A default value is entered for Window Size as 4 1 Then Run button need to be clicked Output Output for the above Sample is as follows 2 An Output Table is obtained when Run button is clicked In the Output Table Transmitted frame Data and Acknowledgement and their corresponding Counts is obtained The Total Count is also obtained The table is given below Output Total data frames to be transmitted 24 Data 26 Acknowledgement 7 Total 33 296 Note The Total data frames to be transmitted and Total count in the Output table depends on size of the txt file 3 The details of the Data Frames flowing from Node 1 to Node 2 are obtained on the right hand side panel Below are the details that is obtained in the tool O O O Data Frame 1 is flowing from Node1 to Node2 with no error Data Frame 2 is flowing from Node1 to Node2 with no error Data Frame 3 is flowing from Node1 to Node2 with no error Data Frame 4 is flowing from Node1 to Node2 with error Acknowledgement from Node2 to Node1 Data Frame 4 is flowing from
19. gt Output 300 0 0 0 0 0 rate of node 8 Priority of Node8 2nd second gt Output rate of node 1 gt Priority of Node 1 gt gt Output rate of node 8 Priority of Node8 Nth second gt Output rate of node 1 gt Priority of Node 1 gt gt Output rate of node 8 Priority of Node8 Sample File data 1 gt 0 00 gt 0 gt 0 00 gt 0 gt 100 00 gt 1 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt 2 gt 0 00 gt 0 gt 0 00 gt 0 gt 100 00 gt 1 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt 3 gt 0 00 gt 0 gt 0 00 gt 0 gt 100 00 gt 1 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt 0 00 gt 0 gt Interface Source Code Interface source code written in C is given using this the user can write only the Scheduling inside the function fnMMFA using the variables already declared To view the interface source code go to NetSim Installation path src Programming MMF c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 280 Sample Scenarios Objective The objective is to allocate the output capacity among the various input capacities using Max Min Fare MMF Scheduling algorithm How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming menu selectScheduling Sample Input B
20. the same if the Key Value is same The Cipher Text in case of Encryption is Alpha Numeric i e for the user to understand in a better manner and in case of Decryption the tool converts it to Binary form i e since the tool doesn t recognize Alpha Numeric Cryptography Data Encryption Standard DES Encryption 170 Programming Guidelines This section guides the user to link his her own code for DES Encryption to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt 64 Bit plain text 64 bit key AY a ss ae 4 hits Pamaacin 36 bit key 2 23 Bits Left Circular Shift Permutation e LefCircular Shin 4 32 Bit Swap h A 64 Bit cipher text 171 Details ofeach Iteration Li Rii Ri Lii F Ri K 32 Bits 32 Bits 28 Bits 28 Bits wj Box and P Box Operations 6 6 6 6 6 6 6 6 4 4 4 4 4 4 4 4
21. 1 gt DSR 1ib LinkLayerAck obj warning LNK4 99 PDB vc8 pdb was not found with DSR lib LinkLayerAck Filter rgico cur bmp dlg 1 gt List lib List obj warning LNK4 99 PDB vc8 pdb was not found with List lib List obj or at D Unique Identifier 67DA6AB6 F800 4 1 gt 1ibDSR vexproj gt D Akhilesh DSR DSR12 1ibDSR Debug 1ibDSR d11 j a Rebuild All 1 succeeded failed skipped F Resource Files Specifies the name of the filter ATEI E Output 12 55 PM 2 1 2014 102 The WLAN h header file which was included in DSR solution must be edited and the line where _declspec dllexport PHY_VAR varl was written must be replaced with _declspec dllimport PHY_VAR var1 For viewing the variable value in the command prompt the following lines must be added in DSR c include WLAN h if var1 fprintf stderr lf n var1 gt dTotalReceivedPower dBui R he c RouteR i CheckRo i Solution Explorer ZARE var1 DEVICE_PHYVAR 1 1 h WLAN h printf d var1 gt nDIFS a amp Resource Files PHY_VAR pstruPhy gt dTotalReceivedPower pstruPhy gt dTotalReceivedPower dFadingPower E DSR lib ojd NaS X xoqjoo DSR_DEVICE_VAR devVar1 DSR_DEV_VAR 1 DSR_DEVICE_VAR devVar2 DSR_DEV_VAR 2 DSR_DEVICE_VAR devVar3 DSR_DEV_VAR 3 DSR_DEVICE_VAR devVar4 DSR_DEV_VAR 4 DSR_DEVICE_VAR devVar5 DSR_DEV_VAR 5 DSR_DEVICE_VAR devV
22. 192 168 0 55 192 168 0 55 857938 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 858687 00e04c1100c8 0016178F7661 192 168 0 152 59521 00e04c1100c8 00161 78F7661 IP 192 168 0 152 860164 00e04c1100c8 0016178F7661 192 168 0 152 860753 00e04c1100c8 00161 78F7661 192 168 0 152 192 168 0 55 873240 00e04c1100c8 00161 78F7661 192 168 0 152 192 168 0 55 874731 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 875346 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 877394 00e04c1100c8 00161 78F7661 192 168 0 152 192 168 0 55 9 Repeat the same procedure by increasing the number of systems lnnahaati noe PENET 102 160 0452 increase the number of nodes transferring data in the network Inference Export to csv in the network and also Using Netpatrol one can analyze the throughput of the file transfer in the network Furthermore you can drill down to each packet and get information relating to packet length source IP address Destination IP address Source MAC Address Destination MAC Address etc 138 Programming Menu Available only in Academic version This menu contains network programming exercises Run down the menu and select the desired programming exercise The programs available are as follows e Assignments of Sites to Concentrator e Address Resolution Protocol e Cryptog
23. 4ax Lang libDSR dll fn_NetSim_DSR_GeneralPacketProcessing stru_NetSim_EventDetails pstruEventDetails 0x0073fb18 stu_DSR_Prc _ libDSR dll fn_NetSim_DSR_Run Line 58 Oxia bytes c aded for NetworkStack dil 4 Call Stack C Breakpoints Comman E Immediat E Output E Error List J Autos E Locals Find Symb EWatch 1 Solution Explorer Ready Adding the variable to watch Watch the change in the variable as the code progress by right clicking on the variable amp clicking on add watch tab This is useful if to continuously monitor the change in the variable as the code progresses File Edit View Project Build Debug Tools Test PurifyPlus Window Community Help Jy vd be a gt amp inti asama bus gt SR He B B T a tua e de PacketProcessing ca x M 3x Global Scope Wfn_NetSim_DSR_GeneralPacketProcessing NetSim EVEN _ Name Value Type F O moea 0100732338 PRAEC svu PR PRREQIdentifcaton 0 insgred SH pabuRouteCache 0x00000000 Time siu DSR I patuSendeutfer 0x00000000 Dest stu DSR E Q peruRREQTable 0x00000000 T stru PSR Adye UKJAYERAK lt umame psmuMantSuffer 0x00000000 dAcKT su PSR Zo dsMerics FreqSent0 recor stru DSR port int fn NetSim DSI eralPacket sing NetSim EVE ddress nextHop Call Browser rene Create Unit Tests P Go To Definition OU Go To Declaration Q Find All References Go To Header File pst s QuickWatch C
24. Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Input txt file has the original data bits the type of parity Output txt file the First line odd or even and the error data bits is the LRC bits value for the Parity Odd or Even original data bits The Second Data Tetcos line is the LRC bits value for Data_Bits_Original 0101010001100101011101000110001 the error data bits 10110111101110011 00111010 LRC bits of the Data_Bits_Error 001010110100010101010100011000110 original data 110111101110011 01000101 LRC bits of the error data Interface Source Code Interface source code written in C is given using this the user can write only the Longitudinal Redundancy Check inside the function fnLRC using the variables already declared To view the interface source code go to NetSim Installation path src Programming LRC c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 203 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Longitudinal Redundancy Check LRC How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Error Detecting Codes in that Longitudinal redundanc
25. INode3 gt Server IDHCP_ACK gt Server gt 192 168 0 107 IDHCP_DISCOVER gt INode4 gt Nodel gt INode4 gt Node2 gt INode4 gt Node3 gt INode4 gt Server IDHCP_OFFER gt Server gt Node4 IDHCP_REQUEST gt INode4 gt Server IDHCP_ACK gt Server gt 192 168 0 108 Interface Source Code Interface Source code written in C is given using this the user can write only the Dynamic Host Configuration Protocol inside the function fnDHCPServer and fnDHCPClient using the variables already declared To view the interface source code go to NetSim Installation path src Programming DHCP c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 189 Sample Scenarios Objective Find the Shortest Path using Dynamic Host Configuration Protocol How to Proceed The objective can be executed in NetSim by using the programming exercise available In the Programming menu selectDynamic Host Configuration Protocol Sample Input Follow the below given steps e Select number of clients e Set the Start Address and the End Address e Click on Run button to execute Output The Output that is obtained is given below 192 168 0 105 192 168 0 106 192 168 0 107 192 168 0 108 mm DHCP SWITCH DHCP SERVER 190 Error Correcting Code Hamming Code Programming Guidelines This sectio
26. Manage Config Tool Settings J Build Steps T Build Artifact Binary Parsers amp Error Parsers GCC Assembler F Libraries I General L GCC C Compiler amp Preprocessor S Enter Value pS Symbols Directories Optimization Debugging ws2_32 Warnings Miscellaneous MinGW C Linker General Miscellaneous Shared Library Settings Libraries I a Click Project Menu in the workspace b Select properties in the pull down menu c Then click C C Build d Select Setting e Select Libraries under MinGW C Linker f Press add button in the Libraries 1 window d Type ws2_32 file in the text box area e Click OK to confirm the changes in the workspace e If gcc compiler is used via command prompt a Set the path to Socket program location c C WINDOWS system32 cmd exe F mahi send gt b Create output file o file using below command 259 gcc C Filename c ex C WINDOWS system32 cmd exe F mahiX send gt gcee c send c F mahiNsend gt c Create exe file exe file using below command gcc o send send o lws2_32 e If using Dev C IDE go to Tools gt compiler options and add lws2_32 as follows before executing Compiler Options ss Compiler Sel Compiler set to configure Default compiler v a A Add the following commands when calling compiler
27. NetSim Installation path src Programming Crc32 c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To detect the error found in the file transferred between a Sender and Receiver using CRC32 How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming menu selectError Detecting Codes gt Cyclic Redundancy Check Sample Input e For No Error Case Follow the below given steps 0 SampleMode should be selected 1 SelectCRC32 as Algorithm from the list available 2 Under Condition NoError should be selected 3 Under Input Enter the path of the file name to get its CRC The file should be in txt format which should not exceed 5000bytes 4 Click on Run button to execute Refresh button can be used if new Inputs have to be given e For Error Case Follow the below given steps 0 SampleMode should be selected 1 SelectCRC32 as Algorithm from the list available 2 Under Condition Error should be selected 3 Under Input Enter the path of the file name to get its CRC The file should be in txt format which should not exceed 5000bytes 4 Click on Run button to execute Refresh button can be used if new Inputs have to be given 199 Sample Output e For No Error Case The Ca
28. Path in NetSim Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt 226 General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt File Format Input File Format Output File Format Class B Network_Address 128 0 0 0 No_of_Subnets 2 Host_IP_Address 128 0 0 89 The Output file contains the Default mask in decimal Network portion of Default mask in binary Host portion of Default mask in binary Subnet mask bit value Network portion of Subnet mask in binary Host portion of Subnet mask in binary Subnet mask in decimal number of zero in host portion number of host in each subnet Host address subnet number of the given host subnet address of the given host and Subnet address Starting address Ending address Broadcast address of each subnet The Output File format Default mask in decimal gt Network portion of Default mask in binary gt Host portion of Default mask in binary gt Subnet mask bit value gt Subnet mask in decimal gt Network portion of Subnet mask in binary gt Host portion of Subnet mask in binary gt Number of zero in host portion gt Number of host in each subnet gt Host address gt Subnet number of the given host gt Sub
29. Rebuild All 1 succeeded failed skipped Finished generating code ve8 pdb was not found with DSR 1ib LinkLayerAck or at D oq Solution libDSR 1 project T libDSR Gl External Dependencies Protocol h Stack h WLAN h source Files DSR lib Saw LAN True Header Files h hpp ho hm inkin Unique Identifier 93995380 89BD 4t Specifies the name of the filter 1217 PM 101 The library file D libWLAN Debug libWLAN lib file which got created must be copied and pasted in the DSR solution folder D ibDSR and must be included as a resource file in DSR solution in visual studio Organize v Open with Sharewith New folder Name Date modified ir Favorites BB Desktop B Downloads E Recent Places 2 1 2014 11 16 AM 2 1 2014 11 15 AM 2 1 2014 11 15AM __ Incremental Linke JAM Object File Library Program Debug D DLL File EXP File ibWLAN libWLAN libWLAN 2d libwy libw Wa Scan for viruses Open with Share with Fi Libraries Documents gt Music ictures TortoiseSVN H Videos Add to archive Add to libWLAN rar Compress and email Compress to libWLAN rar and email Restore previous versions 1 Computer amp Local Disk C amp Local Disk D ce Local Disk E a New Volume F amp New Volume G Send to Cut Copy Gu Network Create shortcut Delete Rename Properties li
30. Step 2 Inside this new folder on your desktop also copy and paste a Include folder b lib folder and c NetSim sln file from NetSim_Standard src simulation folder For example if you are modifying the DSR protocol then the new folder on your desktop would have CO Joll gt New folder X y Search New folder A Organize Include in library v Share with New folder z 2 Jr Favorites Name 5 Date modified ype T Downloads J DSR 5 23 2014 9 37 AM File folder 2 Recent Places J Include 20149 37AM File folder J lib 3 2014 9 37 AM File folder G Libraries NetSim sin 3 2014 6 28 PM Microsoft Visual S C Documents ae Note NetSim allows you to build DLLs for more than one protocol at a time For example if you want to build DLLs for DSR and AODV copy and paste both AODV and DSR folders along with Include lib and NetSim sIn from the simulation folder Double click on NetSim sln file to open the solution in visual studio NetSim Microsoft Visual Studio Eile Edit View Project Build Debug Team Data Tools Test Window Help i a SS id a a DO SI CD Debug win32 j ap lt TAG NAME Application_Lay Solution Explorer NietSim 1 project lt Tp AODV unavailable 5 Application unavailable C ARP unavailable lt i ATM unavailable 5 BGP unavailable x09 00 X i Cellular unavailable i CognitiveRadio unavailat Si
31. To release all memory after completion char fn_NetSim_protocol_ConfigPacketTrace constvoid xmlNetSimNode To configure the packet packet trace in terms of the parameters to be logged char fn_NetSim_protocol_WritePacketTrace const NetSim_PACKET To configure the event trace in terms of the parameters to be logged 105 Advanced Features Random Number Generator and Seed Values All network simulations involve an element of randomness Some examples are a Itis possible to configure the traffic sources in the simulation to generate traffic in a perfectly regular pattern However this is typically not the case in the real world b Node back off s after collisions are random to resolve contention issues c The exact bit which is errored based on Bit error probability of a wireless channel is decided randomly NetSim uses an in built Linear Congruential Random Number Generator RNG to generate the randomness The RNG uses two seeds values to initialize the RNG Having the same set of seed values ensures that for a particular network configuration the same output results will be got irrespective of the PC or the time at which the simulation is run This ensures repeatability of experimentation Modifying the seed value will lead to the generation of a different set of random numbers and thereby lead to a different sequence of events in NetSim When simulations are run for a network configuration with differ
32. change to your IO Path define license 5053 192 168 0 10 change to where your license server is running Flow of the batch program code and important functions main iterate from MIN to MAX for all of the devices to create configuration files If If certain network validation conditions are not met write the name of configuration file to NetSim_Batch_Log txtNetSim_Bact_Log txt contains all the config files that did not meet the neccassary validation conditions and were not created duing the batch execution Else Create configuration file fnCreateExperimentInformation fpConfigurationFilePointer fnCreateNetworkConfiguration fpConfigurationFilePointer fnCreateSimulationParameter fpConfigurationFilePointer fnCreateS tatisticsCollection fpConfigurationFilePointer End of creation of all config files Create batch file RunAll bat Run the batch file RunAll bat Loop over number of configuration files call NetSim executable which will write the output files Main end fnCreateNetworkConfiguration FILE fpConfigurationFilePointer fnCreateDeviceConfiguration fpConfigurationFilePointer fnCreateConnectionConfiguration fpConfigurationFilePointer 112 fnCreateDeviceConfiguration FILE fpConfigurationFilePointer fnConfigureRouters fpConfigurationFilePointer fnConfigureS witches fpConfigurationFilePointer fnConfigureWiredNodes fpConfigurationFilePointer fnConfigure
33. from 192 168 6 118 bytes 32 time ims TTL 127 from 192 168 6 118 bytes 32 time ims TTL 127 from 192 168 118 bytes 32 time 3ims TTL 127 from 192 168 6 118 bytes 32 time ims TTL 127 from 192 168 0 118 bytes 32 time ims TTL 127 from 192 168 090 118 bytes 32 time 24ms TTL 127 from 192 168 6 118 bytes 32 time 4ms TTL 127 from 192 168 080 118 bytes 32 time ims TTL 127 NOTE In case if no ping messages can be sent from source to destination disable windows firewall and try again IX The impact of the link propagation delay in NetSim Emulator is seen on a real packet 2 Example Application Video Steps at Source PC 1 Open VLC Media player gt Click Media menu Select Stream Option 2 Click add button then select the video which you want to play Open Media on P File pisc 32 Network E capture Device File Selection You can select local files with the following list and buttons C Users P Sathishkumar Desktop MANET Final_Video wmv Use a subtitle file Show more options Stream Cancel 336 3 Click on Stream Option Then click next button 4 Enable the display locally checkbox Then select the RTP MPEG Transport Stream from the drop down list as shown in the below screen shot Destination Setup Select destinations to stream to Add destinations following the streaming methods you need Be sure to check with transcoding that the format is compatible
34. gt packettrace csv Microsoft Excel D X Home Insert Page Layout Formulas Data Review View Team ox p i 7 F z idati z Z gt From Access gt A S Us Connections K Clea 3 Data Validation C eh ri a OS 2 m aE pg H al aa 2 ig From Web T Properties Reapply Bi Consolidate f p From Other Existing Refresh zyl Sort S7 Textto Remove gt 3 Group Ungroup Subtotal L FromText Sources Connections Ally Edit Links J Advanced Columns Duplicates What If Analysis X Get External Data Connections Sort amp Filter Data Tools Outline i 15 G fe Successful M 4 A B I c D E F G j H E 1 PACKET_IO SEGMENT_ID 7 PACKET_TYPE CONTROL_PACKET_TYPE SOURCE_IC DESTINATION_I TRANSMITTER_IC_ RECEIVER_I PACKET_STATUS 2 ON A Control_Packet ARP_Request NODE 2 Broadcast 0 NODE 2 ROUTER 1 Successful 3 ON A Control_Packet ARP_Reply ROUTER 1 NODE 2 ROUTER 1 NODE 2 Successful 4 ON A Control_Packet TCP_SYN NODE 2 NODE 3 NODE 2 ROUTER 1 Successful Step 3 Click the arrow 7 in the header of the column you want to filter In the list of text or numbers uncheck the Select All box at the top of the list and then check the boxes of the items you want to show For example click on arrow of SOURCE_ID and uncheck the Select all check box and select NODE 2 then click on ok All the rows which are having NODE 2 as source id will be shown 50 J 4 G D PACKET_ID SEGMEN
35. include lt stdlib h gt define MAXROUTER 6 define _DLL ere ROUTERTABLE int nDestID MAXROUTER 1 i Debug Ready x Eas Pree A eq Solution DVR 1 project S 3 Project Only gt Profile Guided Optimization gt Custom Build Rules Tool Build Order Add gt References Add Web Reference Set as StartUp Project Debug cut Remove Rename Unload Project S Properties 3 gm Al Solution Explorer JResource view 8 Select the mode for creating the exe i e debug or release mode by choosing the required option as shown in the figure The preferred setting is debug mode DVR Microsoft Visual Studio File Edt View Project Buld Debug Tools Test Window Community Help o dyr c Global Scope include lt windows h gt include lt stdio h gt include lt conio h gt include lt string h gt include lt malloc h gt include lt stdlib h gt idefine MAXROUTER 6 define _DLL struct ROUTERTABLE t int nDestID MAXROUTER 1 en CA Solution DYR 1 project s 8 B Header Files Gi Resource Files S amp Source Files 3 dvr c lt Solution Explorer Resource View Ready 145 Alternate way to create an exe in Debug Release Mode a Right click on the Project File gt Properties D
36. 1178 587 SrcIP 192 168 1 1 Dest IP 192 168 1 3 MAC_Add AAAAAAAAAAAF O xz is completed Simulation Time 1 279 ms Event Id 152ARP ARP_RequestSen t EventT ime 1279 647 SrcIP 192 168 2 4 DestIP 192 168 2 5 O z is completed Simulation Time 1 368 ms Event Id 162ARP ARP_ReplySent EventT ime 1368 346 SrcIP 192 168 2 5 MAC_Add AAAAAAAAAAAB Dest IP 1 92 168 2 4 is completed Simulation Time 1 458 ms Event Id 1 71ARP ARP_ReplyGot 1457 633 SrcIP 192 168 2 4 Dest IP 192 168 2 5 MAC_Add AAAAAAAAAAAB 1 z is completed Simulation Time 119 938 ms Event Id 3097 Breakpoint triggered Press any key to continue the process Press enter then control goes to the project and stops at the break point in the source code as shown below 92 File Edit View Project Build Debug Team Data Tools Test Window Help a a Gd 4 aala e G Q dD Debug win32 2 switching i O he ae ela S2IOPGaegdaQsid ua alo Si H glas Process 3696 NetSimCore exe Thread 3440 Main Thread WP W Stack Frame libTCP dll fn_NetSim_TCP_SEND_SEG 4 Send_SEG c x ca xX v Global Scope fn_NetSim_TCP_SEND_SEG fn_TCP_JacobsonTimer fnp_TCP_JacobsonT NETSIM_ID usnSourcePort usnDest_Port unsigned int unNo_of_Seg in Queue unSEG_Count unSEG_to_Transmit double dEventtime 0 0 nAppId pstruEventDetails gt nApplicationId
37. 2 9 3A Solution NetSim 1 project i a i DSR DSR Init function initializes the DSR parameters CheckRouteFound c C DSR c _declspec dllexport int fn_NetSim_DSR_Init struct stru_NetSim_Network NETWORK_Formal in DSR NetSim_EVENTDETAILS pstruEventDetails_Forn amp ie char pszAppPath_Formal MaintBuffer c char pszWritePath_Formal Gr Network _Layer_Ack c int nVersion_Type PacketProcessing c void fnPointer RouteCache c RouteError c fprintf stderr Source is modified n RouteReply c getch CA RartePaennect e return fn_NetSim_DSR_Init_F NETWORK_Formal pstruEventDetails Formal pszAppPath_Forn l m j f A Solut Can EES EE xoqjoo 1810 dxq ua5 Sig Properties Z fn_NetSim_DSR_Init VCCodeFurx Show output from Build J 8 3 ate Finished generating code List lib List obj warning LNK4 99 PDB vc1 pdb was not found with List lib List ob m E DSR lib DSR obj warning LNK4 99 PDB vcl pdb was not found with DSR lib DSR obj lt Name fn_NetSim_DSF_ DSR 1ib LinkLayerAck obj warning LNK4 99 PDB vc1 pdb was not found with DSR 1lib L File c users p sathi DSR vcxproj_ gt C Users P Sathishkumar Desktop Simulation DSR D11 DSR d11 FullName fn_NetSim_DSF C Maia E Output Step 4 Inside the simulation folder present on the desktop a DII folder will be created and inside the DLL s are built
38. 807284 142 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 TCP 28398 1218 00e04c1100c8 00161 78F7661 192 168 0 152 192 168 0 55 TCP 830056 158 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 TCP 830673 142 00e04c1100c8 00161 78F7661 192 168 0 152 192 168 0 55 TCP 831254 142 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 TCP 844359 982 00e04c1100c8 10016178f7661 192 168 0 152 192 168 0 55 TCP 846557 158 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 TCP 47166 142 00e04c1100c8 00161 78F7661 192 168 0 152 192 168 0 55 TCP 847760 142 loden4c1 1008 0016178F7661 192 168 0 152 192 168 0 55 TCP 849404 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 850567 00e04c1100c8 00161 78F7661 192 168 0 152 192 168 0 55 51178 00e04c1100c8 00161787661 192 168 0 152 192 168 0 55 851772 00e04c1100c8 o016178F7661 192 168 0 152 952531 653355 853948 854554 855863 856740 857341 O0e04c1100 8 o016176F7661 192 168 0 152 00e04c1100c8 0016178F7661 192 168 0 152 O0e04c1100c8 joo16178F7661 192 168 0 152 O0eD4e1 100c8 o016178F7661 192 168 0 152 OdeD4c1 1008 0016178F7661 192 168 0 152 OOeD4c1 100c8 o016178F7661 192 168 0 152 00e04c1 1008 0016178F7661 1192 168 0 152 192 168 0 55 192 168 0 55
39. Algorithm Borovska No_of_Switches 3 No_of_Edges 3 Source_Switch 3 Destination_Switch 1 Distance 11 Source_Switch 1 Destination_Switch 2 Distance 22 Source_Switch 3 Destination_Switch 2 Distance 33 Output txt file has the edges in the spanning tree which is selected from the input edges Node1 gt Node2 gt Cost gt Example 1 gt 2 gt 22 gt 1 gt 3 gt 11 gt 310 Interface Source Code Interface source code written in C is given Using this the user can write only the Borovska algorithm inside the function fnBorovska using the variables already declared To view the interface source code go to NetSim Installation path src Programming Boruvska c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To find a SpanningTree for a network using Borovska s algorithm How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming Menu selectSpanning Tree Sample Input e SampleMode should be selected e SelectBorovska as Algorithm from the list available e Select the Number of Switches Select 4 Switches as an Input e Click on 2 Switches to give the distance between them Similarly connect all the Switches that are available in the network The Distances between the Rou
40. Binary value of Address mask gt Binary value of Network Address gt Decimal value of Network Address gt Sample Output text Format 11000000 10101000 00000000 10001100 gt 1 gt 10000000 00000000 00000000 00000000 gt 10000000 00000000 00000000 00000000 gt 128 gt 0 gt 0 gt 0 gt Interface Source Code Interface source code written in C is given using this the user can write only the fnNetworkAddress function using the variables already declared To view the interface source code go to NetSim Installation path src Programming NetworkAddress c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To understand the concept of finding Network Address through programming Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Select the IP Address 223 e Select the Prefix value e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are done internally e Binary value of IP Address is obtained e Binary value of Address Mask is obtained e Binary value of Network Address is obtained e Decimal value of Network Address is obtained e Once the sample experiment is done then Refresh button can be clicked to create New Sa
41. Click the arrow L7 in the header of the column PACKET ID and uncheck the Select all check box and select the packet id which you want to observe for example 1 and then click on ok 51 A c D 7 4 Sort Smallest to Largest ntrol_Packet ARP_Request NODE 2 Broadcast 0 NODE 2 ROUTER 1 Z sort Largest to Smallest ntrol_Packet ARP_Reply ROUTER 1 NODE 2 ROUTER 1 NODE 2 Sort by Color ntrol_Packet TCP_SYN NODE 2 NODE 3 NODE 2 ROUTER 1 ntrol_Packet ARP_Request ROUTER 1 Broadcast 0 ROUTER 1 NODE 3 ntrol_Packet ARP_Reply NODE 3 ROUTER 1 NODE 3 ROUTER 1 ntrol_Packet TCP_SYN NODE 2 NODE 3 ROUTER 1 NODE 3 ntrol_ Packet TCP_SYN_ACK NODE 3 NODE 2 NODE 3 ROUTER 1 Select All pntrol_Packet TCP_SYN_ACK NODE 3 NODE 2 ROUTER 1 NODE 2 Pntrol_Packet TCP_ACK NODE 2 NODE 3 NODE 2 ROUTER 1 ita N A NODE 2 NODE 3 NODE 2 ROUTER 1 ae TCP_ACK NODE 2 NODE 3 ROUTER 1 NODE 3 ta N A NODE 2 NODE 3 ROUTER 1 NODE 3 E TCP_ACK NODE 3 NODE 2 NODE 3 ROUTER 1 ntrol_Packet TCP_ACK NODE 3 NODE 2 ROUTER 1 NODE 2 fia N A NODE 2 NODE 3 NODE 2 ROUTER 1 ata N A NODE 2 NODE 3 ROUTER 1 NODE 3 Pntrol_Packet TCP_ACK NODE 3 NODE 2 NODE 3 ROUTER 1 pntrol_Packet TCP_ACK NODE 3 NODE 2 ROUTER 1 NODE 2 Number Filters MON HAH bw No J Scenario is as shown below and traffic flow is from Wired Node 1 to Wired Node 2 Flow of packet 1 can be observed from the packet trace as shown below I
42. Configure each layer gt lt Set Physical Layer properties gt lt LAYER TYPE PHYSICAL LAYER e lt Set Protocol properties gt lt PROTOCOL NAME ETHERNET SETPROPERTY true gt lt Set protocol properties gt lt PROTOCOL PROPERTY ETHERNET _STANDARD IEEE802 3u gt lt PROTOCOL gt lt LAYER gt Solution To resolve this issue mouse over the corresponding attribute in order to get the tool tip that furnishes the details about the valid input for that attribute Note If the schema file and the configuration file are not present in the same folder the zigzag lines won t appear So place the Configuration file and Schema File in the same location or change the path of schema file in the configuration file Problem 2 Simulation runs successfully but errors are provided in the ConfigLog txt Since NetSim will crash if all the required parameters are not configured NetSim addresses this issue by enabling default values where ever required However the user is made to be aware of the missing parameters in the Configuration file by mentioning the errors in the ConfigLog txt Example Error produced in the ConfigLog txt when the value for the Update timer for router is not specified in the Configuration file is given below 73 Attributes UPDATE_TIMER not found in line number 349 Tag path TETCOS_NETSIM NETWORK_CONFIGURATION DEVICE_CONFIGURATION DEVIC E 3 LAYER 2 ROUTIN
43. Interface source code written in C is given using this the user can write only the Transmission Flow Control Go Back N inside the function GoBackN using the variables already declared To view the interface source code go to NetSim Installation path src Programming GoBackN_TFC c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Send and receive the data using Transmission Flow Control Go BackN How to Proceed The objective can be executed in NetSim using the programming exercise available Under ProgrammingMenu select Transmission Flow Control gt Go Back N 320 Sample Input By using the InputPanel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows 1 SampleMode should be selected SelectGoBackN as Algorithm Create a Datafile txt and save it on the disk Select the path of the above created Datafile txt which could be Maximum of 100000bytes SelectBit Error Rate BER as 104 5 from the drop down menu Then Run button need to be clicked Output Output for the above Sample is as follows 2 An OutputTable is obtained when Run button is clicked In the OutputTable Transmittedframe Data and Acknowledgement and their corresponding Counts is
44. Output with extension txt The path of the input file and the output file can be viewed on clicking the Button Path in NetSim 210 Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Input File Content This gives us the format of Output Txt to which PCR 1 the user has to write his program CDVT 0 200 Each value should be separated by a delimiter gt Actual_Arriva_Time 0 100 There should be no extra white spaces or blank lines Previous_Theoratical_Time 0 000 Example Valuel gt Value2 gt Value3 gt Valuel Cell conformation Flag Value 2 Next Cells Expected arrival Time Value 3 Current cell s Actual arrival time Note The above convention to write into the Output Txt are mandatory A sample file format is as follows 3 gt 2 000 gt 1 000 gt Interface Source Code Interface source code written in C is given using this the user can write only the Longitudinal Redundancy Check inside the void main using the variables already declared To view the interface source code go to NetSim Installation path src Programming VSA c To f
45. Select the file click import the following window will appear The Text Wizard has determined that your data is Delimited If this is correct choose Next or choose the data type that best describes your data Original data type ra felch tense emai ii Characters such as commas or tabs separate each field Fixed width Fields are aligned in columns with spaces between each field Start import at row File origin 437 OEM United States Preview of file C Users P Sathishkumar Documents Manet_Trace txt rame NumberFrame TypeFrame TransmissionTypeSourceNode IDDestination ARREQBroadcastNode 1BroadCastNode 118 0020 0054 00 ARREPPoint to PointNode 2Node 1Node 212 0020 8354 00 RACKPoint to PointNANANode 114 0021 9524 0021 95 DATAPoint to PointNode 1Nede 2Node 11472 0020 0086 0 Step 3 Click next the following window will appear in that select the check box as mentioned in the following window and then click Finish button 44 below Delimiters V Tab l Semicolon Comma Space E Other Data preview Text Import Wizard Step 2 of 3 This screen lets you set the delimiters your data contains You can see how your text is affected in the preview Text qualifier X w Number Frame Type Frame TransmissionType BourceNode ID Destination Nd REQ roadcast Node 1 roadCast REP oint to Node 2 Node 1 ACK oi NA NA ATA oi Node 1 Node 2 X
46. Using the Input Output module inputs are given and output is viewed The working of the concept algorithm is done in the process module The link between the Input Output module and process module is as follows Input Output Process Input Text file Read Input Input txt Process Output Text file Output txt Write Output Process is the module for which the user has to write and link the written code when using the user mode The code can be written either by C or C the executable file created should be linked to the software The input and output file format should be as required as they form the link between the software and the user executable file Creating exe using Visual Studio 1 Select File gt New Project 141 M rosoft Visual Studio File Edit view Tools Test Window Community Help New r Project Ctrl Shift N Open File Ctri N india D J Project From Existing Code Ctrl Shift 5 Recent Files Recent Projects Exit Output Show output from SJ Solution Explorer A Resource view Ready 2 Select Win32Console Application Name the project and select location to save the project and then click OK button Templates 5 Visual C Visual Studio installed templates ATL CLR General MFC My Templates Smart Device f Test search Online Templates Win32 Distributed System Solutions Other Proje
47. e Choose the Number of Transmitting Mobile Stations e Enter the Binary Datas as per the limits e Choose the respective Codes for each Mobile Station Number of Transmitting Mobile Stations gt 3 Maximum of 8 Mobile Stations Mobile Station Binary Data 1Byte Code 1 01110111 11111111 2 00110011 1 11 11 11 1 245 3 11011101 11 1 111 1 1 e Then Run button needs to be clicked Refresh button can be used if new inputs have to be given Output The Output for the above sample is as follows e In Transmitter side the values of each Mobile Station s Binary Data Code Encode and Signal are shown if the user clicks the Mobile Station e The Signals will be broadcast from each Mobile Stations e The Interference Pattern will be formed in Base Station and if the user clicks the Base Station interference Pattern will be displayed e Decode mode needs to be selected e In Receiver side the Interference Pattern will be broadcasted to each Mobile Station from the Base Station e In Receiver side the values of each Mobile Station s Interference Pattern Code Decode and Binary Data are shown if the user clicks the Mobile Station e Once the sample experiment is done Refresh button can be clicked to create new samples The Values are showed in Table Transmitter Side Mobile Binary Code Encode Signal Station Data 1Byte 1 01110111 11111111 1 1 1 1 1 1 1 1 1 1
48. follow the steps given below 1 Run the scenario again in sample mode On completion minimize NetSim and keep it running without closing the programming exercise 2 Open your code in Visual studio 2010 or in Eclipse development environment This is how your code should look when opened in Visual studio as a project Refer visual studio help on how to create a Win 32 based Exe project gt DVR Microsoft Visual Studio File Edit View Project Build Debug Tools Test Window Community Help O Gu s Bw b Debug z Win32 SF St BL Tt at FSS SO EER NE Ss Solution Explorer 2 X GoBackN c Start Page cn LALE Global Scope wil al A Solution DYR 1 project B include lt windows h gt al d 5 gd DVR include lt stdio h gt a Header Files include lt math h gt Gi Resource Files a r a Acknowledgement frame constant AETA define POSACKDATA POSITIVEPOSITIVEPOSITIVEPOSITIVEPOSITIVEACKACK Retransmission Request frame constant define NEGACKDATA NEGATIVENEGATIVENEGATIVENEGATIVENEGATIVEACKACK unsigned long g_ulnErrorSeedl 12345676 unsigned long g_ulnErrorSeed2 23456781 double idata 0 00 char szApp_path NULL char szTempPath NULL char szInput_path NULL char szOutput_path NULL lt gt 3 Aso Eza pAPr lt gt Output vax Show output from z Liab el Jy 3 Right click on your project and select properties as shown below File Edit View Project Build
49. graph will be plotted gt Add metrics file of different experiments to compare e The Metrics Table This is the table that is generated when the Experiments are selected using the Select the Metrics File Experiment option gt The first column in the Metrics Table consists of the Check Boxes that are used to select i e by default all the Experiments are selected or deselect the selected Experiments If an Experiment is selected then that Experiment would be compared along with other Experiments else the Experiment would not be compared with other Experiments gt The second column in the Metrics Table X button is available This X button is used for deleting the Experiment 61 Running Simulation via Command Line Interface CLI Note This feature is available from v7 onwards In v8 NetSim can be run via CLI for Internetworks Advanced Wireless Networks MANET Wireless Sensor Networks Personal Area Networks BGP Networks Cellular Networks LTE Networks and Cognitive Radio Networks only For other networks NetSim v amp can only be run via GUI Advanced users can model their simulation via a config file which can be created without the NetSim GUD and run the simulation from command line This is typically done in cases where very large networks are to be simulated it takes too long to create it in the GUD or to run a series of simulations automatically Ref Help on NetSim Batch Processing The c
50. mahi send gt gcc c send c F mahiNsend gt 3 Create exe file exe file using below command gcc o send send o lws2_32 ot C WINDOWS system32 cmd exe F mahi send gt gce c send c F mahiX send gt gcece o send send o lws2_32 F mahi send gt 4 Once exe file is created link that exe file with NetSim gt Programming gt User mode Creating exe using Dev C 1 Open the C source code file in Dev C Then go to Execute gt Compile E Dev C 4 9 9 2 File Edit Search View Project Execute Debug Tools CVS Window Help gg iruga nC Ctri F9 oo aa m E May C Run Ctri F10 Parameters x Project Classes Debug ARP c FF Compile amp Run F9 ooo EE Rebuild All Ctrl F11 f Syntax Check Clean Profile analysis define MEM BUFFER1 100 define MEM BUFFER2 200 Define a FILE pointer for parsing the con FITLE filenninter NIT T Dev C will create the exe file in the same location where the C source code file is located 2 Once exe file is created link that exe file with NetSim gt Programming gt User mode 150 How to De bug your code linked to NetSim s Programming Exercise In NetSim programming exercise menu users can write and link their code as executables exe If the user s exe file does not provide the correct output NetSim UI will display the message Error in User Code To de bug your code on getting this message
51. nSocketId unsigned int pstruEventDetails gt szOtherDetails Get the socket interface address and assign to local variable pstru_Socket_Interface NETWORK gt ppstruDeviceList pstruEventDetails gt nDeviceId 1 gt pstruSocketInterface pstru_Tmp_Segment pstru_Socket_Interface gt pstruSocketBuffer nSocketId gt pstruPacketlist if pstru_Tmp_Segment T All debugging options like step over F10 step into F11 step out Shift F11 continue F5 are available After execution of the function the control goes back to NetSim and then comes back to the custom code the next time the function is called in the simulation To stop debugging and continue execution remove all breakpoint and press F5 key This thengives the control back to NetSim for normal execution to continue 93 Event Trace Writingfile name and line number of the code which generated the event To debug your own custom code it is often helpful to know which section of the code file name amp line number generated the event under study To use this feature Step 1 Enable the event trace lt SEED SEED1 12345678 SEED2 23456789 SEED3 34567890 SEED4 45678901 gt lt Configure the Static Routing gt lt STATIC_ROUTING STATUS DISABLE gt lt Configure the Static Routing gt lt STATIC_ARP STATUS DISABLE gt lt ANIMATION STATUS DISABLE gt lt SIMULATION_PARAMETER gt SATSAS AIEA lt FILTER INCLUDE_SUBE
52. two interfaces Both the nodes are in different networks 11 1 0 0 and 11 2 0 0 in this case The same logic is extended as the number of devices is increased 29 Applications NetSim allows users to model and simulate the applications Custom Database FTP Email HTTP PEER_TO_PEER Video Voice SS aa ey a To set up the application click and drop the application icon from the tool bar as shown below cieaee Usms a Point Station Sensor Sink Agent Trace Trace Simulation Metrics Setting 2 ai 300 350 meters gt Right click on the application icon and select properties i A operties J Application Application 1 Applicationi Application Type CUSTOM ri Application ID 1 fi Source_Count 0 1 Source_Id 0 X Destination _Count 0 1 Destination_Id z fi Start_Time F End_Time 10000 0 PACKET_SIZE Distribution CONSTANT 0 Value Bytes 1460 fi INTER_ARRIVAL_TIME Distribution CONSTANT 0 Value micro sec 0 20000 Add Remove This properties window allows you to set the traffic You can add or delete one or more applications 30 Common properties for all the traffic types Application ID This property represents the unique identification number of the application Start time This property represents the start time of the application in seconds End time This property represent the end time of the application in
53. 4 Frame s Destination address Typed Value 1 ACK Value 2 POS Value 3 Acknowledgement frame s Source Address Value 4 Acknowledgement frame s Destination Address Types Value DEL Value 2 count of frames being deleted Value 3 FRAME Value 4 DELETED Note The above convention to write into the Output Txt ismandatory Values in Quotes to be written into file Output Txt as it is including Case DT gt Frame No gt nodel gt node2 gt DT denotes Data from node to node 2 EV gt Error Flag gt nodel gt node2 gt EV denotes Error Value i e If the above frame has error then set the error flag as 1 else set the flag as 0 ACK gt POS gt node2 gt node1 gt Acknowledgement for that above frame received is sent to node 2 to node 1 Ex CNT gt 1 gt FRAMES gt TRANSMIT gt DT gt 1 gt nodel1 gt node2 gt EV gt 0 gt node1 gt node2 gt ACK gt POS gt node1 gt node2 gt 290 Interface Source Code Interface source code written in C is given using this the user can write only the Sliding Window Protocols Go Back N inside the function GoBackN using the variables already declared To view the interface source code go to NetSim Installation path src Programming GobackN_SW c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP
54. 7 Open file location in Windows Vista Properties gt find target in Windows XP Cryptography Data Encryption Standard DES Decryption Programming Guidelines This section guides the user to link his her own code for DES Decryption to NetSim Pre Conditions 173 The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt 64 Bit plain text 64 bit key Reduction Thru transposition 56 bit key 2 28 Bits Left Circular Shift Left Circular Shift Left Circular Shift 64 Bit cipher text 174 Details ofeach Iteration Li Rui Riz L1 OF Ri KD 32 Bits 32 Bits 28 Bits 28 Bits cn Ba Box and P Box Operations 6 6 6 6 6 6 6 6 4 4 4 4 4 4 4 4 Prenton renner P Global array g_pe 32 Bit output 6bit 4 Bit conversion logic in each S Box Of the 6 input bits 4 bits 1 2 3 4 are used for identifying the S Box column 4 bits representing 16 colu
55. CBR CBR stands for Constant Bit Rate Packets of constant size are generated at constant inter arrival times e VBR VBR stands for Variable Bit Rate The two types of Suppression Model that can be selected are Deterministic Markov Chain Video Video is an electronic medium for the recording copying and broadcasting of moving visual images 32 Model Type e Continuous Normal VBR This model is the simplest of all models It uses Normal Distribution for the generation of bits per pixel In this model consecutive packet sizes are independent of each other o Frames per second Number of frames arriving per second This is in the range of 10 50 o Pixels per frame Number of pixelsin each frame This is in the range of 10000 100000 o Bits per pixel u Mean value of the normal distribution used to generate the value of bits per pixel o Bits per pixel 2 Standard Deviation of the normal distribution used to generate the value of bits per pixel e Continuous State Autoregressive Markov This model incorporates the autocorrelation between the frames Also current packet size depends on the previous packet size via the first order autoregressive Markov process o Frames per second Number of frames arriving per second This is in the range of 10 50 o Pixels per frame Number of pixels in each frame This is in the range of 10000 100000 o Constant A First order autoregres
56. DVR Microsoft Visual Studio File Edit View Project Build Debug Tools Test Window Community Help fnRandomNo DVR Property Pages Configuration Active Release Platform Active win32 Common Properties S Configuration Properties General Debugging Ge CCH S Linker Manifest Tool XML Document Generator S Browse Information Build Events Custom Build Step Code Analysis Web Deployment S Application Verifier Ready B General Configuration Manager Active solution configuration Active solution platform A Solution DYR 1 project S GA Dy Gi Header Files CH Resource Files S E Source Files GA dvr c Win32 Project contexts check the project configurations to build or deploy Project Configuration DYR Release Platform v Win32 E Solution Explorer a JResource view 146 11 To build the Solution Select Build Menu gt Build Solution File Edit View Project Build Debug Tools Test Window Community Help a gu Build Solution F7 b Release gt Win32 g fnRandomNo JAFAR wo S a N Rebuild Solution Ctrl Alt F7 ar Fa Rk Ds Zier v1 Jz T dvr Clean Solution E Global Scope j Build DYR F nf inc lude lt wind Rebuild DVR f z eq Solution DVR 1 project Clean DYR r S Gm He
57. General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and 193 The results of the program should be written into the output file Output txt Input File Format Output File format Algorithm CRC_12 Output contains two values which is the Condition No_Error written in the separate line File_Path C Users P Sathishkumar Docum The First line has the CRC value of the ents l Th txt gt data Sender side CRC value The Second line has the CRC value of the data Receiver side CRC value Example 8CB 000 Interface Source Code Interface Source code written in C is given using this the user can write only the Cyclic Redundancy Check inside the function fnCRC using the variables already declared To view the interface source code go to NetSim Installation path src Programming Crce12 c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To detect the error found in the file transferred between a Sender and Receiver using CRC12 How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming Menu selectError Detecting Codes gt Cyclic Redundancy Check Sample Input e For No Error Case Follow the belo
58. Miscellaneous MinGW C Linker General Miscellaneous Shared Library Settings Libraries l oF r Enter Value x Libraries I ws2_32 a Click Project Menu in the workspace b Select properties in the pull down menu c Then click C C Build d Select Setting e Select Libraries under MinGW C Linker f Press add button in the Libraries 1 window d Type ws2_32 file in the text box area e Click OK to confirm the changes in the workspace e If gcc compiler is used via command prompt a Set the path to Socket program location 273 c C WINDOWS system32 cmd exe F mahi send gt b Create output file o file using below command gcc C Filename c ex C WINDOWS system32 cmd exe F mahiXN send gt gcee c send c F mahiNsend gt c Create exe file exe file using below command gcc o send send o lws2_32 e If using Dev C IDE go to Tools gt compiler options and add lws2_32 as follows before executing Compiler Options amp Compiler i Ogh Compiler set to configure Default compiler Add the following commands when calling compiler V Add these commands to the linker command line 1Ws2_32 Compile Del 0 7 Enables a delay in milliseconds if make complains ome heey X about the makefiles time stamp Makefile generation MV Use fast but imperfect dependency generation D
59. Nodel to Node2 with no error Data Frame 17 is flowing from Node1 to Node2 with no error Acknowledgement from Node2 to Nodel Data Frame 18 is flowing from Nodel to Node2 with no error Data Frame 19 is flowing from Nodel to Node2 with no error Data Frame 20 is flowing from Nodel to Node2 with no error Data Frame 21 is flowing from Nodel to Node2 with no error Data Frame 22 is flowing from Nodel to Node2 with no error Data Frame 23 is flowing from Nodel to Node2 with error Data Frame 24 is flowing from Node1 to Node2 with no error Acknowledgement from Node2 to Nodel Data Frame 23 is flowing from Nodel to Node2 with no error Data Frame 24 is flowing from Node1 to Node2 with no error Acknowledgement from Node2 to Nodel new samples Sliding Window Protocol Selective Repeat Programming Guidelines This section guides the user to link his her own code for Selective Repeat to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt 293 Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and
60. Sample Scenarios Objective Send and receive the data using Sliding Window Protocol Go BackN How to Proceed The objective can be executed in NetSim using the programming exercise available Under ProgrammingMentu select Sliding WindowProtocol gt Go Back N Sample Input By using the InputPanel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows e SampleMode should be selected e SelectGoBackN as Algorithm e Create a Datafile txt and save it on the disk e Select the path of the above created Datafile txt which could be Maximum of 100000bytes e SelectBit Error Rate BER as 104 5 from the drop down menu e SelectSequencenumber Bits as 3 from the drop down menu e A default value is entered for WindowSize as 7 1 Then Run button need to be clicked Output Output for the above Sample is as follows 291 2 An OutputTable is obtained when Run button is clicked In the OutputTable Transmittedframe Data and Acknowledgement and their corresponding Counts is obtained The TotalCount is also obtained The table is given below Output Total data frames to be transmitted 24 Data 30 Acknowledgement 5 Total 35 Note The Total data frames to be transmitted and Total count in the Output table depends on size of the txt file 3 The details of the DataFrames
61. Size of Buffer from the given list of values The value ranges from 100 to 1000 Enter in the Input Capacity in the fields provided The range that can be entered is from 100 to 1000 These values will be plotted in the graph on the right hand side panel Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e Once the Run button is clicked a graph with Output and Discard Rate is obtained e The graph explains in detail as in what is the Output and Discard Packet Rate for the given inputs e Once the sample experiment is done then Refresh button can be clicked to create New Samples 240 Multi Level Multi Access Programming Guidelines This section guides the user to link his her own code for Multi Level Multi Access Protocol to NetSim Pre Condition User written program should read the value from the Input txt in the temporary directory which is having input from the GUI at runtime The output should be stored in Output txt in the temporary directory for display User written program should return an integer value Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of
62. a parameter during simulation time To get detailed help please refer Dynamic Metrics Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation MPLS Networks New Experiments In the Simulation menu select Simulation gt New gt MPLS Networks To perform experiments in MPLS Networks the following steps should be followed e Create Scenario e Establishing Connections e Set Device Properties e Set Link Properties 20 e Enable Packet Trace Optional e Run Simulation Create Scenario Adding CPE Click on the CPE icon in the toolbar and drop the CPE on the environment Adding Router Click on the Router icon in the tool bar click and drop the Router on the environment By default a Router has eight ports Establishing Connections The steps for connecting CPE and Router are as follows e The connections between two CPEs cannot be made in the network e The connection possibilities are gt CPE to Router and gt Router to Router Set the Properties for the devices and links Right click over the devices and then select Properties to set the properties of the links and the devices Modifying Viewing Accepting Properties On opening an already configured properties of an application the input fields will be frozen i e the input cannot be changed To modify these values click on the Modify button in the screen Now the input value can be changed Click on the Accept button the
63. also needs to be given Let Router 3 be the DestinationRouter e Click on 2 Routers to give the distance between those 2 Routers A blue Line would be pointing from the SourceNode to the DestinationNode The Distances between the Routers that needs to be given are as follows 1 Router 1 and Router 2 gt 35 2 Router 2 and Router 3 gt 30 3 Router 3 and Router 4 gt 60 287 4 Router 4 and Router 1 gt 20 5 Router 4 and Router 5 gt 67 and 6 Router 5 and Router 2 gt 58 Click on Run button to view the output in the RoutingTable Output The Output for the above Scenario is as follows Click the Run button to view program output The Output is obtained in a RoutingTable All possible Routes and the corresponding Distance are obtained Below is a RoutingTable for the above Inputs The ShortestPath would be highlighted in Green color in the RoutingTable Click on RefreshButton to Refresh the screen and create fresh Scenarios Routing Table Route Distance KM 5 gt 2 gt 1 gt 4 gt 3 gt 173 5 gt 2 gt 1 gt 4 gt 113 5 gt 2 gt 1 gt 93 5 gt 2 gt 3 gt 88 5 gt 2 gt 58 5 gt 4 gt 1 gt 2 gt 3 gt 132 5 gt 4 gt 1 gt 2 gt 22 5 gt 4 gt 1 gt 87 5 gt 4 gt 3 gt 127 5 gt 4 gt 67 5 gt 0 288 Sliding Window Protocol Go Back N Programming Guidelines This section guides the user to link his her own code for Go Back N to NetSim Pre Conditions The us
64. be changed To modify these values click on the Modify button in the screen Now the input value can be changed Click on the Accept button the modified values will be saved This View button is enabled once the Accept Button is clicked To view the given values click on the View button Enable Packet Trace or and Event Trace Optional Click Packet Trace icon Event Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help check Generating Packet trace and Event trace Note Event Trace is applicable only for MANET Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation 18 BGP Networks New Experiments In the Simulation menu select Simulation gt New gt BGP Networks To perform experiments in BGP Networks the following steps should be followed e Create Scenario e Establishing Connections e Set Device Properties e Set Link Properties e Click and drop applications and configure e Enable Packet Trace or and Event Trace Optional e Enable Dynamic Metrics Optional e Run Simulation Create Scenario Adding Border Router e Click and drop the Border Router icon from the tool bar Note Maximum you can have 3 Autonomous systems in a single scenario Adding Internal Router e Click on the Internal Router icon in the tool bar and drop the Internal Router onto the Autonomous systems created By default a Router has eigh
65. bit of position 1 of input data 3 gt 6 gt 7 gt 10 gt 11 gt 1 gt 1 gt the check bit of position 2 of input data 191 5 gt 6 gt 7 gt 12 gt 13 gt 0 gt 0 gt the check bit of position 4 of input data 9 gt 10 gt 11 gt 12 gt 13 gt 0 gt 0 gt the check bit of position 8 of input data 3 gt 5 gt 7 gt 9 gt 11 gt 13 gt 0 gt 0 gt the check bit of position 1 of error data 3 gt 6 gt 7 gt 10 gt 11 gt 1 gt 1 gt the check bit of position 2 of error data 5 gt 6 gt 7 gt 12 gt 13 gt 1 gt 1 gt the check bit of position 4 of error data 9 gt 10 gt 11 gt 12 gt 13 gt 1 gt 1 gt the check bit of position 8 of error data 4 gt 8 gt 12 gt the check bit position whose value has been changed and the final error position Interface Source Code To view the interface source code go to NetSim Installation path src Programming HammingCode c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To detect and correct the single bit error occurs in the transmission of data How to proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Error Correcting Code gt Hamming Code Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Parity need
66. can be done offline or during simulation Note that enabling them to be plotted during simulation would consume a lot of memory and slow down the simulation significantly Dynamic metrics can be set by clicking on the dynamic metrics icon in the GUI and selecting those metrics that you wish to monitor F Internetworks Dynamic Metrics al J Internetworks ae n or AE Plot graphs after simulation Application Metrics Plot graphs during simulation Simulation will slow dowm significantly oughput for Linki Wired Link2 Wired Link3 Wired Link4 Wired LinkS Wired SES S88 82 Upon completion of the simulation dynamic metrics plots can be viewed by clicking on Link throughput in Metrics screen NetSim Plot maximum 0 723371 Link_Throughput_1 minimum 0 000000 mean 0 658562 SD 0 014481 Throughput mbps 0 f f L fi 1 1 1 1 1 O 10000 20000 30000 40000 50000 60000 70000 80000 90000 10000C Time ms 42 Generating Packet Trace Available in Standard and Pro Version only Introduction NetSim allows users to generate trace files which provide detailed packet information useful for performance validation statistical analysis and custom code de bugging Packet Trace logs a set of chosen parameters for every packet as it flows through the network such as arrival times queuing times departure times payload overhead errors collisions etc By providing a hos
67. can be TCP_SYN TCP_SYN_ACK TCP_ACK WLAN_ACK ICMP_ECHO_REQUEST ICMP_ECHO_REPLY etc SOURCE_ID Specifies the Node ID of the source device DESTINATION_ID Specifies the Node ID of the destination device TRANSMITTER_ID Specifies the Node ID of the device transmitting the packet RECEIVER_ID Specifies the Node ID of the device receiving the packet APP_LAYER_ARRIVAL_TIME Specifies the time microseconds at which the data packet is generated at Application Layer of source device 45 TRX_LAYER_ARRIVAL_TIME Specifies the time microseconds at which the packet reaches the Transport Layer of source device NW_LAYER_ARRIVAL_TIME Specifies the time microseconds at which the packet reaches the Network Layer of source device MAC_LAYER_ARRIVAL_TIME Specifies the time microseconds at which the packet reaches the Data Link Layer of source device PHY_LAYER_ARRIVAL_TIME Specifies the time microseconds at which the packet reaches the Physical Layer of source device PHY_LAYER_START_TIME Specifies the time microseconds at which the packet leaves the Physical Layer of source device PHY_LAYER_END_TIME Specifies the time microseconds at which the packet reaches the Physical Layer of destination device APP_LAYER_PAYLOAD Specifies the size of the Payload at Application Layer TRX_LAYER_ PAYLOAD Specifies the size of the Payload at Transport Layer NW_LAY
68. custom code is to modify protocol source code and link them as DLLs Dynamic Link Library DLL DLL is the shared library concept implemented by Microsoft All DLL files have a dll file extension DLLs provide a mechanism for sharing code and data to upgrade functionality without requiring applications to be re linked or re compiled It is not possible to directly execute a DLL since it requires an EXE for the operating system to load it through an entry point Part 1 How to build Dynamic Link Libraries DLLs Note If the DLL needs to be debugged then build the DLL in debug mode or else build in release mode Dynamic link libraries DLLs can be built using different compilers a Using Microsoft Visual Studio Compiler a Compiler Microsoft Visual Studio To create the DLL follow the steps given below Note Make sure that visual studio has been installed in your computer 82 Step 1 Copy the source code folder of the protocol library which you wish to change This would be present in NetSim_Standard src simulation folder and paste it in a suitable location for example a new folder on your desktop For example if you wish to modify the DSR protocol then copy paste the folder NetSim_Standard src simulation DSR to a new folder in the desktop Note It is recommended to keep a separate copy of the NetSim Standard src Simulation older to have the backup of the original source code
69. e ba ag EA lar z M et z jele fal 3 a a eo jis 2 m y lar zZz et iz jle 4 oO a Conf igure Conf igurePrimitives Conf igPacketTrace fn NetSim_TCP_WritePacketTrace C Program Files NetSim Standard bin 1libRout ing d11l gt gt fn_NetSim_RIP_Init gt z et jle E oO a ga gt z et jls E iz a TA PV Ce ea N_NETSIM_AIP_WPItTEracKeti race jrror in config file fore number of Interface is configured compare to setted interface count 75 Step 4 Fix the error and then run NetSim independent of UI with debug mode as in Step 2 Check whether simulation runs successfully by checking Event Trace Metrics and ConfigLog files Note Set the breakpoint as 1 when the simulation has to run without any pause in any event Problem 5 Simulation does not commence and error is displayed at the command prompt Also Zigzag lines appearing at the tag specifying the Layer in the Configuration file This issue arises mainly when the closing tag is not specified correctly for a particular layer in the Configuration file Example If the closing tag is not specified for the Data link Layer then the zigzag lines appear at the starting tags of Data link Layer and the Network Layer lt Configure each layer gt lt li taLink Layer properties gt CLBYER TYPES DATALINK_LAYER gt T Serc Protocol p
70. experiments in Advanced Wireless Networks the following steps should be followed e Create Scenario e Set Device Properties e Enable Packet Trace or and Event Trace Optional e Run Simulation Create Scenario Adding Node e Click on the Node icon in the tool bar and click and drop it inside the grid Note A Node cannot be placed on another Node A Node cannot float outside of the grid Adding Base Station and Subscriber Note This is applicable for Fixed Wi MAX e Click on the Base Station icon in the tool bar and click it onto the environment e Click on the Subscriber icon in the tool bar and click and drop it on the Base Station coverage area 17 e Subscriber cannot be placed on another Subscriber It has to be clicked and placed on the Base Station coverage area Set Node Properties e Right click on the appropriate node to select Properties Note This is applicable for MANET Set Base Station BS Properties e Right click on the Base Station BS and set Properties Note This is applicable for Fixed Wi MAX Set Subscriber Properties e Right Click on the appropriate Subscriber to select Properties Note This is applicable for Fixed Wi MAX Set Environment Properties e Right click on the Environment and click Properties Note This is applicable for MANET Modifying Viewing Accepting Properties On opening an already configured properties of an application the input fields will be frozen i e the input cannot
71. file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To find a SpanningTree for a network using Prims algorithm How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming Menu selectSpanning Tree Sample Input e SampleMode should be selected e SelectPrim s as Algorithm from the list available e Select the Number of Switches Select 4 Switches as an Input e Click on 2 Switches to give the distance between them Similarly connect all the Switches that are available in the network The Distances between the Routers that needs to be given are as follows o Switch 1 and Switch 2 gt 67 Km 316 o Switch 1 and Switch 4 gt 46 Km o Switch 1 and Switch 3 gt 89 Km o Switch 2 and Switch 3 gt 78 Km o Switch 2 and Switch 4 gt 99 Km o Switch 3 and Switch 4 gt 56 Km e SourceSwitch can be any 1 from list Here SourceSwitch is selected as 3 e Click on Run button to execute Refresh button can be used if new Inputs have to be given Sample Output e The SpanningTreeTable with the Path SourceSwitch and Destination Switch and Distance is obtained Below is the Table that is obtained for the above inputs SpanningTreeTable Path Distance KM 3 4 56 4 1 46 1 2 67 e The Length of the SpanningTree KM would be given below in the o
72. find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP PC to PC Communication Chat Application UDP Programming Guidelines This section guides the user to link his her own code for PC to PC Communication Socket programming to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Coding Pre Requisites 271 The prerequisite for the creation of sockets in the Windows based C complier is they must have winsock h header file in its standard header file folder In order to use the commands of the winsock h there must be wsock32 lib library file present in the C complier To link wsock32 lib different steps have to be followed for different compilers as shown For Visual Studio complier 2010 10 0 versions the library file linkage must be made in the following way LANDII Property Pages 00 7 7 aa __ Configuration Active Debug v Platform Active Win3
73. flowing from Nodel to Node 2 are obtained on the right hand side panel Below are the details that is obtained in the tool O O O Data Frame 1 is flowing from Node1 to Node2 with no error Data Frame 2 is flowing from Node1 to Node2 with no error Data Frame 3 is flowing from Node1 to Node2 with no error Data Frame 4 is flowing from Node1 to Node2 with error Data Frame 5 is flowing from Node1 to Node2 with no error Data Frame 6 is flowing from Node1 to Node2 with no error Data Frame 7 is flowing from Node1 to Node2 with error Acknowledgement from Node2 to Nodel Data Frame 4 is flowing from Node1 to Node2 with no error Data Frame 5 is flowing from Node1 to Node2 with no error Data Frame 6 is flowing from Node1 to Node2 with no error Data Frame 7 is flowing from Node1 to Node2 with no error Data Frame 8 is flowing from Node1 to Node2 with no error Data Frame 9 is flowing from Node1 to Node2 with no error Data Frame 10 is flowing from Nodel to Node2 with no error Acknowledgement from Node2 to Nodel Data Frame 11 is flowing from Node1 to Node2 with no error Data Frame 12 is flowing from Nodel to Node2 with no error 292 O O e Once the sample experiment is done then Refresh button can be clicked to create Data Frame 13 is flowing from Nodel to Node2 with no error Data Frame 14 is flowing from Nodel to Node2 with no error Data Frame 15 is flowing from Nodel to Node2 with no error Data Frame 16 is flowing from
74. gt 2 gt 1 gt 2 gt 1 gt 0 gt 1 gt 2 gt 0 gt 1 gt Descending Order 1 gt 0 gt 1 gt 2 gt 0 gt 1 gt 1 gt 1 gt 2 gt 2 gt 1 gt 2 gt 1 gt 0 gt 1 gt Interface Source Code interface source code go to Interface source code written in C is given using this the user can write only the Sorting Algorithm inside the function fnInsertsort using the variables already declared To view the NetSim Installation path src Programming InsertionSort c To find NetSim s Installation path right click NetSim icon and select 302 Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Project Objective To study the working of Sorting Techniques How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Sorting Techniques Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Select the Insertion Sort as Sorting Type e Select the Sorting Order as either Ascending or Descending e Select the total number that has to be sorted The values available are from 3 to 25 e Enter the Number Value in the field provided The value entered should be within the range of 1 to 9999 e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps
75. gt Source Address 00111111 gt Data 01001000011001010110110001101100011011111110 gt Error Status 0 gt CheckSumReceiver 0000 gt Binary Values 0100100001100101011011000110110001101111 gt H 72 gt e 101 gt 1 108 gt 1 108 gt 0 111 gt Message Hello gt Interface Source Code Interface source code written in C is given Using this the user can write only the functions fnBitStuffing and fnDeStuffing using the variables already declared To view the interface source code go to NetSim Installation path src Programming BitStuffing c 206 To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Bit Stuffing technique How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Framing Sequence gt Bit Stuffing Sample Inputs In the Input panel e Sample mode should be selected e Fill in the HDLC Frame fields available o Enter the 8 binary digits in the Source Address field o Enter the 8 binary digits in the Destination Address field o Enter data with a maximum of 5 characters o CRC polynomial will be chosen by default and select either Error or No Error e Then Run button needs to be clicked Refresh button can be used if new Inpu
76. gt NetS imCore exe Usage NetSimCore AppPath PATH IO0Path PATH license Port IP activate roam flag M flag D 1 h AppPath Specify the path where NetSim dll s are present This is typically the bin folder of the install directory I0Path Specify the path where input configuration xml is present In the same path output Metrics txt will be written by NetSim license Specify the license server address For Floating License this is of the form portPipaddress where port is usually 5653 and ipaddress is the IP address of the PC where the licens e server is running For Node locked license Internet Activated License this is of the form activate Used to activate sw lock Netsim will ask key to activate Used to checkout checkin the roaming license O to run roaming first if available without checkout then float 1 to checkout a roaming license to checkin a roaming license Memory leak flag For Tetcos debug use only 2 to dump the memory leak 3 to break at certain allocation number and dump memory leak at Example M 2 dumps the memory leak at the end M 3 Ask for allocation number and dump the memory leak at end Break the simulation at a certain event id Example D 899 will break the simulation when 899th event is triggered D i will only print the line number and file name in event tra Display the help 66 Configuration file Let
77. list of attributes that the element supports This is known as IntelliSense Using this feature you can select the options that are required to create the desired scenario Color coding is followed to indicate the elements and the attributes in a unique fashion The following screenshot displays the Configuration xml which is opened through the Visual Studio o Configuration xml Microsoft Visual Studio o e File Edit View Debug Team XML Data Tools Test Window Help doe E sal 9 e 1 G gt a eo oa GIO Re tele e 2 lO VPGugeasQ Configurationxml X k xml version 1 0 encoding UTF 8 gt lt 100 4 68 To reformat it click on Reformat Selection icon Configuration xm Microsoft Visual Studio o S ete File Edit View Debug Team XML Data Tools Test Window Help xe sGdadgs s BB 9 e H o gt T gt of X T a EHEFERFEELEEET ELE Configuration xml X k2 xml version 1 0 encoding UTF 8 gt lt Always mention xml schema file in first line of configuration xml gt a lt TETCOS_NETSIM xmlns ns http www w3 org 20 1 XMLSchema instance ns noNamespaci lt EXPERIMENT_INFORMATION gt lt VERSION gt NetSimStandard lt VERSION gt lt USER gt Admin lt USER gt lt NAME gt Experiment lt NAME gt lt DATE gt Sat Sep 6 17 48 56 IST 2014 lt DATE gt lt COMMENT gt lt COMMENT gt lt EXPERIMENT_INFORMATION gt lt GUI_INFORMATION gt lt The following
78. modified values will be saved This View button is enabled once the Accept Button is clicked To view the given values click on the View button Enable Packet Trace Optional Click Packet Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation 21 Cellular Networks New Experiments In the Simulation menu select gt New gt Cellular Networks For Example to arrive CDMA In the Simulation menu select gt New gt Cellular Networks gt CDMA To perform experiments in Cellular Networks GSM CDMA the following steps should be followed e Create Scenario e Set Device Properties e Set link properties e Click and drop applications and configure e Enable Packet Trace or and Event Trace Optional e Enable Dynamic Metrics Optional e Run Simulation Create Scenario Adding Base Transceiver Station BTS Click on the BTS icon in the toolbar and click it onto the environment Adding Mobile Switching Centre MSC Click and drop MSC in the environment Adding Mobile Station MS e Click on the Mobile Station icon in the tool bar click and drop it on the Base Station coverage area e Mobile Station cannot be placed on another Mobile Station It has to be clicked and placed on the Base Station coverage area Set the Properties for the dev
79. obtained The TotalCount is also obtained The table is given below Output Total data frames to be transmitted 24 Data 30 Acknowledgement 5 Total 35 Note The Total data frames to be transmitted and Total count in the Output table depends on size of the txt file Once the sample experiment is done then Refresh button can be clicked to create new samples Transmission Flow Control Selective Repeat Programming Guidelines This section guides the user to link his her own code for Selective Repeat to NetSim 321 Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Window Size The Window Size for Selective Repeat is 7 Input File Format Output File Format Algorithm Selective_Repeat Valuel gt Value2 gt Value3 gt Value4 gt Data_File C Users P Sathishkumar Types Documents Th txt gt There are five types of fo
80. of the app path lt app path gt Docs Sample_Configuration This folder contains the sample configuration xml files in the corresponding folders Internetworks CognitiveRadio MANET Zigbee WSN LTE Cellular lt app path gt Docs Help File e Contains NetSim User Manual and Experiment Manual e Contains the help for NetSim source code Note Not available for Academic version only lt app path gt Docs xml e Contains xml files related to NetSim lt app path gt Docs Icons e Contains icons for GUI of NetSim lt app path gt Movie e Contains animations for Basic menu of NetSim Note Available in Academic version only 13 Running Simulation via Graphical User Interface GUI Internetworks Internetwork simulation is available in NetSim with LAN WAN LAN modeling capability Internetwork runs Ethernet Wireless LAN IP Routing and TCP UDP and allows users to log packet and event in NetSim standard version only traces New Experiments In the Simulation menu select gt New gt Internetworks To perform experiments in Internetworks the following steps should be followed e Create Scenario e Connect the devices e Click and drop Application s to generate traffic e Set Properties for the devices links and the applications e Enable Packet Trace or and Event Trace Optional e Enable dynamic metrics Optional e Run Simulation Create Scenario Adding Devices Internetworks comes with the palette of vari
81. required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Router_ID 1 gt Router_Name Router_1 gt No_Of_Neigh Initial Stage gt Source Router ID bour 2 gt Neighbours_ID 2 gt 5 l i Destination Router_ID 2 gt Router_Name Router_2 gt No_Of_Nei gh RouterID gt CostID gt Intermediate bour 1 gt Neighbours_ID 1 RouterID Router_ID 3 gt Router_Name Router_3 gt No_Of_Neigh bour 0 Ex Router_ID 4 gt Router_Name Router_4 gt No_Of_Neigh 0 gt 1 gt 2 gt 1 gt 0 bour 0 Router_ID 5 gt Router_Name Router_5 gt No_Of_Neigh 9 gt 1 gt 5 gt 1 gt 0 bour 1 gt Neighbours_ID 1 0 gt 2 gt 1 gt 1 gt 0 Router_ID 6 gt Router_Name Router_6 gt No_Of_Neigh bour 0 0 gt 5 gt 1 gt 1 gt 0 1 gt 1 gt 2 gt 1 gt 0 1 gt 1 gt 5 gt 1 gt 0 185 1 gt 2 gt 1 gt 1 gt 0 1 gt 2 gt 5 gt 2 gt 1 1 gt 5 gt 1 gt 1 gt 0 1 gt 5 gt 2 gt 2 gt 1 2 gt 1 gt 2 gt 1 gt 0 2 gt 1 gt 5 gt 1 gt 0 2 gt 2 gt 1 gt 1 gt 0 2 gt 2 gt 5 gt 2 gt 1 2 gt 5 gt 1 gt 1 gt 0 2 gt 5 gt 2 gt 2 gt 1 Interface Source Code Interface Source code written in C is given using this the user can
82. select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective The objective is to allocate the output capacity among the various input capacities using First In First Out FIFO Scheduling algorithm How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming menu selectScheduling Sample Input By using the InputPanel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows e SampleMode should be selected e Algorithm should be selected as FirstIn First Out FIFO e Under Input field 0 EnterOutputLinkCapacity which is in MBPS The options that are available for selecting are 100 200 300 1000 MBPS Select 400 MBPS 1 EnterBits Node for one second limit 0 9999 in the fields available i e Nodel 100 Node2 100 ccccccccccecees ones Node8 100 o The Priority for the Node needs to be given Click to Select or Deselect the Priority of a Node In this Sample the Priorities are as follows Node Priority Number Given 1 7 2 6 3 8 4 3 5 2 6 1 7 5 8 4 e Click on the Run button 278 Output Note The Transmission of the data takes place in the following sequence The Bits Node are represe
83. simplified formula for the path loss between two isotropic antennas in free space L in dBm 20logio 41d0 A Where L is the path loss in decibels _ is the wavelength and d is the transmitter receiver distance in the same units as the wavelength The code for calculating the Path loss is included in the function fn_NetSim_WLAN_CalculateReceivedPower which is present in the file 802_11_PHY c path for the file is NetSim Standard src Simulation WLAN Shadowing Slow shadowing in wireless network is the attenuation caused by buildings or any obstacles between a transmitter and a receiver In the model with shadowing the shadowing value X typically defined in dB is added to or subtracted from the average received power zero means Gaussian distributed random variable with standard deviation The default value for standard deviation is chosen as 5 dB The code for calculating the shadow loss is present in file 802_11_PHY c path for the file is NetSim Standard src Simulation WLAN Fading In wireless communications fading is deviation of the attenuation affecting a signal over certain propagation media The fading may vary with time geographical position or radio frequency and is often modelled as a random process In NetSim the Rayleigh Fading which follows Rayleigh Probability Distribution with mean of 1 is used The code for calculating fading loss is present in the file 802_11_PHY c path for the file is NetSim Standard src Simulat
84. the changes and overwrite the file in case of write protection Step 3 Click on Build gt Build Solution File Edit View Project Build Debug Team Data Tools Test Window Help ia 6S ld a E Build Solution Ctrl Shift B Win32 Te ANA Rebuild Solution Clean Solution Build DSR Rebuild DSR f DJ Solution NetSim 1 project Clean DSR a ZDSR F Fa Init func Project Only C CheckRouteFound c _declspec d1 Profile Guided Optimization 2tSim_Network NETWORK_Formal eee Batch Build ETAILS pstruEventDetails Formal e Maaa 2 ath_Formal i Configuration Manager 2Path_Formal 4 Network_Layer_Ack c Compile Ctrl F7 Type C3 PacketProcessing c vexe omreanter RouteCache c RouteError c fprintf stderr Source is modified n RouteReply c getch g s 4 RouteRequest c return fn_NetSim_DSR_Init_F NETWORK_Formal pstruEventDetails_Formal pszAppPath_Formal pszWritePath_f SendBuffer c S Global Scope a 2 g m g pi fe g A ci o So gt 3 S 84 Check that the build is successful and necessary DLL files have been built i o0 NetSim Microsoft Visual Studio File Edit View Project Build Debug Team Data Tools Test Window Help i Ga aw 4 ww 9 Li B d Debug win32 L lt TAG NAME Application_Lay iO he ae E 2 OHGegaasQ Ds cx Solution Explorer Global Scope 9 fn_NetSim_DSR_Init stru_NetSim_Network NETWORK E al 3
85. the program should be written into the output file Output txt Note The naming of the input and the output file must be same as the text displayed in the Methodology screen File Format Input File Output File Number_of_Nodes 2 Nodel_Address 250 Node2_Address 500 Output txt file has the decade s number decade s type and actual decades node addresses Decade No gt Decade Type gt Decade gt aderess1 gt adress2 gt Sample Output 0 gt 0 gt 0000100100 gt 1 gt 1 gt 0000000001 gt 2 gt 2 gt 0000000001 gt 500 gt 241 3 gt 1 gt 0000100000 gt 4 gt 2 gt 0000000001 gt 250 gt Interface Source Code Interface source code written in C is given using this the user can write only the Multi Level Multi Access Protocol inside the function fnMLMA using the variables already declared To view the interface source code go to NetSim Installation path src Programming MLMA c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Multi Level Multi Access MLMA How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Multi Level Multi Access Protocol Sample Inputs In the Input panel the following steps ne
86. three sections are used only for the GUI gt lt ENVIRONMENT_VIEWTYPE gt Grid View lt ENVIRONMENT_VIEWTYPE gt lt MAP_POSITION gt 5478 3269 lt MAP_POSITION gt ee ee a imanna 100 om Wht Sections of Configuration file These are the different sections in Configuration xml e EXPERIMENT_INFORMATION e GUIINFORMATION e NETWORK CONFIGURATION e SIMULATION_PARAMETER e PROTOCOL_CONFIGURATION e STATISTICS COLLECTION EXPERIMENT_INFORMATION This section contains the details about the user credentials such as the user mode Admin or Exam or Practice experiment name date on which the experiment is created and the comments about the experiment This section plays a significant role while running NetSim through GUI 69 GUILINFORMATION This section contains the GUI information like the environment length view type etc and the network name which is desired to be run NETWORK_CONFIGURATION This section is used to configure the devices and the links of the desired network at the each layer of the OSI stack It consists of DEVICE_CONFIGURATION CONNECTION and APPLICATION_CONFIGURATION DEVICE_CONFIGURATION configures the devices in the desired network while the CONNECTION configures the links in the desired network and APPLICATION configures the Applications SIMULATION PARAMETER Simulation time and seed values are described in this section PROTOCOL_CONFIGURATION IPV4 and static ARP are enabled or
87. time Value gt End time Value gt user Value gt Guard Interval Value gt Bandwidth Value gt start time Value gt end time Value gt nouser Value gt Guard Interval Value gt Bandwidth Value gt start time Value gt end time Value gt nouser Value gt channel no Value gt Bandwidth Value gt start time Value gt End time Value gt user Value gt and so on The value of the GuardInterval is 1 and the value of the no user is 0 Example GuardInterval 1 gt Bandwidth 100 gt StartTime 0 0 gt EndTime 0 0 gt nouser 0 gt Channelno 1 gt Bandwidth 100 gt StartTime 0 0 gt EndTime 100 0 gt user 1 gt GuardInterval 1 gt Bandwidth 100 gt StartTime 100 0 gt EndTime 100 0 gt no user 0 gt Interface Source Code Interface source code written in C is given Using this the user can write only the function fnTDMAQO using the variables already declared To view the interface source code go to 249 NetSim Installation path src Programming TDMA c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Time Division Multiple Access technique How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Multiple Access Technology gt Time Division Multiple Acces
88. to NetSim Installation path src Programming ARP c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenario Objective To find the Medium Access Control MAC Address of the Destination Node using Address Resolution Protocol ARP How to Proceed The objective can be executed in NetSim by using the programming exercise available In the Programming menu select Address Resolution Protocol ARP Sample Input By using the Input Panel that is available on the left hand side a Sample Scenario is created The Steps involved in creating are as follows e Sample Mode should be selected e Click on the drop down button and select 6 Nodes e List of NodesNumbers along with their PAddresses that would be availed are Node Numbers IP Address 1 192 168 1 1 2 192 168 1 2 3 192 168 1 3 4 192 168 1 4 5 192 168 1 5 6 192 168 1 6 154 e ARP Request System and ARP Reply System needs to be selected That is 1 ARP Request System 192 168 1 1 Any one Node Number to be selected 2 ARP Reply System 192 168 1 6 Any one Node Number to be selected e Then Run button need to be clicked Output Output for the above Sample is as follows e The Source Node i e Node Number 1 in the above example sends the ARP Requ
89. used to capture packets in real time transfer Note This menu is available only in Academic Version Simulation Programming Basics Utilities Help Frames Capture Basics Select the desired item under Basics for animated explanations Note This menu is available only in Academic Version A NetSim Simulation Programming Real time Utilities Help Introduction Internetworks Legacy Networks Advanced Wireless Networks MPLS Networks Cellular Networks VLAN Devices Frames Capture Ethernet Wireless LAN TCP UDP Example Upon selecting Ethernet under Internetworks following screen will open out F NetSim Basics Basics Help BE E Introduction 1 Data Rate Introduction l5 Physical Le A Local Area Network technology that allows connection of a variety of devices E Frame Structure computers printers fax machines scanners sharing a common medium for E crc transmission of data eg cable E Inter Frame Gap E Backoff Algorithm Ethernet is standardized by IEEE as 802 3 Working of Protocol Scanner Ethernet Switch 10 Utilities This section displays consists of the following options e Login As This option is used to login as that user which the user desires This can be done based on the access provided e User Management This option is used for Adding Deleting Change Password and Change Mode of the users Also unwanted experiments can be deleted
90. write only the Distance Vector Routing inside the function fnDistVectAlgorithm using the variables already declared To view the interface source code go to NetSim Installation path src Programming DVR c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Find the Shortest Path using Distance Vector Routing How to Proceed The objective can be executed in NetSim by using the programming exercise available In the Programming menu selectDistance Vector Routing Sample Input Follow the below given steps e Click on two Routers to establish a Path i e 1 Click on Router number 1 and 2 then similarly on Router number 2 and 3 3 and 4 4 and 5 5 and 6 amp 6 and 1 186 e Router 1 2 3 4 5 6 are connected e Click on Initial Intermediate and Final button to execute Output The Output that is obtained is given below Dest Cost NextHop Dest Cost NextHop Dest Cost NextHop Router 5 Intermediate Initial button can be clicked to view the initial table of the all router Intermediate button can be clicked to view the intermediate table of the all router Final button can be clicked to view the final table of the all router Distance Host Configuration Protocol Programming G
91. 000 gt Error in getting license Press any key to continue 80 Solution NetSim is based on the client server architecture When NetSim runs in the client machine it will check for the license in the same machine first If license is not available in the same machine then No license for product 1 will be displayed in the command prompt and the server machine will be checked for the availability of license If no license is available in the server machine also then again No license for product 1 will be displayed in the command prompt So if No license for product 1 is displayed in the command prompt two times then check in the NetSim license server to know about the availability of license and adjust the number of current users of NetSim in order to get the license 81 How to write Custom Code in NetSim NetSim allows the user to write the custom code for all the protocols by creating a DLL Dynamic Link Library for their custom code and replacing NetSim s default DLL with the user s custom DLL There are two important steps in this process and each of these steps has various options as explained in the subsequent pages 1 Part 1 Building your own DLLs 2 Part 2 Linking your custom DLL with NetSim Note Writing custom code and Configuration file serve unique purposes Configuration file is used to create a scenario when users want to run NetSim via CLI whereas writing
92. 01001111 gt Key_Text 00010110 gt 01000101 gt 01010011 gt BNLORE Interface Source Code Here a skeleton code written in C is given using this the user can write only the XOR Decryption inside the function fnXORDecryption using the variables already declared 168 To view the interface source code go to NetSim Installation path src Programming XorDecrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Encrypt and Decrypt the message by using the same KeyText in XOR How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming menu select Cryptography gt XOR Note Encryption should be done first and then Decryption should be done Encryption Sample Inputs By using the InputPanel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows o SampleMode should be selected o EncryptionMode needs to be selected o PlainText and KeyValue need to be entered in the fields available That is Plain Text gt tetcos Maximum of 8 Characters Key Text gt 123456 Maximum of 8 Characters Note If the length of the PlainText and Key Value differs then an error would pop out o Then Run button need to be clicked Output
93. 1 1 1 1 111111 1 111111111111111 1111 1 1 1 1 1 1 1 11 111111111111111 11111111 2 00110011 1 1 1 11 11 1 1 1 1 1 1 1 11 11 11 11 11 11 1 1 1 1 111 11 11 11 11 1 246 1 11 11 1 11 11 11 1 1 11 11 11 111 11 1 1 11 11 11 11 11 1 11011101 11 1 111 1 1 1 1 1 1 1 1 11 1 111 1 111 1 11 1 1 1 1 1 1 l111 1 l1l111 1 111 1 111 1 111 1 111 1 111 1 1 1 111 1 11111 1 111 1 1 In Base Station Mobile Signal Station 1 1 1 1 1 1 1 1 1 1 1 1 11 11111111 1111111111 1 1 1 1 1 1 1 1 1 11111111111 11111111 11 11 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 Interference 1 1 3 1 11 3 1 1 3 11 13 1 11 1311 13131 1 13 Pattern 1 1 1 1 1 3 1 1 1 3 1 1 3 1 1 1 3 1 1 1 1 3 11 13 131 1 13 11 1 Receiver Side Mobile Code Decode Binary Station Interference Pattern Data 1Byte 1 1 1 3 1 11 3 1 13 11111111 88 88 8 88 01110111 1 113 111 131 8 1 131131 1 1311 1 1 1 3 1 1 1 3 1 1 3 11 13 1 11 1 3 11 13 1311 1311 1 2 1 1 3 1 11 3 1 13 1 11 11 11 8 8 8 8 8 8 8 00110011 1 1 113 111 131 1 8 247 1 13131 1 1311 1 1 1 3 1 1 1 3 1 1 3 1 1 13 1 11 1 3 11 13 131 1 13 11
94. 1 1 1 1 1 1 gt MobileStation 2 gt Data 1 1 1 1 0 0 0 0 gt Code 1 1 1 1 1 1 1 1 gt Encode 1 1 1 1 1 1 1 1 gt Signal 1 1 1 1 1 11 11 11 11 11 11 11 11 11 1 1 11 11 11 1 11 11 11 11 11 11 11 1 1 11 11 11 11 11 11 11 11 gt InterferencePattern 2 02020200 20 20 20 2202020200 20 20 20 202020202 2 0 20 20 2002020202 20 20 20 20 gt MobileStation 1 gt Code 1 1 1 1 1 1 1 1 gt Decode 8 8 8 8 8 8 8 8 gt Data 10101010 gt MobileStation 2 gt Code 1 1 1 1 1 1 1 1 gt Decode 8 8 8 8 8 8 8 8 gt Data 1 11 10000 gt 244 Interface Source Code Interface source code written in C is given Using this the user can write only the function fnEncode and fnDecode using the variables already declared To view the interface source code go to NetSim Installation path src Programming CDMA c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Code Division Multiple Access technique How to Proceed The objective can be executed in NetSim using the programming exercise available Under programming select Multiple Access Technology gt Code Division Multiple Access Sample Inputs In the Input panel the following steps need to be done e Sample Mode should be selected e n default the Encode operation will be enabled
95. 1 STATIC ROUTING STATUS py T _PATH C Program ternetworks 1800 MAX AGE 3600 ROUTER PRTORITY I STATIC ROUTING STATUS 109 Note 1 Update this information in any one of the router 2 A sample StaticRouting txt file will be available inside C Program Files NetSim standard Docs Sample_Configuration Internetworks Appropriately modify it for the scenario The StaticRouting txt file contains 1 Device Id of the Router 2 List of entries to add in the routing table DEVICE_ID 1 ip route 192 168 0 0 255 255 255 0 192 168 0 1 1 ip route 192 168 1 0 255 255 255 0 192 168 1 1 1 DEVICE_ID 2 ip route 192 168 2 0 255 255 255 0 192 168 2 1 1 ip route 192 168 3 0 255 255 255 0 192 168 3 1 1 The above format is perstandard Cisco command for static routes iproute dest_ip maskgateway_ip distance The ip route is the Cisco command to add the static route The dest_ip is the Network address for the destination network The mask is the Subnet mask for the destination network The gateway_ip is the IP address of the next hop router SO ee ee eS The distanceis the administrative distance for the route The default is 1 Step 3 After this run this configuration file through CLI and static routes will be used for routing 110 NetSim Batch Processing Batch processing is the execution of series of simulations without manual intervention Consider the example where a user wishes to create an
96. 192 168 0 87 Address of the system where NetSim Emulation Server is running 2 Setting in the PC running NetSim Emulation I Open Registry Editor by going to Run gt regedit Go to HKEY_LOCAL_MACHINE S YSTEM CurrentControlSet Services Tcpip Parameters Il Set IPEnableRouter as 1 IH Restart System 333 B Registry Editor co fe ls Js Spooler Name Type Data SQLBrowser D SQLBrowser ab Default REG_SZ value not set b ab DataBasePath REG_EXPAND_SZ ystemRoot e System32 h 33 DeadGWDetectDefault REG_DWORD ha sam ab DhcpNameServer REG_SZ i SSDPSRV ab Domain J PIS k 20 DontAddDefaultGatewayDefault Edit DWORD 32 bit Value LES J swenum 98 EnablelCMPRedirect D swprv wo ForwardBroadcasts Symhi ab Hostname p ymaa ab CSDomain 8 1 d Symc8x a d SysMain no MaxUserPort d TabletinputSer ab NameServer do Tapisry 2b NV Hostname Cancel J TBS 4b ReservedPorts a di Tepip ab SearchList REG_SZ di Enum 88 TcpTimedWaitDelay REG_DWORD J Linkage wo UseDomainNameDevolution REG_DWORD 0x00000001 1 di Parameters d Performanc lt I lt m Computer HKEY_LOCAL_ MACHINE SYSTEM CurrentControlSet Services T cpip Parameters 3 Ping the destination from the source and check the time duration In this case you would notice the time to be lt 1ms BA Administrator C Windows System32 cmd exe ping 192 168 0 86 t Sle Pingi
97. 2 Configuration Manager E Common Properties a Additional Dependencies CEID E m References Ignore All Default Libraries o Configuration Properties Ignore Specific Library General Module Definition File Debugging Add Module to Assembly E co C Embed Managed Resource File Ee Force Symbol References General Delay Loaded DLLs Assembly Link Resource Manifest File Debugging System Optimization Embedded IDL Advanced Command Line Manifest Tool H XML Document Genera Browse Information Build Events Custom Build Ste i sass om os lm lien a Click Project Menu in the workspace b Select properties in the pull down menu or press Alt F7 c Then click Linker d Select Input 272 d Type ws2_32 lib file in the Additional Dependencies text box area e Click OK to confirm the changes in the workspace e If you have an eclipse complier the library linkage must be in the following way type filter text Resource a Discovery Options Enyjronment DA C C General Project References Run Debug Settings Task Repository Settings e Configuration Release EA Manage Config Tool Settings Build Steps gt Build Artifact i Binary Parsers Error Parsers GCC Assembler General GCC C Compiler Preprocessor Symbols Directories Optimization Debugging Warnings
98. 2 3333 4444 AAAA BBBB CCCC DDDD gt 15 gt 1 gt 1119 2222 3333 4444 AAAA BBBB CCCC DDDD gt 15 gt 236 1 gt 111B 2222 3333 4444 AAAA BBBB CCCC DDDD gt 15 gt 1 gt 111D 2222 3333 4444 AAAA BBBB CCCC DDDD gt 15 gt 1 gt 111F 2222 3333 4444 AAAA BBBB CCCC DDDD gt 15 gt Interface Source Code Interface source code written in C is given using this the user can write only the fnIPV6Subnetting function using the variables already declared To view the interface source code go to NetSim Installation path src Programming IP V6Subnetting c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To understand the concept of IPV6 Subnetting through programming How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select IPV6 Addressing gt IPV6 Subnetting Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Enter the IPV6 Address e Select the Prefix length e Select the number of subnets value e Click the Add value button to add the levels e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given 237 Output The following steps are under gone internally e IPV6 is se
99. 200 5 0 95 0 1 0 200 95 0 100 0 0 0 200 100 0 105 0 0 2 200 105 0 195 0 2 0 200 195 0 200 0 0 0 200 200 0 205 0 0 251 3 200 205 0 295 0 3 0 200 295 0 300 0 0 0 200 300 0 305 0 0 1 200 305 0 395 0 1 Orthogonal Frequency Division Multiple Access Programming Guidelines This section guides the user to link his her own code for Orthogonal Frequency Division Multiple Access to NetSim Pre conditions The user program should read the input scenario from text file named Input with extension txtwhich is in Temporary Directory The user program after executing the concept should write the required output to a file named Output with extension txtin Temporary Directory Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and the results of the program should be written into the output file Output txt 252 Input File Format Output File Format The following lines will be in Input txt file Number of users Value Userl1 Value User2 Value User3 Value User4 Value Number of sub carrier per user Value Example Number of users 4 Userl 111111111111 User2 010101010101
100. 2_22 lib c 7 PHYSICAL_IN 3 SCH 0 2082 802_22 lib c 8 TIMER_EVENT 1 0 FORM_DS_BURS 212 c users p sathishkumar desktop libcognitiveradio 802_22 9 MAC_IN 2 SCH 0 303 c users p sathishkumar desktop libcognitiveradio 802_22 10 MAC_IN 3 SCH 0 303 c users p sathishkumar desktop libcognitiveradio 802_22 11 TIMER_EVENT 1 0 TRANSMIT_DS_B 43 c users p sathishkumar desktop libcognitiveradio fch c 13 PHYSICAL_OUT 1 FCH 118 c users p sathishkumar desktop libcognitiveradio dsframg 14 PHYSICAL_IN 2FCH 2082 802_22 lib c 15 PHYSICAL_IN 3 FCH 2082 802_22 lib c 45 45 0 45 45 0 3 3 3 Note In the above trace file Event Id 2 is triggered inside the 802_22_lib c file which is present in Cognitive radio lib Since all the lib files are opaque to the end user you cannot see the source code of the lib file However Event Id 4 is triggered at line number 80 of sch c file and you can find the location of the event by opening the sch c file as shown below SCH c X Solution Explorer ae Scope O fn_NetSim_CR_TransmitSCH fn_Netsim_CR_SM_ScheduleQuietPeri E SA pstruSCH gt n_Current_DS_US Split Resource Fil pstruSCH gt n_Claimed_US DS Split a amp Source Files pstruSCH gt n_DS_US Change Offset H 802_22 c pstruSCH gt n_HCS s DCD c pstruSCH gt n_Padding bits G DSFrame Add SCH header to SCH packet G4 DSMAP pstruSCHPacket gt pstruMacData gt Packet_MACProtocel pstruSCH Cr DSx c
101. 49 PM DLL File DLL File DLL File DLL File 1 Computer amp Local Disk C ca BACKUP D lt a WORKSPACE E n m 0 0 0 0 e e e M M M M M ui DLL File CJJ J gt Computer gt Local Disk C Program Files gt NetSim Standard bin Organize v Include in library v Share with v New folder Name Date modified Type F libATM dll 1 28 2014 2 49PM _ DLL File E libATM2 dll 4 3 2014 10 20 AM DLL File DLL File 3 libBGP d ef eT Original DLL has been renamed F libBina DLL File Libraries F libCDMA dil 1 28 2014 2 49PM _DLLFile 1 28 2014 2 49PM DLL File Documents a libCDMAProg dll 1 28 2014 2 49PM_ DLL File Music F libCellular dll Pictures 3 libCIDR dll 1 28 2014 2 49PM DLL File IPNRA 1 28 2014 2 49PM DLL File F Favorites E Desktop Downloads TE Recent Places Place the custom DLL inside of the NetSim Standard gt bin folder Copy the built custom DLL and paste it inside of the NetSim Standard gt bin folder Note Custom DLL is the DLL which is created by the user To create the custom DLL see the help in NetSim Help gt Writing Custom Code in NetSim gt How to create dynamic link libraries dlls section 87 JO d Comp Organize v E Open v New folder a Ft Favorites Name DLL Type W Desktop 3 libCellular dll B7Z0IF Z 7 DLL File r Downloads 7 libCIDR dll 28 2014 2 49 PM DLL File libCogn
102. 7t sin 2PIf7t sin 2PIf7t sin 2PIf1 1t sin 2PIf1 1t sin 2PIf1 1t sin 2PIf15t sin 2PIf15t sin 2PIf15t 255 User 2 sin 2PI f4 f5 f6 f7 t sin 2PI f4 f5 f6 f7 t sin 2PI f4 f5 f6 f7 t User 3 sin 2PI f8 f9 f10 f11 t sin 2PI f8 f9 f10 f11 t sin 2PI f8 f9 f10 f11 t User 4 sin 2PI f12 f13 f14 f15 t sin 2PI f12 f13 f14 f15 t sin 2PI f12 f13 f14 f15 t Interface Source Code Interface Source code written in C is given Using this the user can writeonly the fnOFDMA and fnSubcarrierAddition functions using the variables already declared To view the interface source code go to NetSim Installation path src Programming OFDMA c To find NetSim s Installation path right click NetSim icon and select e Open file location in Windows 7 e Open file location in Windows Vista e Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Orthogonal Frequency Division Multiple Access technique How to Proceed The objective can be executed in NetSim using the programming exercise available Under programming select Multiple Access Technology gt OFDMA Sample Inputs In the Input panel e Sample Mode should be selected e The value of Number of Users needs to be selected 256 e Enter the Binary Datafor each user e Number of SubCarriers per User needs to be selected e Then Run button needs to be clicked Refresh button can be used if new
103. 802 11n ac Real Times Frame Capture Available in Academic version only Programming Menu Available in Academic version only Working Architecture How to create an executable How to De bug your code linked to NetSim User Accounts NetSim Emulator Available only with Emulator Add on Module Note Page 90 Page 94 Page 96 Page 104 Page 106 Page 106 Page 107 Page 108 Page 111 Page 117 Page 120 Page 126 Page 133 Page 139 Page 140 Page 141 Page 151 Page 329 Page 331 To enable Bookmarks in Adobe Reader go to View Show Hide gt Navigation Panes gt Bookmarks NetSim Versions and Components Overview NetSim is used by people from different areas such as academics industry and defence to design simulate analyze and verify the performance of different networks NetSim Versions NetSim comes in three versions Standard Pro and Academic The standard version is used for project work and research while the academic version is used for lab experimentation and teaching Pro version addresses the needs of defense and industry The standard and pro versionsare available as 8 eight components in NetSim v8 from which users can choose and assemble The academic version is available as a single product and includes all the technologies shown below The main difference between standard and academic is the availability of protoc
104. AC Address gt Second part of MAC MAC_Address 1 1 11 FF FF 12 34 Address FF EE appended Address gt First byte value gt Binary value of First byte gt 7 bit value gt Complement value of 7 bit Complemented binary value of First byte gt Hexa decimal value of complemented binary value gt Interface Id value gt Interface Id in colon notation gt IPV6 prefix value gt 230 IPV6 Address gt Sample Output text Format 11 11 FF FF 12 34 gt 11 11 FF gt FF 12 34 gt 11 11 FF FF FE FF 12 34 gt 11 gt 00010001 gt O gt 1 gt 00010011 gt 13 gt 13 11 FF FF FE FF 12 34 gt 1311 FFFF FEFF 1234 gt 2000 FE21 5931 72C3 gt 2000 FE21 5931 72C3 1311 FFFF FEFF 1234 gt Interface Source Code Interface source code written in C is given using this the user can write only the fnEUI64 function using the variables already declared To view the interface source code go to NetSim Installation path src Programming IPV6EUI64 c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To understand the concept of EUI 64 Interface Identifier through programming How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select IPV6 Addressing gt EUI 64 Interface Identifier S
105. AccessPoints fpConfigurationFilePointer fnConfigureWirelessNodes fpConfigurationFilePointer fnCreateConnectionConfiguration FILE fpConfigurationFilePointer fnCreateRouterRouterLinks fpConfigurationFilePointer fnCreateRouterS witchLinks fpConfigurationFilePointer fnCreateS witch WiredNodeLinks fpConfigurationFilePointer fnCreateS witchAccessPointLinks fpConfigurationFilePointer fnCreateAccessPointWirelessNodesLinks fpConfigurationFilePointer fnConfigureRouters FILE fpConfigurationFilePointer iterate until all routers are configured fnCreateRouterInterfaces fpConfigurationFilePointer nLoopCounterlI fnCreateRouterTransportLayer fpConfigurationFilePointer fnCreateRouterA pplicationLayer fpConfigurationFilePointer fnConfigureSwitches FILE fpConfigurationFilePointer iterate until all switches are configured fnCreateS witchInterfaces fpConfigurationFilePointer nLoopCounterI fnConfigureWiredNodes FILE fpConfigurationFilePointer iterate until all wired nodes are configured fnCreate W iredNodelInterface fpConfigurationFilePointer nLoopCounter fnCreate W iredNodeTransportLayer fpConfigurationFilePointer fnCreate W iredNodeA pplicationLayer fpConfigurationFilePointer nLoopCounterl 113 fnConfigureAccessPoints FILE fpConfigurationFilePointer iterate until all access points are configured fnCreateAccessPointInterfaces fpConfigurationFilePointer nLoopCount
106. Breakpoints Ctri Shift F9 fentDetails gt nDe pstru_Tmp_Segme Disable All Breakpoints ifer nSocketId if pstru_Tmp_Se Clear All DataTips Export DataTips Maeg Import DataTips szSourceIP jurceIP szDestIP Options and Settings IP usnSourcePort pstru_Tmp_Segment gt pstruTransportData gt nSourcePort usnDest_Port pstru_Tmp_Segment gt pstruTransportData gt nDestinationPor Attach to NetSimCore exe Transport Default x Qualifier PSATHISHKUMAR Transport Information The default transport lets you select processes on this computer or a remote computer running the Microsoft Visual Studio Remote Debugging Monitor MSVSMON EXE Attach to Automatic Native code Available Processes Process ID Title Type User Name Session javi 2644 NetSim Simulation ATM Experimentdemo x86 PSathishkumar Ram 1 Net re exe 39 x86 am 1 SnippingTool exe 3148 Snipping Tool x86 PSathishkumar Ram 1 taskhost exe 1220 x86 PSathishkumar Ram 1 TSVNCache exe 2332 186 PSathishkumar Ram 1 E vcpkgsrv exe 3732 x86 PSathishkumar Ram 1 vcpkgsrv exe 3992 x86 PSathishkumar Ram 1 a WINWORD EXE 2712 Debugging_Custom_Code _in_NetSim doc Co x86 PSathishkumar Ram 1 F wisptis exe 3436 x86 PSathishkumar Ram 1 wweb32 exe 2204 x86 PSathishkumar Ram 1 4 l Show processes from all users Show processes in all sessions ee ee 91 Click on Attach
107. C Case 1 C programs 1 Set the path as C program path ct C WINDOWS system32 cmd exe C Documents and Settings comp SY S 29 gt f F mahi aRP gt _ 2 Create Output file o file using the command gcc C Filename c cx C WINDOWS system32 cmd exe F mahiNARP gt gcee c arp c F N mahiSARP gt 3 Create exe file exe file using the command gcc o filename filename o ct C WINDOWS system32 cmd exe F mahisARP gcc c arp c F mahiSARP gcc o ARP arp o F mahi SARP gt 4 Once exe file is created link that exe file with NetSim gt Programming gt User mode 148 Case 2 C programs 1 Set the path as C program path ex C WINDOWS system32 cmd exe F mahi Crci2 gt 2 Create output file o file using the command g C Filename c c C WINDOWS system32 cmd exe F 2 mahi Gre12 gt g c Crei2 cpp F mahiN Cre12 gt 3 Create exe file exe file using the command g o filename filename o c C WINDOWS system32 cmd exe F mahi Grei12 gt g c Crei2 cpp F mahi Crci2 gt g o Crcei2 Crcei2 o F nmahi Grcei12 gt _ 4 Once exe file is created link that exe file with NetSim gt Programming gt User mode Case 3 Socket programs 1 Set the path to Socket program location cx C WINDOWS system32 cmd exe F mahi send gt 2 Create output file o file using below command gcc C Filename c 149 ex C WINDOWS system32 cmd exe F
108. Debug Tools Test Window Drar ed A i i ee GoBackN c Start Page Global Scope DVR 1 project I include oo a i 4 Build Rebuild i Project Only Profile Guided Optimization n ed long g_ulnErr Custom Build Rules ed long g_ulnErr Tool Bulld Order Add Unload Project ca Properties 4 Inside the properties window select Debugging and edit the Command Arguments as shown 151 DVR Property Pages EJEA Configuration Active Debug v Platform Active Win32 Configuration Manager Common Properties Debugger to launch E Configuration Properties Local Windows Debuager w General ji Debugging Command TargetPath ch C C Program Files NetSim_Standard_SwW_6 1 C DOCUMI S pi wa Working Directory i Manifest Tool Attach No E XML Document Generator Debugger Type Auto E Browse Information E r Build Events vromer Custom Build Step Merge Environment Yes SQL Debugging No Code Analysis Web Deployment Application Verifier Command Arguments The command line arguments to pass to the application 5 Inside command argument add the following two paths a Path to where NetSim is installed within double quotes This is usually C Program Files NetSim Standard This can be got by right clicking on the NetSim icon and selecting Find target or open file location b The windows temporary path which has the NetSim folder for
109. ER_PAYLOAD Specifies the size of the Payload at Network Layer MAC_LAYER_ PAYLOAD Specifies the size of the Payload at Data Link Layer PHY_LAYER_ PAYLOAD Specifies the size of the Payload at Physical Layer PHY_LAYER_ OVERHEAD Specifies the size of the overhead in Physical layer PACKET_STATUS Specifies whether the Packet is Successful Collided or Errored LOCAL_ADDRESS Specifies the Port Number at Source Node FOREIGN_ADDRESS Specifies the Port Number at Destination Node CWND Specifies the size of congestion window SEQ_NO If TCP is enabled it specifies the TCP Sequence number of the packet ACK_NO If TCP is enabled it specifies the TCP Acknowledgement number of the packet RTT Specifies the Round Trip Time for the packet RTO Specifies the Retransmission Timeouts CONNECTION_STATE Specifies the state of TCP connection CW Specifies the maximum size of contention window BO_TIME Specifies the Backoff time in microseconds DATARATE In case of WLAN it specifies the data rate at which the packet was transmitted RX_POWER Specifies the power in dBm required by the device at reception RX_SENSITIVITY Specifies the minimum magnitude in dBm of input signal required to produce a specified output signal 46 Generating Event Trace Available in Standard and Pro Version only NetSim Network Stack NetSim s Network Stack forms the core of NetSim an
110. Ethernet unavailable f IP unavailable G LTE unavailable G Output 4 Show output from Solution A eS a 2 C Users P Sathishkumar Desktop Simulation AODV AODV vexproj error Project C Users F 83 Note Sometimes you may get the following warning message Then click on ok and proceed isual One or more projects in the solution were not loaded correctly Please see the Output Window for details Debug Team Data Tools Test Window Help 238 9 e 1 54 D Debug win32 SB2 0SPQGaCgasQ kal alas DJ Solution NetSim 1 project a SI DSR l DSR Init function initializes the DSR parameters CheckRouteFound c i i i _declspec dllexport int fn_NetSim_DSR_Init struct stru_NetSim_Network NETWORK_Formal ea NetSim_EVENTDETAILS pstruEventDetails Forn ag char pszAppPath_Formal MaintBuffer c char pszWritePath_Formal 4 Network_Layer_Ack c int nVersion_Type 3 PacketProcessing c void fnPointer 4 RouteCache c RouteError c fprintf stderr Source is modified n 4 RouteReply c A Bieter return fn_NetSim_DSR_Init_F NETWORK_Formal pstruEventDetails_Formal pszAppPath_Form j A sout Cos 100 4 m gt Properties MEE fn NetSim_DSR_Init VCCodeFun Show output from Solution a S e 1G C Users P Sathishkumar Desktop Simulation AODV AODV vcxproj error Project C Users f Once this is done click to save
111. FRAME CAPTURE 80000 70000 60000 Packet s Received 50000 PACKETS 40000 Y Axis 30000 Total Packets 59983 20000 Total Collisions 0 10000 o Total Errors o X Axis Seconds signar Strength dBm Packets Received Packets Dropped Single Collision Multiple Collision Alignment Error Errors Received Errors Transmitted 39277 41003 41950 43843 45479 46683 49053 50947 52926 53744 57961 NA NA NA eo NA NA NA NA NA NA Na je eeleyeyayejayajaye Click the Start button Data from the network getting captured 8 After the duration time end click Export to csv button and note the values 136 F NetSim Frames Capture Help fA Frames Capture Adapter Duration Seconds Network Ethernet 802 3 Data Rate 100 Mbps FRAME CAPTURE Frame Dea Reconfiguration PACKETS Total Packets 141768 Total Collisions 0 Total Errors Packets Received Packets Dropped 39277 41003 Single Collision Multiple Collision Graph Type DURATION Input 60 Seconds Remaining 0 Seconds Packet s Received Y Axis X Axis Seconds Alignment Error Errors Received Errors Transmitted yrs Tenon NA NA 41950 43843 45479 46683 NA Na Na Ina 49053 50947 52926 Na Na NA 53744 57961 Sole Sfelojsisjojare Na na Click Export to CSV The details of the frame and the performance of the network can be viewed by clicki
112. G_PROTOCOL PROTOCOL_PROPERTY Solution User has to specify the missing parameters in the Configuration file which are mentioned in the ConfigLog txt in order to obtain accurate metrics for the desired scenario Problem 3 Simulation is interrupted and the error is displayed in command line Example If the user defined function in the PRIMITIVES_INFORMATION of the Configuration file is incorrect missing then the simulation is interrupted and the corresponding function name will be specified in the command prompt as shown below In 1330 line of StackInternal c file following error occurs fn_NetSim_UDP_Init The specified procedure could not be found Error number 127 Solution User has to specify the exact function name in the PRIMITITIVES_INFORMATION of the Configuration file in order to simulate the desired scenario Problem 4 Simulation is interrupted and the metrics are not generated This issue arises mainly while linking custom code in NetSim i e when the custom code is having any bug the flow of execution of NetSim gets disturbed and this leads to stand still condition Solution The bugs can be fixed by setting the break points for debugging of custom code and the following steps can be used to fix the issue Step 1 Since the packets flow per events in NetSim enable event trace eitherin the Configuration file or via the UI Analyze the Event Trace to identify at which event id the stand still condition oc
113. Input File Format Output File Format IPV6_Address 1111 2222 3333 4444 AAAA BBBB CCCC DDDD Prefix_Length 12 The Output File format IPV6 Address gt Binary value of IPV6 Address gt Prefix part of IPV6 Address gt Suffix part of IPV6 Address gt Prefix part of Starting Address gt Suffix part of Starting Address gt Starting Address in hexa decimal notation gt Prefix part of Ending Address gt Suffix part of Ending Address gt Ending Address in hexa decimal notation gt Sample Output text Format 1111 2222 3333 4444 AAAA BBBB CCCC DDDD gt 000100010001000100100010001000100011001100110011 010001000100010010101010101010101011101110111011 11001100110011001101110111011101 gt 12 gt 116 gt 000100010001 gt 00010010001000100010001100110011001 101000100010001001010101010101010101110111011101 111001100110011001101110111011101 gt 00010001000 1 gt 00000000000000000000000000000000000 000000000000000000000000000000000000000000000000 000000000000000000000000000000000 gt 1110 0000 0000 0000 0000 0000 0000 0000 gt 000100010001 gt 11111111111111111111111111111111111 111111111111111111111111111111111111111111111111 111111111111111111111111111111111 gt 111F FFFF FFFF FFFF FFFF FFFF FFFF FFFF gt 233 Interface Source Code Interface source code written in C is given using this the user can write only the fnHostAddresses function using the variables already declared To view the interface source code go to NetSim Insta
114. Inputs have to be given Output The following steps are done internally by NetSim e The values of each userBinary Data Parallel Conversion Bit Mapping SubCarrier Mapping amp SubCarrier Addition and Transmission will be shown in the right hand side of the screen by animation e Once the sample experiment is done Refresh button can be clicked to create new samples PC to PC Communication Socket Programming TCP Programming Guidelines This section guides the user to link his her own code for PC to PC Communication Socket programming to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Coding Pre Requisites The prerequisite for the creation of sockets in the Windows based C complier is they must have winsock h header file in its standard header file folder In order to use the commands of the winsock h there must be wsock32 lib library file present in the C complier To link wsock32 lib different steps have to be followed for different compilers as shown 257 e For Visual Studio complier 2010 10 0 versi
115. N_CopyPacket_F NetSim_PACKET Function to write WLAN Metrics into Metrics _declspec dllexport int fn_NetSim WLAN Metric int fn_NetSim WLAN Metrics_F char Function to configure and write WLAN packet _declspec dllexport char fn_NetSim WLAN Conf declspec dllexport int fn_NetSim WLAN WriteP Function to do tasks when PHYSICAL_OUT event is triggered int fn_NetSim_WLAN_Physicalout 5 Function to do tasks when PHYSICAL_IN event is triggered int fn_NetSim_WLAN_PhysicalIn Function to do tasks when MAC_IN event is triggered int fn_NetSim_WLAN_MacIn Function to update the device state PHY OUT int fn_NetSim WLAN Transmitter UpdateMedium UpdateDeviceStatus NETSIM ID nDeviceld NETSIM_ID nInter Function to update the device state UPDATE DEVICE STATE TIMER event pt PHY IN EventTime 4 raiojdg aaas Se Ctrl Shift A Shift Alt A Ctrl Shift X Ctrl X Ctrl C Ctrl V Class Wizard Cut Copy Paste Delete Rename Properties xOg O0 1 X New Filter YS Class g Resource Output Show output from SCC Files PEJFIE 2 warning LNK4 99 PDB vc8 pdb was not found with DSR 1ib DSR obj or at D Ak Name Filter D 1 gt DSR lib DSR obj 1 gt DSR lib LinkLayerAck obj warning LNK4 99 PDB 1 gt List lib List obj warning LNK4 99 PDB vc8 pdb was not found with List lib List obj 1 gt libDSR vcxproj gt D Akhilesh DSR DSR12 1ibDSR Debug 1ibDSR d11
116. NetSim Help Index NetSim Versions and Components Overview NetSim Getting Started NetSim File Organization Running Simulation via Graphical User Interface GUI IP Addressing in NetSim Applications Performance Metrics Dynamic Metrics Available in Standard and Pro versions Generating Packet Trace Available in Standard and Pro versions Generating Event Trace Available in Standard and Pro versions Packet Animation Saving Experiments Opening and Deleting saved Experiments Analytics Running Simulation via Command Line Interface CLI Configuration File Troubleshooting Writing custom code in NetSim Available in Standard and Pro versions How to build dynamic link libraries dlls How to link dynamic link libraries dlls Hello World Program Page 3 Page 7 Page 12 Page 14 Page 29 Page 30 Page 40 Page 42 Page 43 Page 47 Page 53 Page 55 Page 57 Page 60 Page 62 Page 67 Page 71 Page 82 Page 82 Page 86 Page 89 How to debug Custom Code Writing line number and file name of code in Event trace View Accessing variables NetSim APIs Advanced Features Random number generator and seed values How to fail a Node in NetSim Static Routing NetSim Batch Processing SINR BER and Propagation models for 802 15 4 SINR BER and Propagation models for 802 11 a b g and n WLAN
117. Node1 to Node2 with no error Data Frame 5 is flowing from Node1 to Node2 with no error Data Frame 6 is flowing from Node1 to Node2 with error Data Frame 7 is flowing from Node1 to Node2 with no error Acknowledgement from Node2 to Node1 Data Frame 6 is flowing from Node1 to Node2 with no error Data Frame 8 is flowing from Node1 to Node2 with no error Data Frame 9 is flowing from Node1 to Node2 with no error Data Frame 10 is flowing from Node1 to Node2 with no error Acknowledgement from Node2 to Nodel Data Frame 11 is flowing from Node1 to Node2 with no error Data Frame 12 is flowing from Node1 to Node2 with no error Data Frame 13 is flowing from Nodel to Node2 with no error Data Frame 14 is flowing from Nodel to Node2 with no error Acknowledgement from Node2 to Nodel Data Frame 15 is flowing from Nodel to Node2 with no error Data Frame 16 is flowing from Nodel to Node2 with no error Data Frame 17 is flowing from Nodel to Node2 with no error Data Frame 18 is flowing from Nodel to Node2 with no error Acknowledgement from Node2 to Nodel Data Frame 19 is flowing from Nodel to Node2 with no error 297 o Data Frame 20 is flowing from Nodel to Node2 with no error o Data Frame 21 is flowing from Nodel to Node2 with no error o Data Frame 22 is flowing from Nodel to Node2 with no error o Acknowledgement from Node2 to Nodel o Data Frame 23 is flowing from Nodel to Node2 with no error o Data Frame 24 is flowing from Node1 to Node2 with no error o Ackno
118. OL_PACKET_TYPE SOURCE IDY DESTINATION _I 7 TRANSMITTER_ID RECEIVER _I 7 PACKET_STATUS gt Jili 0 N A Control_Packet ARP_Request NODE 2 Broadcast 0 NODE 2 ROUTER 1 Successful 0 N A Control_Packet TCP_SYN NODE 2 NODE 3 NODE 2 ROUTER 1 Successful 0 N A Control_Packet TCP_SYN NODE 2 NODE 3 ROUTER 1 NODE 3 Successful 0 N A Control_Packet TCP_ACK NODE 2 NODE 3 NODE 2 ROUTER 1 Successful 1 0 Data N A NODE 2 NODE 3 NODE 2 ROUTER 1 Successful 0 N A Control_Packet TCP_ACK NODE 2 NODE 3 ROUTER 1 NODE 3 Successful 1 0 Data N A NODE 2 NODE 3 ROUTER 1 NODE 3 Successful 2 0 Data N A NODE 2 NODE 3 NODE 2 ROUTER 1 Successful 2 0 Data N A NODE 2 NODE 3 ROUTER 1 NODE 3 Successful 3 0 Data N A NODE 2 NODE 3 NODE 2 ROUTER 1 Successful 3 0 Data N A NODE 2 NODE 3 ROUTER 1 NODE 3 Successful 4 0 Data N A NODE 2 NODE 3 NODE 2 ROUTER 1 Successful 4 0 Data N A NODE 2 NODE 3 ROUTER 1 NODE 3 Successful 5 0 Data N A NODE 2 NODE 3 NODE 2 ROUTER 1 Successful 5 0 Data N A NODE 2 NODE 3 ROUTER 1 NODE 3 Successful 6 0 Data N A NODE 2 NODE 3 NODE 2 ROUTER 1 Successful Typically filters can be set to observe Errored Collided Successful packets packets of destination and packets of source Observing packet flow in the Network through packet trace file Step 1 Open the packet trace file Step 2 Set the filter Note Refer NetSim Help gt Trace data Analysis techniques gt How to set filter to a NetSim trace file section to set the filter Step 3
119. Output for the above Sample is as follows o Plain Text gt tetcos o Key Text 7912345 6 o Binary of plain text gt 01110011 o Binary of key text gt 00110110 o XOR Value gt 01000101 o ASCII Equivalent gt 69 87 71 87 90 69 o Cipher Text SE WGwWwWZE 169 Decryption Sample Inputs By using the InputPanel that is available on the left hand side a Sample Scenario is created The Steps involved in creating are as follows O O O O SampleMode should be selected After completing the Encryption part DecryptionMode needs to be selected CipherText this field is automatically filled and Key Value this should be same as the one that is entered in Encryption need to be entered in the fields available That is CipherText gt 010001010101011101000111010101110101101001000101 Cipher Text in Binary Format Maximum 64 bits KeyText gt 123456 Maximum of 8 Characters Note Both Cipher Text and Key Text is automatically taken when Decryption button is selected i e after undergoing Encryption Then Run button need to be clicked Output Output for the above Sample is as follows Note O O O Cipher Text SE W G W Z E Key Text gt 1 2 3 4 5 6 Binary of cipher text gt 01000101 Binary of key text gt 00110110 XOR Value gt 01110011 ASCII Equivalent gt 116 101 116 99 111 115 Plain Text gt t e t c o S Text in the Input of the Encryption and Output of the Decryption should be
120. Pictures Devices was Local Network AA Universal Plug Play BA Network streams SAP Internet g Podcasts i Free Music Charts keecast Radio Directory J Jamendo Selections Toggle button is circled in red at the bottom of the screen shot 3 Double click on Network Stream SAP under local network Then right click and play on the stream name that appears on the screen E VLC media player Media Playback Audio Video Subtitle Tools View Hel Search 2 Playlist 00 00 Title elsa Duration Album gh Media Library My Computer E My Videos J My Music My Pictures Devices Discs Local Network 22 Universal Plug n Play 2 Network streams SAP Internet m g Podcasts G Free Music Charts Icecast Radio Directory Jamendo Selections 4 v Ay Ds mln ean ese 5 339 Steps at NetSim Emulation Server I Create a basic network Scenario in any stack based protocol Internetworks MANET BGP Cellular WSN Zigbee CR LTE in NetSim Screenshot of a sample scenario in Internetworks is shown below H Click and drop the Application Il Right click Application gt select Properties IV Inthe Application Type select Emulation V Select Source and Destination ID according to the network scenario VI Change the Source and Destination IP address and click accept 340 VII Before running simul
121. Sample Output SampleMode should be selected SelectCRCCCITT as Algorithm from the list available Under Condition Error should be selected be in txt format which should not exceed 5000bytes Click on Run button to execute Refresh button can be used if new Inputs have to be given e For No Error Case The CalculatedCRC should be Zero when the txtfile is received by the Node2 The message DataFrame is Flowing from Node1 to Node2 with NoError e For Error Case The CalculatedCRC should be Non Zero when the txt file is received by the Node2 The message DataFrame is Flowing from Nodel to Node2 with Error Error Detection Code Longitudinal Redundancy Check LRC Programming Guidelines This section guides the user to link his her own code for Longitudinal Redundancy Check to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt 202 The user program after executing the concept should write the required output to a file named Output with extension txt The path of the input file and the output file can be viewed on clicking the Button Path in NetSim Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt
122. Step 6 Go to command prompt which is already opened in Step 3 Enter the Event Id Note For help about event details see Help gt NetSim Help F1 gt Generating Event trace Note If you don t want to stop at any event you can specify 0 as event id ce D WINDOWS system32 cmd exe NetSimCore apppath D Program Files NetSim Standard Oo x D Program Files NetSim Standard bin gt NetSimCore apppath D Program Files Net i m Standard bin iopath D DOCUME 1 BALUBA 1 G LOCALS 1 Temp Net im license 5653 192 168 6 16 d Breakpoint is set Enter the event id where u want to break 3698_ Execution will stop at the specified event cx D WINDOWS system32 cmd exe NetSimCore apppath D Program Files NetSim Standard Oy x iEventT ime 148 665 SrcIP 192 168 56 6 Dest IP 192 168 56 5 MAC_Add PN AAAAAAAAASSS O xz is completed Simulation Time 148 ms Event Id 9ARP ARP_ReplyGot EventT ime 148 685 SrcIP 192 168 60 7 Dest IP 192 168 680 6 MAC_Add AAAAAAAAAGGEE O is completed Simulation Time 1 666 ms Event Id 117ARP ARP_RequestSen EventT ime 1666 666 SrcIP 192 168 1 1 Dest IP 192 168 1 3 O z is completed Simulation Time 1 689 ms Event Id 127ARP ARP_ReplySent EventT ime 1089 293 SrcIP 192 168 1 3 MAC_Add AAAAAAAAAAAF Dest IP 1 92 168 1 1 O is completed Simulation Time 1 179 ms Event Id 136ARP ARP_ReplyGot EventT ime
123. Switches Wired Nodes Access Points Wireless Nodes m CO NJ Gi rR O N ON Go 2 3 On entering the above details the following configuration files are created and simulation is run for all these configuration files 1 5 2 8 12 Configuration 5 2 8 12 xml 1 5 2 8 13 Configuration1 5 2 8 13 xml 1 5 2 9 12 Configuration1 5 2 9 12 xml 1 5 2 9 13 Configuration1 5 2 9 13 xml 1 6 2 8 12 Configuration1 6 2 8 12 xml 1 6 2 8 13 Configuration 6 2 8 13 xml 1 6 2 9 12 Configuration 6 2 9 12 xml 1 6 2 9 13 Configuration 6 2 9 13 xml 2 5 2 8 12 Configuration2 5 2 8 12 xml 2 5 2 8 13 Configuration2 5 2 8 13 xml 2 5 2 9 12 Configuration2 5 2 9 12 xml 2 5 2 9 13 Configuration2 5 2 9 13 xml 2 6 2 8 12 Configuration2 6 2 8 12 xml 2 6 2 8 13 Configuration2 6 2 8 13 xml 2 6 2 9 12 Configuration2 6 2 9 12 xml 2 6 2 9 13 Configuration2 6 2 9 13 xml 3 5 2 8 12 Configuration3 5 2 8 12 xml 3 5 2 8 13 Configuration3 5 2 8 13 xml 3 5 2 9 12 Configuration3 5 2 9 12 xml 3 5 2 9 13 Configuration3 5 2 9 13 xml 3 6 2 8 12 Configuration3 6 2 8 12 xml 3 6 2 8 13 Configuration3 6 2 8 13 xml 3 6 2 9 12 Configuration3 6 2 9 12 xml 3 6 2 9 13 Configuration3 6 2 9 13 xml 115 Output Files Configuration1 5 2 8 12 xml_Metrics txt is the metrics file created for configuration file Configuration1 5 2 8 12 xml Similarly other output
124. T_ID PACKET_TYPE x CONTROL_PACKET_TYPE SOURCE_ID DESTINATION _I TRANSMITTER_IC y RECEIVER_I PACKET_STATUS 1 2 0 N A Control_Packet ARP Sort Atoz Broadcast 0 NODE 2 ROUTER 1 Successful 3 0 N A Control_Packet ARP Z SortZtoA NODE 2 ROUTER 1 NODE 2 Successful 4 0 N A Control_Packet TCP Sort by Color NODE 3 NODE 2 ROUTER 1 Successful 5 0 N A Control_Packet ARP K ae aera Broadcast 0 ROUTER 1 NODE 3 6 0 N A Control_Packet ARP g ROUTER 1 NODE 3 ROUTER 1 Successful 7 ON A Control_Packet TCP i NODE 3 ROUTER 1 NODE 3 Successful 8 0 N A Control_Packet Top E ters NODE 2 NODE 3 ROUTER 1 Successful 9 0 N A Control_Packet TCP m Select All NODE 2 ROUTER 1 NODE 2 Successful 0 N A Control_Packet TCP 5 BONES NODE 3 NODE 2 ROUTER 1 Successful 1 0 Data N A ROUTER 1 NODE 3 NODE 2 ROUTER 1 Successful ON A Control_Packet TCP NODE 3 ROUTER 1 NODE 3 Successful 1 0 Data N A NODE 3 ROUTER 1 NODE 3 Successful 0 N A Control_Packet TCP NODE 2 NODE 3 ROUTER 1 Successful 0 N A Control_Packet TCP NODE 2 ROUTER 1 NODE 2 Successful 2 0 Data N A NODE 3 NODE 2 ROUTER 1 Successful 2 0 Data N A NODE 3 ROUTER 1 NODE 3 Successful 0 N A Control_Packet TCP NODE 2 NODE 3 ROUTER 1 Successful 0 N A Control_Packet TCPL NODE 2 ROUTER 1 NODE 2 Successful 3 0 Data N A NODE 3 NODE 2 ROUTER 1 Successful E2 Q fe NODE 2 a B c D E E G H 1 PACKET_ID y SEGMENT_ID PACKET_TYP Y CONTR
125. The systems can move and communicate in this range only e A Node cannot be placed on another Node A Node cannot float outside the grid Adding PAN Coordinator Click on the PAN Coordinator icon in the toolbar and click and drop inside the grid 24 Set Environment Properties Right click in side of the on the Environment and click Properties Set the Properties for the devices links and applications e Right click over the devices and then select Properties to set the properties of the links and the devices e Click and drop Application s to generate traffic e Right click over Application and set properties Multiple applications can be generated by using add button in Application properties Modifying Viewing Accepting Properties On opening an already configured properties of an application the input fields will be frozen i e the input cannot be changed To modify these values click on the Modify button in the screen Now the input value can be changed Click on the Accept button the modified values will be saved This View button is enabled once the Accept Button is clicked To view the given values click on the View button Enable Packet Trace or and Event Trace Optional Click Packet Trace icon Event Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace and Event trace Enable Dynamic Metrics Optional Click on dynamic metric
126. User3 101010101010 User4 000000000000 Number of sub carrier per user 4 Parallel Data Conversion User 1 Value User 2 Value User 3 Value User 4 Value Bit Mapping User 1 Value User 2 Value User 3 Value User 4 Value SubCarrier Mapping User 1 Value User 2 Value User 3 Value User 4 Value SubCarrier Addition User 1 Value 253 User 2 Value User 3 Value User 4 Value Example Parallel Data Conversion User 1 User 2 0 1 1 0 1 1 0 1 1 User 3 1 0 1 1 0 1 1 0 1 User 4 0 0 0 0 0 0 0 0 0 Bit Mapping User 1 254 1 1 1 1 1 1 1 1 User 3 1 1 1 1 1 1 1 1 1 1 1 1 User 4 1 1 1 1 1 1 1 1 1 1 1 1 SubCarrier Mapping User 1 sin 2PIf0t sin 2PIf1t sin 2PIf0t sin 2PIf1t sin 2PIf0t sin 2PIf1t User 2 sin 2PIf4t sin 2PIfSt sin 2PIf4t sin 2PIfSt sin 2PIf4t sin 2PIfSt User 3 sin 2PIf8t sin 2PIf9t sin 2PIf8t _ sin 2PIf9t sin 2PIf8t sin 2PIf9t User 4 sin 2PIf12t sin 2PIf13t sin 2PIf12t sin 2PIf13t sin 2PIf12t sin 2PIf13t SubCarrier Addition User 1 sin 2PI f0 f1 f2 f3 t sin 2PI f0 f1 f2 f3 t sin 2PI f0 f1 f2 f3 t sin 2PIf2t sin 2PIf2t sin 2PIf2t sin 2PIf6t sin 2PIf6t sin 2PIf6t sin 2PIf10t sin 2PIf10t sin 2PIf10t sin 2PIf14t sin 2PIf14t sin 2PIf14t sin 2PIf3t sin 2PIf3t sin 2PIf3t sin 2PIf
127. VENT 0 mait DS Burst a ARP DATE Incumbent_Operation_ mi Incumbent_Operation_Start DSA_RVD_TimeOu lt EVENT_TRACE gt lt STATISTICS_COLLECTION gt Step 2 Run the NetSim via CLI in debug mode Refer NetSim Help gt Running Netsim via CLI with d as the fourth parameters E C Windows system32 cmd exe oba C Program Files NetSim Standard bin gt netsimcore appapth C Program Files Net i m Standard bin iopath C Users P Sathishkumar AppData Local Temp Net im lic ense 5 53 192 168 0 185 d Press enter Step 3 Enter 1 as the event ID EA C Windows system32 cmd exe netsimcore appapth C Program Files NetSim Standard bin io amp C Program Files NetSim Standard bin gt netsimcore appapth C Program Files NetS i m Standard bin iopath C Users P Sathishkumar AppData Local Temp Net im lic ense 5053 192 168 0 185 d r apppath is not defined Setting current path as app path App path C Program Files NetSim Standard bin Breakpoint is set Enter the event id where u want to break 1 Upon running NetSim will write the file name and line number of the source code that generated each event 94 a o al Event_Id Event_Type Device_Id Packet_Id Subevent_Type Packet_Size Prev_EvefiLine_No File_Name 2 TIMER_EVENT 1 0 TRANSMIT_SCH 1888 802_22_lib c 4 PHYSICAL_OUT 1SCH 0 45 80 c users p sathishkumar desktop libcognitiveradio sch c 6 PHYSICAL_IN 2 SCH 0 2082 80
128. VR Microsoft Visual Stu File Edit View Project Build Debug Tools Test Window Community Help o O e 2i Sp Release x Win32 ipl dvr c x 1 Global Scope ETES A inc lude lt windows h gt A A Solution DVR 1 project 2 i Build S include lt stdio h gt E X Rebuild z include lt conio h gt Clean 2 g R Project Only gt x include lt string h gt Profile Guided Optimization inc lude lt malloc h gt include lt stdlib h gt Custom Build Rules Tool Build Order define MAXROUTER 6 Add gt define _NETSIMDLL References E Add Web Reference struct ROUTERTABLE Set as StartUp Project Debug gt int nDestID MAXROUTER 1 amp cut z ay lt i gt x Remove Output vax Rename Show output From Build 5 SRE E gt Unload Project dvr c 250 warning C4996 strcepy was declared deprecated a Renee Message This function or variable may be unsafe Consider using strcpy_s instead To disable deprec Linking Generating code Finished generating code Embedding manifest Build log was saved at file DVR 0 error s 19 warning s a Besssssss Build 1 suersaded N foiled N im tra dara N skinned sasssssss aq T lt il J a F Solution Explorer Resource View Ready b Click Configuration Manager a new dialog box will appear Select Active Solution Configuration as Debug Release close and Finally OK
129. Value of the prime numbers P and Q are obtained e Value of N p q is obtained e Value of Z p 1 q 1 is obtained e Value of Kp and Ks is obtained e Plain Text which is the actual count of the alphabet is obtained e The corresponding Cipher Text is obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples Cryptography Wired Equivalent Privacy WEP Encryption Programming Guidelines This section guides the user to link his her own code for WEP Encryption to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt 180 The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Cryptographic_Method Encryption There are 3 lines in output txt file Data Initialization Vector TETCOS Key Text Cipher Text Ex 8A699C 0123456789 364130B9CA018D5B760383CD8552875 1 Interface Source Code Interface Source code written in C is given u
130. a NetSim Simulation Programming Realtime Basics Help Login As Ctrl L User Accounts Help This section displays all the Help related to NetSim NetSim source code help it contains the documentation about source code Available with NetSim Standard as well as Pro Version Shortcut Keys it contains shortcut keys for all menus and sub menus a NetSim Simulation Programming Realtime Basics Utilities NetSim Help Fl NetSim source code help Shortcut Keys About NetSim 11 NetSim File Organization The install directory of NetSim also termed as application path is as explained below Consider C Program Files NetSim Standard as lt app path gt gt lt app path gt bin y All the dll files like Simulation dll jdic dll rlm932 dll etc v NetSimCore exe The following folder contains files essential to developers writing custom code in NetSim gt lt app path gt src e lt app path gt src Simulation This folder is not available in the Academic version e lt app path gt src Simulation Include v Packet h yY Stack h v main h Y Protocol h v List h e lt app path gt src Simulation lib v protocoll lib protocol2 lib protocol3 lib NetworkStack lib A S Metrics lib etc e lt app path gt src Simulation Protocol Name Vv c files v eh files 12 e lt app path gt src Programming y All c files of programming exercises Build as dll your custom code into the bin folder
131. ader Fes a include lt stdi naa T Project Only E C Resource Files a include lt coni Profile Guided Optimization gt S E Source Files 3 C4 dvr c a Batch Build Es include lt strij Configuration Manager include lt mal 1 include lt stdlib h gt define MAXROUTER 6 define _DLL struct ROUTERTABLE int nDestID MAXROUTER 1 eee E r a er e4 lt l gt Output vax Show output from Debug z hip se gt 5 Cal F Solution Explorer Resource view 7 eee eee nee eee es Ready 12 Now Exe is created in the Project Folder as shown below release File Edit View Favorites Tools Help OQ BD Psh gt Folders Ei Address C Documents and Settings Muthukumar My Documents isual Studio 2005 Projects D R release Eco DYR File and Folder Tasks Program Debug Database 155 KB Rename this file BF Move this file P Copy this file Publish this file to the Web E mail this file XK Delete this file Other Places ovr My Documents Shared Documents Q My Computer My Network Places Details Creating exe using GCC e By using Command Prompt C C files can be created using any editor Ex Notepad Once C C file is ready go to command prompt using Start gt Run Type the name of 4 program folder document or Internet resource and Windows will open it For you There are three cases for creating Exe exe file using GC
132. age events per sec wall clock gt 6883 89 Simulation complete he etwork metrics calculations complete Protocol specific metrics calculations complete Protocol binaries freed Stack memory freed pie If you are running via CLI go to IO path to view NetSim metrics If you are running via UI you can view NetSim performance metrics in the UI Press any key to continue Note If the folder name contains white space then mention the folder path within double quotes while specifying the folder name in the command prompt For example if app path contains white space then the app path must be mentioned within double quotes in the command prompt as given below gt cd lt app path gt gt NetSimCore exe apppath lt app path gt iopath lt io path gt license 5053 lt Server IP Address gt Administrator Command Prompt lol x Microsoft Windows Version 6 0 6000 Copyright lt c 2006 Microsoft Corporation All rights reserved C Users Administrator gt cd C Program Files NetSim Standard bin C Program Files NetSim Standard bin gt Net imCore exe apppath C Program Files N etSim Standard bin iopath C Users ADMINI 1 AppData Local Temp NetSim license 5653 192 168 6 2_ To know more about the options that are available to run NetSim via CLI type the following in the command prompt gt cd lt app path gt gt NetSimCore exe h 65 D Daisy AppPath of NetSim NetSim Standard 7 6 3 bin
133. all Stack Name ot t OSR dlth NetSee_DSR_GenerePacketProceasi gt Set NOt Statemen veriDetads Ox0073818 stru DSR Pr C IDOSR dilfn_NetSim_OSR_RunQ Lune 8 0xia Go To Disassembly a Show Next Statement I Run To Cursor amp cut tack doii r 12a Copy Outlining Dwani tn22 Cot 24 96 Viewing external variables During the process of debug users would come acrossvariables that are defined outside the source file being built as a dll Such variables cannot be viewed directly when added in the watch tab as this would throw the error CX0017 Error symbol Variable Name not found Watch 1 v7 hx Name Value Type pstruEventDetails CXX0017 Error symbol pstruEventDetails not found In the call stack window one can find the file in which that variable is situated Right click on the dll file name in the call stack window in this case NetworkStack dll Then in the pull down menu which appears select load symbols from and give the path of the pdb program database file A program database pdb file also called a symbol file maps the identifiers that a user creates in source files for classes methods and other code to the identifiers that are used in the compiled executablesof the project The pdb file also maps the statements in the source code to the execution instructions in the executables The debugger uses this information to determine the source file and the line number displaye
134. amed Input with extension txt 195 The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File format Algorithm CRC_16 Output contains two values which is the Condition No_ Error written in the separate line File_Path C Users P Sathishkumar Doc The First line has the CRC value of the data Sender side CRC value The Second line has the CRC value of the data Receiver side CRC value uments 1 Th txt gt Example OFCF 0000 Interface Source Code Interface Source code written in C is given using this the user can write only the Cyclic Redundancy Check inside the function fnCRC using the variables already declared To view the interface source code go to NetSim Installation path src Programming Crc16 c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 196 Sample Scenarios Objective To det
135. ample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Select the IPV6 Network Id IPV6 Prefix e Enter the MAC Address 231 e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e MAC Address is divided into two parts e FF FE value is appended between the two parts e Interface Identifier is found by complementing 7 bit of firs byte e IPV6 Network Id IPV6 prefix and Interface Identifier are combined to produce IPV6 address e Once the sample experiment is done then Refresh button can be clicked to create New Samples IPV6 Host Addresses Programming Guidelines This section guides the user to link his her own code for IPV6 Host Addresses to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt 232 File Format
136. and a concentrator This indicates the only shortest path available between the site and the concentrators Hence it indicates the site has been allocated to that concentrator e A site can have only one concentrator whereas a concentrator can have many sites linked to it e Once the sample experiment is done then Refresh button can be clicked to create New Samples Cryptography Substitution Encryption Programming Guidelines This section guides the user to link his her own code for Substitution to NetSim Pre conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and the results of the program should be written into the output file Output txt 158 Input File Format Output File Format There are six lines in Input txt file Plain letter gt encrypted letter for the Cryptographic_Technique Substitution COneSpOnGINS Piai Iene Cryptographic_Method Encryption t gt u gt v gt Plain_Text e gt f gt g gt tetcos t gt u gt v gt Key_Text c gt d gt e gt 2 o gt p gt
137. and ending tag expected gt Solution The bug can be fixed by setting the closing tag correctly in the Configuration file Problem 6 Zigzag lines appearing at configuration xsd in the Configuration file This issue arises when the schema and the configuration file are not in the same folder Config file gt Always mention xml schema file in first line of configuration xml gt ETCOS_NETSIM xmlns nsO http www w3 org 2001 XMLSchema instance nsO noNamespaceschemaLocat ioh Contiguration xsd lt EXPERIMENT_INFORMATION gt lt VERSION gt NetSim Standard 7 0 lt VERSION gt lt USER gt Admin lt USER gt lt NAME gt NetSim lt NAME gt lt DATE gt Thu Nov 05 14 37 02 IST 2012 lt DATE gt lt COMMENT gt NetSim Configuration File lt COMMENT gt lt EXPERI MENT_INFORMATION gt lt NETWORK_CONF IGURATION gt lt The following section of config file is used to set the device properties gt lt DEVICE_ CONFIGURATION DEVICE _COUNT 6 gt lt Set Device properties gt lt DEVICE DEVICE NAME MS1 DEVICE ID 1 INTERFACE COUNT 1 TYPE MOBILE STATION gt lt Set Pos_3D properties gt lt POS_3D X POS 157 Y POS 110 Z POS 0 gt lt Set Interface properties gt lt INTERFACE ID 1 INTERFACE TYPE CDMA gt lt Configure each layer gt lt Set Physical_Layer properties gt lt LAYER TYPE PHYSICAL LAYER CONNECTION _MEDIUM WIRELESS gt lt Set Protocol pro
138. ar6 DSR_DEV_VAR 6 if var1 fprintf stderr 1f n var1 gt dTotalReceivedPower 7 FILE fp fp fopen D Akhilesh DSR DSR12 DSR1 Experiment fprintf fp dhello 1 fclose fp oe switch pstruEventDetails gt n ventType m Output dsl hello txt a J lasiga Show output from Build 1 gt Finished generating code 1 gt DSR 1ib DSR obj warning LNK4 99 PDB vc8 pdb was not found with DSR 1ib DSR obj or at D Ak 1DSR 1ib LinkLayerAck obj warning LNK4 99 PDB vc8 pdb was not found with DSR 1ib LinkLayerAck 1 gt List lib List obj warning LNK4 99 PDB vc8 pdb was not found with List 1ib List obj or at D 1 gt 1ibDSR vexproj gt D Akhilesh DSR DSR12 1ibDSR Debug Rebuild All 1 succeeded failed skipped 1ibDSR d11 libDSR lib td List lib Mobility lib i NetworkStacklib a Source Files 2 CheckRouteFound c C DSR c x MaintBuffer c 2 Network Layer_Ack c Ge PacketProcessing c C RouteCache c 2 RouteError c io Ln ek fn_NetSim_DSR_R File d akhilesh dsr ds FullName fn_NetSim_DSR_R IsInjected False Isinline False Name Sets returns the name of the object INS 12 39 PM a onjama The solution must be built and the resulting dll file D ubDSR Debug libDSR dll must be copied and replaced in the NetSim Standard bin path When a scenario is run the Total Received Power can be seen in the command prompt
139. are under gone internally e According to the Sorting Type selected the Output would vary e Number of Comparison would be obtained e Number of Swapping would be obtained 303 e A table with the values tabulated would be obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples Sorting Technique Quick Sort Programming Guidelines This section guides the user to link his her own code for Sorting Algorithm to NetSim Pre Condition User written program should read the value from the Input txt in the temporary directory which is having input from the GUI at runtime The output should be stored in Output txt in the temporary directory for display User written program should return an integer value Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Note The naming of the input and the output file must be same as the text displayed in the Methodology screen File Format Input File Format Output File Format type gt index 1 gt index 2 gt type 0 specifies Positioning the data value Sorting Type Quick index that ha Sorting_Order Ascending Ascendin
140. ary directory which is having input from the GUI at runtime The output should be stored in Output txt in the temporary directory for display User written program should return an integer value Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and the results of the program should be written into the output file Output txt Note The naming of the input and the output file must be same as the text displayed in the Methodology screen File Format Input File Format Output File Format type gt index 1 gt index 2 gt Aatamiin Order type 0 specifies Positioning the data value Sorting Type Selection index that ha Sorting Order Ascending type 1 specifies the two index following it are being compared 307 Total_Number 3 Number_to_Sort 88 77 66 Descending Order Sorting Type Selection Sorting_Order Descending Total_Number 3 Number_to_Sort 55 11 22 type 2 specifies the two index following it are being swapped The following types are used in Quick Sort type 3 specifies the two index where index 1 value is copied to index 2 value type 4 specifies the two index where Position data index value of index is copied to the index 2 value index 1 index is the i
141. at 192 gt 128 gt 1 gt 64 gt 64 gt 64 gt 1 gt 0 gt 0 gt 32 gt 0 gt 0 gt 0 gt 16 gt 0 gt 0 gt 0 gt 8 gt 0 gt 0 gt 0 gt 4 gt 0 gt 0 gt 0 gt 2 gt 0 gt 0 gt 0 gt 1 gt 0 gt 0 gt 168 gt 128 gt 1 gt 40 gt 40 gt 64 gt 0 gt 40 gt 40 gt 32 gt 1 gt 8 gt 8 gt 16 gt 0 gt 8 gt 8 gt 8 gt 1 gt 0 gt 0 gt 4 gt 0 gt 0 gt 216 0 gt 2 gt 0 gt 0 gt 0 gt 1 gt 0 gt 0 gt 0 gt 128 gt 0 gt 0 gt 0 gt 64 gt 0 gt 0 gt 0 gt 32 gt 0 gt 0 gt 0 gt 16 gt 0 gt 0 gt 0 gt 8 gt 0 gt 0 gt 0 gt 4 gt 0 gt 0 gt 0 gt 2 gt 0 gt 0 gt 0 gt 1 gt 0 gt 0 gt 100 gt 128 gt 0 gt 100 gt 100 gt 64 gt 1 gt 36 gt 36 gt 32 gt 1 gt 4 gt 4 gt 16 gt 0 gt 4 gt 4 gt 8 gt 0 gt 4 gt 4 gt 4 gt 1 gt 0 gt 0 gt 2 gt 0 gt 0 gt 0 gt 1 gt 0 gt 0 gt 11000000 10101000 00000000 01100100 gt Interface Source Code Interface source code written in C is given using this the user can write only the fnBinaryConversion function using the variables already declared To view the interface source code go to NetSim Installation path src Programming BinaryConversion c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista 217 Properties gt find target in Windows XP Sample Scenarios Objective To understand the concept of Binary conversion through programming Sample Inputs In the Input panel the following steps need to be done e SampleM
142. ation Properties J See more results cmd Shut down gt Il Type command route delete lt Network Address gt then press Enter key You will get OK For example if your IP address is 192 168 0 4 and the subnet mask is 255 255 255 0 then the network address is 192 168 0 0 Got by performing a bitwise AND of the IP Address and the subnet mask 332 Il Type command route add lt Network Address gt mask 255 255 255 0 lt IP Address where NetSim Emulation serve is running gt metric 1 here the subnet mask is taken as 255 255 255 0 After execution you will get OK IV Type command netstat r to check if the IP configuration is done or not EY Administrator C Windows System32 cmd exe o x Network Destination Gateway Interface Metric 6 6 6 8 6 6 6 6 192 168 6 254 192 168 6 188 26 127 0 0 0 255 0 0 0 On link 127 0 0 1 306 127 0 0 1 255 255 255 255 On link 127 0 0 1 306 127 255 255 255 255 255 255 255 On link 127 0 0 1 306 192 168 0 0 255 255 255 0 192 168 6 87 192 168 6 188 21 192 168 6 188 255 255 255 255 On link 192 168 6 188 224 0 0 0 240 0 0 0 On link 127 0 0 1 224 0 0 0 240 0 0 8 On link 192 168 6 188 gee are Sen ore 255 255 255 255 sie ink 127 0 0 1 n li 1i Persistent Routes None IPv6 Route Table If Metric Network Destination Gateway 1 Ki eee eg FA On link Note thatin the above screenshot for the network 192 168 0 0 the gateway address assigned is
143. ation start streaming of the video from Source VIII Click Run Simulation During Simulation you will notice a change in the quality of the video being played in the destination PC This is because the network created in NetSim would have errors delays etc The impact of this loss jitter delay etc in NetSim Emulator is seen on a real video stream 341
144. ation in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Sorting Techniques How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Sorting Techniques Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Select the Quick Sort as Sorting Type e Select the Sorting Order as either Ascending or Descending e Select the total number that has to be sorted The values available are from 3 to 25 e Enter the Number Value in the field provided The value entered should be within the range of 1 to 9999 e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e According to the Sorting Type selected the Output would vary e Number of Comparison would be obtained e Number of Swapping would be obtained 306 e A table with the values tabulated would be obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples Sorting Technique Selection Sort Programming Guidelines This section guides the user to link his her own code for Sorting Algorithm to NetSim Pre Condition User written program should read the value from the Input txt in the tempor
145. ave path B saved Note 1 Experiment Name can be changed before running the simulation only 2 Saving the Experiment in same location without changing name will lead to overwriting the saved experiment For Legacy MPLS Wi Max Networks the following screen appears and the Experimentis saved by entering the experiment name and clicking OK ZA NetSim Simulation ATM Simulation Programming Utilities Help 56 Opening Saved Experiments Open Network Select Network from Simulation gt Open menu to open saved experiments The following steps need to be followed Select the User Note This option is available in Admin login only Select the Network There are various options like Internetworks Legacy Networks Advanced Wireless Networks MPLS Networks BGP Networks Cellular Networks Wireless Sensor Networks Personal Area Networks LTE Networks and Cognitive Radio Networks will be available Choose based on the saved experiment that needs to be opened Select the Protocol Note This is not applicable for Internetworks BGP Networks Wireless Sensor Networks Personal Area Networks LTE Networks and Cognitive Radio Networks Select the Config File Experiment gt For Internetworks BGP Networks Advanced Wireless Networks MANET Wireless Sensor Networks Personal Area Networks LTE networks and Cognitive Radio Networks and Select the Config File of the par
146. bWLAN Object File Library Date modified 2 7 2014 11 15 AM Size 10 2 KB Date created 2 7 2014 11 15 AM 12 27 PM 2 7 2014 New folder m Date modified Type ala h WLAN h a Resource Files Organize I Downloads A Name E Recent Pl a sea celine A CheckRouteFound A DsR 11 30 2013 11 38 C Sour 2 1 2014 11 20 AM_ C Sour G Libraries Documents a Music h DSR a DSR 11 30 2013 11 38 12 31 2013 6 40 AM pate tails gt nInterface C C Object EA DSR lib t List lib A Mobility lib R libDSR 2 1 20141236PM_ SQL Se I fPdingPower libDSR 1 28 2014 12 57 PM libwLAN 2 6 2014 2 15PM_ EXP Fil E libWLAN 2 1 201411 15AM_ Object Ln List 11 30 2013 11 38 C C G Neth Leyes Ack 4 List 12 31 2013 6 40 AM Object A PacketProcessing c h main 11 30 2013 11 38 C C RouteCache c 9 MaintBuffer 11 30 2013 11 38 C Sour G4 RouteError c l r C RouteReply c All Files Z F NetworkStack lib a amp Source Files C CheckRouteFound c G DSR c 3 MaintBuffer c Pictures E Subversion B Videos Micros jE Computer amp Local Disk C c Local Disk D a Local Disk E Filename libWLAN SCC Files True Jae S 1a Show output from Build 1 gt Finished generating code Name 1 gt DSR 1ib DSR obj warning LNK4 99 PDB vc8 pdb was not found with DSR 1ib DSR obj or at D Ak 2
147. ber of Subnets from the given list e Select the Host IP Address e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e Subnet mask value is obtained e Number of host in the each subnet is obtained Subnet address Starting address Ending address and Broadcast address are obtained e Subnet address of the given Host IP address is obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples 229 EUI 64 Interface Identifier Programming Guidelines This section guides the user to link his her own code for EUI 64 Interface Identifier to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt File Format Input File Output File IPV6_Network_Id 2000 FE21 593 1 72 The Output File format C3 MAC Address gt First part of M
148. btained This Plain Text would be similar to the Plain Text entered at the time of Encryption e Once the sample experiment is done then Refresh button can be clicked to create New Samples Cryptography XOR Encryption Programming Guidelines This section guides the user to link his her own code for XOR Encryption to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and 166 The results of the program should be written into the output file Output txt Input File Format Output File Format Cryptographic_Technique XOR 01010100 gt 01000010 gt 00010110 gt Cryptographic_Method Encryption 01000101 gt 01001110 gt 00001011 gt Plain_Text 01010100 gt 01001100 gt 0001 1000 gt TETCOS 0100001 1 gt 01001111 gt 00001100 gt Key_Text 01001111 gt 01010010 gt 00011101 gt BNLORE 01010011 gt 01000101 gt 00010110 gt Interface Source Code Interface Source code written in C is given using this the user can write only the XOR Encryption inside t
149. can be calculated using the formula L 10n logip d C Where L is the path loss in decibels Fis the path loss exponent d is the distance between the transmitter and the receiver usually measured in meters and C is a constant which accounts for system losses A simplified formula for the path loss between two isotropic antennas in free space 118 L in dBm 20 x logy Where L is the path loss in decibels is the wavelength and d is the transmitter receiver distance in the same units as the wavelength Calculation of Received Power In general Cre ye A Gee Clea se The path loss model used is described in IEEE Standard 802 15 2 2003 B9 which stipulates a two segment function with a path loss exponent of 2 0 for the first 8 m and then a path loss exponent of 3 3 thereafter The formula given in IEEE Standard 802 15 2 is shown in Equation E 1 pl 1 10y logigdd gt 8m i te 10yg logy 5 d lt 8m Where for 2 4 Ghz pl 1 40 2 dBm pl 8 58 5 dBm y1 2 the path loss exponent for d lt 8m Yg 3 3 the path loss exponent for d gt 8m Reference IEEE Standard 802 15 4 2006 Part 15 4 Wireless Medium Access Control MAC and Physical Layer PHY Specifications for Low Rate Wireless Personal Area Networks WPANS 119 SINR BER and Propagation models for 802 11a b g and n Received Power Calculation The received power can be expressed as Preclabm 10logio P Gr Gr F 20lo
150. celd and nInterfaceld are defined beforehand The solution must be built and the resulting D ubWLAN Debug libWLAN dII file which gets created must be copied in to the NetSim standard bin folder Again refer to writing custom code in NetSim 100 File Edit View Project Build Debug Team Data Tools Test Window Help He ae TOETER _ Win32 Global Scope fn_NetSim_WLAN PhysicallnQ pstrufventDetails gt nDeviceType NETWORK gt ppstruDeviceList nDeviceld 1 gt nDeviceType pstruEventDetails gt pPacket pstruPacket fnpAddEvent pstruEventDetails auojdg auas Sie else Drop the packet fn_NetSim Packet_FreePacket pstruPacket pstruPacket NULL if pstruMac gt Medium n_NetSim WLAN CheckPacketsInPacketlist nDeviceld nInterfaceld xOqjOo Dd 4 varl DEVICE_PHYVAR nDeviceld nInterfaceld JANAR Solution Explorer J4 Packet h R Protocol h Stack h h WLAN h i Resource Files a Source Files 9 802 11 MAC c C 802 11 PHY c 802_11ag c 802 11b c Ce 802 lle 802_11n c return bi bp s tekeeecessnesseeeseeeseeeseereeeseieesnesseeesseeseeesenessunesieesneenneeseees This function is called when MAC_IN_EVENT is triggered It checks the frame type and update the relevant sub event to process the frame SRRAEEREESREESERESSEEAEERAESREESERESSEEEEEREREREESERESSEESSERAES REESE REREREEEERERE Hint fn NetSim WLAN MacIn ila le convers
151. change the password of the user which is selected currently in the left side of the User Accounts Administrator can change the password of all the users whereas other user other than Administrator can change his her password only Experiment Deletion Section This section is used to delete the saved experiments in NetSim Administrator can delete the saved experiments of all the users whereas other user other than Administrator can delete his her saved experiments only Note Experiment Deletion Section can be used to delete the saved experiments in Legacy Networks Advanced Wireless Networks WiMAX and MPLS Saved experiments in Internetworks BGP Networks Advanced Wireless Networks MANET Wireless Sensor Networks Personal Area Networks Cellular Networks LTE Networks and Cognitive Radio Networks cannot be deleted through Experiment Deletion Section since these experiments are saved as configuration files in user specified locations 330 NetSim Emulator Available only with Emulator Add on Module A network simulator mimics the behavior of networks but cannot connect to real networks NetSim Emulator enabled users to connect NetSim simulator to real hardware and interact with live applications Emulation How Simulation interacts with the real world PCr Real Node receiving traffic a Simulation scenario in NetSim with source sending a simulation packet to des
152. columns available in the output table i e First Address Last Address CIDR Mask and No of Hosts 221 e The First Address of the first network would be nothing but the Starting IP Address which is selected No of rows in the table depends on the No of Networks selected The Last Address depends on depends on the No of Host selected e CIDR Mask is obtained internally by using the following formula CIDR Mask 32 log No of Host log 2 e Once the sample experiment is done then Refresh button can be clicked to create New Samples Network Address Programming Guidelines This section guides the user to link his her own code for Network Addresses to NetSim Pre Conditions The user program should read the input from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt File Format Input File Output File 222 IP_Address 192 168 0 140 The Output File format Prefix_Value 1 Binary value of IP Address gt Prefix value gt
153. ct Types Test Projects E Win32 Project A project for creating a Win32 console application DYR C Documents and Settings Muthukumar My Documents Visual Studio 2005 Projects DYR V Create directory for solution Solution Explorer A Resource View 142 3 Click Next gt Check Whether Console application is selected or not If selected then select Empty Project otherwise select Console application and Empty Project and finally click Finish button Microsoft Visual Studio OX File Edit View Tools Test Window Community Help on E fnRandomNo Win32 Application Wizard DVR Application type O Windows application v Precompiled header p Saal E Solution Explorer Resource View 4 Add source codes to the project Right click on the Source Files gt Add gt New Item DVR Microsoft Visual Studio Edit View Project Build Debug Tools Test Window Community Help e pe Er ES gt Debug gt Win32 fnRandomNo n DYR 1 project 8 DYR g E Header Files Be Gar File A g 3 New Filter Ha Copy Class Resource Remove Rename Properties Solution Explorer i Resource View Ready 143 5 Select c File cpp and name the file with extension of c DVR Microsoft Visual Studio File Edit View Project Build Debug Tools Test Window Community Help Debug
154. ct stru_NetSim_Network conststruct stru_NetSim_EventDetails constchar constchar int constvoid Using this API the stack passes all the relevant pointers to variables paths etc needed for the protocol Inside this function a local variables should be initialized b Initial events if any should be written eg Hello packet in RIP STP in Ethernet c File pointers for reading amp writing protocol_specific_IO files 104 int fn_NetSim_protocol_Configure conststruct stru_NetSim_Network int nDeviceld int nINterfaceID int nlayertype fnpAllocateMemory fnpFreeMemory fpConfigLog The stack calls this API when reading the config file Upon reaching the appropriate protocol definition in the XML file the stack calls this and passes all these pointers to the protocol int fn_NetSim_protocol_run This is called by the stack to run the protocol char fn_NetSim_protocol_trace int This called by the stack to write the event trace int fn_NetSim_protocol_CopyPacket const NetSim_PACKET pstruDestPacket const NetSim_PACKET pstruSrcPacket This is for copying protocol specific parameters data into the packed int fn_NetSim_protocol_FreePacket const NetSim_PACKET pstruPacket The this to free the protocol specific parameters data in the packet fn_NetSim_protocol_Metrics const FILE fpMetrics This is to write the metrics file upon completion of the simulation int fn_NetSim_protocol_Finish
155. curs 74 Step 2 Run NetSim independent of UI by mentioning the following things in the command prompt cd lt apppath gt apppath lt NetSim install directory gt iopath lt IO Path gt license 5053 lt License Server IP Address gt d Example C Program Files NetSim Standard bin gt NetSimCore exe apppath C Program Files NetSim Standard bin iopath D NetSim license 5053 192 168 0 10 d Step 3 Command prompt will ask for break point while debugging Set the event id from which the code flow has to be analyzed as the break point in the command prompt as shown below ex C WINDOWS system32 cmd exe NetSimCore exe apppath C Program Files NetSim Stan a x C Program Files NetSim Standard bin gt NetSimCore exe apppath C Program Files N etSim Standard bin iopath D Daisy Internal Testing NetSim 7 0 7 Internal Tes tingNConfig license 5653 192 168 6 16 d Breakpoint is set Enter the event id where u want to break 1 Gathering NetSim license information Roam Enable i gt Disable gt 6 netsim_std_1 Errors will be thrown in the command prompt if any as shown below n_NetSim_ eT igPacketIrace fn _NetSim_ARP_WritePacketTrace C Program Files NetSim Standard bin 1libICP d11 gt gt fn_NetSim_TCP_Init fn_NetSim_TCP_Run Ph zZ o et in re 3 iz y h pY iz fn_NetSim_TCP TCP TCP FreePacket CopyPacket Metrics 33 ee zz ct ct awn
156. d gt Newfolder gt v Organize v Open Include in library v Share with New folder Name Date modified Type Jr Favorites Downloads 23 2014 10 02 AM_ File folder Recent Places ub DSR 23 2014 9 46 AM File folder Up Include 23 2014 9 37AM File folder G Libraries J iib 23 2014 9 37 AM File folder Documents NetSim sin 13 2014 6 28 PM Microsoft Visual S a Music Pictures Subversion 85 Organize v Open v Share with New folder Name Fr Favorites J Downloads a E Recent Places i DSR exp 5 23 2014 10 02 AM Exports Library File E5 libDSR ilk 5 2014 10 02 AM Incremental Linke G Libraries t DSR lib 5 23 2014 10 02 AM Object File Library Documents DSR pdb 5 23 2014 10 02 AM Program Debug D a Music Pictures These is are the custom DLL s which have been built per the modifications done These DLL s will have to be pasted in NetSim_Standard bin path in order to simulate your custom code Part 2 How to link dynamic link libraries DLL The procedure to link custom dynamic link libraries DLLs is explained below with an example This procedure is common for any linking of any custom DLL to NetSim Let us take an example where a user wishes to link their customized CognitiveRadio dll to the NetSim Step 1 Build your own DLL with the source code available in NetSim Standard gt src gt Simulation folder for help refer How
157. d in 5 3 2 of that standard BER x x iE 1 1 xSINR x 1 Where SINR Signal to Interference plus Noise Ratio BER should be between 0 and 1 117 Propagation Loss Three different and mutually independent propagation phenomena influence the power of the received signal path loss shadowing and multipath fading Shadowing Slow shadowing in wireless network is the attenuation caused by buildings or any obstacles between a transmitter and a receiver In the model with shadowing the shadowing value Xo typically defined in dB is added to or subtracted from the average received power Xo is a zero means Gaussian distributed random variable with standard deviation o The Probability Density Function PDF of the lognormal distribution is i ax o 2g a The default value for standard deviation is chosen as 5 dB Path Loss Pathloss is the reduction in power density of an electromagnetic wave as it propagates through space Path loss may be due to many effects such as free space loss refraction diffraction reflection aperture medium coupling loss and absorption Path loss can be represented by the path loss exponent whose value is normally in the range of 2 to 4 where 2 is for propagation in free space and 4 is for relatively loss environments In NetSim the default value for path loss exponent is taken as 2 Path loss is usually expressed in dB In its simplest form the path loss
158. d in the Visual Studio IDE and the location in the executable to stop at when a user sets a breakpoint A symbol file also contains the original location of the source files and optionally the location of a source server where the source files can be retrieved from When a user debugs a project in the Visual Studio IDE the debugger knows exactly where to find the pdb and source files for the code If the user wants to debug code outside their project source code such as the Windows or third party code the project calls the user has to specify the location of the pdb and optionally the source files of the external code and those files need to exactly match the build of the executables 97 The pdb files are usually available in NetSim s install directory else write support tetcos com for the latest copy of these debug files File Edit View Project Build Debug Tools Test PurifyPlus Window Community Help u Gi d s 4a b m init JAFARA gt a gt Se F e Ha gs gs p RouteRequest c 8 DSR c x Watch ax Global Scope LNetSim_DSR_Run eae ee Type j pe pstruEventDetails CXX0017 Error TI Select All par 69 decid Switch To Frame R Run Tle Go To Disassembly sy gt Run To Cursor ype ca pEventType Breakpoint Hexadecimal Display Byer or Network in Include Calls To From Other Threads Load Symbols ppPacket gt nPacketType PacketType_ BING Symbol Load Inf
159. d in the data field available in the Decryption view e Fields such as Enter the Key Text Number of Iteration and Data is filled in automatically when Copy and Paste button is clicked e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e Keyl i e if Iteration is 1 in binary format is obtained e The Data that was entered in the Encryption view would be encrypted and displayed e Once the sample experiment is done then Refresh button can be clicked to create New Samples Rivest Shamir Adleman Algorithm RSA Programming Guidelines This section guides the user to link his her own code for RSAAIgorithmto NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt The path of the input file and the output file can be viewed on clicking the Button Path in NetSim Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt 178 General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output
160. d its architectural aspects are diagrammatically explained below Network Stack accepts inputs from the end user in the form of Configuration file and the data flows as packets from one layer to another layer in the Network Stack All packets when transferred between devices move up and down the stack and all events in NetSim fall under one of these ten categories of events namely Physical IN Data Link IN Network IN Transport IN Application IN Application Out Transport OUT Network OUT Data Link OUT and Physical OUT The IN events occur when the packets are entering a device while the OUT events occur while the packet is leaving a device EIn a lt xml gt Configuration GUI or via XML config file Application Transport Network 5 Data Link End of Simulation tiie Physical j es For each device Kernel Packet and Event Every device in NetSim has an instance of the Network Stack shown above Switches amp Access points have a 2 layer stack while routers have a 3 layer stack End nodes have a 5 layer stack 47 The protocol engines are called based on the layer at which the protocols operate For example TCP is called during execution of Transport IN or Transport OUT events while 802 11b WLAN is called during execution of MAC IN MAC OUT PHY IN and PHY OUT events When these protocols are in operation they in turn generate events for NetSim s discrete event engine to process T
161. d simulate thousands of network scenarios and store amp analyze the performance metrics of each simulation run It is not possible to do this using the GUI However the same can be done when writing a batch processing program which runs NetSim via CLI An example C program for batch processing of NetSim can be found at lt NetSim Path gt src NetSim_Batch_Processing c where lt NetSim Path gt is the path to where NetSim is installed This batch program can be customized by users as desired Batch File Picture NetSim CLI Mode Simulate NBP c Fa Config_1_1_1 xm gt Ly a Customizable CS Example Code available in lt NetSim Path gt src A Ph contig 112m j an Compile i 5 a K2 lt D P NBP exe The first scenario will have MIN value of the devices the last scenario will have MAX value of the devices Input Range Min to Max Routers Switchs Access Points Nodes w P ke Config_MaxR_MaxS A lel E MaxA xml Metrics_1_1_1 txt logfile_1_1_1 configlog_1_1 txt 1 txt Metrics_1_1_2 txt logfile_1_1_2 txt configlog_1_1_2 txt Metrics_1_1_3 txt logfile_1_1_3 txt configlog_1_1_3 txt Metrics_mR_mS_mA txt logfile_mR_mS_mA txt configlog_mR_mS_mA txt 111 Given below are important sections of the source code of this batch program define apppath C Program Files x86 NetSim pro7 bin change to your app path define iopath F NetSim_Batch_Processing
162. der gone internally e The Plain Text and Key Value entered would be displayed in red color e The corresponding Cipher Text would be obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples Decryption Sample Input In the Input panel the following steps need to be done e SampleMode should be selected e Decryption need to be selected 161 e Cipher Text obtained while encryption is filled in the Plain Text and also the Key Text is same as that entered while encrypting e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e The Cipher Text and Key Value entered would be displayed in red color e The corresponding Plain Text that had been entered at the time of encrypting is obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples Cryptography Transposition Encryption Programming Guidelines This section guides the user to link his her own code for Transposition Encryption to NetSim Pre conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp g
163. ding of the Inputs from the input file Input txt Executing the required concept and the results of the program should be written into the output file Output txt Note The naming of the input and the output file must be same as the text displayed in the Methodology screen File Format Input File Format Output File Format Output_Link_Capacity 100 Node s_Priority 8 7 6 5 4 3 2 1 Node s_ Capacity 0 0 500 0 0 0 0 0 Output txt file format is as follows Seconds gt no of bits transmitted in node 1 gt Transmission sequence of node 1 gt no of bits transmitted in node 8 gt Transmission sequence of node 8 gt Sample Output File 1 gt 0 gt 0 gt 0 gt 0 gt 100 gt 1 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 2 gt 0 gt 0 gt 0 gt 0 gt 100 gt 1 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 3 gt 0 gt 0 gt 0 gt 0 gt 100 gt 1 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 4 gt 0 gt 0 gt 0 gt 0 gt 100 gt 1 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 5 gt 0 gt 0 gt 0 gt 0 gt 100 gt 1 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt Interface Source Code Interface source code written in C is given using this the user can write only the Scheduling inside the function fnFIFO using the variables already declared To view the interface source code go to NetSim Installation path src Programming FIFO c 277 To find NetSim s Installation path right click NetSim icon and
164. disabled in this section The text files illustrating the static routing and static ARP can be obtained by enabling the corresponding tags in the Configuration xml STATISTICS COLLECTION The packet trace and the event trace can be observed in the text files which are created by enabling the tags in this section The required fields of the packet trace can be enabled in the PACKET_TRACE while the event trace can be enabled in the EVENT_TRACE of this section 70 Troubleshooting While running NetSim via CLI for the scenarios described in the Configuration file you may bump into few problems Note While running NetSim via CLI try to ensure that there are no errors in the Configuration xml file The file ConfigLog txt written to the windows temp path would show errors if any found by NetSim s config parser This section discusses some common issues and solutions Possible errors when running NetSim via CLI Problem 1 Wrong I O path r BA C Windows system32 cmd exe netsimcore appapth C Program Files NetSim Standard bin io G pee a netsim_std_6 ers ion netsim_std_ netsim_enmulator ersion rs Output of license files netsim gt std gt 7 gt 1 gt r1lm_hw gt 1111111 gt Emulation gt etSim license validated Installing heart beat status cexaxel NetSim start Network Stack loaded z Initializing simulation I O warning failed to load external entity ee O
165. e Specifies additional items to add to the link line ex kernel32 lib configuration specific gt wnn 8 We j gt a Click Project Menu in the workspace b Select properties in the pull down menu or press Alt F7 c Then click Linker d Select Input d Type ws2_32 lib file in the Additional Dependencies text box area e Click OK to confirm the changes in the workspace e If you have an eclipse complier the library linkage must be in the following way 262 type filter text Resource C C Build BerifeTeriables Discovery Options Environment OoPettain editor C C General Project References Run Debug Settings Task Repository Settings ey Configuration Release 7 Manage Config Tool Settings J Build Steps T Build Artifact Binary Parsers amp Error Parsers GCC Assembler F Libraries I General L GCC C Compiler amp Preprocessor S Enter Value pS Symbols Directories Optimization Debugging ws2_32 Warnings Miscellaneous MinGW C Linker General Miscellaneous Shared Library Settings Libraries I a Click Project Menu in the workspace b Select properties in the pull down menu c Then click C C Build d Select Setting e Select Libraries under MinGW C Linker f Press add button in the Libraries 1 window d Type ws2_32 file in t
166. e 8 pilot x4 5 802 11n 802 1lac 160MHz_ Total 484 468 Usable 16 pilot x9 0 Now with the knowledge of MCS index and bandwidth of the channel data rate is set in the following manner Step1 Get the number subcarriers that are usable for the given bandwidth of the medium Step2 Get the Number of Bits Per Sub Carrier NBPSC from selected MCS Step3 Number of Coded Bits Per Symbol NCBPS NBPSC Number of Subcarriers Step4 Number of Data Bits Per Symbol NDBPS NCBPS Coding Rate Step5 Physical level Data Rate NDBPS Symbol Time 4micro sec for long GI and 3 6 micro sec for short GI 132 Real Time Frames Capture Available in Academic Version only Description Monitor the traffic using Frames capture To capture amp analyze packets in a network we require active systems connected in the network and a network monitoring tool The network monitoring tool observes the network for data movement and as the tool recognizes data movement it will copy the data even if the data is not destined for the machine running the monitoring software and analyze it The analyses of data include the correctness of the data the data payload overheads the time of capture and also the protocols involved Based on the data analyses the tool calculates the utilization and effective utilization of the network observed Procedure 1 Connect two systems by using a hub for testing a single broadcast domain or via a Switch
167. e code written in C is given using this the user can write only the UDP functions To view the interface source code go to NetSim Installation path src Programming SocketUDP c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Send and Receive the data using PC to PCCommunication SocketProgramming How to Proceed Two Systems are required to perform this experiment When one System is in the ServerMode other should be in the Client Mode The objective can be executed in NetSim using the programming exercise available In the Programming menu selectPC to PC Communication gt Socket Programming Sample Inputs By using the InputPanel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows e SampleMode should be selected e Select a Protocol from the following o TCP o UDP e Under Operation Server or Client should be selected e On the Right hand side panel there is an InputField Enter Data to be Transmitted where Data needs to be typed in This Data is later sent to the ReceiverSystem Here Type Hello e Under Input there are two things 265 o When Operation is Client then the Server sIPAddress 192 168 1 2 should be given in the Server IP Address field o When Operation is Ser
168. e in the temporary directory The program should write the output data to Output txt file that is available in the temporary directory Note The temporary directory is navigated through the following step 285 Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and the results of the program should be written into the output file Output txt Input file format Output file format Input txt contains the distance matrix given by the user along with the source node destination node and the total number of nodes Here we have the input as a SYMMETRIC matrix The format of input txt is for example Algorithm Link_State No_of_Router 3 Distance 999 gt 6 gt 5 gt 6 gt 999 gt 7 gt 5 gt 7 gt 999 gt Source_Router 1 Destination_Router 2 Note gt is the delimiter symbol which is used to separate each input Consider the source node is 1 Distance gt 0 gt 1 gt 2 gt 1 gt 2 gt 1 gt Path gt 0 gt 1 gt 2 gt 1 gt 4 gt 1 gt The first line has the all the distance values from the source node to all the other connected nodes The second line has the path values from the source node to all the other nodes The first line contains the values stored in the distance array single dimensional array used in the algorithm The second line contains the
169. e interface source code go to NetSim Installation path src Programming AddressMask c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To understand the concept of finding Address mask through programming Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Select the IP Address e Select the Prefix value e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are done internally e Binary value of IP Address is obtained e Prefix Suffix values are obtained e Binary value of Address Mask is obtained e Decimal value of Address Mask is obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples 214 Binary Conversion Programming Guidelines This section guides the user to link his her own code for Binary conversion to NetSim Pre Conditions The user program should read the input from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input tx
170. e login as option Simulation Programming Realtime Basics Utilities Help Displays all the Help related to NetSim Help covers Simulation Experiments also Consists of Frame Capture Frame Capture is Consists of Animated explanations of networking used to capture packets in real time transfer principles protocol working and packet formats Note Note This menu is available only in Academic This menu is available only in Academic Version Version Simulation The Simulation menu contains options such as New Open Delete and Analytics Select the desired protocol in Internetworks Legacy Cellular BGP MPLS Personal Area Advanced Wireless Wireless Sensor Cognitive Radio and LTE Networks under New and the screen similar to the one below will open up New gt Internetworks Open y Legacy Networks gt Delete Advanced Wireless Networks gt Analytics BGP Networks MPLS Networks Cellular Networks Wireless Sensor Networks Personal Area Networks Cognitive Radio Networks LTE Networks eae x X Zoom Zoom 500 meters Trace button is used to describe the packet flow and event details of current experiment Help describes about how to create scenarios and run simulations This is available for all the protocols i e available in NetSim Also refer NetSim Help under the Help menu for further details Programming The Programming menu contains network programming exercise
171. e rl pData Local Temp Conf iguration xml Bie NetSim end If you are running via CLI go to IO path to view NetSim metrics If you are running via UI you can view NetSim performance metrics in the UI Solution While typing the CLI command if you enter wrong I OPath or if there is no Configuration xml file then the following error is thrown So check I O path Problem 2 Wrong License information If the license information is wrong then the following message will be shown 71 Communications error with License server Connection refused at server 111 gt netsim_std_6 ra Product Version Product Version Communications error with license server Connection refused at server 111 gt Product netsim_std_ Version 7 hackers netsim_std_all netsim_std_all Connun ications error with license server nN Product netsim lator Uersion 7 Communications error with license server 17 gt Connection refused at server 111 gt Output o icense files 7 netsim gt std gt 7 gt 1 gt r1lm_hw gt 6660600 gt Error in getting license Press any key to continue Solution In this example license server IP address is 192 168 0 185 but it is given as 192 168 0 180 Here server IP address is wrong Same error message is shown for wrong port number wrong tag name like apppath iopath license For example if appppath is typed instead of apppath then this message will be shown So check those details
172. e selected Let us consider 4 Routers are selected e SourceRouter needs to be given Let Router 4 be the SourceRouter e DestinationRouter also needs to be given Let Router 1 be the DestinationRouter e Click on 2 Routers to give the distance between those 2 Routers A bluearrow would be pointing from the SourceNode to the DestinationNode The Distances between the Routers that needs to be given are as follows 1 Router 4 and Router 1 gt 67 Km 2 Router 4 and Router 3 gt 46 Km 3 Router 3 and Router 1 gt 18 Km 284 4 Router 3 and Router 2 gt 56 Km and 5 Router 1 and Router 2 gt 70 Km e Click on Run button to view the output in the RoutingTable Output The Output for the above Scenario is as follows e Click the Run button to view program output e The Output is obtained in a RoutingTable All possible Routes and the corresponding Distance are obtained Below is a RoutingTable for the above Inputs Routing Table Route Distance KM 4 gt 1 gt 67 4 gt 3 gt 1 gt 64 4 gt 3 gt 2 gt 102 4 gt 3 gt 46 4 gt 0 e The ShortestPath would be highlighted in greencolor e Click on RefreshButton to Refresh the screen and create fresh Scenarios Shortest Path Link State Programming Guidelines This section guides the user to link his her own code for shortest path Link State Routing to NetSim Pre Conditions The program should read the data from Input txt file that is availabl
173. e various files that will be written in the NetSim install directory IO path on completion of simulation 40 S No File Contents Contains the metrics of the network 1 Metrics txt oe that is simulated recently Contains the data required to plot the 2 MetricsGraph txt graph between the various parameters in metrics against time Contains the status of the 3 LicenseErrorLog txt communication between the NetSim dongle and the client This file will be written while reading the Configuration file 4 ConfigLog txt ie Provides errors if there are errors in the configuration file Contains the logs as the control 5 LogFile txt flows across various layers in the Network Stack Contains the detailed packet 6 PacketTrace txt information This file will be written only when Packet Trace is enabled Contains the information about each event This file will be written only when Event Trace is enabled 7 EventTrace txt If NetSim runs via the UI then the metrics will be displayed automatically at the end of simulation with illustrative pie charts and tables If NetSim runs via CLI then the metrics will be written into Metrics txt and MetricsGraph txt 41 Dynamic Metrics Available in Standard and Pro Version only Dynamic metrics allows users to monitor the value of a parameter over simulation time As of NetSim v8 link and application throughputs can be dynamically plotted These plots
174. e written in C is given using this the user can write only the WEP Decryption inside the function fnWEPDecrypt using the variables already declared To view the interface source code go to NetSim Installation path src Programming WEPDecrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Encrypt and Decrypt the message by using WEP How to Proceed The objective can be executed in NetSim using the programming exercise available In Programming menu select Cryptography gt Advanced Wired Equivalent Privacy Note Encryption should be done first and then Decryption should be done Encryption Sample Inputs By using the Input Panel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows o SampleMode should be selected o Under CryptographicMethod Encryption Mode needs to be selected o Input Data Maximum of 1500 Characters NetSim TetCos Bangalore o Then Run button need to be clicked Sample Output Output for the above Sample is as follows o Initialization Vector 3E41C6 o Key ABCDEFO0123 183 O Decryption The Encrypted Text obtained 786441A955C419F9537576954F897BCC5866549653DB5CA73E1B4DF63 CA939AD Click on Copy button and then on Paste button This wou
175. e2 gt DT denotes Data from node 1 to node 2 EV gt Error Flag gt node1 gt node2 gt EV denotes Error Value i e If the above frame has error then set the error flag as 1 else set the flag as 0 ACK gt POS gt node2 gt node1 gt Acknowledgement for that above frame received is sent to node 2 to node 1 Ex CNT gt 1 gt FRAMES gt TRANSMIT gt DT gt 1 gt nodel1 gt node2 gt EV gt 0 gt nodel gt node2 gt ACK gt POS gt nodel gt node2 gt Interface Source Code Interface source code written in C is given using this the user can write only the Sliding Window Protocol Selective Repeat inside the function SelectiveRepeat using the variables already declared To view the interface source code go to NetSim Installation path src Programming SelectiveRepeat_SW c To find NetSim s Installation path right click NetSim icon and select 295 Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Send and receive the data using Sliding Window Protocol Selective Repeat How to Proceed The objective can be executed in NetSim using the programming exercise available Under Programming Menu select Sliding WindowProtocol Selective Repeat Sample Input By using the Input Panel that is available on the left hand side a Sample Scenario is created The Steps involved in creating are as follows e Sample Mode should be selected
176. ect the error found in the file transferred between a Sender and Receiver using CRC16 How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming menu selectError Detecting Codes gt Cyclic Redundancy Check Sample Input e For No Error Case Follow the below given steps 5 SampleMode should be selected 6 SelectCRC16 as Algorithm from the list available 7 Under Condition No Error should be selected 8 Under Input Enter the path of the file name to get its CRC The file should be in txt format which should not exceed 5000bytes 9 Click on Run button to execute Refresh button can be used if new Inputs have to be given e For Error Case Follow the below given steps 10 SampleMode should be selected 11 SelectCRC16 as Algorithm from the list available 12 Under Condition Error should be selected 13 Under Input Enter the path of the file name to get its CRC The file should be in txt format which should not exceed 5000bytes 14 Click on Run button to execute Refresh button can be used if new Inputs have to be given Sample Output e For No Error Case The CalculatedCRC should be Zero when the txtfile is received by the Node2 The message DataFrame is Flowing from Node1 to Node2 with NoError e For Error Case The CalculatedCRC should be Non Zero when the txtfile is received by the Node2 The message DataFrame is Flowing from Node
177. ectSpanning Tree Sample Input e SampleMode should be selected e SelectKruskal as Algorithm from the list available e Select the Number of Switches Select 4 Switches as an Input e Click on 2 Switches to give the distance between them Similarly connect all the Switches that are available in the network The Distances between the Routers that needs to be given are as follows o Switch 1 and Switch 2 gt 67 Km o Switch 1 and Switch 4 gt 46 Km o Switch 1 and Switch 3 gt 89 Km o Switch 2 and Switch 3 gt 78 Km o Switch 2 and Switch 4 gt 99 Km o Switch 3 and Switch 4 gt 56 Km e Click on Run button to execute Refresh button can be used if new Inputs have to be given Sample Output e The SpanningTreeTable with the Path Source Switch and Destination Switch and Distance is obtained Below is the Table that is obtained for the above inputs Spanning Tree Table Path Distance KM 1 4 46 4 3 56 1 2 67 314 e The Length of the SpanningTree KM would be given below in the output panel The SpanningTree Path consists of green lines whereas the Non SpanningTree consists of red lines Here in this Sample Length of the SpanningTree KM gt 169 e Once the sample experiment is done then Refresh button can be clicked to create new samples Spanning Tree Prims Programming Guidelines This section guides the user to link his her own code for Spanning Tree using Prims a
178. ed Node A Wired Node G 54 Saving Experiments For Internetworks BGP Networks Advanced Wireless Networks MANET Wireless Sensor Networks Personal Area Networks Cognitive Radio Networks and LTE networks Step 1 Just before simulating the network enter the Experiment name with which you want to save the experiment and any additional comments optional on IP and ARP Configuration Simulation Time Simulation Time 0 to 100000 s 100 Experiment will be Experiment Information Users can save the scenario and results after simulation The experiment will be saved in this eier erae ai name The file location can be set after simulation Packet Animation Don t play record animation Simulation will run fast 5 Record animation Simulation will slow down marginally Play amp record animation Simulation will slow down significantly Seed Values Used to generate random numbers in simulation Enter any value between 1 to 99999999 Seed 1 12345678 Seed 2 23456789 Step 2 Click on save button after completing the simulation browse the path where the experiment needs to be saved and click OK The configuration file and metrics file associated to this experiment is saved in the location provided 55 a NetSim Simulation Simulation Programming Utilities Help Click on Save Select the path where experiment is to be Experiment Name Experiment S
179. ed to be done e SampleMode should be selected e Number of Nodes need to be selected The value ranges from 2 to 15 e Node Address has to be entered and added onto the Node Address field The Number of Nodes selected and the Number of Addresses added into the Address field should match e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e An Output table is formed 242 e On the right hand panel an animation would play This shows that higher the address given to the node higher the priority that node gets Hence the node with the higher address would transmit the data first e Once the sample experiment is done then Refresh button can be clicked to create New Samples Code Division Multiple Access Programming Guidelines This section guides the user to link his her own code for Code Division Multiple Access to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt which is in Temporary Directory The user program after executing the concept should write the required output to a file named Output with extension txt in Temporary Directory Note The Temporary Directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading o
180. efault X Cancel Help Input File Format Output File Format The data format in the input file is as Write the received message follows Ex 274 Receive Input 192 168 0 2 Requesting for the Protocol UDP connection Local User Name Tetcos Send Protocol TCP Number of Users 2 1 192 168 0 1 2 192 168 0 2 Interface Source Code Interface source code written in C is given using this the user can write UDP Chat functions To view the interface source code go to NetSim Installation path src Programming ChatUDP c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Send and Receive the data using PC to PCCommunication Chat Application How to Proceed Two to Ten Systems are required to perform this experiment The objective can be executed in NetSim using the programming exercise available In the Programming menu selectPC to PC Communication gt Chat Application Sample Inputs By using the InputPanel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows e SampleMode should be selected e Select a Protocol from the following o TCP 275 o UDP On the Right hand side panel there is an InputField Send Data where Data needs to be ty
181. enerate custom traffic Set DL UL Ratio as 1 1 so that the BS transmits whatever it receives Run UDP in transport layer Use static ARP Run Simulation for more than 100 sec 27 Long Term Evolution LTE simulation per 3GPP 36 standard is available from version 8 of NetSim New Experiments In the Simulation menu select gt New gt LTE Networks Then the following steps should be performed e Create Scenario e Connect the devices e Set Properties for the devices and the links e Click and drop applications and configure e Enable Packet Trace or and Event Trace Optional e Enable Dynamic Metrics Optional e Run Simulation Create Scenario Adding MME Click on the Router icon in the tool bar click and drop the MME Mobility Management Entity onto the environment Adding ENB Click on the Evolved node B ENB icon in the toolbar and click it onto the environment Adding UE e Click on the UE User Equipment icon from the Node icon in the toolbar click and drop it on the ENB coverage area e UE cannot be placed on another UE It has to be clicked and placed on the ENB node coverage area Connect the devices Select the appropriate link in the toolbar and connect the devices by clicking on the device 1 and device 2 Set the Properties for the devices links and applications e Right click over the devices and then select Properties to set the properties of the links and the devices e Click and drop Application s to generate tra
182. ent seed values the results will likely be slightly different More advanced users may note that Confidence can be established by analyzing a set of results with different seed values for the same network scenario 106 How to Fail a Node in NetSim In this section we explain node failure using MANET DSR as an example e Using Device Id Identify the Device ID of the particular device e The fn_NetSim_DSR_Run is the main function to handle all the protocol functionalities DSR_Run strcpy pszFilepath pszIOPath strcat pszFilepath Output txt fp fopen pszFilepath r i 0 if fp while fgets pszConfigInput 500 fp NULL sscanf pszConfigInput d d amp NodeArray i amp TimeArray i i 1 forG 0 1 lt 100 i if pstruEventDetails gt nDeviceld NodeArray i amp amp pstruEventDetails gt dEventTime gt TimeArray i Node failure happens after a value of time storted in an array This just returns instead of running DSR functionality when the node is failed pstruEventDetails gt nInterfaceld 0 return 0 Note Add the above lines of code after the variable declarations in the function Build the dll by clickingBuild gt Build Solution The dll will be created inside the Visual studio project gt Debug 107 Static Routing IP Forwarding How to Setup Static Routes in RIP and OSPF Using GUI Step1 Create a scenario in internetworks and set properties of the devices Configure t
183. er program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Window Size The Window Size for Go Back N is 7 Input File Format Output File Format Algorithm Go_Back_N Data_File C Users P Sathishkumar D ocuments Th txt gt Bit_Error_Rate 6 Sequence_Number 3 Window_Size 7 Valuel gt Value2 gt Value3 gt Value4 gt Types There are five types of formats of writing in the output file Each format is written in specific condition the types are explained below The condition of writing the types is explained in the algorithm Typel Valuel CNT Value 2 output of the slidingcount function Value 3 FRAMES Value 4 TRANSMIT Type2 289 Valuel DT Value 2 Frame number Value 3 Frame s Source address Value 4 Frame s Destination address Type3 Value 1 EV Value 2 Output of the intro_error function Value 3 Frame Source address Value
184. erI fnConfigureWirelessNodes FILE fpConfigurationFilePointer iterate until all wireless nodes are configured fnCreate W irelessNodelInterface fpConfigurationFilePointer nLoopCounter fnCreate W irelessNodeTransportLayer fpConfigurationFilePointer fnCreate W irelessNodeA pplicationLayer fpConfigurationFilePointer nLoopCounterI On compiling NetSim_Batch_Processing c and running the executable the following screen will appear NetSim Batch Processing Please refer Running simulation via CLI gt NetSim Batch Processing in NetSim Help file for more details Enter the following details Range of number of Routers minimum and maximum values Range of number of Switches Cminimum and maximum values gt Range of number of Wired Nodes minimum and maximum values gt Range of number of Access Points Cminimum and maximum values gt Range of number of Wireless Nodes minimum and maximum values gt Please enter the minimum value for number of Routers enter the maximum value for number of Routers enter the minimum value for number Switches enter the maximum value for number Switches enter the minimum value for number Wired Nodes enter the maximum value for number Wired Nodes enter the minimum value for number Access Points enter the maximum value for number Access Points enter the minimum value for number Wireless Nodes enter the maximum value for number Wireless Nodes 114 Sample Input Routers
185. est to the Connecting Device e The Connecting Device then broadcasts the ARP Request to all the Nodes available in the network e The Destination Node i c Node Number 6 in the above example sends an acknowledgement in the form of ARP Reply i e The Destination MAC MAC Address of the Destination Node to the Connecting Device e The Device then transmits the ARP Reply i c The Destination MAC MAC Address of the Destination Node only to the Source Node e Once the sample experiment is done then Refresh button can be clicked to create new samples Assignment of Sites to Concentrator Programming Guidelines This section guides the user to link his her own code for Assignment of Sites to Concentrator to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step 155 Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input file format Output file format Input txt contains the number of sites number of co
186. etworks gt Pure Aloha To perform experiments in Legacy Networks the following steps should be followed e Create Scenario e Establishing Connections e Set Device Properties e Enable Packet Trace Optional e Run Simulation Create Scenario Adding Node e Click on the Node icon in the tool bar and click and drop inside the grid Note This is applicable for Pure Aloha and Slotted Aloha e Nodes cannot be connected directly to each other because an intermediate connecting component such as Hub or Concentrator is required Note This is applicable for Traditional Ethernet Token Bus and Token Ring 15 Adding Hub e Click on the Hub icon in the tool bar and click it onto the environment By default a Hub has eight ports Note This is applicable for Traditional Ethernet and Token Bus Adding Concentrator e Click on the Concentrator icon in the tool bar and click it onto the environment By default a Concentrator consists of eight ports Note This is applicable for Token Ring Adding CPE Customer Premise Equipment e Click on the CPE icon in the tool bar click and drop the CPE on the environment Note This is applicable for ATM X 25 and Frame Relay Adding Switch e Click on the Switch icon in the tool bar click and drop the Switch on the environment By default a Switch has eight ports Establishing Connections The steps for connecting CPE and Switch are as follows e The connections between two CPEs cannot be
187. exe lt space gt apppath lt space gt lt app path gt lt space gt iopath lt space gt lt io path gt lt space gt license lt space gt 5053 lt Server IP Address gt d et D WINDOWS system32 cmd exe D Program Files NetSim Standard bin gt NetSimCore apppath D Program Files Nets m Standard bin iopath D DOCUME 1 BALUBA 1 G G LOCALS 1 Temp Net im license 56530192 168 6 16 dm Press enter Now you can see the following screen o D WINDOWS system32 cmd exe NetSimCore apppath D Program Files NetSim Standard Jof x D Program Files NetSim Standard bin gt Net imCore apppath D Program Piles Netsi m Standard bin iopath D DOCUME 1I BALUBA 1 G LOCALS 1 Temp Net im license 50530192 168 0 18 d Breakpoint is set Enter the event id where u want to break nm 90 Step 4 Open Create the Project in Visual Studio and put break point inside the source code Step 5 Go to Debug gt Attach to Process Windows iD a Ga sua ee T gt Start Debugging gt Start Without Debugging F5 Ctrl F5 7 E E Attach to Process S Global Scope z Exceptions Ctrl Alt E O NETSIM_ID usnSo l unsigned int un E Step Into Fil to_Transmit double dEventti E Step Over F10 nAppId pstruE Toggle Breakpoint F9 nSocketId un New Breakpoint p Ss Get the sock ate n riable pstru_Socket_In Delete All
188. f the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt File Format 243 Input File Format Output File Format The Input txt file contains NumberofTransmittingMobilestat ions Value gt MobileStation Value gt Data Value gt Code Value gt MobileStation Value gt Data Value gt Code Value gt MobileStation Value gt Data Value gt Code Value gt Example NumberOfTransmittingMobileStatio ns 2 gt MobileStation 1 gt Data 10101010 gt Code 1 111111 1 gt MobileStation 2 gt Data 1 1 1 10000 gt Code 1 1 1 1 1 1 1 1 gt No of Transmitting MobileStations Value gt MobileStation Value gt Data Value gt code Value gt Encode Value gt Signal Value gt MobileStation Value gt Data Value gt code Value gt Encode Value gt Signal V alue gt MobileStation Value gt Data Value gt code Value gt Enecode Value gt Signal Value Interference Pattern Value gt MobileStation Value gt code Value gt Decode Valu e gt Data Value gt MobileStation Value gt code Value gt Decode Valu e gt Data Value gt MobileStation Value gt code Value gt Decode Valu e gt Data Value gt Example NumberofMobileStations 2 gt MobileStation 1 gt Data 1 0 10 101 0 gt Code 1 1 1 1 1 1 1 1 gt Encode 1 1 1 1 1 1 1 1 gt Signal 1 1 1 11111 1 1 1 1 1 1 1 111111111 1 1 1 1 1 1 1 111111111 1 1 1 1 1 1 1 1 11111111 1 1
189. ffic 28 e Right click over Application and set properties Multiple applications can be generated by using add button in Application properties Enable Packet Trace or and Event Trace Optional Click Packet Trace icon Event Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace and Event trace Enable Dynamic Metrics Optional Click on dynamic metrics to monitor the value of a parameter during simulation time To get detailed help please refer Dynamic Metrics Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation IP Addressing in NetSim When you create a network using the GUI NetSim will automatically configure the IP address of the devices in the scenario Consider the following scenarios If you create a network with two wired nodes and a switch the IP addresses are assigned as 10 0 1 2 and 10 0 1 3 for the two wired nodes The default subnet mask is assigned to be 255 255 0 0 It can be edited to 255 0 0 0 Class A or 255 255 255 0 Class C subnet masks Both the nodes are in the same network 10 0 0 0 Similarly if you create a network with a router and two wired nodes the IP addressed are assigned as 11 1 1 2 and 11 2 1 2 for the two wired nodes The subnet mask is default as in above case 1 e 255 255 0 0 The IP address of the router is 11 1 1 1 and 11 2 1 1 respectively for the
190. files like Configuration1 5 2 8 12 xml_log_file txt are created Output files for all the configuration files with the name of the configuration file as the prefix are generated All the configuration files which are not created due to various reasons explained in the programs code comments are listed in NetSim_Batch_Log txt 116 SINR BER and Propagation models for 802 15 4 SINR Calculation Analogous to the SNR used often in wired communications systems the SINR is defined as the power of a certain signal of interest divided by the sum of the interferencepower from all the other interfering signals and the power of some background noise The interference power is the difference between the total power received by the receiver and the power received from one particular transmitter The background thermal noise in dBm at room temperature is given by P in dBm 174 10 x logio Af where Af is the Bandwidth in Hertz For 802 15 4 Af 2 MHz P indBm 2 P in mW 10 10 Therefore SINR in dBm is calculated as SINR in dBm log10 Received power in mW Interference Noise in mW Thermal Noise in mW Bit Error Rate BER Calculation The bit error rate BER is the number of bit errors divided by the total number of transferred bits during a studied time interval The BER results were obtained using the analytical model from IEEE standard 802 15 2 2003 B9 The calculation follows the approach outline
191. following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Note The naming of the input and the output file must be same as the text displayed in the Methodology screen File Format 301 Input File Format Output File Format Ascending Order Sorting Type Insertion Sorting_Order Ascending Total_Number 3 Number_to_Sort 9 8 7 Descending Order Sorting Type Insertion Sorting_Order Descending Total_Number 3 Number_to_Sort 1 9 3 type gt index 1 gt index 2 gt type 0 specifies Positioning the data value index that ha type 1 specifies the two index following it are being compared type 2 specifies the two index following it are being swapped The following types are used in Quick Sort type 3 specifies the two index where index value is copied to index 2 value type 4 specifies the two index where Position data index value of index is copied to the index 2 value index 1 index is the index of array that points to the first data that is being swapped or compared index 2 index 2 is the index of array that points to the second data that is being swapped or compared Sample Output Ascending Order 1 gt 0 gt 1 gt 2 gt 0 gt 1 gt 1 gt 1 gt 2
192. frame received is sent to node 2 to node 1 Ex DT gt 1 gt nodel1 gt node2 gt EV gt 0 gt nodel1 gt node2 gt ACK gt POS gt node2 gt nodel1 gt Interface Source Code Interface source code written in C is given using this the user can write only the Transmission Flow Control Stop and Wait inside the function stopandwait using the variables already declared To view the interface source code go to NetSim Installation path src Programming Stopand Wait c To find NetSim s Installation path right click NetSim icon and select 327 Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Send and receive the data using Transmission Flow Control Stop and wait How to Proceed The objective can be executed in NetSim using the programming exercise available Under Programming Menu select Transmission Flow Control gt Stop and wait Sample Input In the Input panel the following steps need to be done SampleMode should be selected Stop and Wait needs to be selected for Algorithm The path of the Data file txt should be entered Bit Error Rate BER should be selected Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e When the Run Button is clicked the Tool generates the Output in the followin
193. g format Output Total data frames to be transmitted Transmitted frame Count Data Acknowledgement Total e Once the sample experiment is done then Refresh button can be clicked to create New Samples 328 User Accounts This menu can be used to add new user delete of existing users and to set mode of working Exam Practice of the user It is typically used by professors administrators to add student users and then set the user to exam mode during assessments Note As of v8 it is not yet possible to control set modify user settings from a central location server All of the possible user accounts operations given below will have to be done in each client PC where NetSim is installed Tetcos is exploring the possibility of providing centralized user accounts control in NetSim from v9 onwards User Accounts can be reached through Utilities gt User Accounts The Administrator has to enter the correct password and click on OK button to enter into the User Accounts interface This is used for verification purpose The buttons available in User Accounts window are e Add User This button is used for creating new users The following fields have to be filled in o Username Name of the new user needs to be entered in the field provided o Category By default student is selected o Mode Either Practice Exam mode needs to be selected o Click on Accept Cancel button to acce
194. g Order type 1 specifies the two index following it 304 Total_Number 3 Number_to_Sort 33 22 66 Descending Order Sorting _Type Quick Sorting _Order Descending Total_Number 3 Number_to_Sort 22 33 44 are being compared type 2 specifies the two index following it are being swapped The following types are used in Quick Sort type 3 specifies the two index where index 1 value is copied to index 2 value type 4 specifies the two index where Position data index value of index is copied to the index 2 value index 1 index is the index of array that points to the first data that is being swapped or compared index 2 index 2 is the index of array that points to the second data that is being swapped or compared Sample Output Ascending 0 gt 0 gt 0 gt 1 gt 0 gt 2 gt 3 gt 1 gt 0 gt 4 gt 0 gt 1 gt 0 gt 2 gt 2 gt 0 gt 0 gt 0 gt Descending 0 gt 0 gt 0 gt 3 gt 2 gt 0 gt 1 gt 0 gt 1 gt 4 gt 0 gt 2 gt 0 gt 0 gt 0 gt 1 gt 0 gt 1 gt 4 gt 0 gt 0 gt 0 gt 1 gt 1 gt Interface Source Code Interface source code written in C is given using this the user can write only the Sorting Algorithm inside the function fnQuicksort using the variables already declared To view the interface source code go to 305 NetSim Installation path src Programming QuickSort c To find NetSim s Installation path right click NetSim icon and select Open file loc
195. g of Character Stuffing technique How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Framing Sequence gt Character Stuffing Sample Input In the Input panel the following steps need to be done e SampleMode should be selected e Fill in the HDLC Frame fields available 209 o Starting Delimiter has to be filled in o Enter the 8 characters in the Destination Address field o Enter the 8 characters in the Source Address field o Enter in Data field with a maximum of 8 characters o Enter the 8 characters in the Check Sum field o Ending Delimiter has to be filled in e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e HDLC Frame will be formed in Sender side e Character stuffing process will be animated in Sender Side e Then destuffing process will be animated in Receiver side e Once the sample experiment is done Refresh button can be clicked to create new samples Virtual Scheduling Algorithm Programming Guidelines This section guides the user to link his her own code for Virtual Scheduling Algorithm to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named
196. gio A 4tdo 10nlog dod Pshadow loss Prading Where P Power Transmitted in mwatts Gy Gain of the transmitting antenna in dB Gpr Gain of the receiving antenna in dB Wavelength in meters do Reference distance at which the path loss inherits free space path loss n Path loss exponent ranges between 2 to 5 Pshadow loss Power due to Shadowing in dB Prading Power due to Fading in dB The code for calculating the received power is included in the file 802_11_PHY c path for the file is NetSim Standard src Simulation WLAN Propagation Loss Three different and mutually independent propagation phenomena influence the power of the received signal path loss shadowing and multipath fading Path Loss Path loss is the reduction in power density of an electromagnetic wave as it propagates through space Path loss may be due to many effects such as free reflection aperture medium coupling loss and absorption Path loss can be represented by the path loss exponent whose value is normally in the range of 2 to 4 where 2 is for propagation in free space In NetSim the default value for path loss exponent is taken as 2 120 Path loss is usually expressed in dB In its simplest form the path loss can be calculated using the formula L 1 Onlo g do d Where L is the path loss in decibels n is the path loss exponent and d is the distance between transmitter and the receiver usually measured in meters A
197. h array single dimensional array used in the algorithm Sample Output 1 gt 2 gt 3 gt 1 gt 2 gt 1 gt 3 gt 1 gt gt gt gt path_FS gt 0 gt 0 gt 0 gt 0 gt 0 gt 1 gt 0 gt 1 gt 0 gt distance_FS gt 0 gt 5 gt 1 gt 5 gt 0 gt 6 gt 1 gt 6 gt 0 gt Note The string Distance and Path in the file is compulsory The output must be stored in the same format 283 Interface Source Code Interface source code written in C is given using this the user can write only the Scheduling inside the function fnFloyd using the variables already declared To view the interface source code go to NetSim Installation path src Programming Floyds c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective The objective is to find the ShortestPath between the two Routers using the Floyds algorithm How to Proceed The objective can be executed in NetSim using the Programming exercise available Under ProgrammingMentu select ShortestPath Sample Input By using the Input Panel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows e SampleMode should be selected e Select the Algorithm as Floyd s e Number of Routers needs to be selected Minimum of 3Routers and Maximum of 8Routers can b
198. h can be done so by adjusting the RTS Threshold If the Present_Time gt NAV then an Event MAC_OUT with SubEvent DIFS End is added at the time Present_Time DIFS time The medium is checked at the end of DIFS time period and a random time BackOff is calculated based on the Contention Window CW An Event MAC_OUT with SubEvent Backoff is added at time Present_Time BackOff Time Once Backoff is successful NetSimstarts the transmission process wherein it gets the aggregated packet from the QOS buffer and stores it in the Retransmit buffer If the A MPDU size is gt RTS Threshold then it enables RTS CTS mechanism which is an optional feature Event Mac_Out Sub Event BackOff Start Transmission Get Aggregated Packet f Packet Size gt RTS Thrhid Send RTS Wait for CTS Event Phy_Out Sub Event AMPDU_Frame ee NetSim sends the packet by calling the PHY_OUT Event with SubEventAMPDU_Frame Note that the implementation of A MPDU is in the form of a linked list 128 Event Phy_Out Sub Event AMPDU_Frame Packet NULL Event Phy_In Sub Event AMPDU_Frame Event Timer Sub Event Update Device Status Event Mac_In Time End Time of SubFrame Sub Event AMPDU_Frame Event Phy_In De Aggregate the Sub Event AMPDU_SubFrame AMPDU Time End Time of SubFrame Device Packet Next Packet Target Event Network In Add Packet to Event Phy_Out SubEvent 0 Access Buffer Sub Even
199. he applications Step 2 While running the simulation go to IP and ARP configuration tab and enable Static IP forwarding and browse the path where it has to be saved NetSim aoe Simulation Configuration IP and ARP Configuration Static ARP Static ARP Enable Auto w File Path a Static IP forwarding Static IP Forwarding Eae File Path Browse Using CLI Step1 In internetworks Static Routes can be set for any scenario having a minimum of 3 routers 2 switches and 3 wired nodes The easiest way to do this is to first run the scenario with routing protocol set as RIP OSPF and save the Configuration file Step 2 Open the Configuration file with Visual studio Expand the Router configuration and set the Static Routing information in Application Layer property of the device by enabling the Static routing status Then set the appropriate Static routing file name and file path RIP By default lt LAYERTYPE APPLICATION LAYER gt lt ROUTING PROTOCOLNAME RIP SETPROPERTY true gt lt PROTOCOL PROPERTYFILE NAME StaticRouting txt FILE PATH C Program Files NetSim 108 standard Docs Sample Configuration Internetworks GARBAGE O STAT WANA lt ROUTING PROTOCOL gt BL IC_ROUTING STATUS DISA E TIM baAkicRouting Ext Pi ERTY true gt tion Internetwork
200. he following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Algorithm Kruskal s Output txt file has the edges No_of_Switches 3 in the spanning tree which is No_of_Edges 3 selected from the input edges Source_Switch 3 Destination_Switch 1 Distance 23 Nodel gt Node2 gt Cost gt Source_Switch 1 Destination_Switch 2 Distance 34 Example Source_Switch 3 Destination_Switch 2 Distance 45 3 gt 1 gt 23 gt 1 gt 2 gt 34 gt Interface Source Code Interface source code written in C is given Using this the user can write only the Kruskal algorithm inside the function fnKruskal using the variables already declared To view the interface source code go to NetSim Installation path src Programming Kruskal c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To find the SpanningTree for a network by using Kruskal algorithm 313 How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming Menu sel
201. he function fnXOREncryption using the variables already declared To view the interface source code go to NetSim Installation path src Programming XorEncrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 167 Cryptography XOR Decryption Programming Guidelines This section guides the user to link his her own code for XOR Decryption to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Cryptographic_Technique XOR 00010110 gt 01000010 gt 01010100 gt Cryptographic_Method Decryption 00001011 gt 01001110 gt 01000101 gt Cipher_Text 00011000 gt 01001100 gt 01010100 gt 00010110000010110001100000001100000 00001100 gt 01001111 gt 01000011 gt 1110100010110 00011101 gt 01010010 gt
202. he text box area e Click OK to confirm the changes in the workspace e If gcc compiler is used via command prompt a Set the path to Socket program location c C WINDOWS system32 cmd exe F mahi send gt b Create output file o file using below command 263 gcc C Filename c ex C WINDOWS system32 cmd exe F mahiX send gt gcee c send c F mahiNsend gt c Create exe file exe file using below command gcc o send send o lws2_32 e If using Dev C IDE go to Tools gt compiler options and add lws2_32 as follows before executing Compiler Options ss Compiler Sel Compiler set to configure Default compiler v a A Add the following commands when calling compiler V Add these commands to the linker command line Compile Dela 0 a Enables a delay in milliseconds if make complains Bes y Xi about the makefiles time stamp Makefile generation IV Use fast but imperfect dependency generation Default X Cancel Help Input File Format Output File Format The data format in the input file is as follows Write the received message Server Input Protocol UDP Operation Server Client Protocol UDP Operation Client Destination IP 192 168 0 132 Ex 192 168 0 2 Requesting for the connection 264 lt Client IP Message gt Ex 192 168 0 2 Requesting for the connection Interface Source Code Interface sourc
203. help of Simple IPB Composite Model o Hurst B Refer i button help of Simple IPB Composite Model o Hurst P Refer i button help of Simple IPB Composite Model o Gamma I Refer i button help of Simple IPB Composite Model o Gamma B Refer i button help of Simple IPB Composite Model o Gamma P Refer i button help of Simple IPB Composite Model o Eta I Refer i button help of Simple IPB Composite Model o Eta B Refer i button help of Simple IPB Composite Model o Eta P Refer i button help of Simple IPB Composite Model 35 FTP File Size Distribution The options available for distribution are e Constant e Exponential File Size Bytes Sets the size of the packets being generated by the chosen distribution By default 1000000 bytes is entered File_Inter Arrival Time This indicates the time gap between packets Distribution The options available for distribution are e Constant e Exponential Inter Arrival Time Enter the average inter arrival time between packets A lower inter arrival time would lead to a higher generation rate and the vice versa By default 5 Sec is entered Database Transaction Size Distribution The options available for distribution are e Constant e Exponential Packet_Size Bytes Sets the size of the packets being generated by the chosen distribution By default 10000 bytes is entered Transaction Inter Arrival Time This indicates the time gap between packets 36 Di
204. hese are known as SUB EVENTS All SUB EVENTS fall into one of the above 10 types of EVENTS Each event gets added in the Simulation kernel by the protocol operating at the particular layer of the Network Stack The required sub events are passed into the Simulation kernel These sub events are then fetched by the Network Stack in order to execute the functionality of each protocol At the end of Simulation Network Stack writes trace files and the Metrics files that assist the user in analyzing the performance metrics and statistical analysis Event Trace The event trace records every single event along with associated information such as time stamp event ID event type etc in a text file or csv file which can be stored at a user defined location Apart from a host of information the event trace has two special information fields for diagnostics a A log of the file name and line number from where the event was generated Please refer Help Event Trace Writing file name and line number of the code which generated the event and b Previous event which triggered the current event Note Turning on Event Trace will slow down the simulation significantly 48 How to enable Event Trace via GUI If NetSim runs via GUI event trace can be turned on by clicking the Event Trace icon in the tool bar in the Internetworks menu and selecting the required fields in the event trace How to enable Event Trace via CLI If NetSim runs
205. ices links and applications e Right click over the devices and then select Properties to set the properties of the links and the devices e Click and drop Application s to generate traffic e Right click over Application and set properties Multiple applications can be generated by using add button in Application properties 22 Enable Packet Trace or and Event Trace Optional Click Packet Trace icon Event Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace and Event trace Enable Dynamic Metrics Optional Click on dynamic metrics to monitor the value of a parameter during simulation time To get detailed help please refer Dynamic Metrics Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation Wireless Sensor Networks New Experiments In the Simulation menu select Simulation gt New gt Wireless Sensor Networks To perform experiments in Wireless Sensor Networks the following steps should be followed e Create Scenario e Set Device Properties e Set Environment Properties e Enable Packet Trace or and Event Trace Optional e Enable Dynamic Metrics Optional e Run Simulation Create Scenario Adding Sink Node Click on the Sink Node icon in the toolbar and click and drop inside the grid Adding Sensor Click on the Sensor Node icon in the toolbar and click and drop inside the grid Add
206. ile C Users P Sathishkumar Documents 1 Th txt gt BER 0 Valuel gt Value2 gt Value3 gt Value4 gt Types There are five types of formats of writing in the output file Each format is written in specific condition the types are explained below The condition of writing the types is explained in the algorithm Typel Valuel CNT Value 2 output of the slidingcount function Value 3 FRAMES Value 4 TRANSMIT Type2 Valuel DT Value 2 Frame number Value 3 Frame s Source address Value 4 Frame s Destination address Type3 Value 1 EV Value 2 Output of the intro_error function Value 3 Frame Source address Value 4 Frame s Destination address Typed Value 1 ACK 326 Value 2 POS Value 3 Acknowledgement frame s Source Address Value 4 Acknowledgement frame s Destination Address Types Value 1 DEL Value 2 count of frames being deleted Value 3 FRAME Value 4 DELETED Note The above convention to write into the Output Txt is mandatory Values in Quotes to be written into file Output Txt as it is including Case DT gt Frame No gt nodel gt node2 gt DT denotes Data from node 1 to node 2 EV gt Error Flag gt nodel gt node2 gt EV denotes Error Value i e If the above frame has error then set the error flag as 1 else set the flag as 0 ACK gt POS gt node2 gt node1 gt Acknowledgement for that above
207. iler is used via command prompt a Set the path to Socket program location c C WINDOWS system32 cmd exe F mahi send gt b Create output file o file using below command 269 gcc C Filename c ex C WINDOWS system32 cmd exe F mahiX send gt gcee c send c F mahiNsend gt c Create exe file exe file using below command gcc o send send o lws2_32 e If using Dev C IDE go to Tools gt compiler options and add lws2_32 as follows before executing Compiler Options ss Compiler Sel Compiler set to configure Default compiler v a A Add the following commands when calling compiler V Add these commands to the linker command line Compile Dela 0 a Enables a delay in milliseconds if make complains Bes y Xi about the makefiles time stamp Makefile generation IV Use fast but imperfect dependency generation Default X Cancel Help Input File Format Output File Format The data format in the input file is as Write the received message follows Ex Receive Input Tetcos Hello 11111 Protocol TCP Local User Name Tetcos Send Protocol TCP Number of Users 2 1 192 168 0 1 2 192 168 0 2 270 Interface Source Code Interface source code written in C is given using this the user can write the TCP chat functions To view the interface source code go to NetSim Installation path src Programming ChatTCP c To
208. ind NetSim s Installation path right click NetSim icon and select 211 Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Virtual Scheduling Algorithm How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Virtual Scheduling Algorithm Sample Input In the Input panel the following steps need to be done e SampleMode should be selected e Select the Peak Cell Rate PCR Its value ranges from 1 to 10 e Select the Cell Delay Variation Tolerance CDVT Its value ranges from 0 1 to 0 9 e Enter in the Actual Arrival Time e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e A graph with the following information is obtained o Cell Confirmation o Actual Arrival Time o Expected Time TAT o Whether the Cell has been discarded or successfully received This discarding or receiving of the cell depends on the Actual Arrival Time entered Go through the 3 rules given in this program e Once the sample experiment is done then Refresh button can be clicked to create New Samples 212 Programming Guidelines Address Mask This section guides the user to link his her own code for Address mask to NetSim Pre Co
209. ing Agent Click on the Agent icon in the toolbar and click and drop inside the grid Set the Properties for the devices Right click over the devices sensor sink node and agent and then select Properties to set the properties of the devices 23 Enable Packet Trace or and Event Trace Optional Click Packet Trace icon Event Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace and Event trace Enable Dynamic Metrics Optional Click on dynamic metrics to monitor the value of a parameter during simulation time To get detailed help please refer Dynamic Metrics Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation Personal Area Networks New Experiments In the Simulation menu select Simulation gt New gt Personal Area Networks For example to arrive ZigBee In the Simulation menu select Simulation gt New gt Personal Area Networks gt ZigBee To perform experiments in Personal Area Networks the following steps should be followed e Create Scenario e Set Device Properties e Set Environment Properties e Click and drop applications and configure e Enable Packet Trace or and Event Trace Optional e Enable Dynamic Metrics Optional e Run Simulation Create Scenario Adding Node e Click on the Node icon in the toolbar and click and drop it inside the grid i e Visibility Range
210. ing it are being compared type 2 specifies the two index following it are being swapped The following types are used in Quick Sort type 3 specifies the two index where index 1 value is copied to index 2 value type 4 specifies the two index where Position data index value of index is copied to the index 2 value index 1 index is the index of array that points to the first data that is being swapped or compared index 2 index 2 is the index of array that points to the second data that is being swapped or compared Sample Output Ascending Order 1 gt 0 gt 1 gt 2 gt 0 gt 1 gt 1 gt 1 gt 2 gt 2 gt 1 gt 2 gt 1 gt 0 gt 1 gt 2 gt 0 gt 1 gt Descending Order 1 gt 0 gt 1 gt 2 gt 0 gt 1 gt 1 gt 1 gt 2 gt 2 gt 1 gt 2 gt 1 gt 0 gt 1 gt 2 gt 0 gt 1 gt 299 Interface Source Code Interface source code written in C is given using this the user can write only the Sorting Algorithm inside the function fnBubblesort using the variables already declared To view the interface source code go to NetSim Installation path src Programming BubbleSort c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Sorting Techniques How to Proceed The objective can be executed in NetSim using the prog
211. ion WLAN 121 SINR Calculation Analogous to the SNR used often in wired communications systems the SINR is defined as the power of a certain signal of interest divided by the sum of the interference power from all the other interfering signals and the power of some background noise The interference power is the difference between the total power received by the receiver and the power received from one particular transmitter The background thermal noise in dBm at room temperature is given by Poise in dBm 174 10logio Af Where Af is the Bandwidth in Hertz For 802 11a b g Af 20 MHz and for 802 11n Af 20 MHz or 40 MHz Therefore SNR in dBm Power Received in dBm Pnoise Gn dBm Bit Error Rate BER Calculation The bit error rate BER is the number of bit errors divided by the total number of transferred bits during a studied time interval The BER calculation has been done as a hash table based on the BER curves for different modulation schemes The code for calculating SNR and implementation of SNR vs BER is included in the function fn_NetSim_WLAN_802_11x_BER of the file 802_11_x c where x a b g and n you can find it in the following path NetSim Standard src Simulation WLAN 122 SNR vs BER curve for MPSK where M 2k Bit error probability P_a M 10 5 0 5 10 15 20 Ep Np dB Reference From Page 221 Digital Communications by Bernard Sklar 2 Edition 123 SNR vs BER cur
212. ion from double to int warning C4244 File FullName users core desktop 1ibwlan g02_11ag c 29 1 gt Generating Code 1 gt WLAN 1ib WLanLib obj MSIL netmodule or module compiled with GL found restarting link with LT 1 gt LINK warning LNK4 75 ignoring INCREMENTAL due to LTCG specification 1 gt Creating library C Users Core Desktop 1ibWLAN Debug 1ibWLAN 1ib and object C Users Core Deskto 1 gt LINK warning LNK4 98 defaultlib MSVCRT conflicts with use of other libs use NODEFAULTLIB libra 1 gt Generating code CATAE Output Isinjected sinline CH Ln 589 CH PMD_RX Specification 8 C WLan c amp Class Vi ax fn_NetSim_WLAN c users core desl fn_NetSim_WLAN False False 12 12 PM 2 7 2014 The user must create a DSR solution as mentioned above How to write a custom code In the example the folder path is D ibDSR The D ibWLAN WLAN h file which was changed earlier must be copied and pasted in the DSR solution folder D libDSR and must be included in the header files in DSR solution in visual studio pe libDSR Microsoft Visual Studio Function to free the allocated memory for the WLAN packet _declspec dllexport int fn_NetSim WLAN FreePacket NetSim_PACKET int fn_NetSim WLAN FreePacket_F NetSim_PACKET Function to copy the WLAN packet from source to destination _declspec dllexport int fn_NetSim_WLAN_CopyPal int fn_NetSim_WLA
213. ith extension txt The user program after executing the concept should write the required output to a file named Output with extension txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Coding Pre Requisites The prerequisite for the creation of sockets in the Windows based C complier is they must have winsock h header file in its standard header file folder In order to use the commands of the winsock h there must be wsock32 lib library file present in the C complier To link wsock32 lib different steps have to be followed for different compilers as shown e For Visual Studio complier 2010 10 0 versions the library file linkage must be made in the following way 267 B Common Properties Additional Dependencies References Ignore All Default Libraries Configuration Properties Ignore Specific Library General Module Definition File Debugging Add Module to Assembly meee Embed Managed Resource File ems Force Symbol References General Delay Loaded DLLs Assembly Link Resource Manifest File Debugging System Optimization Embedded IDL Advanced Command Line Manifest Tool XML Document Genera Browse Information DaDo Additional Dependencies Custom Build Ste Specifies additional items to add to the link line ex ker
214. ition Encryption Sample Input In the Input panel the following steps need to be done SampleMode should be selected Encryption need to be selected Enter the Cipher Text Maximum of 14 Characters can be entered Enter the Key Value Maximum of 8 alphabets can be entered Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally Decryption The entered Key Value would be displayed first The order of the Key Value is internally sensed The corresponding Cipher Text is obtained Once the sample experiment is done then Refresh button can be clicked to create New Samples Sample Input In the Input panel the following steps need to be done Once Encryption is done Decryption has to be selected The Cipher Text obtained for Encryption is the Cipher Text for Decryption This would be automatically taken Maximum of 14 Characters can be entered 165 e Enter the Key Value will also be taken internally Maximum of 8 alphabets can be entered e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e The entered Key Value would be displayed first This is arranged in such a way that the order is changed when compared to Encryption e The order of the Key Value is internally sensed e The corresponding Plain Text is o
215. itiveRadio_default dll J Libraries 3 libCRC dll 28 2014 2 49 PM DLL File 128 2014 2 49 PM DLL File 1 73 Recent Places 1 libCqgnitiveRadio dll 4 2 2014 5 10 PM DLL File 1 1 Note Ensure that the name of the DLL which is pasted is exactly the same as the original DLL before it was renamed For the example case of cognitive radio the DLL must be libCognitiveRadio dll NetSim Hello World Program Add a printf statement inside the source code to print Hello World when custom built dll is executing Note stdout is redirected to LogFile txt which is present in lt iopath gt So you can see Hello World Statement or whatever you write inside the printf inside the LogFile txt Use fprintf stderr Hello World instead of printf to write to standard out Take source code of any primitive for example DSR Add printf statement as shown below NetSim Microsoft Visual Studio co fmm File Edit View Project Build Debug Team Data Tools Test Window Help a i Ge aw amp 4a i E D Debug Win32 lt TAG NAME Application_Lay 4 2 TK I joa 2 iO sR Ga ar OG aAA DSR c x Solution Explorer Global Scope fn_NetSim_DSR_Init stru_NetSim_Network NETWORK_ a 4 a cd oa Solution NetSim 1 project _declspec dllexport int fn_NetSim_DSR_Init struct stru_NetSim_Network NETWORK_Formal 4 fj DSR NetSim_EVENTDETAILS pstruEventDetai
216. l1 to Node2 with Error 197 Error Detection Code Cyclic Redundancy Check CRC 32 Programming Guidelines This section guides the user to link his her own code for Cyclic Redundancy Check to NetSim Pre Conditions The user program should read the input from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File format Algorithm CRC_32 Output contains two values which is the Condition No_Error written in the separate line File_Path C Users P Sathishkumar Documents 1 The First line has the CRC value of the data Th txt Sender side CRC value txt gt The Second line has the CRC value of the data Receiver side CRC value Example DD8F598B 00000000 Interface Source Code Interface Source code written in C is given using this the user can write only the Cyclic Redundancy Check inside the function fnCRC using the variables already declared To view the interface source code go to 198
217. lculatedCRC should be Zero when the txtfile is received by the Node2 The message DataFrame is Flowing from Nodel to Node2 with NoError e For Error Case The CalculatedCRC should be Non Zero when the txtfile is received by the Node2 The message DataFrame is Flowing from Nodel to Node2 with Error Error Detection Code Cyclic Redundancy Check CRC CCITT Programming Guidelines This section guides the user to link his her own code for Cyclic Redundancy Check to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File format Algorithm CRC_CCITT Output contains two values which is the Condition No_Error written in the separate line 200 File_Path C Users P Sathishkumar Document The First line has the CRC value of the data s l Th txt gt Sender side CRC value The Second line has the CRC value of
218. ld Copy the EncryptedText onto the DecryptionInputDatafield Sample Inputs By using the InputPanel that is available on the left hand side a Sample Scenario is created The Steps involved in creating are as follows O Sample Output O O O Sample Mode should be selected This is Automatically selected once the Paste button is clicked at the time of Encrypting the Data Under Cryptographic Method Encryption Mode needs to be selected This is Automatically selected once the Paste button is clicked at the time of Encrypting the Data Enter Key Value gt 3E41C6ABCDEF0123 16Hexadecimal Characters This field is Automatically filled once the Paste button is clicked at the time of Encrypting the Data Number of Iterations gt 1 Input Data 78644 1A955C419F9537576954F897BCC5866549653DBS5CA73E1 B4DF63 CA939AD This field is Automatically filled once the Paste button is clicked at the time of Encrypting the Data Then Run button need to be clicked Output for the above Sample is as follows Initialization Vector 3E41C6 Key ABCDEFO0123 The EncryptedText obtained NetSim TetCos Bangalore 184 Distance Vector Routing Programming Guidelines This section guides the user to link his her own code for Distance Vector Routing to NetSim Pre Conditions The user program should read the input from text file named Input with extension txt The user program after executing the concept should write the
219. left of the text box Users can pin the variable to watch by clicking on the pin icon to the right of that variable in the text box View Project Build Debug Tools Test PurifyPlus Window Community Help gt PacketProcessing ca RouteRequestic 6 D5R c zx Global Scope fn_NetSim_DSR_GeneralPacketProcessing NetSim EVEN Name Vale Type i el haau a i ae L include List h G declspec dllexport int fn NetSim DSR GeneralPacketProcessing NetSim EVE q NETSIM_IPAddress nextHop NETSIM_ID nInterface DSR_ROUTE_CACHE cacl 3 DSR_DEVICE_VAR pst War DSR DEV VAR pstruEventDetails gt nDevicel if DSR_CHECK_ROUTE_FOUND pstruDewar 38 nRREQIdentification pstruDewVar nextHop p NRREQIdentifcation 0 t GO pstuRoutecache 1100000000 dTineoutT la Route found E pstruRREQTable 0x00000000 nTTL lastRequestTime dBackoff DSRCADDCACE REQUEST ee psnuantuffer Ox0000000 HAGKTine cute nexthop gt DSR_ADD_ACK_REQUEST PS Genetics ffreqSent 0 rregForwarded 0 rrepsent 0 F free pstruEventDetails pstruEventDetails gt pPacket gt pstruNetworkData gt szNextHopIp _strd pstruEventDetails gt pPacket gt nTransmitterId pstruEventDetails gt n pstruEventDetails gt pPacket gt nReceiverId fn_NetSim_Stack_GetDevi DSR_ADD_TO_MAINT_BUFFER pstruEventDetails gt nDeviceld pstruEventDe DSR_DEV_VAR pstruEventDetails gt nDeviceld gt dsrMetrics packetTrans m J Eiai 3
220. levels 0 A MA Transitions between levels are assumed to occur with exponential rates that may depend on the current level e Simple IPB Composite Model In this model the frames are organized as IBBPBBPBBPBBIBBPBB i e 12 frames in a Group of Pictures GOP Generate X0 from a Gaussian distribution N 0 y 0 Set initial value NO 0 DO 1 For k 1 2 N 1 calculate Okj j 1 2 k iteratively using the following formulae Nk r k j 12k 1 k 1 j r k j Dk Dk 1 N2k 1 Dk 1 kk Nk Dk Okj Ok 1 j Okk k 1 k j j 1 k 1 mk j 1LkOkjXk j y k 1 2kk yk 1 34 Finally eachXk is chosen from N mk y k Thus we get a process X with ACF approximating to r k The auto correlation function can be calculated in a recursive way as follows r O 1 r k 1 k d k 1 r k where d H 0 5 H is called the Hurst parameter k B is used as the ACF of a self similar process We get the value of H parameter for a self similar process using the relationship B 2 2H Distribution of these data is Gaussian For data to be Beta distributed the following mapping is being used Yk F 18 FN Xk k gt 0 Xk Self similar Gaussian process FN The cumulative probability of normal distribution F 18 The inverse cumulative probability functions of the Beta model o Frames per second Number of frames arriving per second This is in the range of 10 50 o Hurst Refer i button
221. lgorithm to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Algorithm Prim s Output txt file has the edges in the No_of_Switches 3 spanning tree which is selected from No_of_Edges 3 the input edges 315 Source_Switch 1 Node1 gt Node2 gt Cost gt Source_Switch 3 Destination_Switch 1 Distance 44 Example Source_Switch 1 Destination_Switch 2 Distance 55 1 gt 3 gt 44 gt Source_Switch 2 Destination_Switch 3 Distance 66 1 gt 2 gt 55 gt Interface Source Code Interface source code written in C is given Using this the user can write only the Prim s algorithm inside the function fnPrims using the variables already declared To view the interface source code go to NetSim Installation path src Programming Prims c To find NetSim s Installation path right click NetSim icon and select Open
222. licking on the device 1 and device 2 Set the Properties for the devices links and applications e Right click over the devices and then select Properties to set the properties of the links and the devices e Click and drop Application s to generate traffic 26 e Right click over Application and set properties Multiple applications can be generated by using add button in Application properties Enable Packet Trace or and Event Trace Optional Click Packet Trace icon Event Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace and Event trace Enable Dynamic Metrics Optional Click on dynamic metrics to monitor the value of a parameter during simulation time To get detailed help please refer Dynamic Metrics Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation Notes on Cognitive Radio implementation in NetSim e CRBS allocates max one symbol per CPE If the generation rate is more than the data filled in one symbol then allocation fails and it results in zero throughput e The first symbol is reserved for CR control frames or any broadcast PDU e NetSim gives App layer throughput which is lesser than that of MAC layer throughput because of gt TCP connection establishment gt ARP set up gt Service flow creation CPE BS and BS CPE gt BW request e To avoid the above effects G
223. llation path src Programming IP V6HostAddress c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To understand the concept of IPV6 Host Addresses through programming How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select IPV6 Addressing gt IPV6 Host Addresses Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Enter the IPV6 Address e Select the Prefix length e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e IPV6 is separated into two parts Network Id bits prefix and Host Id bits suffix e Starting address of the network is found by replacing each bits of suffix part with Zero e Ending address of the network is found by replacing each bits of suffix part with one e Once the sample experiment is done then Refresh button can be clicked to create New Samples 234 IPV6 Subnetting Programming Guidelines This section guides the user to link his her own code for IPV6 Subnetting to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with exten
224. ls Forn 63 CheckRouteFound c char pszAppPath_Formal C DSR c char pszWritePath_Formal n DSR h int nVersion_Type void fnPointer amp MaintBuffer c c Network_Layer_Ack c fprintf stderr Hello World n C PacketProcessing c getch s C RouteCache c return fn_NetSim_DSR_Init_F NETWORK_Formal pstruEventDetails_Formal pszAppPath_Forn RouteError c c RouteReply c XOG OO mojdg aaas S C RateRernect e This is the DSR configure function w F Tea B Class Properties vax Create DLL and Link the DLL to the NetSim explained above And run the simulation you can see the following output on the console Gas C Program Files NetSim Standard bin NetSimCore exe o x 7 netsim_std_4 7 netsim_std_5 7 netsim_std_6 7 netsim_std_7 7 license files netsim gt std gt gt 6 gt rim_hw gt 1111111 gt NetSim license validated E E E NetSim start Network Stack loaded Initializing simulation Config file reading complete i re validation complete Protocol binaries loaded Stack variables initialized HE Hello World SS Press enter then simulation will continue 89 Debugging custom code in NetSim Step 1 Open the Command prompt Press windows R and type cmd Step 2 To run the NetSim via CLI copy the path where NetSimCore exe is present gt cd lt apppath gt Step 3 Type the following command gt NetSimCore
225. made in the network e The connection possibilities are gt CPE to Switch and gt Switch to Switch Note Depending upon the simulation choose either ATM Switch or X 25 Switch or Frame Relay Switch Set Node Properties or CPE Properties Right Click on the appropriate node or CPE and select Properties Set the Properties for the devices and links Right click over the devices and then select Properties to set the properties of the links and the devices Modifying Viewing Accepting Properties On opening an already configured properties of an application the input fields will be frozen i e the input cannot be changed To modify these values click on the Modify button in the screen 16 Now the input value can be changed Click on the Accept button the modified values will be saved This View button is enabled once the Accept Button is clicked To view the given values click on the View button Enable Packet Trace Optional Click Packet Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation Advanced Wireless Networks New Experiments In the Simulation menu select gt New gt Advanced Wireless Networks For example to arrive MANET In the Simulation menu select gt New gt Advanced Wireless Networks gt MANET To perform
226. ment W My Computer g My Network Place Details s Start w Inbox Outloo Windows E xE Microsoft O Mozilla Firefox E Microsoft O 7 cX SDK Command RIZ 2 27PM Now user can debug the code so that the flaw in the Configuration xml or in the dll can be removed easily 79 Problem 9 Simulation does not commence No license for product 1 is displayed in the command prompt Example laix l C Program Files NetSim Standard bin gt NetSimCore exe apppath C Program Files N etSim Standard bin iopath C DOCUME 1 Tesingi LOCALS 1 Temp Net Sim license 5653 192 168 6 168 Gathering NetSim license information Server license Roam Enable i gt Disable gt 6 Product netsim_std_1 J e for product netsim_std_2 7 e for product Product etsim_std_3 ers ion is e for product netsim_std_4 7 e for product etsim_std_5 is ers ion e for product etsim_std_6 o oO 2 n 7 e for product netsim_std_7 7 o license for product 1 gt Output of license files netsim gt std gt 7 gt gt r1m_hw_roam gt 6660000 gt Gathering NetSim license information Server 5653 192 168 6 16 Roam Enable i gt Disable gt 6 netsim_std_1i mignurnueganrie unrienieuieunn misunuus Product ers ion misnrisuus All licenses in use 22 Output of license files netsim gt std gt 7 gt gt r1lm_hw_roam gt 6660
227. mns and the remaining 2 bits 0 5 are used for identifying the S Box row 2 bits representing 4 rows The corresponding hexadecimal number is chosen from the 175 S box Since each Hexadecimal number represents 4 bits in binary form the total output is of 32 bits Input File Format Output File Format Cryptographic_Method Decryption Key_Text abcdef1234567890 No_of_Iterations 1 Data 616075733F724B40 The number of lines present depends on the number of iterations chosen The number of lines equals the number of iterations plus one The last line of inputs gives the data encrypted data if encryption has been chosen else the decrypted data if decryption has been chosen The previous lines give the DES Key generated for encryption or decryption 110101010111110010011010110000101110011000011001 tetcos Interface Source Code Interface Source code written in C is given using this the user can write only the DES Decryption inside the function fnDESDecryption using the variables already declared To view the interface source code go to NetSim Installation path src Programming DesDecrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Encrypt and decrypt the message with the using DES 176 How to Proceed
228. mples Special Addresses Programming Guidelines This section guides the user to link his her own code for Special Addresses to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and 224 The results of the program should be written into the output file Output txt File Format Input File Output File IP_Address 192 168 0 160 The Output File format Prefix_Value 5 Binary value of IP Address gt 32 gt Prefix value gt Suffix value gt Binary value of Prefix Part gt Binary value of Suffix Part gt Condition number in the table gt condition gt Type of address gt Sample Output text Format 11000000 10101000 00000000 10100000 gt 32 gt 5 gt 27 gt 11000 gt 000 10101000 00000000 10100000 gt It doesn t Satisfy the four conditions gt Not a special address gt Interface Source Code Interface source code written in C is given using this the user can write only the fnSpecialAddress function using the variables already declared To
229. n guides the user to link his her own code for Hamming Code Generator to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt The path of the input file and the output file can be viewed on clicking the Button Path in NetSim Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input file format Output file format Parity Odd Output txt file the first line is the count of check bits to be Data a introduced in the current hamming code application The next 8 lines is the check bit calculation process the first four lines are Pror Postgu for input data and the next four lines are for the error data Data_Bits_Original 01100001 1 and 2 are the check bits that vary in the Hamming String The Data_Bits_Error 00100001 last value is the actual position in the Hamming Code generated where the data bits has been changed 4 The number of check bits introduced 3 gt 5 gt 7 gt 9 gt 11 gt 13 gt 0 gt 0 gt the check
230. n the Configuration xml or in the dll Solution Check whether the desired scenario has been configured properly in the Configuration xml Enable the event trace in the Configuration xml so that the event details can be logged 78 Run NetSim via CLI again by specifying the event ID in order to debug the code as given below gt NetSimCore exe lt space gt apppath lt space gt lt app path gt lt space gt iopath lt space gt lt io path gt lt space gt license lt space gt 5053 lt Server IP Address gt lt space gt d Event id will be asked in the command prompt Enter the event id from where the code has to be analyzed as given below g iopath E X ay Q sxx amp B s Search Folders EJ E Folder sync S D iopath v Go e Configuration xml ConfigLog txt EventTrace csv ML Document Text Document a Microsoft Office Excel Comma 1KB 31 KB 1 459 KB 9 Make a new folder sai 8 nen this folder cx SDK Command Prompt NetSimCore exe apppath D Program Files NetSim Standard bin B x Wel Add File and Folder Tasks i ka Share this Folder D Program Files NetSim Standard bin gt NetSimCore exe apppath D Program Files N ietSim Standard bin iopath D iopath license 5653 192 168 0 16 d Breakpoint is set Enter the envent id where u want to break 761_ Other Places z Local Disk D My Documents Shared Docu
231. ncentrators and number of sites that can be assigned to a concentrator the order in which sites are to be assigned and the distance matrix given by the user The format of input txtis Number_of_Sites 2 Number_of_Concentrators 2 Sites_per_Concentrator 1 Selected_Priority 1 gt 0 gt Distance 1 gt 2 gt 3 gt 4 gt Note gt is the delimiter symbol which is used to separate each input In the output file i e Output txt each line should indicate one complete traverse For example for the above input the output file should be 2 gt 1 gt 1 gt 2 gt In each line the first character indicates the site and the rest indicates the concentrators The second character excluding the gt symbol is the first concentrator found with minimum distance cost The third character is a concentrator which has the minimum distance cost compared to the previous one and so on Note gt is the delimiter symbol which is used to separate each input Interface Source Code Interface Source code code written in C is given using this the user can write only the Assignments of Sites to Concentrators inside the function fnAssignmentsofSites using the variables already declared To view the interface source code go to 156 NetSim Installation path src Programming AssignSites c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 O
232. ndex of array that points to the first data that is being swapped or compared index 2 index 2 is the index of array that points to the second data that is being swapped or compared Sample Output Ascending 0 gt 0 gt 0 gt 1 gt 1 gt 0 gt 0 gt 1 gt 1 gt 1 gt 2 gt 1 gt 0 gt 2 gt 2 gt 2 gt 0 gt 2 gt 0 gt 1 gt 1 gt 1 gt 2 gt 1 gt Descending 0 gt 0 gt 0 gt 1 gt 1 gt 0 gt 1 gt 2 gt 0 gt 0 gt 1 gt 1 gt 1 gt 2 gt 1 gt 0 gt 2 gt 2 gt 2 gt 1 gt 2 gt Interface Source Code Interface source code written in C is given using this the user can write only the Sorting Algorithm inside the function select using the variables already declared To view the interface source code go to 308 NetSim Installation path src Programming SelectionSort c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the working of Sorting Techniques How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Sorting Techniques Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected Select the Selection Sort as Sorting Type e Select the Sorting Order as either Ascending or Descending e Select the total numbe
233. nditions The user program should read the input from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt File Format Input File Output File This gives us the contents of the Input Txt from which the user has to get the values for his program The Input File format IP Address gt Sample Input text Format Let us consider how a given input Data file and error index is stored in the text and read IP_Address 192 169 0 150 Prefix_Value 1 The Output File format Binary value of IP Address gt Prefix value gt Suffix value gt Binary value of Address mask gt Decimal value of Address mask gt Sample Output text Format 11000000 10101001 00000000 10010110 gt 1 gt 31 gt 10000000 00000000 00000000 0000000 gt 128 gt 0 gt 0 gt 0 gt 213 Interface Source Code Interface source code written in C is given using this the user can write only thefnAddressMAsk function using the variables already declared To view th
234. nel32 lib configuration specific a Click Project Menu in the workspace b Select properties in the pull down menu or press Alt F7 c Then click Linker d Select Input d Type ws2_32 lib file in the Additional Dependencies text box area e Click OK to confirm the changes in the workspace e If you have an eclipse complier the library linkage must be in the following way 268 type filter text Resource C C Build BerifeTeriables Discovery Options Environment OoPettain editor C C General Project References Run Debug Settings Task Repository Settings ey Configuration Release 7 Manage Config Tool Settings J Build Steps T Build Artifact Binary Parsers amp Error Parsers GCC Assembler F Libraries I General L GCC C Compiler amp Preprocessor S Enter Value pS Symbols Directories Optimization Debugging ws2_32 Warnings Miscellaneous MinGW C Linker General Miscellaneous Shared Library Settings Libraries I a Click Project Menu in the workspace b Select properties in the pull down menu c Then click C C Build d Select Setting e Select Libraries under MinGW C Linker f Press add button in the Libraries 1 window d Type ws2_32 file in the text box area e Click OK to confirm the changes in the workspace e If gcc comp
235. net address of the given host gt Subnet address gt Starting address gt Ending address gt Broadcast 227 address gt until number of subnet is reached Sample Output text Format 255 255 0 0 11111111 11111111 gt 00000000 00000000 gt 1 gt 255 255 128 0 gt 11111111 11111111 1 gt 0000000 00000000 gt 15 gt 32766 gt 128 0 0 89 gt 1 gt 128 0 0 0 gt 1 gt 128 0 0 0 gt 128 0 0 1 gt 128 0 127 254 gt 128 0 127 255 gt 2 gt 128 0 128 0 gt 128 0 128 1 gt 128 0 255 254 gt 128 0 255 255 gt Interface Source Code Interface source code written in C is given using this the user can write only the Leaky bucket algorithm inside the function fnSubnet using the variables already declared To view the interface source code go to NetSim Installation path src Programming Subnet c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 228 Sample Scenarios Objective To understand the concept of Subnetting through programming How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Subnetting Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Select the Class Name e Select the Network Address from the given list e Select the Num
236. ng Metrics and Frame Details button Frames Capture fA Frames Capture Duration Seconds Network Ethernet 802 3 Data Rate 100 Mbps PACKETS Total Packets 141768 Total Collisions o Total Errors o Packets Received Packets Dropped 39277 41003 Single Collision Multiple Collision Graph Type DURATION 0 Seconds Input 60 Seconds Remaining Packet s Re Y Axis X Axis Seconds Alignment Error Errors Received Errors Transmitted signal Strength 41950 43843 45479 46663 49053 50947 52926 53744 57961 Click Metrics to view the metrics screen Click Frame Details to view the frame details screen 137 Metrics Screen Frame Details Screen Frames Capture Details Frames Capture Metrics Collided Errored Captured PACKETS 0 87680 MAC Layers Throughput Mbps 2 431016 Normalized Throughput Mbps 2 376496 CAPTURED FRAME DETAILS Captured MicroSeconds 756714 Captured Length 1318 Destination MAC Source MAC Network Layer Source IP Address Address Protocol Address 00e04c1 100c8 0016178f7661 192 168 0 152 Destination IP Address 192 168 0 55 Transport Laye Protocol TCP 806068 158 00e04c1100c8 0016178F7661 192 168 0 152 192 168 0 55 TCP 806695 142 00e04c1100c8 0016176F7661 192 168 0 152 192 168 0 55 TCP
237. ng 192 168 0 86 with 32 bytes of data 192 168 6 86 bytes 32 192 168 08 86 bytes 32 192 168 6 86 bytes 32 192 168 8 86 bytes 32 192 168 09 86 bytes 32 192 168 0 86 bytes 32 192 168 8 86 bytes 32 192 168 0 86 bytes 32 192 168 8 86 bytes 32 192 168 6 86 bytes 32 192 168 0 86 bytes 32 192 168 0 86 bytes 32 192 168 80 86 bytes 32 192 168 0 86 bytes 192 168 0 86 bytes 32 192 168 80 86 bytes 32 192 168 0 86 bytes 32 192 168 0 86 bytes 32 192 168 0 86 bytes 32 192 168 0 86 bytes 32 192 168 8 86 bytes 32 Running Emulation in NetSim 1 Example Application ping I Create a basicnetwork Scenario in any stack based protocol Internetworks MANET BGP Cellular WSN Zigbee CR LTE in NetSim Screenshot of a sample scenario in Internetworks is shown below 334 H Click and drop the Application IH Right click Application gt select Properties IV Inthe Application Type select Emulation V Select Source and Destination ID according to the network scenario VI Change the Source and Destination IP address and click accept VII Before running simulation start pinging the Destination from Source using command ping lt Destination_IP gt t 335 VII During Simulation you will notice that the present time duration is higher than the earlier ping results This is because the network created in NetSim has link propagation delay of Sms
238. ng Basics Utilities Help Save Print Performance Metrics my ao Network Metrics j Application Metrics Link Metrics Queue Metrics Ee oe Simulation Time ms 30000 00 WLAN Metrics Wireless Node Metrics ARP Metrics ARP TABLE Metric Packets Transmitted 24031 Packets Errored 138 Packets Collided 9079 Bytes Transmitted Bytes 5537401 00 Payload Transmitted Bytes 2460672 00 Analytics Overhead Transmitted Bytes 3076729 00 Go to NetSim Analytics Resources Export to csv View Packet Animation Event Trace Path Click on each Metric to view its definition Click on Metrics Help to view the definition of each metric Note about metrics The metrics are calculated at each layer and might not be equivalent to the same metric calculated at a different layer For exactness and precision we recommend users also verify the results with the event trace amp packet trace generated by NetSim Note about packet transmission The Network Stack forms the core of NetSim s architecture The Stack consists of five IN and OUT events PHYSICAL_IN MAC_IN NETWORK_IN TRANSPORT_IN APPLICATION_IN and APPLICATION_OUT TRANSPORT_OUT NETWORK_OUT MAC_OUT PHYSICAL_OUT All the packets when transferred between devices go through the above events in order IN events occur when the packet is entering a device and all the OUT events occur when packet leaves a device The following table lists th
239. ng the types is explained in the algorithm Typel 318 Valuel CNT Value 2 output of the slidingcount function Value 3 FRAMES Value 4 TRANSMIT Type2 Valuel DT Value 2 Frame number Value 3 Frame s Source address Value 4 Frame s Destination address Type3 Value 1 EV Value 2 Output of the intro_error function Value 3 Frame Source address Value 4 Frame s Destination address Typed4 Value 1 ACK Value 2 POS Value 3 Acknowledgement frame s Source Address Value 4 Acknowledgement frame s Destination Address Types Value 1 DEL Value 2 count of frames being deleted Value 3 FRAME Value 4 DELETED Note The above convention to write into the Output Txt is mandatory Values in Quotes to be written into file Output Txt as it is including Case DT gt Frame No gt nodel gt node2 gt DT denotes 319 Data from node 1 to node 2 EV gt Error Flag gt nodel gt node2 gt EV denotes Error Value i e If the above frame has error then set the error flag as 1 else set the flag as 0 ACK gt POS gt node2 gt nodel1 gt Acknowledgement for that above frame received is sent to node 2 to node 1 Ex CNT gt 1 gt FRAMES gt TRANSMIT gt DT gt 1 gt nodel1 gt node2 gt EV gt 0 gt node1 gt node2 gt ACK gt POS gt node2 gt node1 gt DEL gt 1 gt FRAME gt DELETED gt Interface Source Code
240. ng_IP_Address 150 0 0 0 No_of_Networks 3 No_of_Hosts_in_Network_1 512 No_of_Hosts_in_Network_2 1024 No_of_Hosts_in_Network_3 2048 Host_IP_Address 150 0 1 2 The Output file contains the First address Last address Mask Value and Network Address of all the networks First Address The Starting Address of the Network Last Address The last address in the Network Mask The Mask address Mask should be 4 byte format Number of Node The number of nodes in the network Value The value will be either O or 1 O The next line has the network address to which the given host belongs 1 Means that the host does not belong to any network 219 Network Address If the Value is 1 then the network to which the host belongs is given Note Each data will have a separate line and each line will end with gt A Sample Output File Format 150 0 0 0 gt 150 0 1 255 gt 255 255 254 0 gt 512 gt 150 0 4 0 gt 150 0 7 255 gt 255 255 252 0 gt 1024 gt 150 0 8 0 gt 150 0 15 255 gt 255 255 248 0 gt 2048 gt 0 gt 150 0 0 0 gt For each network there will be first address last address mask and number of hosts Since the input is 3 networks there are 3 set of outputs The last two lines give the details about whether the host is present in any of the network Interface Source Code Interface source code written in C is given using this the user can write only the CIDR in
241. nsists of a bitmap compressed bitmap of 64bits or 8 bytes This bitmap can acknowledge upto 64 packets 1bit for each packet The value of a bitmap field is 1 if respective packet is received without error else it is 0 Only the error packets are resent until a retry limit is reached The number of packets in an A MPDU is restricted to 64 since the size of block ack bitmap is 64bits Octets 2 8 4 Frame an k cae BA a Sequence BitMap FCS Control ID Control Block Ack Control Packet 126 Details of 802 11 n implementation in NetSim e NetSim aggregates packets in terms of numbers and not size e A user can vary the number of packets to aggregate by changing the appropriate parameters in the GUI e NetSim ignores the padding bytes added to the MPDU since its effect is negligible e NetSim aggregates packets to the same receiver id and not to the destination ID Network Layer Access Buffer Packets arriving from the NETWORK Layer gets queued up in an access buffer from which they are sorted according to their priority in the respective QOS buffer according to the IEEE 802 1 le standard An event MAC_OUT with SubEvent CS Carrier Sense CSMA is added to check if the medium is free Event Mac_Out Sub Event CS Event Mac_Out Sub Event DIFS End Event Mac_Out Sub Event BackOff 127 In CS if the medium is free then the NAV is checked This is enabled if RTS CTS mechanism is enabled whic
242. nt App path and IO path can also be same i e Configuration xml can be placed inside the app path if the app path has write permission Otherwise users can create a folder for IO path and Configuration xml can be placed inside that folder Note Sample configuration xml files are available in the lt apppath gt Docs Sample_Configurations folder of the NetSim install directory Rename the sample file as Configuration xml before running NetSim through CLI Depending on your system setting the extension xml might be implicitly present and not visible In such cases do not add the extension as that will cause the file to be named as configuration xml Step 3 Running NetSim through command line for Simulation To run NetSim through command line copy the app path where NetSimCore exe is present and paste it in the command prompt gt cd lt app path gt For floating roaming licenses type the following in the command prompt gt NetSimCore exe lt space gt apppath lt space gt lt app path gt lt space gt iopath lt space gt lt io path gt lt space gt license lt space gt 5053 lt Server IP Address gt Where e lt app path gt contains all files of NetSim including NetSimCore exe e lt iopath gt contains Configuration xml and Configuration xsd 63 e 5053 is the port number through which the system communicates with the license server i e the system in which the dongle is running for floating license u
243. nted in different colors These colors indicate the order in which the transmission takes place The Transmission Sequence gt i 1 ia 2 EI 3 E 4 ie 5 z 6 4 7 Cl 8 Seconds 1 2 Nodel 0 100 Node2 0 100 Node3 100 0 Noded 0 100 Nodes 0 100 Node6 100 0 Node7 100 Node8 100 Scheduling Max Min Fair MMF Programming Guidelines This section guides the user to link his her own code for Scheduling MMF to NetSim Pre Conditions The program should read the data from Input txt file that is available in the application path The program should write the output data to Output txt file that is available in the application path Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt 279 General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and the results of the program should be written into the output file Output txt Note The naming of the input and the output file must be same as the text displayed in the Methodology screen File Format Input File Format Output File Format Output_Link_Capacity i00 Output txt file format is as follows Node s_Capacity 0 0 Ist second gt Output rate of node 1 gt Priority of Node 1 gt
244. o 100000 s 30 Experiment Information Users can save the scenario and results after simulation The experiment will be saved per the name given Experiment Name Experiment Comments Packet Animation Don t play record animation Simulation will run fast Record animation Simulation will slow down marginally Seed Values Used to generate random numbers in simulation Enter any value between 1 to 99999999 Seed 1 12345678 Seed 2 23456789 Lox Click here to record packet animation The packet animation would then be recorded and the user can view the animation from the metrics screen as shown below Analytics Go to NetSim Analytics Resources Export to csv Click here to view packet animation lew Networ Edit and Re run Metrics Help 53 When packet animation is enabled a screen with the following toolbar appears Simulation Programming Utilities Help gt Oo Simulation Time L 20821 60 Micro sec Animation Speed H 2 While viewing packet animation user can see the flow of packets as well as the type of packet Blue color packet denotes control packet green color is used for data packet and red color is error collided packet Example showing packet animation In first figure Custom data packet is flowing from Switch F to Node G green color and TCP_ACK is sent from Node G to Switch F in second figure blue color Wired Node A Wired Nede G Wir
245. o the output file Output txt Input File Output File The Input txt file contains Starting Delimiter Value Destination Address Value Source Address Value Data Value Checksum Value Ending Delimiter Value Example Starting Delimiter a Destination Address eraerwbr The Output txt file contains Stuffing gt Destination Address Value gt Source Address Value gt Data Value gt Checksum Value gt DeStuffing gt Destination Address Value gt Source Address Value gt Data Value gt Checksum Value gt 208 Source Address asdasdas Example Data sdfgf Stuffing gt Checksum shfsdfsd Destination Address eraaerwbr gt Ending Delimiter h Source Address aasdaasdaas gt Data sdfgf gt Checksum shhfsdfsd gt DeStuffing gt Destination Address eraerwbr gt Source Address asdasdas gt Data sdfgf gt Checksum shfsdfsd gt Interface Source Code Interface source code written in C is given Using this the user can write only the functions fnCharacterStuffing and fnDeStuffing using the variables already declared To view the interface source code go to NetSim Installation path src Programming CharacterStuffing c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To study the workin
246. ode should be selected e Select the IP Address e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are done internally e Each bit is obtained one by one e Binary value of IP Address is obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples Classless InterDomain Routing Programming Guidelines This section guides the user to link his her own code for Classless Inter Domain Routing to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt The path of the input file and the output file can be viewed on clicking the Button Path in NetSim 218 Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt File Format Input File Format Output File Format This gives the contents of the Input Txt from which the user has to get the values The Input File contains Starti
247. ode2 gt EV gt 0 gt node1 gt node2 gt ACK gt POS gt node2 gt node1 gt DEL gt 1 gt FRAME gt DELETED gt Interface Source Code Interface source code written in C is given using this the user can write only the Transmission Flow Control Selective Repeat inside the function SelectiveRepeat using the variables already declared To view the interface source code go to NetSim Installation path src Programming SelectiveRepeat_TFC c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Send and receive the data using Transmission Flow Control Selective Repeat How to Proceed The objective can be executed in NetSim using the programming exercise available Under Programming Menu select Transmission Flow Control Selective Repeat Sample Input By using the Input Panel that is available on the left hand side a Sample Scenario is created The Steps involved in creating are as follows e Sample Mode should be selected e Select Selective Repeat as Algorithm e Create a Data file txt and save it on the disk 324 e Select the path of the above created Data file txt which could be Maximum of 100000 bytes e Select Bit Error Rate BER as 10 5 from the drop down menu 1 Then Run button need to be clicked Output Output fo
248. ol source code and packet tracing facility in the standard version Component No Networks Protocols International Standards Internetworks Ethernet Fast amp Gigabit Address Resolution Protocol IEEE 802 3 WLAN 802 11 a b g n ac and e RFC 826 Propagation Free space Log normal 802 11 a b g n ac e Shadowing Rayleigh Fading IP v4 with VPN Firewalls Routing RIP OSPF Queuing Round Robin FIFO Priority RFC 2453 2328 TCP UDP Component 1 RFC s 793 2001 and 768 Common Modules Applications Traffic Generator Voice Video FTP Database HTTP Email Peer to peer and Custom Virtual Network Stack Simulation Kernel Command Line Interface Metrics Engine with packet and event trace Packet Animator Component 2 Legacy Networks Aloha Pure amp Slotted CSMA CD Token ring Token bus ATM X 25 Frame Relay Real Time Frame Capture IEEE 802 3 IEEE 802 4 IEEE 802 5 ATM Forum ITU Forum Component 3 BGP Networks amp MPLS Networks Border Gateway Protocol BGP Multi Protocol Label Switching MPLS IETF RFC 1771 IETF RFC s 3031 and 3121 Component 4 Advanced Wireless Networks MANET DSR AODV OLSR ZRP Wi Max IETF RFC 4728 3561 3626 IEEE 802 16d Component 5 Cellular Networks GSM CDMA 3GPP ETSI IMT MC IS 95 A B IxRTT 1x EV Do 3xRTT Component 6 Wireless Sensor Networks amp Personal Area Networks WSN with agent model am
249. onfig file contains all required information to run the simulation including the network topology devices links traffic statistics traces etc To run Simulation in NetSim through command line interface CLI the following steps have to be followed Step 1 Note the App Path App path is the file location in the system in which NetSim has been installed The app path can be found out by right clicking the NetSim Shortcut in the desktop and selecting Open file location In Vista and Windows 7 or Find Target In Windows XP The app path will be something like C Program Files NetSim Standard bin depending on where NetSim is installed Note The path to the bin folder of the app path must be mentioned Step 2 Note the IO Path IO path Input output Path is the path where the input and output files of an application is written This is similar to the temp path of windows OS For NetSim the IO path can be got by Start gt Run gt temp NetSim Once you reach this folder the user can notice that the path would be something like C Users Ram AppData Local Temp NetSim 62 Note The IO path must have write permission For example Windows 7 does not provide write permission for the app path explicitly NetSim may exhibit unpredictable behavior if this path does not have write permission The IO path is the path where the Configuration xml NetSim Config file of the scenario that will be simulated should be prese
250. ons the library file linkage must be made in the following way LANDII Property Pages m othe a Configuration Active Debug Platform Active Win32 Configuration Manager Common Properties G References Ignore All Default Libraries t Configuration Properties Ignore Specific Library General Module Definition File Debugging Add Module to Assembly E G C Embed Managed Resource File ues Force Symbol References General Delay Loaded DLLs g Assembly Link Resource Manifest File Debugging System Optimization Embedded IDL Advanced Command Line Manifest Tool XML Document Genera Browse Information Build Events Additional Dependencies Custom Build Step Specifies additional items to add to the link line ex kernel32 lib configuration specific win oe m a Click Project Menu in the workspace b Select properties in the pull down menu or press Alt F7 c Then click Linker d Select Input d Type ws2_32 lib file in the Additional Dependencies text box area e Click OK to confirm the changes in the workspace e If you have an eclipse complier the library linkage must be in the following way 258 type filter text Resource C C Build BerifeTeriables Discovery Options Environment OoPettain editor C C General Project References Run Debug Settings Task Repository Settings ey Configuration Release 7
251. or distribution are e Constant e Exponential Email_Size It represents the size of the email that is received Email_Send This represents the rate at which emails are sent Duration_Distribution The options available for distribution are e Constant e Exponential Duration Time gap between two successive sending emails in seconds Email_Size_Distribution The options available for distribution are e Constant e Exponential Email_Size It represents the size of the email that is sent 38 Priority and QoS of Applications The various traffics generated in NetSim have the following priority and QoS values Application Type Priority Value Priority QoS Class Voice One way 8 High RTPS Voice Two way 8 High UGS Video 6 Medium nRTPS FTP 2 Low BE Database 2 Low BE Custom 2 Low BE Note Priority of Normal has a Priority Value of 4 and nRTPS QoS Class Ex Video over TCP 39 Performance Metrics NetSim provides distinct quantitative metrics at various abstraction levels such as Network Metrics Link Metrics TCP Metrics Application Metrics etc at the end of simulation With the help of metrics users can analyze the behavior of the modeled network and can compare the impact of different algorithms on end to end behavior After simulation of a scenario is performed the NetSim Performance Metrics are shown on the screen as shown below Simulation Project Work Programmi
252. ormation Symbol Settings Show Module Names st forward Show Parameter Types Show Parameter Names Show Parameter Values I Name Show Line Numbers gt libDsR dll fn_NetSim Show Byte Offsets Nei Si to In the watch window the variable which the user has to watch should be edited by double clicking on it and prefixing NetworkStack dll to the variable name and pressing enter The name of the respective file in which the variable is defined should be mentioned in this case NetworkStack dll 98 Community Help gt QP aot BI E 77X nd Value Type a packe 0x00622918 nP stru_Nett cle sNetworkStack di pstrul 4x00 d 7 unsigned serebventberetts TORERE dEventTime 25418 0000000000C double 9 nEventType NETWORK_OUT_EVE enum_Ev 9 nProtocolld 301 unsigned nDeviceType NODE enum_De 9 nDeviceld 2 unsigned Q ninterfaceld 1 unsigned nApplicationiId 0 unsigned dPacketSize 12 0000000000000C double 9 pPacket 0x00622918 nPack stru_Net nPacketId o int nSegmentid is int nSubEventType 0 unsigned szOtherDetails 0x00000000 void 9 nPrevEventid 26 unsigned line it int Q file 0x00000000 lt Q char Prefixing to the variable name void var Accessing External Variables In NetSim while a scenario is simulated it is possible to access variables which are defined in one dll file f
253. ous devices like Switch Router Wired Node Wireless Node AP etc Select the desired devices application icon in the toolbar and click and drop on the environment To remove devices or application right click on the particular icon and then click Remove Connect the devices Select the appropriate link in the toolbar and connect the devices by clicking on the device 1 and device 2 Set the Properties for the devices links and applications e Right click over the devices and then select Properties to set the properties of the links and the devices e Click and drop Application s to generate traffic e Right click over Application and set properties Multiple applications can be generated by using add button in Application properties 14 Enable Packet Trace or and Event Trace Optional Click Packet Trace icon Event Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace and Event trace Enable Dynamic Metrics Optional Click on dynamic metrics to monitor the value of a parameter during simulation time To get detailed help please refer Dynamic Metrics Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation Legacy Networks New Experiments In the Simulation menu select gt New gt Legacy Networks For example to arrive Pure Aloha In the Simulation menu select gt New gt Legacy N
254. p battery models IEEE 802 15 4 MAC ZigBee MANET in L3 Cognitive Radio Networks Component 7 WRAN IEEE 802 22 Long Term Evolution Component 8 LTE 3GPP Note NetSim v7 had 7 components and component 8 LTE was added in NetSim v8 NetSim v6 had 16 components and the 16 component table of v6 is given below Component No Component 1 Protocols Aloha Slotted Aloha Token Ring Token Bus CSMA CD Standards TEEE 802 3 802 4 802 5 Component 2 Net Patrol LAN Speedometer N A Component 3 Wireless LAN IEEE 802 11 a b g Component 4 Ethernet Switching Gigabit Ethernet IEEE 802 1 d Component 5 X 25 ITU Forum Component 6 Frame Relay ITU Forum Component 7 ATM ATM Forum Component 8 TCP UDP RFC s 793 2001 and 768 Component 9 IP Routing RIP OSPF BGP RFC 1058 2328 1771 Component 10 MANET DSR IETF RFC 4278 Component 11 Wi Max IEEE 802 16 D Component 12 Multi Protocol Label Switching MPLS IETF RFCs 3031 and 3121 Component 13 GSM 3GPP ETSI Component 14 CDMA N a Component 15 WSN E eich 15 4 MAC IETF Component 16 ZigBee IEEE 802 15 4 MAC IETF RFC 4278 What s new with NetSim v8 e Modeling and simulation of LTE networks as per 3GPP Standard e Dynamic Metrics enables users to plot the value of a parameter over simulation time e GSM and CDMA have been integrated with NetSim s
255. parated into two parts prefix and suffix e Number of subnet mask id is calculated e Then Subnet Id portion is derived from suffix part e Using the subnet id portion subnets are calculated e Like that subnets in the all levels are calculates by using the above steps e Once the sample experiment is done then Refresh button can be clicked to create New Samples Leaky Bucket Algorithm Programming Guidelines This section guides the user to link his her own code for Leaky Bucket Algorithm to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt The path of the input file and the output file can be viewed on clicking the Button Path in NetSim Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and 238 The results of the program should be written into the output file Output txt File Format Input File Output File Output_Capacity 100 Output txt file contains three lines of data The Buffer_Size 100 data format in the output file should be as follows Input_Capacity 100 100 500 1 Ou
256. ped in This Data is later sent to the ReceiverSystem Here Type Hello On the Right hand side panel there is Receive Data where data is received from user Ex Hello Under Input there are two things o Number of users must be select between one to ten o Enter the IP address of the data where needs to be in all the column in the input pane Sample Output TCP UDP On the Right hand side panel there is an InputField ReceivedData where Data would get displayed Hello is the Data that is received from the users Click Run button to create the socket and start Receive Data from the users Click Send button to transmit the data to the users Click Refresh button to terminate the connection Click Run button to create the socket and start Receive Data from the users Click Send button to transmit the data to the users Scheduling First In First Out FIFO Programming Guidelines This section guides the user to link his her own code for Scheduling FIFO to NetSim Pre Conditions The program should read the data from Input txt file that is available in the temporary directory The program should write the output data to Output txt file that is available in the temporary directory 276 Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Rea
257. pen file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To allocate the resource which is concentrator to the require system which is sites based on the distance for each sites to concentrator How to proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Assignment of Sites to Concentrator Sample Input By using the Input Panel that is available on the left hand side a Sample Scenario is created The Steps involved in creating are as follows e Sample Mode should be selected e Number of Sites need to be selected The value that has selected ranges from 1 to 7 e Number of Concentrators need to be selected The values available for selection are 2 3 and 4 e Number of Sites Concentrators need to be selected The value that has selected ranges from 1 to 7 e Click on the image to select Priority Click on Change Priority to reset the Priority of the Sites e Enter the Distance in the given table Distance should be in the range 1 to 99 km e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given e Click on Concept Algorithm Pseudo Code amp Flow Chart to get help on it Output The following steps are under gone internally e The site which has the highest priority searches for a concentrator which is the nearest 157 e A red line appears between the site
258. perties gt lt PROTOCOL NAME CDMA SETPROPERTY true gt lt Set Protocol properties gt lss Unit TRANSMITTED POWER W Solution The bug can be fixed by placing the Configuration file and schema in the same folder Problem 7 Simulation does not commence and the error is displayed at the command prompt Example 77 C Windows system32 cmd exe NetSimCore exe apppath E NetSim7 DII iopath E NetSim7 l ole Xil Nersion 7 A Output of license files netsim gt std gt 7 gt gt r1lm_hw gt 1111111 gt NetSim license validated tataxel NetSim start E Network Stack loaded Initializing simulation 1 0 warning failed to load external entity file E NetSim Conf iguration x ml This problem arises when the Configuration xml file name and extension should be correct is not available in the specified io path Solution The bug can be fixed by ensuring whether file name and extension of Configuration xml are correct Problem 8 Simulation terminates and exhibits unpredictable behavior An error message stating An exe to run NetSim backend has stopped working is thrown Example a E Microsoft Windows g A exe to run NetSim Backend has stopped working Windows can check online for a solution to the problem gt Check online for a solution and close the program gt Close the program v View problem details This problem arises if there is any flaw i
259. pt cancel the changes e Delete User This button is used for deleting the existing users e Change Mode This button is used for changing the mode There are two modes present in the software o Practice Mode Students will be able to get all the help that is associated with the software Saved experiments can be reused If this mode is selected then the user would have access to 1 Under Simulation all the saved experiments in Simulation when the user is in Practice mode can be opened and reused deleted if they are not required and Saved experiment can be used in the Analytics interface 329 3 4 Under Programming Sample all help documents such Concepts Algorithm Pseudo Code and Flowchart can be viewed Basics Menu NetSim Help o Exam Mode Students will not be able to use the help associated with the software Also saved experiments in the Practice mode cannot be reused in the Exam mode If this mode is selected then the user would have access to 1 3 4 Under Simulation all the saved experiments in Simulation when the user is in Exam mode can be opened and reused delete if they are not required and Saved experiment can be used in the Analytics interface Under Programming users cannotview Concepts Algorithm Pseudo Code and Flowchart Basics Menu cannot be accessed NetSim Help can be used Change Password This button is used to
260. q gt s gt t gt u gt Interface Source Code Interface Source code written in C is given using this the user can write only the Substitution Encryption inside the function fnSubstutionEncryption using the variables already declared To view the interface source code go to NetSim Installation path src Programming SubstEncrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Cryptography Substitution Decryption Programming Guidelines This section guides the user to link his her own code for Substitution to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt 159 The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format There are six lines in Input txt file Cipher letter gt decrypted letter for the Cryptographic_Technique S
261. r that has to be sorted The values available are from 3 to 25 e Enter the Number Value in the field provided The value entered should be within the range of 1 to 9999 e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e According to the Sorting Type selected the Output would vary e Number of Comparison would be obtained e Number of Swapping would be obtained e A table with the values tabulated would be obtained 309 e Once the sample experiment is done then Refresh button can be clicked to create New Samples Spanning Tree Borovska Programming Guidelines This section guides the user to link his her own code for Spanning Tree using Borovska algorithm to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format
262. r the above Sample is as follows 2 An Output Table is obtained when Run button is clicked In the Output Table Transmitted frame Data and Acknowledgement and their corresponding Counts is obtained The Total Count is also obtained The table is given below Output Total data frames to be transmitted Data Acknowledgement Total Note The Total data frames to be transmitted and Total count in the Output table depends on size of the txt file e Once the sample experiment is done then Refresh button can be clicked to create new samples Transmission Flow Control Stop and Wait Programming Guidelines This section guides the user to link his her own code for Stop and Wait to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt 325 The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Algorithm Stop_and_Wait Data_F
263. ramming exercise available under programming user has to select Sorting Techniques Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Select the Bubble Sort as Sorting Type e Select the Sorting Order as either Ascending or Descending e Select the total number that has to be sorted The values available are from 3 to 25 e Enter the Number Value in the field provided The value entered should be within the range of 1 to 9999 e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e According to the Sorting Type selected the Output would vary 300 e Number of Comparison would be obtained e Number of Swapping would be obtained e A table with the values tabulated would be obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples Sorting Technique Insertion Sort Programming Guidelines This section guides the user to link his her own code for Sorting Algorithm to NetSim Pre Condition User written program should read the value from the Input txt in the temporary directory which is having input from the GUI at runtime The output should be stored in Output txt in the temporary directory for display User written program should return an integer value Note The temporary directory is navigated through the
264. raphy o Substitution o Transposition o XOR o Advanced Data Encryption Standard RSA Wired Equivalent Privacy e Distance Vector Routing e Dynamic Host Configuration Protocol e Error Correcting Code o Hamming Code e Error Detecting Codes o Cyclic Redundancy Check o Longitudinal Redundancy Check e Framing Sequence o Bit Stuffing o Character Stuffing e Generic Cell Rate Algorithm o Virtual Scheduling Algorithm e IPV4 Addressing o Address Mask o Binary Conversion o Classless InterDomain Routing o Network Address 139 o Special Addresses o Subnetting e IPV6 Addressing o EUI 64 Interface Identifier o Host Addresses o Subnetting e Leaky Bucket Algorithm e Multi Level Multi Access e Multiple Access Technology o CDMA o TDMA o OFDMA e PC to PC Communication o Socket Programming o Chat Application e Scheduling e Shortest Path e Sliding Window Protocol e Sorting Techniques e Spanning Tree e Transmission Flow Control NetSim s Programming Lab has been designed to provide hands on network programming skills to students The labs come with a GUI where students can first run the experiment in Sample mode and subsequently link their own code and visualize it s working Programs can be written in C and the executable can be linked to NetSim Architecture The following Architecture is applicable for all the exercises under the Programming menu Each exercise has two modules 140 Input Process Output
265. rmats of writing in the BER 0 output file Each format is written in specific condition the types are explained below The condition of writing the types is explained in the algorithm Typel Valuel CNT Value 2 output of the slidingcount function Value 3 FRAMES Value 4 TRANSMIT 322 Type2 Valuel DT Value 2 Frame number Value 3 Frame s Source address Value 4 Frame s Destination address Type3 Value 1 EV Value 2 Output of the intro_error function Value 3 Frame Source address Value 4 Frame s Destination address Typed Value 1 ACK Value 2 POS Value 3 Acknowledgement frame s Source Address Value 4 Acknowledgement frame s Destination Address Types Value 1 DEL Value 2 count of frames being deleted Value 3 FRAME Value 4 DELETED Note The above convention to write into the Output Txt is mandatory Values in Quotes to be written into file Output Txt as it is including Case DT gt Frame No gt nodel gt node2 gt DT denotes Data from node 1 to node 2 EV gt Error Flag gt nodel gt node2 gt EV denotes Error Value i e If the above frame has error then set the error flag as 1 else set the flag as 0 323 ACK gt POS gt node2 gt node1 gt Acknowledgement for that above frame received is sent to node 2 to node 1 Ex CNT gt 1 gt FRAMES gt TRANSMIT gt DT gt 1 gt node1 gt n
266. rom another dll file An example is given below showing how a WLAN file variable dTotalReceivedPower can be accessed in the DSR file The user must create a WLAN solution in visual studio as mentioned above in how to write custom codes In the example below the libWLAN folder path is D ibWLAN The variable dTotalReceivedPower is defined in a structure PHY_VAR So the user will have to access a pointer of type PHY_VAR In the header file where the structure definition is given the following line of code must be written _declspec dllexport PHY_VAR var1 In the example the code line must be written in WLAN h file 99 0 libWLAN Microsoft Visual Studio File Edit View Project Build Debug Team Data Tools Test Window Help E a Gadal EY h Debug winae Hmi 2 a e etE S SID HPGegaaQ Stack h a main n h 4 Stack t ho 7 Function to iis tasks when PHYSICAL OUT event is triggered int fn_NetSim_WLAN Physicalout Function to do tasks when PHYSICAL_IN event is triggered int fn_NetSim WLAN PhysicalIn Function to do tasks when MAC_IN event is triggered int fn_NetSim_WLAN MacIn Function to update the device state PHY OUT int fn_NetSim_WLAN_Transmitter_UpdateMedium_UpdateDeviceStatus NETSIM_ID nDeviceId NETSIM_ID nInter Function to update the device state UPDATE DEVICE STATE TIMER event at PHY IN EventTime int fn_NetSim_WLAN_Receiver_UpdateMedium_UpdateDeviceStatus _declspec dlle
267. roperties gt lt PROTOCOL NAME ETHERNET SETPROPERTY true MAC ADDRESS AAAAAAAAAAAA gt lt Set Protocol properties gt lt PROTOCOL PROPERTY gt lt PROTOCOL gt lt Configure each layer gt lt Set Network Layer properties gt lt LAYER TYPE NETWORK LAYER gt lt Set Network Protocol properties gt lt NETWORK PROTOCOL IP_ADDRESS 192 168 0 5 NAME IPV4 SUBNET MASK 255 255 255 lt PROTOCOL NAME ARP SETPROPERTY true gt lt PROTOCOL PROPERTY ARP RETRY INTERVAL 10 ARP RETRY LIMIT 3 gt lt PROTOCOL gt lt LAYER gt lt INTERFACE gt When NetSim is made to run through CLI then the following error gets displayed in the command prompt 76 C Windows system32 cmd exe NetSimCore exe apppath E NetSim DIl iopath E NetSim7 co amp Z 7 netsim_std_4 7 Version Product Version Product Vers ion Product Vers ion netsim_std_5 7 netsim_std_6 7 nN netsim_std_ license files netsim gt std gt gt gt r1lm_hw gt 1111111 gt INetSim license validated NetSim start Network Stack loaded Initializing simulation file E NetSim Conf iguration xml1 48 parser error ismatch LAYER line 32 and INTERFACE lt INTERFAGE gt file E NetSim Conf iguration xml 173 parser error mismatch INTERFACE line 2 and DEVICE lt DEVIGCE gt file E NetS im Conf iguration xml1 365 parser error Opening and ending tag m Opening
268. s Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Enter the Value of the Bandwidth e Enter the Value of the No of Time Slots e Enter the Value of the TimeSlotLength e Enter the Value of the GuardInterval Note The Values entered should be within the range Bandwidth kHz 200 No of TimeSlots 3 TimeSlotLength us 100 GuardInterval us 10 e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given 250 Output The Output for the above sample is as follows e Bandwidth is divided into Time slots called channel e The first channel is allocated to first mobile station second channel is allocated to second mobile station and so on e The first Mobile Station will access the medium in first channel time slot e The Second Mobile Station will access the medium in second channel time slot and so on e During the guard interval No mobile station will access the medium This is used to avoid the collision or interference Finally the table will be showed e Channel no is obtained e Bandwidth value is obtained e Start Time and End Time of the Guard Interval is obtained e Start Time and End Time of the channel is obtained e Which Mobile Station is accessing the allocated time slot is obtained Channel number Bandwidth kHz Time us Mobile Station 0 200 0 0 5 0 0 1
269. s Run down the menu and select the desired programming exercise Upon selection a screen similar to the one shown below will open up Note This menu is available only in Academic and Standard Version FA NetSim Simulation Realtime Basics Utilities Help Address Resolution Protocol Assignments of Sites to Concentrator Cryptography Distance Vector Routing Dynamic Host Configuration Error Correcting Code Error Detecting Codes Cyclic Redundancy Check Framing Sequence Longitudinal Redundancy Check Generic Cell Rate Algorithm IPV4 Addressing IPV6 Addressing Leaky Bucket Algorithm Multi Level Multi Access Multiple Access Technology PC to PC Communication Scheduling Shortest Path Sliding Window Protocol Sorting Techniques Spanning Tree Transmission Flow Control FZ NetSim Programming Assignments of Sites to Concentrator Mode o Sample Using the User mode users can link and run their Input own source code Number of Sites Number of Concentrators Number of Sites Concentrator Click image to select priority 28282 82 8 82 a Selected Priority Distance Enter integer 1 to 99 KM Concentrators Clicking on the Concept Algorithm Pseudo Code and Flowchart would open up for that program Clicking on Interface Source Code 2 Concept Algorithm Pseudo Code amp Flow Chart will open the c source files Real time This section consists of Frame Capture Frame Capture is
270. s GARBAG lt LAYER gt Change to lt LAYERTYPE APPLICATION LAYER gt lt ROUTING PROTOCOLNAME RIP SETPROP lt PROTOCOL PROPERTYFILE NAME S Files NetSim standard Docs Sample Configura O STATIC ROUTING STATUS ENABLE TIM ROUT TIMER 180 2 gt lt ROUTING PROTOCOL gt ERTY true gt lt LAYER gt OSPF By default lt LAYERTYPE APPLICATION LAYER gt lt ROUTING PROTOCOLNAME 0SPF SETPROP lt PROTOCOL PROPERTYFILE NAME Static Files NetSim s tandard Docs Sample Config 1800 MAX AGE 3600 ROUT LS_REFRESH_ TIME DISABLE VERSION 2 gt lt ROUTING PROTOCOL gt lt LAYER gt Change to lt LAYERTYPE APPLICATION LAYER gt lt ROUTING PROTOCOLNAME OSPF S E7 lt PROTOCOL PROPERTYFILE NAM Files NetSim s LS REFRESH TIME ENABLE VERSION 2 gt lt ROUTING PROTOCOL gt lt LAYI lea R gt EOUT TIMER 180 UPDAT ER 12 F _ COLLECTION TIM TIM ER 30 VERSION E PATH C Program E COLLECTION TIMER 12 UPDAT E TIMBR 30 VERSION Routing tXt FIN urationyin ETPROFRP ERTY true gt E Static Routing txt FILI tandard Docs Sample Configuration In E PATH Cr Program ternetworks ER PRIORITY
271. s see under the hood to know how NetSim is working Using UI Using CLI Configuration xml Protocol Engine Stack Kernel Fig 1 NetSim Architectural Overview To model a scenario in order to generate metrics in NetSim GUI will write all the details about the devices used in the scenario and its properties the links used and their properties the properties of the environment being used etc in Configuration xml 67 The back end engine that contains dlls and NetSimCore exe will read this Configuration xml execute the simulation and write output metrics files in txt format to the IO path Then the GUI will display the metrics based on the text files written by the backend In order to run NetSim through command line CLI the user has to create the Configuration xml furnishing all the details about the devices links and the environment of the desired scenario How to use Visual Studio to edit the Configuration file To edit the Configuration xml xml editor is required There are various xml editors available in the market Visual Studio 2010 is one of the xml editors that can be used to edit the Configuration xml with efficacy This section shows limelight on how to use Visual Studio to edit the Configuration xml XML View XML view provides an editor for editing raw XML and provides IntelliSense and color coding After you type the element name and press the CTRL SPACE you will be presented with a
272. s tabs available like Internetworks Legacy Networks BGP Networks MPLS Networks Advanced Wireless Networks MANET Advanced Wireless Networks WiMAX Cellular Networks Wireless Sensor Networks Personal Area Networks Cognitive Radio Networks and LTE networks Click on the particular Network tab for comparing the performance of protocols under that Network For Internetworks Advanced Wireless Networks MANET BGP Networks Wireless Sensor Networks Personal Area Networks LTE networks and Cognitive Radio Networks select the Metrics File Select the Metrics Fileto add it onto the Metrics Table by using Browse button For Other Networks select the Experiment based on the tab selected When one of the tabs is selected all the experiments saved under the particular Network will be listed Click on the Experiment Name to add it onto the Metrics Table Export to csv Click on Export to csv to export the Metrics Table to a csv 6 format This action button will export the contents to a csv format that is available 60 gt Print Click on the Print option to print the Metrics Table This action button will fetch the Print dialogue box e The Graph Field gt Select the Metrics Select the coordinates for Y axis by clicking on the dropdown menu gt Graph Based on the X axis i e Metrics File Experiment selected and Y axis i e Metrics selected by using the dropdown menu above the graph a Bar
273. s to monitor the value of a parameter during simulation time To get detailed help please refer Dynamic Metrics Run Simulation Select the Simulation Time and then Click on OK button to start the Simulation 25 Cognitive Radio Networks Cognitive Radio Network simulation is available from v7 of NetSim Cognitive Radio Networks allows you to connect if required with Ethernet Wireless LAN IP Routing TCP UDP and allows users to log packet and event in NetSim standard version only traces New Experiments In the Simulation menu select gt New gt Cognitive Radio Networks Then Select either Map View or Grid view and to perform experiments in Cognitive Radio Networks the following steps should be followed e Create Scenario e Connect the devices e Set Properties for the devices and the links e Click and drop applications and configure e Enable Packet Trace or and Event Trace Optional e Enable Dynamic Metrics Optional e Run Simulation Create Scenario Adding Devices e Cognitive Radio Networks comes with the palette of various devices like Cognitive Radio CPE Cognitive Radio Base Station Switch Router Wired Node Wireless Node Access point etc e Select the desired devices in the toolbar and click and drop on the environment e To remove devices right click on the particular device and then click Remove Connect the devices Select the appropriate link in the toolbar and connect the devices by c
274. seconds Source Count This property represents number of sources for the application Voice Video FTP Database and Custom applications have only one source Source ID This property represents the unique identification number of the source Destination Count This property represents number of destinations for the application Voice Video FTP Database and Custom applications have only one destination Destination ID This property represents the unique identification numbers of the destination Custom Packet Size Distribution The options available for distribution are e Constant e Exponential Packet Size Bytes Sets the size of the packets being generated by the chosen distribution By default 1460 bytes is entered 31 Inter Arrival Time This indicates the time gap between packets Distribution The options available for distribution are e Constant e Exponential Inter Arrival Time Enter the average inter arrival time between packets A lower inter arrival time would lead to a higher generation rate and the vice versa By default 20000 Micro Sec is entered Voice Codec Codec is the component of any voice system that translates between analog speech and the bits used to transmit them Every codec transmits a burst of data in a packet that can be reconstructed into voice Five different standards of voice codec s are given which can be selected depending on the variations required Service Type e
275. sers e lt Server IP Address gt is the ip address of the system where NetSim license server dongle is running Please contact your network administrator lab in charge to know the IP address of the PC where the NetSim license server is running The following screenshot is the example of running NetSim through CLI where the ip address of the NetSim license server is 192 168 0 2 E Administrator Command Prompt O x C ProgramFiles Net im tandard bin gt NetSimCore exe apppath C ProgramFiles Net i mStandard bin iopath C Users ADMINI 1 AppData Local Temp NetSim license 50530 192 168 8 2_ For node locked licenses type the following in the command prompt gt NetSimCore exe lt space gt apppath lt space gt lt app path gt lt space gt iopath lt space gt lt io path gt lt space gt Where e lt app path gt contains all files of NetSim including NetSimCore exe e lt iopath gt contains Configuration xml and Configuration xsd The following screenshot is the example of running NetSim through CLI for the node locked license e n R W C Windows system32 cmd exe E amp Simulation will be completed successfully and the text files that are requested by the end user in Configuration xml will be written in the iopath 64 Simulation in progress 166 x is completed Simulation Time 16006 6066 ms Event Id 2965 Total time taken Cwall clock gt 422 ms Total events processed 2905 Aver
276. side the function fnCIDR using the variables already declared To view the interface source code go to NetSim Installation path src Programming CIDR c 220 To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To Implement Classless InterDomain Routing CIDR How to Proceed The objective can be executed in NetSim using the programming exercise available under programming user has to select Classless InterDomain Routing Sample Input By using the Input Panel that is available on the left hand side a Sample Scenario is created The Steps involved in creating are as follows e SampleMode should be selected e Select the Starting IP Address from the given range e Select the No of Networks from the given range Maximum of 6 networks can be selected e Select the No of Hosts from the given range e Click on Add button to add the No ofHosts onto the Hosts Field The use of Add button depends on the No of Networks selected If a new No of Hosts has to be added then remove button can be used e Select the Host IP Address e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e Based on the Starting IP Address a table is obtained e There are 4
277. sing this the user can write only the WEP Encryption inside the function fnWEPEncrypt using the variables already declared To view the interface source code go to NetSim Installation path src Programming WEPEncrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 181 Cryptography Wired Equivalent Privacy WEP Decryption Programming Guidelines This section guides the user to link his her own code for WEP Decryption to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Cryptographic_Method Decryption Plain text Initialization_Vector 8A699C Ex Key 0123456789 Data 364130B9CA018D5B760383CD85528751 TETCOS 182 Interface Source Code Interface Source cod
278. sion txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt File Format Input File Format Output File Format IPV6_Address 1111 2222 3 The Output File format 333 4444 AAAA BBBB CC CC DDDD Binary value of IPV6 Address gt Prefix_Length 12 Prefix part of IPV6 Address gt Suffix part of IPV6 Address gt Number_of Subnets 2 Number of subnets gt number of subnet msk bit gt Number_of Level 2 Prefix part of IPV6 Address gt Subnet Id part of IPV6 Subnets_ in Levell 2 address gt Suffix part of IPV6 Address gt Subnets_ in Level2 4 Prefix part of IPV6 Address gt Subnet Id part of IPV6 address gt Suffix part of IPV6 Address gt Prefix part of Level 1 s first subnet Address gt Subnet Id part of Level 1 s first subnet Address gt Suffix part of Level 1 s first subnet Address gt Hexa decimal value of Level 1 s first 235 subnet address gt prefix length of Level 1 s first subnet gt until number of subnet reached in the first level First level s subnet number gt Prefi
279. sive Markov processA n can be generated by the recursive relation A n aA n 1 bw n o Constant B First order autoregressive Markov process A n can be generated by the recursive relation A n a A n 1 bw n o Eta The steady state average E A and discreet auto covariance C n are given byE A b 1 a n C n b2 1 a2 an where y is the Gaussian parameter e Quantized State Continuous Time Markov In this model the bit rate is quantized into finite discreet levels This model takes uniform quantization step as A bits pixel There are M 1 possible levels 0 A MA Transitions between levels are assumed to occur with exponential rates that may depend on the current level This 33 model is approximating the bit rate by a continuous time process A t with discreet jumps at random Poisson time o Frames per second Number of frames arriving per second This is in the range of 10 50 o Pixels per frame Number of pixels in each frame This is in the range of 10000 100000 o No of Multiplexed Sources This model considers the aggregate instantaneous input rate AN t instead of the single source bit rate 1 t The total rate is the sum of N independent random processes each with mean E A and variance C 0 at steady state Therefore the steady state state mean of AN t will be E A N N x E A bits pixel o Quantization Level This model takes uniform quantization step as A bits pixel There are M 1 possible
280. size of packet during the current event Prev_Event_Id Specifies the ID of the event which generated the current event 49 Trace data analysis techniques This section explains about how to analyze the data of a NetSim trace file How to set filters to NetSim trace file Step 1 Open the trace file In this example packet trace is opened Note Refer NetSim Help gt Generating Packet trace and NetSim Help gt Generating Event trace Sections to generate the trace files On WHI z packettrace csv Microsoft Excel ah s Home Insert Page Layout Formulas Data Review View Team ox B ai Calibri ZHE r jaa s9 General S H 7 in Balnsert z Ae Ad Delete Paste SB BS Et gt vs ly lt 0 0 Conditional Format Cell ae Sort amp Find amp T Birit AA E A Ste e MH aet a Teble Styles Format 27 Fitter Select Clipboard Font tw Alignment Ta Number a Styles Cells Editing D E F G H I 1 PACKET_ID SEGMENT_ID PACKET TYPE CONTROL_PACKET TYPE SOURCE ID DESTINATION_ID TRANSMITTER_ID RECEIVER_ID PACKET_STATUS 0 N A Control_Packet ARP_Request NODE 2 Broadcast 0 NODE 2 ROUTER 1 Successful 0 N A Control_Packet ARP_Reply ROUTER 1 NODE 2 ROUTER 1 NODE 2 Successful 0 N A Control Packet TCP_SYN NODE 2 NODE 3 NODE 2 ROUTER 1 Successful Step 2 Go to Data menu and click on filter icon to enable the auto filter Qia H9
281. stribution The options available for distribution are e Constant e Exponential Inter Arrival Time Enter the average inter arrival time between packets A lower inter arrival time would lead to a higher generation rate and the vice versa By default 1000000 Micro Sec is entered Peer to Peer File Size Distribution The options available for distribution are e Constant e Exponential Value Bytes This represents the size of the file in bytes Piece size Bytes Each file is divided into equal sized pieces and then the piece of the data is transmitted This property represents the size of each piece HTTP Http_request_interarrival_time This indicates the time gap between the pages Distribution The options available for distribution are e Constant e Exponential Inter Arrival Time micro sec This represents the rate at which client sends the requests Page_property Distribution The options available for distribution are e Constant e Exponential Page Count This represents the number of pages received from the server 37 Page Size Bytes This represents the size of each page that is received from the server Email Email_Receive This represents the rate at which emails are received Duration_Distribution The options available for distribution are e Constant e Exponential Duration Time gap between two successive receiving emails in seconds Email_Size_Distribution The options available f
282. t AMPDU_Frame Event Phy_Out Sub Event Wlan_BlockAck Whenever a packet is transmitted the medium is made busy and a Timer Event with SubEvent Update Device Status is added at the transmission end time to set the medium again as idle Events PHY_OUT SubEvent AMPDU_SubFrame Timer EventSubEvent Update Device Status and Event PHY_IN SubEvent AMPDU_SubFrame are added in succession for each MPDU Subframe of the aggregated packet This is done for collision calculations If two stations start transmission simultaneously then some of the SubFrames may collide Only those collided SubFrames will be retransmitted again The same logic is followed for an Errored packet However if the PHY header the first packet is errored or collided the entire A MPDU is resent At the receiver the device de aggregates the packet in the MAC Layer and generates a block ACK which is sent to the transmitter If the receiver is an intermediate node the de aggregated packets are added to the access buffer of the receiver in addition to the packets which arrive from Network layer If the receiver is the destination then the received packets are sent to the Network layer At the transmitter side when the device receives the block acknowledgement it retransmits only those packets which are errored The rest of the packets are deleted from the retransmit 129 buffer This is done till all packets are transmitted successfully or a retransmit limit is reached
283. t NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt 162 Input File Format Output File Format Cryptographic_Technique Transposition 1 gt 3 gt 4 gt 5 gt 2 gt Cryptographic_Method Encryption T gt E gt T gt C gt O gt S gt TSE gt T gt C gt Plain_Text T gt S gt O gt C gt E gt T gt T gt SE gt C gt T gt TETCOS Key_ Text BLORE Interface Source Code Interface Source code written in C is given using this the user can write only the Transposition Encryption inside the function fnTranspositionEncryption using the variables already declared To view the interface source code go to NetSim Installation path src Programming TranspEncrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Cryptography Transposition Decryption Programming Guidelines This section guides the user to link his her own code for Transposition Decryption to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named
284. t and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt File Format Input File Format Output File Format This gives us the contents of the Input Txt from which the user has to get the values for his program The Input File format IP Address gt Sample Input text Format IP_Address 192 168 0 100 The Output File format First Byte value gt 128 gt Quotient of First Byte 128 gt Remainder of First Byte 128 gt Previous remainder gt 64 gt Quotient of Previous remainder 64 gt Remainder of Previous remainder 64 gt Previous remainder gt 32 gt Quotient of Previous remainder 32 gt Remainder of Previous remainder 32 gt Previous remainder gt 16 gt Quotient of Previous remainder 16 gt Remainder of 215 Previous remainder 16 gt Previous remainder gt 8 gt Quotient of Previous remainder 8 gt Remainder of Previous remainder 8 gt Previous remainder gt 4 gt Quotient of Previous remainder 4 gt Remainder of Previous remainder 4 gt Previous remainder gt 2 gt Quotient of Previous remainder 2 gt Remainder of Previous remainder 2 gt Previous remainder gt 1 gt Quotient of Previous remainder 1 gt Remainder of Previous remainder 1 gt same procedure for all bytes Binary value gt Sample Output text Form
285. t of information and parameters of every packet that flows through the network packet trace provides necessary forensics for users to catch logical errors without setting a lot of breakpoints or restarting the program often Window size variation in TCP Route Table Formation in OSPF Medium Access in Wi fi etc are examples of protocol functionalities that can be easily understood from the trace Note Turning on Packet Trace will slow down the simulation significantly By default the packet tracing option is turned off How to enable Packet Trace via UI If NetSim runs via the UI packet trace can be turned on by clicking the Packet Trace icon in the tool bar and selecting the required fields in the packet trace NetSim will write the packet trace to the specified path during simulation How to enable Packet Trace via CLI If NetSim runs via CLI then the packet trace can be turned on by enabling the packet trace in the STATISTICS COLLECTION tag of the configuration file NetSim will write the packet trace to the specified path during simulation How to import Packet Trace to Excel Step 1 Open Excel sheet select Data gt From Text it will ask for file then select the trace file which you want to export to excel sheet 43 Bookl Microsoft Excel Sama EEH Lene Sen From Other Existing Refresh Text to Sources Connections Ally Edit Links Columns decid peste What tf Anadsis i Step 2
286. t ports Establishing Connections The steps for connecting devices in BGP networks are as follows e The connections between two wired nodes cannot be made in the network e The connection possibilities are gt Wired Node to Internal Router gt Internal Router to Border Router gt Border Router to Border Router Set the Properties for the devices links and applications e Right click over the devices and then select Properties to set the properties of the links and the devices 19 e Click and drop Application s to generate traffic e Right click over Application and set properties Multiple applications can be generated by using add button in Application properties Modifying Viewing Accepting Properties On opening an already configured properties of an application the input fields will be frozen i e the input cannot be changed To modify these values click on the Modify button in the screen Now the input value can be changed Click on the Accept button the modified values will be saved This View button is enabled once the Accept Button is clicked To view the given values click on the View button Enable Packet Trace or and Event Trace Optional Click Packet Trace icon Event Trace icon in the tool bar Set the name and path and select the required attributes To get detailed help please refer Generating Packet trace and Event trace Enable Dynamic Metrics Optional Click on dynamic metrics to monitor the value of
287. temporary data This can be got by Start gt Run and typing temp NetSim Type the name of a program folder document or Internet resource and Windows will open it For you Open temp NetSim ver 7 0 TY Netsim_De c Onclicking this you will get a path similar to C Documents and Settings George Local 66 66 Settings Temp NetSim As mentioned above this should also be in double quotes and there should be a single space between the first path and the second path For example C Program Files NetSim_Standard_SW_6 2 C Documents and Settings George Local Settings Temp NetSim 6 Now add a breakpoint to your code in your function or in the main and proceed with de bugging 7 At the end check if the output txt present in the temp NetSim path and the temp txt present in the temp NetSim path are exactly similar Exact similarity would indicate that your code will work fine when you run it in use mode the next time 152 Address Resolution Protocol Programming Guidelines This section guides the user to link his her own code for Address Resolution Protocol to NetSim Pre Conditions The user program should read the input from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp
288. ters that needs to be given are as follows o Switch 1 and Switch 2 gt 67 Km o Switch 1 and Switch 4 gt 46 Km o Switch 1 and Switch 3 gt 89 Km o Switch 2 and Switch 3 gt 78 Km o Switch 2 and Switch 4 gt 99 Km o Switch 3 and Switch 4 gt 56 Km 311 e Click on Run button to execute Refresh button can be used if new Inputs have to be given Sample Output e The SpanningTreeTable with the Path Source Switch and Destination Switch and Distance is obtained Below is the Table that is obtained for the above inputs Spanning Tree Table Path Distance KM 1 2 67 3 4 56 1 4 46 e The Length of the SpanningTree KM would be given below in the output panel The SpanningTreePath consists of green lines whereas the Non SpanningTree consists of red lines Here in this Sample Length of the Spanning Tree KM gt 169 e Once the sample experiment is done then Refresh button can be clicked to create new samples Spanning Tree Kruskal Programming Guidelines This section guides the user to link his her own code for Spanning Tree using Kruskal algorithm to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt 312 The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through t
289. the data Receiver side CRC value Example 92BF 0000 Interface Source Code Interface Source code written in C is given using this the user can write only the Cyclic Redundancy Check inside the function fnCRC using the variables already declared To view the interface source code go to NetSim Installation path src Programming CrcCcitt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To detect the error found in the file transferred between a Sender and Receiver using CRC CCITT How to Proceed The objective can be executed in NetSim using the programming exercise available In the Programming menu selectError Detecting Codes gt Cyclic Redundancy Check Sample Input e For No Error Case Follow the below given steps 0 SampleMode should be selected 1 SelectCRCCCITT as Algorithm from the list available 2 Under Condition NoError should be selected 201 Under Input Enter the path of the file name to get its CRC The file should be in txt format which should not exceed 5000bytes Click on Run button to execute Refresh button can be used if new Inputs have to be given e For Error Case Follow the below given steps 0 1 2 3 Under Input Enter the path of the file name to get its CRC The file should
290. the required output to a file named Output with extension txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Coding Pre Requisites The prerequisite for the creation of sockets in the Windows based C complier is they must have winsock h header file in its standard header file folder In order to use the commands of the 261 winsock h there must be wsock32 lib library file present in the C complier To link wsock32 lib different steps have to be followed for different compilers as shown e For Visual Studio complier 2010 10 0 versions the library file linkage must be made in the following way LANDII Property Pages _ a p_e m So Configuration Active Debug v Platform Active Win32 Configuration Manager 3 Common Properties fe References Ignore All Default Libraries t Configuration Properties Ignore Specific Library General Module Definition File Debugging Add Module to Assembly C C Embed Managed Resource File linker Force Symbol References General Delay Loaded DLLs Assembly Link Resource Manifest File Debugging System Optimization Embedded IDL Advanced Command Line Manifest Tool H XML Document General H Browse Information Build Events h Additional D kad 6 Custom Build St
291. ticular Experiment that needs to be opened using Browse button gt For Other Networks select the Experiment that needs to be opened Click on Ok button to open the specified Experiment User can modify the existing Scenario Simulate and Save it Else Click on Cancel button to Exit the screen Open Metrics Select Metrics from Simulation gt Open menu to open metrics results of the saved experiments The following steps need to be followed Select the User Note This option is available in Admin login only This option can be used to open experiments created by different users Select the Network There are several options like Internetworks Legacy Networks Advanced Wireless Networks MPLS Networks BGP Networks Cellular Networks 57 Wireless Sensor Networks Personal Area Networks LTE Networks and Cognitive Radio Networks available choose based on the saved experiment that needs to be opened e Select the Protocol Note This is not applicable for Internetworks BGP Networks Wireless Sensor Networks Personal Area Networks LTE Networks and Cognitive Radio Networks e Select the Metrics File Experiment gt For Internetworks BGP Networks Advanced Wireless Networks Wireless Sensor Networks Personal Area Networks LTE Networks and Cognitive Radio Networks and Select the Metrics File of the particular Experiment that needs to be opened using Browse button gt For Other Networks select the Experiment that needs
292. tination PC running NetSim Simulation PCR Real Node receiving traffic A real node say PCr sends data to the PC running NetSim say PCy When ever a packet arrives at the interface of PCy this packet is modulated into a simulation packet and sent from a source node user selectable in the network user configurable simulated to a destination node again user selectable Upon receipt of this packet at the destination the packet is then de modulated and sent back to a real destination node PCr 331 EmulationSet up The ideal set up to run emulation would be to have three 3 PC s One would be the real source then another would run NetSim emulation server and the third would be the real destination Alternately the set up can also be managed with two PC s One PC can be the source destination and another PC would run the NetSim Emulation Server and be the real destination source 1 Setting IP configuration in Source and Destination PC s NOT running the NetSim Emulation Server Open command prompt in administrative mode Programs 1 E cmd Run as administrator Scan for Viruses Move to Quarantine Safe Run Check reputation in KSN TortoiseSVN WinMerge Add to archive Add to cmd rar Compress and email Compress to cmd rar and email Pin to Taskbar Pin to Start Menu Restore previous versions Send to Cut Copy Delete Open file loc
293. to be opened e Click on Ok button to open the selected Experiment User can modify the existing Scenario Simulate and Save it Else Click on Cancel button to Exit the screen 58 Delete Deleting Saved Experiments In the Simulation menu select Delete option to delete the saved Simulated Experiments To delete Experiments the user needs to follow the below given steps Note Click the Delete Delete All button to enter into the next window gt Delete Click the Delete button to delete single experiment gt Delete All Click the Delete All button to delete all the saved experiments In the next window gt Delete Select the Experiment Name that needs to be deleted gt Delete All Select the User Name in order to delete the experiments under that user Note This option will be available only in Admin login gt Click on Delete button to delete the Experiment s else click on Cancel button to cancel deletion v After clicking on the Delete button a message appears which says Are you sure you want to delete this Experiment s Click on Yes to continue deleting the Experiment s else click on No to cancel deleting v Click on OK button in the The experiment is deleted or The experiments have been deleted window Admin User An option called User Name is available only in when the User has logged into Admin This option can be made use for deleting experiments under any User
294. to be selected Either Odd or Even can be selected e Data need to be entered Maximum of 8 alphabets can be entered e Error Position needs to be selected Based on the input its values ranges e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally 192 e Data Bits which if in the binary form is obtained This Data Bits is obtained for Original Data entered as well as for the Error selected e Depending on the Parity selected tables of Hamming String Original Data and Error Data will be obtained e For the Error Data table to be obtained click on the Next button available in the output panel When the Error Data table is obtained Error Position value is also obtained e Once the sample experiment is done then Refresh button can be clicked to create New Samples Error Detection Code Cyclic Redundancy Check CRC 12 Programming Guidelines This section guides the user to Run his her own code for Cyclic Redundancy Check to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt
295. to build Dynamic Link Libraries section Step 2 Go to NetSim Standard gt bin folder Here one would find default DLLs for respective protocols as shown in next figure Step 3 Now the user must build and place their DLL custom DLL inside this folder First rename then place like this 1 Rename the default DLL It is recommended to rename the default DLL thereby saving a copy of original DLL For example libCognitiveRadio dll has been renamed as libCognitiveRadio_default dll as shown below 86 Ide Ji H Computer Local Disk C Program Files NetSim Standard Organize v Open v New folder Jt Favorites B Desktop J Downloads SE Recent Places G Libraries B Documents ad Music Pictures E Subversion E Videos Name Component dll Exercise dll iconv dll jdic dll libAddressMask dll libAODV dll libARP dll libARPProg dll libAssignSites dll libATM dll Date modified Type 3 28 2014 3 58PM_ DLL File 1 28 2014 2 49PM _DLL File 1 28 2014 2 49PM_ DLL File 1 28 2014 2 51PM DLL File 1 28 2014 2 49PM_ DLL File 1 28 2014 2 49PM_ DLL File 1 28 2014 2 49PM_ DLL File 1 28 2014 2 49PM_ DLL File 1 5 i 4 Original DLLs of ee libBGP dll libBinaryConversion dll libCDMA dll libCDMAProg dll libCellular dll libCIDR dll 2 lilbCognitiveRadio dil X libCRC dll NetSim Homegroup 1 28 2014 2 49 PM 1 28 2014 2 49 PM 1 28 2014 2 49 PM 1 28 2014 2 49 PM 1 28 2014 2 49 PM 1 28 2014 2
296. tput rate at 1 second gt Output rate at a 00 100 100 100 100 100 100 second gt 4 gt Discard rate at 1 second gt Discard rate at 2 second gt gt Total number of seconds taken gt The data should be stored in the file with a delimiter gt in between Sample File data 100 gt 100 gt 100 gt 100 gt 100 gt 100 gt 100 gt 100 gt 100 gt 100 gt 100 gt 0 gt 0 gt 300 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 0 gt 11 gt Interface Source Code Interface source code written in C is given using this the user can write only the Leaky bucket algorithm inside the function fnLBA using the variables already declared To view the interface source code go to NetSim Installation path src Programming LBA c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 239 Sample Scenarios Objective To understand the concept of Leaky Bucket Algorithm LBA through programming How to Proceed The objective can be executed in NetSim using the programming exercise available under programming menu user has to select Leaky Bucket Algorithm Sample Inputs In the Input panel the following steps need to be done SampleMode should be selected Select the Output Capacity from the given list of values The value ranges from 100 to 1000 Select the
297. ts have to be given Output The following steps are done internally by NetSim e Data will be converted into ASCII Values ASCII Values will be converted into Binary Values e The Binary Value for CRC polynomial will be shown e Checksum will be calculated for the user data in Sender side e HDLC frame will be formed in Sender side and Bit Stuffing process is animated Adding 0 for every consecutive five 1 s e Then Destuffing process will be animated in Receiver side e Checksum will be calculated in receiver side e Again Binary Values will be converted into ASCII values e Finally the ASCII values will be converted into Data which the user entered 207 Framing Sequence Character Stuffing Programming Guidelines This section guides the user to link his her own code for Character Stuffing to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt which is in Temporary Directory The user program after executing the concept should write the required output to a file named Output with extension txt in Temporary Directory Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written int
298. txt Input file format Output file format Input txt file has the input data The dt1 gt dt2 gt dt3 gt dt4 gt dt5 gt dt6 gt dt7 gt dt8 gt format is dt 1 specifies the prime P Plain_Text T dt 2 specifies the prime Q dt 3 specifies the value of N dt 4 specifies the value of Z dt 5 specifies the value of Kp dt 6 specifies the value of Ks dt 7 specifies the value of the Cipher Text dt 8 specifies the value of the Plain Text Example For input T Output 11 gt 3 gt 33 gt 20 gt 7 gt 3 gt 14 gt 20 gt Interface Source Code To view the interface source code go to NetSim Installation path src Programming RSA c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP 179 Sample Scenario Objective Encrypt and decrypt the message with the using DES How to Proceed The objective can be executed in NetSim using the programming exercise available Under programming user has to select Cryptography gt Advanced gt RSA Sample Inputs In the Input panel the following steps need to be done e SampleMode should be selected e Plain Text of only one character has to be entered in the field available e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e
299. ubstitution i a Cpnen iene Cryptographic_Method Decryption v gt u gt t gt Cipher_Text g gt f gt e gt vevequ v gt u gt t gt Key_Text e gt d gt c gt 2 q gt p gt o gt u gt t gt s gt Interface Source Code Interface Source code written in C is given using this the user can write only the Substitution Decryption inside the function SubstutionDecryption using the variables already declared To view the interface source code go to NetSim Installation path src Programming SubstDecrypt c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 160 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective Encrypt and decrypt the message with the same key value using Substitution How to Proceed The objective can be executed in NetSim using the programming exercise available Under programming user has to select Cryptography gt Substitution Encryption Sample Input In the Input panel the following steps need to be done e SampleMode should be selected e Encryption need to be selected e Enter the Plain Text that needs to be encrypted Maximum of 8 alphabets need to be entered e Enter the Key Value This is an Integer which is within the range 0 to 26 e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are un
300. uidelines This section guides the user to link his her own code for Dynamic Host Configuration Protocol to NetSim Pre Conditions 187 The user program should read the input from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Format Output File Format Number_of_Clients 4 IDHCP_DISCOVER gt Start_Address 192 168 0 105 INNode1 gt Node2 gt End_Address 192 168 0 109 INodel gt Node3 gt Mask 255 255 255 0 INode1 gt Node4 gt INodel gt Server IDHCP_OFFER gt Server gt Nodel IDHCP_REQUEST gt INodel gt Server IDHCP_ACK gt Server gt 192 168 0 105 IDHCP_DISCOVER gt INode2 gt Node1 gt INode2 gt Node3 gt INode2 gt Node4 gt INode2 gt Server IDHCP_OFFER gt Server gt Node2 IDDHCP_REQUEST gt INode2 gt Server IDHCP_ACK gt Server gt 192 168 0 106 188 IDHCP_DISCOVER gt INode3 gt Nodel1 gt INode3 gt Node2 gt INode3 gt Node4 gt INode3 gt Server IDHCP_OFFER gt Server gt Node3 IDHCP_REQUEST gt
301. uidelines This section guides the user to link his her own code for shortest path Floyd s to NetSim Pre Conditions The program should read the data from Input txt file that is available in the temporary directory The program should write the output data to Output txt file that is available in the temporary directory Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and the results of the program should be written into the output file Output txt 282 Input file format Output file format Algorithm Floyd s No_of_Router 3 Distance 999 gt 5 gt 1 gt 5 gt 999 gt 10 gt 1 gt 10 gt 999 gt Source_Router 1 Destination_Router 3 Note gt is the delimiter symbol which is used to separate each input Consider the source node is 1 Distance gt 0 gt 1 gt 2 gt 1 gt 2 gt 1 gt Path gt 0 gt 1 gt 2 gt 1 gt 4 gt 1 gt The first line has the all the distance values from the source node to all the other connected nodes The second line has the path values from the source node to all the other nodes The first line contains the values stored in the distance array single dimensional array used in the algorithm The second line contains the values stored in the pat
302. utput panel The SpanningTree Path consists of green lines whereas the Non SpanningTree consists of red lines Here in this Sample Length of the Spanning Tree KM gt 169 e Once the sample experiment is done then Refresh button can be clicked to create New Samples 317 Transmission Flow Control Go Back N Programming Guidelines This section guides the user to link his her own code for Go Back N to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Window Size The Window Size for Go Back N is 7 Input File Format Output File Format Algorithm Go_Back_N Data_File C Users P Sathishkumar Documents Th txt gt BER 0 Valuel gt Value2 gt Value3 gt Value4 gt Types There are five types of formats of writing in the output file Each format is written in specific condition the types are explained below The condition of writi
303. values stored in the path array single dimensional array used in the algorithm Sample Output 1 gt 2 gt 1 gt 3 gt 2 gt 1 gt 3 gt 1 gt gt gt gt Distance gt 0 gt 6 gt 5 gt Path gt 1000 gt 1 gt 1 gt Note The string Distance and Path in the file is compulsory The output must be stored in the same format 286 Interface Source Code Interface source code written in C is given using this the user can write only the Scheduling inside the function fnDiykstra using the variables already declared To view the interface source code go to NetSim Installation path src Programming LinkState c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective The objective is to find the Shortest Path between the two routers using the Link State algorithm How to Proceed Under ProgrammingMenu select ShortestPath Sample Input By using the InputPanel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows e SampleMode should be selected e Select the Algorithm as RunedState e Number of Routers needs to be selected Minimum of 3Routers and Maximum of 8Routers can be selected Select 5 Routers e SourceRouter needs to be given Let Router 5 be the SourceRouter e DestinationRouter
304. ve for 5 5CCK and 11CCK Bit Error Rate Eb No Reference Higher Rate 802 11b Double the Data Rate Chris Heegard Matthew Shoemake amp Sid Schrum Doc IEEE 802 11 00 091 SNR vs BER curve for MQAM BER for QAM using AWGN channel Eb No dB Reference BER Comparison of M ary QAM by Mukthar Hussain MATLAB File Exchange 124 SNR vs BER Table followed in NetSim SNR in dB 31033 35104 T045 350 02 7 0005 125 WLAN 802 11n 802 11lac IEEE 802 11n Standard Mac aggregation and block acknowledgement are two important enhancements to 802 11n standard In the aggregation scheme several MPDU s MAC Protocol Data Units are aggregated in to a single A MPDU Aggregated MPDU The A MPDU s are created before sending to PHY layer for transmission The MAC does not wait for MPDU s before aggregation It aggregates the already present packets in the queue to form an A MPDU The maximum size of A MPDU is 65535 bytes The maximum size of each MPDU is 4KB In A MPDU each MPDU has a delimiter of 32bits at the beginning and padding ate the end These padding bytes ensure that size of MPDU is a multiple of 4bytes PHY Header SubFramel Reserved MPDU CRC Delimiter MPDU Padding 4 Bits Length 8 8 Bits MacHeader 4Bytes 12 Bits Bits Packet In 802 11n a single block acknowledgement is sent for the entire A MPDU The block ack acknowledges each packet that is received It co
305. ver then the Server sIPAddress 192 168 1 1 would be automatically filled in the Local IP Address field Sample Output TCP UDP On the Right hand side panel there is an InputField ReceivedData where Data would get displayed Hello is the Data that is received from the ClientSystem First the Server should click on the Run button after which the Client should click on the Run button to Create the socket Client should click on the Connect button to establish the connection with server The Client should click on the Send button to transmit the data to the Server The Client should click on the Close button to terminate the Connection with Server If the Data is successfully transmitted then the SentData would be Received in the ServerSystem First the Server should click on the Run button after which the Client should click on the Run button to Create the socket The Client should click on the Send button to transmit the data to the Server The Client should click on the Close button to terminate the Connection with Server If the Data is successfully transmitted then the SentData would be Received in the ServerSystem 266 PC to PC Communication Chat Application TCP Programming Guidelines This section guides the user to link his her own code for PC to PC Communication Socket programming to NetSim Pre Conditions The user program should read the input scenario from text file named Input w
306. via CLI then the event trace can be turned on by enabling the event trace in the STATISTICS_COLLECTION tag of the configuration file How to import Event Trace to Excel Refer Help on Generating Packet Trace How to import Packet Trace to Excel Event Trace Metrics Event_Id Specifies the ID of the Event Specifies the type of event being performed for eg APPLICATION_IN Event_Type APPLICATION_OUT MAC_OUT MAC_IN PHYSICAL_OUT PHYSICAL _IN etc Event_Time Specifies the time in microseconds at which the event is being executed Device_Type Specifies the type of device in which the current event is being executed Device_Id Specifies the ID of device in which the current event is being executed Interface_Id Specifies the Interface_Id of device in which the present event is being executed Application_Id Specifies the ID of the Application on which the specific event is executed Packet_Id Specifies the ID of the packet on which the current event is being executed Segment_Id Specifies the ID of the segment of packet on which the current event is being executed Protocol_Name Specifies the Protocol which is presently executed Subevent_Type Specifies the protocol sub event which is being executed If the sub event value is 0 it indicates interlayer communication Ex MAC_OUT called by NETWORK_OUT or a TIMER EVENT which has no sub event Packet_Size Specifies the
307. view the interface source code go to NetSim Installation path src Programming HammingCode c To find NetSim s Installation path right click NetSim icon and select Open file location in Windows 7 Open file location in Windows Vista Properties gt find target in Windows XP Sample Scenarios Objective To understand the concept of Special Addresses through programming Sample Inputs In the Input panel the following steps need to be done 225 SampleMode should be selected Select the IP Address in slash notation Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are done internally Binary value of IP Address is obtained Binary value of Address Mask is obtained Prefix Suffix values are obtained Binary value of Prefix part and Suffix part are obtained Type of address is obtained Once the sample experiment is done then Refresh button can be clicked to create New Samples Subnetting Programming Guidelines This section guides the user to link his her own code for Sub netting to NetSim Pre Conditions The user program should read the inputted scenario from text file named Input with extension txt The user program after executing the concept should write the required output to a file named Output with extension txt The path of the input file and the output file can be viewed on clicking the Button
308. virtual stack Users can now model the mobile switching centre MSC also e BGP integration with stack BGP protocol has been integrated with NetSim s virtual network stack e NetSim s C source code is now based on Doxygen the de facto standard tool for generating source code help e The wireless suite covered in NetSim is 802 11 a b g n and 802 11 ac Gigabit Wi fi e P2P bit torrent HTTP and E Mail application models have been added e File based mobility model for MANET networks e The IP layer of Inter Network component of NetSim now includes VPN Firewall and ICMP e Router to router links now support data rates upto 100 Gbps e Network Device properties can now be user customized e Visual studio based solution files for very easy custom code development e Multiple applications can now be set from any source e Start time and end time can be now set for any application Getting Started Main Menu Opens the Simulation menu consisting of New Open and Delete User can Analyze different Internetworks Legacy Cellular BGP MPLS Advanced Wireless Networks Wireless Sensor Networks Cognitive Radio Networks and LTE Scenarios Opens the Programming menu where different network programming exercises are available Users can link and run their source code here Note This menu is available only in Academic and Standard Version Menu to create users set passwords and sample exam mode Switching of users can be done through th
309. w given steps 194 Wi eS SampleMode should be selected SelectCRC12 as Algorithm from the list available Under Condition NoError should be selected Under Input Enter the path of the file name to get its CRC The file should be in txt format which should not exceed 5000bytes Click on Run button to execute Refresh button can be used if new Inputs have to be given e For Error Case Follow the below given steps Sample Output 0 SampleMode should be selected 1 SelectCRC12 as Algorithm from the list available 2 3 Under Input Enter the path of the file name to get its CRC The file should Under Condition Error should be selected be in txt format which should not exceed 5000bytes Click on Run button to execute Refresh button can be used if new Inputs have to be given e For No Error Case The CalculatedCRC should be Zero when the txt file is received by the Node2 The message Data Frame is Flowing from Nodel to Node2 with No Error e For Error Case The CalculatedCRC should be Non Zero when the txt file is received by the Node2 The message Data Frame is Flowing from Node1 to Node2 with Error Error Detection Code Cyclic Redundancy Check CRC 16 Programming Guidelines This section guides the user to link his her own code for Cyclic Redundancy Check to NetSim Pre Conditions The user program should read the input from text file n
310. with the method used 5 Click on Add Button Then enter the Destination IP address in the Address field and enter a stream name user defined and click next button Destination Setup Select destinations to stream to Rpts E This module outputs the transcoded stream to a network via RTP Address 192 168 0 86 Base port 5004 Stream name NetSim es 337 6 Select Video MPEG 2 MPGA TS option from the drop down list as shown in the below screen shot Then click next button V Activate Transcoding Profle Ox Be H 264 MP3 MP4 VP80 Vorbis H 264 MP3 TS fideo 3 2 MPGA TS WMV WMA ASF DIV3 MP3 ASF Vorbis OGG 7 Click on Stream Button Option Setup Set up any additional options for streaming Miscellaneous Options E Stream all elementary streams Generated stream output string sout transcode vcodec DIV3 vb 800 acodec mp3 ab 128 channels 2 samplerate 44100 duplicate dst udp dst 192 168 0 86 1234 dst display sout keep 338 Steps at Destination PC 1 Open VLC Media Player Click on Toggle Playlist icon as shown in the below screenshot E Wempe al Media Piayb ck Audio Video Subtitle Tools View Help Playlist E E Playlist Title uration Album gh Media Library My Computer Bh My Videos J My Music My
311. with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Input File Output File The Input txt file contains The Output txt file contains Destination Address V alue Message Value gt Source Address Value H Value gt e Value gt l Value gt l Value gt o Value gt Binary Values Value gt CRC Polynomial Value gt CheckSumSender Value gt Error Status 0 or 1 lt Stuffing gt Data Message CRC Polynomial Value Seed Value Value Destination Address Value gt Source Address Value gt Data Value gt Example Destination lt DeStuffing gt Address 00011111 Destination Address Value gt Source Address 00111111 Source Address Value gt 205 Data Hello CRC Polynomial 10010 Error Status 0 Seed Value 45 Data Value gt Error Status Value gt CheckSumReceiver Value gt Binary Values Value gt H Value gt e Value gt l Value gt l Value gt o Value gt Message Value gt Example Message Hello gt H 72 gt e 101 gt 1 108 gt 1 108 gt 0 111 gt Binary Values 0100100001100101011011000110110001101111 gt CRC Polynomial 10011 gt CheckSumSender 1110 gt lt Stuffing gt Destination Address 000111110 gt Source Address 001111101 gt Data 010010000110010101101100011011000110111110110 gt lt DeStuffing gt Destination Address 00011111
312. wledgement from Node2 to Nodel e Once the sample experiment is done then Refresh button can be clicked to create new samples Sorting Technique Bubble Sort Programming Guidelines This section guides the user to link his her own code for Sorting Algorithm to NetSim Pre Condition User written program should read the value from the Input txt in the temporary directory which is having input from the GUI at runtime The output should be stored in Output txt in the temporary directory for display User written program should return an integer value Note The temporary directory is navigated through the following step Run gt Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins with the Reading of the Inputs from the input file Input txt Executing the required concept and The results of the program should be written into the output file Output txt Note The naming of the input and the output file must be same as the text displayed in the Methodology screen 298 File Format Input File Format Output File Format Ascending Order Sorting _Type Bubble Sorting_Order Ascending Total_Number 3 Number_to_Sort 5 4 3 Descending Order Sorting _Type Bubble Sorting_Order Descending Total_Number 3 Number_to_Sort 4 5 6 type gt index 1 gt index 2 gt type 0 specifies Positioning the data value index that ha type 1 specifies the two index follow
313. x part of Level 2 s first subnet Address gt Subnet Id part of Level 2 s first subnet Address gt Suffix part of Level 2 s first subnet Address gt Hexa decimal value of Level 2 s first subnet address gt prefix length of Level 2 s first subnet gt until the number of subnets reached in the second level of first level s subnet until the number of subnets reached in the first level Sample Output text Format 1111 2222 3333 4444 AAAA BBBB CCCC DDDD gt 000100010001 1001001000100010001000110011001100110 1000100010001001010101010101010101110111011101111 001100110011001101110111011101 gt 000100010001 gt 000100100010001000100011001100110011 0100010001000100101010101010101010111011101110111 1001100110011001101110111011101 gt 2 gt 1 gt 000100010001 gt 0 gt 0010010001000100010001 10011001100 1101000100010001001010101010101010101110111011101 111001100110011001101110111011101 gt 000100010001 gt 0 gt 0010010001000100010001 10011001100 1101000100010001001010101010101010101110111011101 11100110011001100110111011101110151111 2222 3333 4 444 AAAA BBBB CCCC DDDD gt 13 gt 000100010001 gt 1 gt 0010010001000100010001 10011001100 1101000100010001001010101010101010101110111011101 11100110011001100110111011101110151119 2222 3333 4 444 AAAA BBBB CCCC DDDD gt 13 gt O gt 1111 2222 3333 4444 AAAA BBBB CCCC DDDD gt 15 gt O gt 1113 2222 3333 4444 AAAA BBBB CCCC DDDD gt 15 gt O gt 1115 2222 3333 4444 AAAA BBBB CCCC DDDD gt 15 gt O gt 1117 222
314. xport PHY_VAR var1 XOg 00 X J210 dxq 134135 4 ifdef __ cplusplus endif endif Output Show output from Build xa doe users core desktop iiulan S02 idag c 298 warning C4244 conversion from double to int 1 gt Generating Code 1 gt WLAN 1ib WLanLib obs MSIL netmodule or module compiled with GL found restarting link with LT 1 gt LINK warning LNK4 75 ignoring INCREMENTAL due to LTCG specification ay Creating library C Users Core Desktop libWLAN Debug libWLAN lib and object C Users Core Deskto 1 gt LINK warning LNK4098 defaultlib MSVCRT conflicts with use of other libs use NODEFAULTLIB iora 1 gt Generating code Ln 825 TEET EE e WLan c Packet h Protocol h Stack h Ln WLAN h E Resource Files a amp Source Files 4 802_11_MAC c 2 802_11_PHY c C 802 11ag c 3 802 11b c C 802 Lle c C4 802_11n c 3 PMD_RX Specification 8 G io AOAC UIT B Class Vi vax INS 12 05 PM Hr 2 7 2014 In the main function where a user wishes to find the dTotalReceivedPower the variable must be assigned the respective value In the above case the following line of code must be written in WLAN c file varl DEVICE_PHYVAR nDeviceld nInterfaceld Note that the parameters given in the macro or any function which assigns a value to the variable must be defined beforehand in the code Here nDevi
315. y Check Sample Input In the Input panel the following steps need to be done e SampleMode should be selected e Parity need to be selected Either Odd or Even can be selected e Data need to be entered Maximum of 8 alphabets can be entered e Error Position needs to be selected The value ranges from 1 to 48 e Then Run button need to be clicked Refresh button can be used if new Inputs have to be given Output The following steps are under gone internally e Data Bits which if in the binary form is obtained This Data Bits is obtained for Original Data entered as well as for the Error selected e Depending on the Parity selected tables of LRC of Original Data Bits and LRC of Error Data Bits are obtained e In each of the above mentioned tables last row would contain the Parity e Error In Column s is obtained 204 Framing Sequence Bit Stuffing Programming Guidelines This section guides the user to link his her own code for Bit Stuffing to NetSim Pre Conditions The user program should read the input scenario from text file named Input with extension txt which is in Temporary DirectoryThe user program after executing the concept should write the required output to a file named Output with extension txt in Temporary Directory Note The temporary directory is navigated through the following step Run Type temp gt NetSim gt Input txt and Output txt General Program Flow The program begins
316. y using the InputPanel that is available on the left hand side a SampleScenario is created The Steps involved in creating are as follows e SampleMode should be selected e Algorithm should be selected as Max Min Fair MMF e Under Input field 0 EnterOutputLinkCapacity which is in MBPS The options that are available for selecting are 100 200 300 1000 MBPS Select10OOMBPS 1 EnterBits Node for one second limit 0 9999 in the fields available i e Nodel 100 Node2 100 12 0 eee eee eee Node8 100 e Click on the Run button Output The Transmission of the data takes place in the following sequence The Bits Node are represented in different colors These colors indicate the order in which the transmission takes place 281 The Transmission Sequence gt i 1 E 2 a 3 a 4 J 5 E 6 E 7 J 8 3 4 Seconds 1 2 5 6 7 8 Nodel 12 50 12 50 12 50 12 50 12 50 12 50 12 50 12 50 Node2 12 50 12 50 12 50 12 50 12 50 12 50 12 50 12 50 Node3 12 50 12 50 12 50 12 50 12 50 12 50 12 50 12 50 Node4 12 50 12 50 12 50 12 50 12 50 12 50 12 50 12 50 Node5 12 50 12 50 12 50 12 50 12 50 12 50 12 50 12 50 Node6 12 50 12 50 12 50 12 50 12 50 12 50 12 50 12 50 Node7 12 50 12 50 12 50 12 50 12 50 12 50 12 50 12 50 Node 12 50 12 50 12 50 12 50 12 50 12 50 12 50 12 50 Shortest Path Floyd s Programming G

Download Pdf Manuals

image

Related Search

Related Contents

Texte de Virgil Tanase  取扱説明書  Installation Manual    Realistic Pro-38 User's Manual  BALAI DESHERBANT SANS FIL Réf.:25281 (Modèle: N0E  User`s Manual  les marches publics : un outil au service des  

Copyright © All rights reserved.
Failed to retrieve file