Using Traffic Generators: 1399839

Using Traffic Generators
Step 1: Open a Linux terminal, and execute the command line iperf –help. Provide four configuration options of iperf.

Step 2: Open two Linux terminals, and configure them:
terminal-1 as server (iperf -s).
terminal-2 as client (iperf –c IPv4_server_address)
Note: use the loopback address.
What are the statistics provided at the end of transmission?

iperf: ignoring extra argument — –c
iperf: ignoring extra argument — 127.0.0.1
Usage: iperf [-s|-c host] [options]
Try `iperf –help’ for more information

Step 3: Open two Linux terminals, and configure terminal-1 as client and terminal-2 as server for exchanging UDP traffic, what are the command lines?

iperf -c 198.51.100.5 -u -b 1000m

What are the statistics are provided at the end of transmission?

[ 3] local 198.51.100.6 port 58070 connected with 198.51.100.5 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec
[ 3] Sent 893 datagrams
[ 3] Server Report:
[ 3] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec 0.084 ms 0/ 893 (0%

What is the difference between statistics in Step 2 and Step 3?

The difference in statistics between steps 2 and 3 is that in step 3 the time is taken to transfer packets from one region to another is shown while in step 2 the time taken is not shown anywhere.

Step 4: Open two Linux terminals, and configure terminal-1 as client and terminal-2 as server for exchanging UDP traffic, with:
Packet length = 1200bytes
Time = 20 seconds
Bandwidth = 3Mbps
Port = 9900
What are the command lines?

iperf -c 198.51.100.5 -u -b 1000m

Step 5: Work in groups for this Step. Repeat the exercises in Step 2-4 using two different PCs this time.
In this section two pcs were used as shown in the figures below.

Figure 1: the following information is displayed

Figure 2: the messages on our phones is as shown abover

Figure 3:the messages displayed on the screen

Figure 4: the information displayed on the screen.

Section 4.2: Using Mininet
Note that if you run the mininet command without specifying a controller, it will use the ovsc controller, by default.
Step 1: Open Linux terminal and execute the command line ifconfig in terminal-1. How many interfaces are present?

Three interfaces are available as shown above.

Step 2: Open Linux terminal, terminal-2, execute the command line sudo mn, what is the output?

The following shows the command after the sudo mn command is executed.

Figure the output after the command runs on the terminal.

Step 3: In terminal-1 execute the command line ifconfig. How many real and virtual interfaces are present now?

Figure 5: 3 interfaces are present on the terminal.

Step 4: Interacting with mininet; in terminal-2, display the following command lines and explain what it does:
omininet> help
omininet> nodes
omininet> net
omininet> dump
omininet> h1 ifconfig –a
omininet> s1 ifconfig –a
omininet> h1 ping -c 5 h2
Draw the network topology that is created in mininet.
In terminal-2, display the following command line: sudo ovs-vsctl show
What is displayed?

Figure 6: the code command list s all the nodes in the network.

Figure 7: the dump command lists all the os in the network.

Figure 8:the h1 config command is used lists all the network interfaces in the software.

Figure 9: lists all the network interfaces

Figure 10: it pings to the network as shown above.


Finish the test using mininet>exit
Step 5: In terminal-2, run the following command line:
sudo mn –link tc,bw=10,delay=500ms
mininet> h1 ping -c 5 h2, What happen with the link?

There is communciation among the network components in the network.

mininet> xterm h1
then in xterm h1 type: iperf –s –u
mininet> xterm h2
then in xterm h2 type: iperf –c IPv4_h1 -u
Is there any packet loss?

There is no packet loss in the network.

Step 6: Modify iperf for creating packet loss in the mininet network, how to achieve that and what is the command line?

The iperf can be monitored using the command interface sudo cp /usr/bin/ovs-testcontroller /usr/bin/ovs-controller

The command will be exected as shown abover.

Section 4.3: Using and Configuring Local Controller
Step 1: Mininet can be used with python scripts as well. The following script reproduce same architecture as before: (save as local_controller.py)
from mininet.cli import CLI
from mininet.net import Mininet
from mininet.node import OVSController

if’main‘ == name:
net = Mininet(controller=OVSController )
c0 = net.addController(‘c0’, port=6633)
s1 = net.addSwitch(‘s1’)

h1 = net.addHost('h1')
h2 = net.addHost('h2')

net.addLink(s1, h1)
net.addLink(s1, h2)

net.build()

c0.start()

s1.start([c0])

net.startTerms()
CLI(net)
net.stop()

TIP: If there is a problem running this script please execute:
sudo cp /usr/bin/ovs-testcontroller /usr/bin/ovs-controller
Step 2: In terminal-1, run the script. The script will open four terminals; run the following command line in the terminals:
terminal-2 C0 (ifconfig), get the virtual interface and run (tcpdump -i s1-ethx arp)
terminal-3 S1 (ifconfig), get the virtual interface and run (tcpdump -i s1-ethx arp)
terminal-4 H1 (ifconfig), get the virtual interface and run (tcpdump -i h1-ethx arp)
terminal-5 H2 (ifconfig), get the virtual interface and run (tcpdump -i h2-ethx arp)

Terminal C0 Terminal S1

Terminal h1 Terminal h2

Example of Terminal-2, Terminal-3, Terminal-4, Terminal-5
Step 3: In terminal-1, display the following command lines:
mininet> nodes
mininet> net
mininet> dump
mininet> h1 ping -c 5 h2
What is the role of controller with ARP packets?

They are usual used to identify the link layer address such as the mac address for packets to be transferred in the network.

In terminal-1, display the following command line:
mininet> h1 ping -c 5 h2
What happen this time? Why?

There is communication among different network components in the network. the packets can flow from one region to another. This is shown thought the replies on the mininet component.

Section 4.4: Using and Configuring Remote Controller
Step 1: The following script reproduce same architecture as before using an external controller: (save as remote_controller.py)
from mininet.cli import CLI
from mininet.net import Mininet
from mininet.node import RemoteController

if’main‘ == name:
net = Mininet(controller=RemoteController)
c0 = net.addController(‘c0’, port=6633)

s1 = net.addSwitch('s1')

h1 = net.addHost('h1')
h2 = net.addHost('h2')

net.addLink(s1, h1)
net.addLink(s1, h2)

net.build()

c0.start()

s1.start([c0])

net.startTerms()
CLI(net)
net.stop()

Step 2: The following script defines the behavior of the controller: (save as simple_switch_13.py, it is also available in Canvas, DO NOT RUN IT)
This script is available in Canvas
Step 3: In terminal-1, run remote_controller.py script. The script open four Linux terminals, run the following command line in the terminals:
terminal-2 C0 (ifconfig), get the virtual interface and run (tcpdump -i s1-ethx arp)
terminal-3 S1 (ifconfig), get the virtual interface and run (tcpdump -i s1-ethx arp)
terminal-4 H1 (ifconfig), get the virtual interface and run (tcpdump -i h1-ethx arp)
terminal-5 H2 (ifconfig), get the virtual interface and run (tcpdump -i h2-ethx arp)
In terminal-1, display the following command lines:
mininet> h1 ping -c 5 h2
 What happen? Why?

There was are reply from the server this shows that the components were communication with each other.

Step 4: Open another terminal-6 run
sudo ovs-vsctl set Bridge s1 protocols=OpenFlow13
Step 5: In terminal terminal-2 Controller run
sudo ryu-manager –ofp-tcp-listen-port 6633 ./simple_switch_13.py
In terminal-1, display the following command lines:
mininet> h1 ping -c 5 h2
What happen? Why?

There is communiction amond different network components as shown above.

Homework Questions:
1.Explain how the traffic generator, like iperf, works?

This are the machines that are used in putting the traffic in the network. They tent to take a single packet in the network then activates the flow packets in the network which will then activate the flow of information in the network
2.Provide another example of traffic generator and how it works.

Another example of the traffic generator is the Solar winds it generates traffics in the network through providing little bandwidth in the network this holds the information flowing in the network thus creating traffic.

3.What is the main difference between configuring UDP and TCP traffic using iperf?

In TCP mode iperf returns the maximum bandwidth available between two hosts, while in UDP mode iperf returns the jitter, packet loss, and bandwidt

4.In your opinion, what are the main advantages and disadvantages of working with Mininet? Provide at least 3 points for each.

It is easy to use.
It small in size is thus portable.
It faster

5.What is the advantage of having a programmable Controller?

It functions can easily be changed though reprogramming
It can be re used.

6.Search for another Controller and provide the description and features.
He umts radio access controller, it consists of various network control access structured that are used in controlling and connect hardware components with the network. it has the following features
It has two logical interfaces.
It has the clock synchronization

References
[1]Iperf Traffic generator. Available at: https://iperf.fr [Last access 15/08/2018]
[2]RYU Controller. Available at: https://osrg.github.io/ryu/ [Last access 15/08/2018] Mininet Network Emulator. Available at: http://mininet.org/overview/