# Wireless System Specification And Design Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

As mention in the previous chapter, wireless sensor networks face many threats against routing protocols which can affect their behaviour and the purpose of designing them. I have decided to do my investigation on the effectiveness of Black hole attack on WSN and how this attack could make a serious damage on the network topology and the routing protocols. There reason of choosing this attack is because many people has done some researches on Black Hole attack and we want to use some of their results to do our investigation on. In this chapter, I am going to identify the specification of this project and the designs of the simulation I have used to simulate, test, and analyses the results.

This section will describe the specification of the project and what the simulation must do to allow us to complete the investigation. So, we need to simulate our project using such a program to allow us to get some output results that can be used to do the investigation on. We want to create a simulation that is able to do several things which can be described in the following points:

In this section, we will describe the design of this project and what we are going to do to meet the results of doing this investigation on. I am going to use Network Simulator (NS2) to simulate different scenarios with and without the attack. NS-2 can be downloaded for free from many websites [31]. It runs on Windows and UNIX systems, but it requires Cygwin to be installed on Windows to run NS-2 [7]. Tool Command Language (TCL) is used to create the topology and simulates the network. NS-2 is a very useful program that is used to simulate wired and wireless networks. It comes in different versions that are described as ns-2.xx. The version number from NS-2 that we have used is ns-2.33 (allinone-ns.2.33).

We are going to have three different scenarios to do our investigation on and to allow us to compare the output result of each scenario. The number of nodes in each network topology is between 10 to 23 nodes which are distributed along 800*800. The reason to have 10 to 23 nodes in the network is to reduce the amount of the traffics and the data that are generated between nodes, thus to allow us to have few data to do the investigation and comparison. There are two types of network traffics which are TCP and UDP traffics is going to be used in these scenarios to compare the effective of the attack on each type. The aim of using these different types of traffics is because they are quit differs in their functionality and the TCP is a connection oriented that must receive an acknowledgement from the receiver depends on WC that it set to before continue sending the remaining packets. Whereas, UDP is a connectionless that does not require acknowledgements from the receiver.

In this project, we need to use one of the routing protocols to do the investigation on and to see the affect of the attack on that routing protocol, therefore, we have used AODV routing protocol. AODV is one of the routing protocols that are used by Wireless Sensor Networks (WSN). This protocol has been described briefly in the previous chapter is reactive routing protocol. Many researches have been carried out on this type of routing protocol which allows us to get some useful data from.

In addition to that, we have followed the instructions of implementing a new routing protocol in NS-2 that are done by others researchers to allow the adversary node to behave as Black hole node. This new protocol needs some changes in the actual C++ code for AODV protocol and some implementations as well. After that, we have to add this protocol to ns2 and recompile it to allow changes to be effected.

Finally, to do the investigation, we need to have an attack on the network to allow us to collect the data, analysis it, and then compare it with the data from the network that has no attack on. We have decided to simulate Black Hole Attack on the network which allows the adversary to tract all nodes to send their packets through it and then simply drop them and ensure that those packets are no more propagated in the network.

Network Simulator (NS2):

Network Simulator (NS) has been developed at the University of California Berkley which is a discrete simulator program. It has been written in C++ and OTcl (Object-oriented Tool Command Language). Since 1995, NS becomes a part of the Virtual InterNetwork Testbed ( VINT) project which is supported by DARPA that develops tools for simulation results and analysis them and converts network topologies to NS formats. It has the ability to implement different objects of the network such as User Datagram Protocol (UDP) and Transmission Control Protocol (TCP), wired and wireless applications, traffic source behaviour like Telnet, Web, File Transfer Protocol (FTP), Constant Bit Rate (CBR) and more [22, 23]. The basic structure of NS-2 is:

C:\Users\user\Desktop\the project\ns 2 view.jpg

Figure 12: NS-2 View

At the top layer of the simulation, OTcl is a script interpreter used to interpret user simulation scripts by NS and it works with C++ codes where it is fully compatible to this programming language [22, 23].

We have used ns-2.33 for several reasons such as it allows us to create the nodes in fixed position and gives some other nodes such movements.

OTCL script:

OTCL is an extension of the TCL scripting language and used by NS to create objects, initiate events scheduler, tell the traffic sources the starting and ending time to transmit packets, and to set up the network topology by using objects in the library [7]. All objects are used in NS are OTCL objects whether they are written in C++ or OTCL. The user can write its own OTCL script to make a new network object or can use the object library to make a compound object.

Network Animator (NAM):

Network Animator which is known as NAM is a sample tool for animating packet trace data (i.e. a graphical user interface). It is a TCL/TK based animation tool which is used to show the real world network and packet simulation traces in an easy way. It supports packet level animation, topology layout, and other data inspection tools [7,30 website].

Output File Format:

When we created the simulation, we have used a TCL script to drive everything occurs in the network simulation to a file format which is called &acirc;€œTrace File&acirc;€Â. We can find in this file all information such as node energy, transmission node, reception node, transmitting packets, receiving packets, and some other data. All these data are used to analysis and monitor the performance of the network.

Network Environment:

To do the investigation, we have three different scenarios for the network topology. The purpose of that is to get different output results from each scenario and then do comparisons between them to find how an attack could affect on the network. In each network, we have 22 or 23 sensor nodes communicate with each other using wireless channels and AODV routing protocol. We have used TCP and UDP packets in each one to see how affective is the attack on each type and which one has the serious impact.

2.2.1. First Scenario:

In the first scenario, we have simulated a wireless sensor network without any attack to figure out the output of this network and compare it with other outputs of the other networks. We have 22 sensor nodes and each sensor node in the network is working fine and there are traffics between nodes in the wireless network where the transmission and reception are operated in good way. The wireless sensor network and the data flow between nodes behave normally.

