This report is about creating a two OPNET models. These node models should communicate and send data like packets from one node to another node. This will be done by a wireless link. Node 1 will have two simple sources, a queue, a processor and a wireless transmitter. Node 2 will have less than this and will have a wireless receiver, a processor and a sink. The processors would be the only thing which will be created and the rest will just be inserted from the default OPNET.
For this assignment I will be using OPNET Modeler which is easy to use and understand. It is fairly quick to get familiar with how the program works and also is very helpful since when you have any errors it takes you to the exact location straightway. You don’t need to go and find the error. From completing this assignment I will be familiar with OPNET as a simulation tool and will also learn how to use OPNET Modeler properly to simulate results and graphs.
OPNET Modeler as a simulation tool
A simulation model is the process of implementing and analysing a prototype or a model to predict its performance in the real world. You want to see how the model reacts in real life situation. This saves you money as you do not need any equipment and could just use OPNET to do this. Also OPNET is very safe to use and you donâ€™t put any lives in danger as you are just using the software and not objects or equipment in the real world. These are the reasons why OPNET is a great tool to use especially in networking and computer systems.
- For this assignment two nodes are to be created. This is the first node model and it contains the components such as two sources, the queue, processor, transmitter and the antenna.
- As two sources are to be created, this is the first source. The values which have been changed here are the process model as simple source, and the packet time and sizes to 2 seconds and 500 bits. This was required for later on when the simulation will be run.
- Here the second source has been similarly set as the first source with the values of 2 seconds and 500 bits as the size.
- The queue for the first node has been set as acp fifo and everything else was left as default.
- The process model which was created has been chosen as the process model for the processor and everything else was left as default.
- The transmitter attributes were not configured and were left as normal. The transmitter was inserted from the OPNET menu and wasn’t created from default.
- An antenna was needed so that the two nodes can transfer packets between each other successfully. The attributes were not configured for the antenna.
- A process model needed to be created as part of the processor for the first node. Two process diagrams were created for the assignment, one for each node model. It contains 3 states and looks like this:
- For the first enter executives state, the code shows the two int commands and a op stat reg command which basically makes the packets sent registered for the processor and t corresponds to this when the simulation is run later on.
- The processor required a lot of time to create as there was a lot of configuration as the code needed to neither have nor errors when compiled. The op stat write command plots the graph for the number of packets sent from the processor to the receiver node when the simulation is run.
- When the transmitter node was created and had no issues, then the next thing was to create node 2. Node 2 took less time to complete as there was less part. Node 2 has the antenna, wireless receiver, processor and the sink.
- When the processor decides that it wants to delete any packets it then sends them to the sink. The sink is where the packets are deleted which are no longer required as they may be corrupted or not needed anymore.
- Here the processor was created for the receiver node. It shows that the process receiver has been configured as the process model.
- The antenna has been left with the normal configuration and was inserted from the default OPNET menu from the program.
- For node 2 the process was configured with two lines of code for the int and two other commands which values show the amount of packets saved and packets destroyed by the processor.
- The processor for the receiver node needed a lot of time to implement. This was because a lot of commands were needed to be used and included the if else statement which shows that if the field value is equals to 1 then the packet should be destroyed, if the field value is something else then it should be kept and saved by the processor.
Results and analysis
For the first scenario both of the traffic sourced needed to be configured as the value of constant 2 seconds before the simulation could be run. This was because to make sure that both of the sources only send packets every two seconds so that the processor could easily handle these packets. The packet size was configured as constant 500 bits.
- This scenario was only run for 15 minutes.
- This is the graph for the packets sent from the transmitter node to the receiver node. This graphs shows that 900 packets were sent from the processor of the receiver node.
- This is the second graph and shows that 450 packets were destroyed by the sink for the receiver node.
- This was the last graph that was produced when the simulation was run. The number of packets that were saved was also 450. This was the same as the number of packets that were destroyed.
- This screenshot shows all of the graphs that were produced.
For scenario 2 the values for the packet interarrival time needed to change to constant of 4 seconds. This meant that packets will only be sent from the processor of the transmitter node every 4 seconds until how long the simulation will be run for.
- For scenario 2 the simulation was run for 15 minutes.
- The results for scenario 2 shows that 900 packets were sent from the transmitter node and those 460 packets were saved and 440 packets were destroyed. For this scenario there were fewer packets that were sent because the processor sent packets every 4 seconds to the receiver node, so this will take time and therefore the receiver will receive fewer packets compared with the first scenario for the assignment.
Overall I have learnt a lot of things from this assignment and in particular working with OPNET Modeler. I have learnt that OPNET is a good tool which can be used for simulation purposes by almost all situations whether it is simulation a small network or even a small experiment. I have learned how to create the OPNET states, queues, processors, transmitters and much more. By doing so I have gained some precious experience which will be very useful in the future if I decide to build on my understanding or to work with other projects which might involve simulations. I can now add OPNET to the list of simulations which I am familiar with especially how OPNET works and how to implement and view results in OPNET.
Order Unique Answer Now