Sunday, August 14, 2016

Deploying html or php Website on Azure (for beginners)

Microsoft Azure is a cloud computing platform and infrastructure introduced by Microsoft for building, deploying, and managing applications and services through a global network of Microsoft-managed data centers.

In this blog, we learnt to create free MS Azure account for students. Now it is time to deploy your html of php website on Azure.

            1-      Go to https://portal.azure.com/
            2-      You will be directed to the following page, sign in using your Microsoft account:




            After you are logged in, you will be directed to your portal:



3-      Go to New => Web + Mobile => Web App



4-      Enter your webApp name, create resource group or use existing and choose your service plan or         use existing service plan. I have already created a web-based hangman game which I am going to       deploy on Azure.

    Resource group is like folder that contains resources to be used by your apps and service plan is         the container for your app. The App Service plan settings will determine the location, features, cost     and compute resources associated with your app.



For this webApp, I am using existing resource group, you can also create your own. Same is the case with Serice plan either use existing or create new. To create new, click “Create new”



 5-      Now enter App service plan name and select your desired location. Click “ok”.


            6-      Click “Create”:






7-      Go to “All Resources“, now you can see your app you just created in the resources.   




 8-      Now you need to add html/ php files of your website. Go to “Deployment source” of your webApp     and click “Configure required settings”:




You will see following options:



9-      You can use any of the above options. In this case I am going to use OneDrive. Select OneDrive          and press “ok”.   

After your OneDrive is synchronized with your webApp, you can see following window in “Deployment Source”:




10-   After synchronization, a folder with your webApp name will be created in the Apps => Azure              Web Apps folder in your OneDrive account.   






11-   Now add your html/php files of your website in that folder.
12-   After adding files, go to “Deployment source” of your webApp and click “sync”.







13-   After synchronization, click the link provided for your webApp.



Hurrah! Here is my webApp.





After deployment you can access your webApp using url provided. Enjoy the services of Azure :)



Thursday, August 11, 2016

Creating free Azure Account for Students By Zumar Noor



Creating free Azure Account for Students

Microsoft offers its variety of products to vast majority and it has always played an important role in promoting education. Microsoft not only serves large organizations and business ventures with its quality products, it also provides learning opportunities to the students all around the world.

Azure is a cloud computing platform and infrastructure introduced by Microsoft for building, deploying, and managing applications and services through a global network of Microsoft-managed data centers. It also offers free access to its services for the students. In this blog we will learn how to create free Azure account for students.

For creating an Azure account you need to have a Microsoft account and a Dreamspark account.

a) For creating Microsoft account:

Go to: https://signup.live.com

Fill all the fields and create an account:



b) After creating Microsoft account now sign up for Dreamspark account.

DreamSpark is a Microsoft Program that supports technical education by providing access to Microsoft software for learning, teaching and research purposes. In order to create dreamspark account:

1- Go to: https://www.dreamspark.com/

2- Click “Students” at the top of the page:






3- Select “Create Account” and you will be directed to Microsoft sign in page if you are not already       signed in:




4- Sign in to your Microsoft account:





  After signing in, you will be directed to the following page:




5- Press “Verify your Student Status” and you will be directed to the following page:




   You can use any of the above options to verify your student status:

i)   If your school is recognised by Microsoft, you can use your student email address provided to you       by you school.

ii)  Use your school network credentials.

iii) Use Dreamspark student verification code.

iv) Use ISIC (International Student Identity Card)

v)  Or upload a photo of school enrollment document.

6- After this, you will receive an email within 24 hours confirming your student status, click the link       given in that email.





7- Now go to https://www.dreamspark.com/Student/ and select “Software Catalog”





8- In software catalog, select “Microsoft Azure for Dreamspark”:





9- You will be directed to the following page, click “Register Now”:





10- Now fill the text fields and Sign up for Azure:





  If you are not already signed in to your Microsoft account, you will be directed to Microsoft sign up   page:



11- Sign in using your Microsoft account and then you will be directed to your Azure portal.





Congratulations! your MS Azure student account is all set. Enjoy its services :)








MININET Report by Zubair Shahzad



    MININET Report
      
Outline·

  •   Introduction
  • · Network Namespaces
  • · Mininet Advantages /Disadvantages
  • · Installing mininet and wireshark
  • · Mininet Commands
  • · Set up a Simple network
  • · Monitoring using Wireshark
  • · Conclusion

Mininet introduction:
Mininet is designed to easily create virtual software-defined networks consisting of an Open Flow controller, a flat Ethernet network of multiple OpenFlow-enabled Ethernet switches, and multiple hosts connected to those switches. It has built-in functions that support different types of controllers and switches. We can also create complex custom scenarios using the Mininet Python API.

Mininet Advantages:
Mininet combines many of the best features of emulators, hardware testbeds, and simulators.

Mininet Disadvantages:
Mininet-based networks cannot (currently) exceed the CPU or bandwidth available on a single server.
Mininet cannot (currently) run non-Linux-compatible OpenFlow switches or applications; this has not been a major issue in practice.


Installation:
OPERATING SYSTEM: UBUNTU
Terminal commands to install the mininet:
· sudo apt-get update
· sudo apt-get install
· sudo apt-get install mininet

Installing Wireshark:
Terminal commands to install the wireshark :
· $ Sudo apt-add-repository ppa: pi-rho/security
· $ sudo apt-get update
· $ sudo apt-get install wireshark