2.2.2. Second Scenario:

We have 23 sensor nodes where 22 nodes are normal sensor nodes and one node is the adversary node. These nodes are distributed among the network topology in fixed positions and the adversary is located a bit far away from those nodes. In this scenario, we have divided into two sub-scenarios. In the first part, we have a normal network and we have generated CBR traffics transmitting from node 1, 5, and 7 which are received by the sink node 0 and node 10 send its packets to node 11 and finally node 20 to node 21. These transmissions are started at 5 m/s and end after 25 m/s during the simulation.

In the second part, we have generated new CBR traffics between the same nodes starting at 35 m/s until the last transmission from node 20 at 45 m/s. In here, we set movement to the adversary at 25 m/s with the speed of 500 m/s to have a new location in the centre of the network. The reason of locating the adversary in the centre is to have the most affect on many nodes in the network. The adversary attracts all nodes want to transmit their packets to send them through it even if the adversary does not have a route to the destination node. Then, the adversary simply drops all received packets without forwarding them to the targeted node.

2.2.3. Third Scenario:

In the final scenario, we have also the same number of nodes used in the second scenario. CBR traffics are also generated between the same nodes which are starting at 5 m/s until 25 m/s time. The difference between scenario 2 and 3 is the adversary movement. In this one, we have moved the adversary to the centre of the network earlier than the second scenario. The adversary has started to move to its new location at 2 m/s with the same speed of 500 m/s. The aim of setting the adversary earlier this time is give it the whole control over all packets transmitting during the simulation time. The network then will be affected badly this time more than the other previous scenarios because the adversary will be in centre of the network between sensor nodes and when they want to send their packets, the will send them through the adversary. Therefore, the adversary will ensure that those packets are not propagated any further in the network by dropping them all.

Results:

In this section, we are going to show the output results of each scenario we have simulated. The analyses of these results will be described in chapter 5.

First Scenario Results:

In this scenario, we have simulated a normal Wireless Sensor Network which consists of 21 sensor nodes distributed over 800*800 network topology. We have two types of network traffics have been used between the nodes during 60 m/s time. The results will be discussed in more details in the chapter 5.

TCP Traffics:

In here, we have generated TCP traffics between some sensor nodes in the network. The transmitting nodes are node 1, 5, 7, 10, and 20. The sink nodes are node 0, 11, and 21. The number of sending and receiving packets is showing the following table:

Sending Node

Number of Sending Packets

Receiving Node

Number of Receiving Packets

1

54

0

54

5

62

0

62

7

30

0

30

10

50

11

50

20

58

21

58

UDP Traffics:

We have here the result of transmitting CBR traffics by the same nodes we have used with TCP traffics. The following table shows the number of transmitting and receiving packets:

Sending Node

Number of Sending Packets

Receiving Node

Number of Receiving Packets

1

42

0

No ack

5

40

0

No ack

7

40

0

No ack

10

42

11

No ack

20

42

21

No ack

Second Scenario Results:

We have divided this scenario in two parts. The first part will take the first 25 m/s from the simulation time and without an attack on the network. The second part will have the Black Hole attack on the network just after the first part finished until the simulation is stopped and we will see the results of both TCP and UDP traffics.

TCP Traffics:

TCP Traffics without an Attack:

We have generated the same TCP traffics we have done in the first scenario using the same nodes. The coming table shows the output of this part that has no attack:

Sending Node

Number of Sending Packets

Receiving Node

Number of Receiving Packets

1

54

0

54

5

62

0

62

7

30

0

30

10

50

11

50

20

58

21

58

TCP Traffics with an Attack:

This table will show the affective of the attack on this type of traffics in the second part of the simulation:

Sending Node

Number of Sending Packets

Receiving Node

Number of Receiving Packets

1

2

0

0

5

2

0

0

7

2

0

2

10

58

11

58

20

62

21

62

UDP Traffics without an Attack:

This table shows the result of CBR traffic of the first part of the simulation before attacking the network:

Sending Node

Number of Sending Packets

Receiving Node

Number of Receiving Packets

1

42

0

No ack

5

40

0

No ack

7

40

0

No ack

10

42

11

No ack

20

42

21

No ack

UDP Traffics with an attack:

This is the result of the second parts of the network after lunching the attack:

Sending Node

Number of Sending Packets

Receiving Node

Number of Receiving Packets

1

10

0

No ack

5

16

0

No ack

7

10

0

No ack

10

0

11

No ack

20

40

21

No ack

Third Scenario Results:

In the third scenario, we have lunched the Black Hole attack after 5m/s from starting the simulation and before any node starts to send any TCP or UDP packets.

TCP Traffics:

We can see in the following table the result of TCP traffic when the network has been attack by the Black Hole attack during the whole simulation:

Sending Node

Number of Sending Packets

Receiving Node

Number of Receiving Packets

1

58

0

58

5

4

0

4

7

0

0

0

10

0

11

0

20

58

21

58

UDP Traffics:

The affective of Black Hole attack on CBR can be seen on the following table during the time of simulation:

Sending Node

Number of Sending Packets

Receiving Node

Number of Receiving Packets

1

42

0

No ack

5

0

0

No ack

7

0

0

No ack

10

0

11

No ack

20

42

21

No ack

Conclusion:

To sum up with, we have presented in this chapter the specification of this project and what we need to do our investigation on including the type of routing protocol used by normal nodes and the need for creating a new routing protocol which is used by the adversary node. Then, we have described the design of the project and all tools that have been used to simulate it. Lastly, we have shown the results of TCP and UDP traffics on different scenarios and will be described in more details in chapter 5. In the coming chapter, we will describe the implementation of all used protocols and how we managed to simulate the attack on the network.