Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CAN201

Introduction to Networking

Networking Project

This part of the networking project aims to use Mininet to create a simple SDN network topology and emulate a traffic control function through using the SDN flow entry.Assuming that the client side only knows the service running on server 1 and communicates with server 1(without knowing the existence of the service on server 2).However,the SDN controller can manipulate(forward/redirect)the traffic without the awareness of the client.The detailed project tasks are specified as follows.For Part II,the client side program and server side program will be given.

Figure 1.A simple SDN network topology

Task 1

Use Mininet Python library to create a Python file to build a simple SDN network topology as Fig.1

shows.Note that Client uses IP address 10.0.1.5/24,Server1 uses IP address 10.0.1.2/24,and Server2

uses 10.0.1.3/24.Also,Client,Server1 and Server2 need to use the MAC address as Fig.1 presents.

Task 2

Program and run an SDN controller application using Ryu framework(see Task 4.1 and Task 5.1)and make sure every node(i.e.,Client,Server1 and Server2)are reachable with each other.In other words,they can‘ping’with each other.Notice that any flow entry(excluding the table-miss flow entry)should set an idle timeout of 5 seconds.

Task 3

Apply the given socket client program(client.py)and the given socket server program(server.py)to this SDN network topology.Specifically,run server.py on both Server1 and Server2,and run client.py on Client.With that,use the socket client side on Client to send traffic to the socket server side on Server1.Notice that wait 5 seconds after ping(the idle timeout mentioned in Task 2)and then start run the client.py,which is to make sure that the flow entry caused by ICMP ping packets has been removed.

Task 4

4.1.Program an SDN controller application that is able to create a flow entry after receiving the first(TCP SYN segment caused)Packet_In SDN packet(from the SDN switch to the SDN controller),then install the flow entry to the SDN switch,and then send out the Packet_Out SDN packet that contains the TCP SYN segment,whereby all the following traffic sent from Client to Server1 is forwarded to Server1.

4.2.With task 4.1,use Wireshark/Tcpdump on Client to capture the packets and then calculate the networking latency(from the first SYN segment till the last ACK segment indicating the TCP 3-way handshake is done).

Task 5

5.1.Program an SDN controller application that is able to create a flow entry after receiving the first(TCP SYN segment caused)Packet_In SDN packet(from the SDN switch to the SDN controller),then install the flow entry to the SDN switch,and then send out the Packet_Out SDN packet that contains the TCP SYN segment,whereby all the following traffic sent from Client to Server1 is redirected to Server2.

5.2.With task 5.1,use Wireshark/Tcpdump on Client to capture the packets and then calculate the networking latency(from the first SYN segment till the last ACK segment indicating the TCP 3-way handshake is done).

Submission:

Codes:

.>=Python 3.6;

.The whole implementation includes multiple Python scripts as follows:

1)Network topology Python file(which is used to create the SDN network topology for completing Task 1).Please name it“networkTopo.py”.

2)The Ryu SDN controller Python program(for performing Task 2 and Task 4.1).Please name it“ryu_forward.py”.

3)The Ryu SDN controller Python program(for performing Task 2 and Task 5.1).Please name it“ryu_redirect.py”.

Allowed Python modules:

os,sys,shutil,socket,struct,hashlib,math,tqdm,numpy,threading,multiprocessing,gzip,zlib,zipfile, time,mininet,ryu.

Codes(50%)

Program testing steps:

1Forwarding case:

1.1 Run the networkTopo.py to create the SDN network topology.Check Client,Server1,and

Server2 use the correct IP addresses and MAC addresses.

1.2.Run ryu_forward.py on Controller,and use Client to ping Server1’s IP address and

Server2’s IP address.

1.3.Run server.py on both Server1 and Server2,and also run client.py on Client after the

previous ICMP ping incurred flow entry’s idle timeout(i.e.,5 seconds).

a.Show the flow table on Switch.

b.Show Server1 receives the traffic sent from Client.

2Redirection case:

2.1 Run the networkTopo.py to create the SDN network topology.Check Client,Server1,and

Server2 use the correct IP addresses MAC addresses.

2.2.Run ryu_redirect.py on Controller,and use Client to ping Server1’s IP address and

Server2’s IP address.

2.3.Run server.py on both Server1 and Server2,and also run client.py on Client after the

previous ICMP ping incurred flow entry’s idle timeout(i.e.,5 seconds).

c.Show the flow table on Switch.

d.Show Server2 receives the traffic sent from Client.

Marking scheme:

1.Step 1.1 and 2.1(10%)

-Complete topology with correct IP addresses:10%

-

Incomplete topology or incorrect IP addresses:3%-9%(3 MAC and 3 IP addresses,1 for host names)

-No networkTopo.py or not executable networkTopo.py:0%-2%

Note:if no networkTopo.py or the networkTopo.py is not executable,the marking stops here.

2.Step 1.2(5%)

-The program ryu_forward.py can work and Client can ping Server1 and Server2:5%

-If ryu_forward.py can work but Client cannot ping Server1 or Server2:3%-4%

-If no ryu_forward.py or ryu_forward.py is not executable:0%-1%

Note:if no ryu_forward.py or ryu_forward.py is not executable,no marking for Step 1.3.

3.Step 1.3(10%)

-The flow entry can be shown correctly and Server1 can receive traffic:10%

-The flow entry cannot be shown correctly or Server1 cannot receive traffic:5%

-Neither the above:0%

4.Step 2.2(10%)

-The program ryu_redirect.py can work and Client can ping Server1 and Server2:10%

-If ryu_redirect.py can work but Client cannot ping Server1 or Server2:6%-8%

-If no ryu_redirect.py or ryu_redirect.py is not executable:0%-3%

Note:if no ryu_redirect.py or ryu_redirect.py is not executable,no marking for Step 2.3.

5.Step 2.3(15%)

-The flow entry can be shown correctly and Server2 can receive traffic:15%

-The flow entry cannot be shown correctly or Server2 cannot receive traffic:7%

-Neither the above:0%