Set up a simple network

Mininet Commands:
Mininet can be started with options that specify the network topology to be created. To see all available options run the Mininet command mn with the -h option to see the help menu. Nodes   will show  nodes in network. Ping  commands is use to pingthe node in the network. PingAll  is  used  to ping  whole  network. And Sudo mn – c  command is use to clean  the minnet.
$ sudo mn –hmininet>h1 ping h2 mininet > nodes
mininet > pingallmininet>iperfimportant command:$sudo mn -c

Mininet must be run as root so we must use the sudo command to run Mininet.
The Mininet network topology can be specified using the –topo option. If started without
any topology options, Mininet will create the minimal built-in topology, which consists of two virtual machines connected
to an Openflow switch, which is managed by an Openflow controller. In our case,
we will create a topology that consists of four virtual machines connected to
an OpenFlow switch, which is connected to an OpenFlow controller.
The default topology is:
Ø $sudo mn















This is diagram of network that is created by command $sudo mn:








To create a network topology with four virtual machines connected to a switch, enter the command:
$ sudo mn --topo=single,4 
In this scenario, we did not specify the type of controller so we are using Mininet’s default controller, ovs-controller, which implements the functionality of a basic layer-2 MAC-learning switch. The controller learns the MAC addresses of the hosts connected to the network and programs the switch’s flow tables to set up connections between hosts that are sending packets to each other.
You will see the following output as Mininet creates the simulated network topology:
*** Creating network *** Adding controller *** Adding hosts: h1 h2 h3 h4 *** Adding switches: s1 *** Adding links: (h1, s1) (h2, s1) (h3, s1) (h4, s1) *** Configuring hosts h1 h2 h3 h4 *** Running terms on localhost:10.0 *** Starting controller *** Starting 1 switches s1 *** Starting CLI: mininet> 
Note:
The mininet> prompt shows Mininet is started and we are using the Mininet command-line interface.



Start Wireshark
To monitor the communications between the controller and any switches in the simulated network, we start Wireshark and capture traffic on the Mininet VM’s loopback interface. Wireshark must be started with superuser privileges so on the Mininet VM terminal, enter the command:
$ sudo wireshark &
Because Mininet creates the controller and the switch as processes running in the root namespace, they exchange communications using the Mininet VM’s loopback interface. So, we set Wireshark to capture packets on the Mininet VM’s loopback interface, lo.
In the Wireshark program, click on the menu commands:
Capture --> Interfaces
Then select the lo (loopback) interface and press the Start button.

Configure Wireshark to capture packets on the Mininet VM’s loopback interface
  
Since many processes are passing information through the loopback interface, filter on the OpenFlow messages by entering the following expression into the Wireshark filter box and clickApply:
of
Now we see the Wireshark window open and monitoring for OpenFlow messages between the controller and the switch.

Testing the simulation
Now the network is set up. We expect that each virtual machine will be able to communicate with any other virtual machine on the same switch. Mininet provides a built-in command to check the communication between all hosts in the network. Use the Mininet pingall command, which will run the ping command on each host and ping every other host, then report the results in the Mininet command line interface:
mininet> pingall *** Ping: testing ping reachability h1 -> h2 h3 h4 h2 -> h1 h3 h4 h3 -> h1 h2 h4 h4 -> h1 h2 h3 *** Results: 0% dropped (12/12 received)
We also see openFlow messages appear in the Wireshark window, showing how the controller and the switch communicate to determine how to pass the ICMP (ping) packets through the switch to their destinations.


OpenFlow packets captured by Wireshark


·      $ sudo mn - -topo=linear,4


   



·      $ sudo mn - -topo=tree,2,2






It’s like:

Simulating a large network

Mininet supports a number of built-in network topologies that can be set up using the –topo option when starting Mininet. Let’s see how Mininet supports a larger network simulation. In this case, we will create a tree topology, where we can specify the depth of the tree and the fanout of the tree, where fanout is the number of “downstream” links on each virtual switch. After the last row of switches in the tree is created, Mininet creates a host on each “downstream” link on the last row of switches.

Using the tree topology, it is possible to specify a large network. For example, a tree topology with a depth of 3 and a fanout of 4 would create 21 switches and 64 hosts (and one controller).


I ran the following command:


$ sudo mn --topo tree,depth=3,fanout=4 

The Mininet network simulator started all the virtual switches and virtual hosts quickly. I was able to run commands on the virtual hosts and I noticed no issues with responsiveness.

Conclusion
Mininet is a unique open-source network simulator that is developed to support reseatch and education in Software Defined Networking. I found the Mininet command-line interface to be very easy to use. Because Mininet uses network namespaces as its virtualization technology, it can support a large number of virtual nodes without slowing down the simulation.
Mininet also has excellent documentation and a very active community of users on the Mininet mailing list.
As a simulator for Software Defined Networking, Mininet seems to work well. However, Mininet — as it is provided by the Mininet project without modification — will not simulate a “traditional” IP network composed of hosts, switches, and routers.
Mininet seems to be most suitable to researchers who will implement new controller software and test it using Mininet. I think that a user of Mininet would find it most useful if they were experienced with the Python scripting language and so were able to utilize Mininet’s Python API and also inspect the Mininet source code (which is written in Python).