Professional Documents
Culture Documents
Experiment 9
Experiment 9
TCP/UDP:
Point-to-Point Protocol- (PPP) is a data link layer (layer 2) communication protocol
between two routers directly without any host or any other networking in between.
It can provide loop connection authentication, transmission encryption, and data
compression.
PPP is used over many types of physical networks, including serial cable, phone line,
trunk line, cellular telephone, specialized radio links, ISDN, and fiber optic links such
as SONET. Since IP packets cannot be transmitted over a modem line on their own
without some data link protocol that can identify where the transmitted frame
starts and where it ends, Internet service providers (ISPs) have used PPP for
customer dial-up access to the Internet.
Date: - / /2023
Roll No.: - B-644
Experiment - 08
Aim: To develop an android application that creates an alert upon receiving a message.
Software:
• Android Studio
Android Studio is the official Integrated Development Environment (IDE) for Android
app development. It is purpose-built for Android to accelerate your development and help
you build the highest-quality apps for every Android device. Android Studio is based on
the powerful code editor and developer tools from IntelliJ IDEA. It offers even more
features that enhance your productivity when building Android apps, such as a flexible
Gradle- based build system. Android Studio is available for download on Windows,
macOS and Linux based operating systems.
The Android SDK stands for Android Software Development Kit, which is developed by
Google for the Android Platform. The SDK Starter Package is a part of the Android SDK
that includes only the core SDK Tools, which you can use to download the rest of the
SDK packages (such as the latest Android platform).
• Gradle
JDK 5 stands for Java Development Kit 5. It is a development environment for building
applications, applets, and components using the Java programming language. It is
supported on Microsoft Windows running Intel IA32, 100% compatible processors, and
AMD Opteron 32.
Program:
Department of Computer Engineering
?
1<?xml version="1.0" encoding="utf-8"?>
2<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:layout_margin="10dp"
6 android:orientation="vertical">
7
8 <TextView
9 android:layout_width="wrap_content"
10 android:layout_height="wrap_content"
11 android:text="Message"
12 android:textSize="30sp" />
13
14 <EditText
15 android:id="@+id/editText"
16 android:layout_width="match_parent"
17 android:layout_height="wrap_content"
18 android:singleLine="true"
19 android:textSize="30sp" />
20
21 <Button
22 android:id="@+id/button"
23 android:layout_width="wrap_content"
24 android:layout_height="wrap_content"
25 android:layout_margin="30dp"
26 android:layout_gravity="center"
27 android:text="Notify"
28 android:textSize="30sp"/>
29</LinearLayout>
30
Code for MainActivity.java:
?
package com.example.exno10;
android.app.PendingIntent; import
android.content.Intent; import
android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View; import
android.widget.Button; import
android.widget.EditText;
notify.setOnClickListener(new View.OnClickListener()
{ @Override
public void onClick(View v)
{
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
PendingIntent pending = PendingIntent.getActivity(MainActivity.this, 0,
intent,
0); Notification noti = new
Notification.Builder(MainActivity.this).setContentTitle("New
Message").setContentText(e.getText().toString()).setSmallIcon(R.mipmap.ic_launcher).s
etContentIntent(pending).build();
NotificationManager manager = (NotificationManager)
getSystemService(NOTIFICATION_SERVICE);
noti.flags |= Notification.FLAG_AUTO_CANCEL;
manager.notify(0, noti);
}
});
}
Department of Computer Engineering
Output:
Department of Computer Engineering
Experiment – 10
Roll no: B644
Aim: To study security tools like Kismet and Netstumbler.
Theory:
Kismet
Netstumbler
Kismet:
although, aside from external drones (see below), there's only one supported
wireless hardware available as a packet source.
Distributed under the GNU General Public License, Kismet is free software.
Features of Kismet:
Usage:
Kismet is used in a number of commercial and open-source projects. It is
distributed with Kali Linux. It is used for wireless reconnaissance and can be
used with other packages for an inexpensive wireless intrusion detection
system. It has been used in a number of peer-reviewed studies such as
"Detecting Rogue Access Points using Kismet".
Department of Computer Engineering
Netstumbler:
NetStumbler (also known as Network Stumbler) was a tool for Windows that
facilitates the detection of Wireless LANs using the 802.11b, 802.11a, and
802.11g WLAN standards. It runs on Microsoft Windows operating systems
from Windows 2000 to Windows XP. A trimmed-down version called
MiniStumbler is available for the handheld Windows CE operating system.
Netstumbler has become one of the most popular programs for wardriving
and wireless reconnaissance, although it has a disadvantage. It can be
Department of Computer Engineering
Visuals of Netstumler:
Department of Computer Engineering
Aim: To study and implement J2ME Program for scrolling text using Java.
Theory:
Output:
Conclusion: Thus, I have implemented J2ME Program for scrolling text using
Java.
Roll No: B644
Date: 01/03/2023
EXPERIMENT NO. 5
3) GSM was developed using digital technology. It has an ability to carry 64 kbps to 120
Mbps of data rates. Presently GSM supports more than one billion mobile subscribers in
more than 210 countries throughout the world. GSM provides basic to advanced voice and
data services including roaming service. Roaming is the ability to use your GSM phone
number in another GSM network.
3) The mobile station (MS) signs into the network. The access control (AC) generates a
random number RAND as challenge, and the SIM within the MS answers with the SRES
(Signed Response) as the response.
4) The AuC (Authentication Centre) generates the random values of RAND, the signal
response SRES and the cipher key Kc. This information is forwarded to the HLR (Home
Location Register). The VLR (Visitor Location Register) requests the values of RAND,
SRES and Kc from the HLR.
5) The VLR sends the RAND value generated to the SIM. On both sides, the network and
the subscriber module, same operation is performed between the 128 bit RAND and 128
bit Ki, called A3. SRES of 32 bit is generated on both the sides. MS sends the SRES
generated by the SIM to the VLR. Now VLR can compare both the SRES generated. If
both are same, the user or the subscriber is authenticated, otherwise rejected.
Code:
#Implementation of A3 Authentication Algorithm used in GSM
import random k=random.getrandbits(128)
m=random.getrandbits(128) kb=bin(k)[2:] mb=bin(m)[2:]
kbl=kb[0:64] kbr=kb[64:] mbl=mb[0:64] mbr=mb[64:]
a1=int(kbl,2)^int(mbr,2) a2=int(kbr,2)^int(mbl,2) a3=a1^a2
a4=bin(a3)[2:].zfill(64) a5=a4[0:32] a6=a4[32:]
a7=int(a5,2)^int(a6,2) print("128 Bit Key =" ,kb) print("128
Random Genrated =" ,mb) print("RES/SRES= ",bin(a7)
[2:].zfill(len(a5)))
OUTPUT:
Assignment No 2
Q. 1 Comparative study of different hosted and bare metal hypervisor with
suitable parameters along with their use in public and private cloud
platform
Answer:
Hypervisors are an essential component of cloud computing, allowing multiple virtual
machines to run on a single physical machine. A hypervisor, also known as a virtual machine
monitor or VMM, is software that creates and runs virtual machines (VMs).
A hypervisor is a form of virtualization software used in Cloud hosting to divide and allocate
the resources on various pieces of hardware. The program which provides partitioning,
isolation, or abstraction is called a virtualization hypervisor. The hypervisor is a hardware
virtualization technique that allows multiple guest operating systems (OS) to run on a single
host system at the same time. A hypervisor is sometimes also called a virtual machine
manager (VMM). A hypervisor allows one host computer to support multiple guest VMs by
virtually sharing its resources, such as memory and processing.
The physical hardware, when used as a hypervisor, is called the host, while the many VMs
that use its resources are guests. The hypervisor treats resource like CPU, memory, and
storage as a pool that can be easily reallocated between existing guests or to new virtual
machines.
Department of Computer Engineering
All hypervisors need some operating system-level components such as a memory manager,
process scheduler, input/output (I/O) stack, device drivers, security manager, a network stack,
and more to run VMs.
Benefits of Hypervisor:
• Speed: It allows the immediate creation of virtual machines, unlike the bare metal
servers. This makes it easier to configure resources according to the needs of dynamic
workloads.
• Efficiency: It runs multiple virtual machines on the resources of one physical machine
can also make more effective use of one physical server. Running multiple virtual
machines on the same physical machine is more cost-effective than running multiple
underutilized physical machines on the same task.
• Flexibility: The bare metal hypervisor allows the operating system and its related
applications to run on various hardware types. Because the hypervisor separates the
operating system from the basic hardware, the software no longer depends on specific
hardware devices or drivers.
• Portability: It allows multiple operating systems to reside on the same physical server
(host machine). Because the virtual machines that run are independent of the physical
machine, they are portable. IT teams can shift workloads and allocate networking,
memory, storage and processing resources across multiple servers as needed, moving
from machine to machine or platform to platform. When an application needs more
processing power, the virtualization software allows it to seamlessly access additional
machines.
In this comparative study, we will examine several hosted and bare metal hypervisors on the
basis of few parameters, along with their use in public and private cloud platforms.
Parameters used to compare hypervisors are as follow:
1. Performance: This parameter measures the hypervisor's ability to run virtual machines
efficiently and without impacting the host machine's performance.
2. Scalability: This parameter measures the hypervisor's ability to support a large number
of virtual machines on a single physical host.
3. Reliability: This parameter measures the hypervisor's ability to maintain uptime and
prevent data loss in the event of hardware failure.
Department of Computer Engineering
Bare-metal Hypervisor:
The hypervisor runs directly on the underlying host system. It is also known as a “Native
Hypervisor” or “Bare metal hypervisor”. It does not require any base server operating system.
It has direct access to hardware resources.
1. VMware ESXi:
This hypervisor is a leading choice for enterprise data centers. It provides a high-performance
virtualization platform that can support hundreds of virtual machines on a single physical
host. It also provides advanced features like vMotion, High Availability, and Distributed
Resource Scheduler (DRS).
• Performance: VMware ESXi is known for its excellent performance, with low
overhead and efficient resource utilization.
Department of Computer Engineering
• Scalability: VMware ESXi can scale up to 480 virtual CPUs and 12 TB of RAM,
making it suitable for large workloads.
• Reliability: VMware ESXi is generally reliable and provides advanced features like
high availability and fault tolerance.
• Management: VMware ESXi provides a user-friendly interface for managing virtual
machines and supports advanced features like virtual networking and storage
management.
2. Microsoft Hyper-V:
This hypervisor is included with Windows Server and provides a scalable and reliable
virtualization platform. It supports a wide range of guest operating systems and provides
advanced features like live migration, storage migration, and virtual machine replication.
• Performance: Microsoft Hyper-V is known for its good performance, with efficient
resource utilization and low overhead.
• Scalability: Microsoft Hyper-V can scale up to 240 virtual CPUs and 12 TB of RAM,
making it suitable for large workloads.
• Reliability: Microsoft Hyper-V is generally reliable and provides advanced features
like live migration and storage migration.
• Management: Microsoft Hyper-V provides a user-friendly interface for managing
virtual machines and supports advanced features like virtual networking and storage
management.
Overall, bare-metal hypervisors are suitable for large workloads and are commonly used in
production environments. When it comes to performance, scalability, reliability, and
management, each hypervisor has its strengths and weaknesses, so it's important to evaluate
them based on your specific needs and requirements.
Department of Computer Engineering
Hosted Hypervisors:
Hosted hypervisors, also known as type 2 hypervisors, run on top of a host operating system.
The host OS provides device drivers and other low-level functionality, while the hypervisor
sits on top and manages the virtual machines.
1. Oracle VirtualBox:
This hypervisor is a free, open-source, cross-platform tool that can run on Windows, Linux, and
macOS. It supports a wide range of guest operating systems and provides a user-friendly
interface for managing virtual machines.
• Performance: Oracle VirtualBox is known for its good performance, with efficient
resource utilization and low overhead.
• Scalability: VirtualBox can scale up to 32 virtual CPUs and 1 TB of RAM, making it
suitable for medium-sized workloads.
• Reliability: VirtualBox is generally reliable, but some users have reported occasional
crashes and stability issues.
• Management: VirtualBox provides a user-friendly interface for managing virtual
machines and supports advanced features like snapshots and cloning.
Department of Computer Engineering
2. VMware Workstation:
This hypervisor is a popular tool for developers and testers who need to create and test
applications in different environments. It supports a wide range of guest operating systems
and provides advanced features like snapshots, cloning, and linked clones.
• Performance: VMware Workstation is known for its excellent performance, with low
overhead and efficient resource utilization.
• Scalability: VMware Workstation can scale up to 16 virtual CPUs and 64 GB of
RAM, making it suitable for medium-sized workloads.
• Reliability: VMware Workstation is generally reliable and provides advanced features
like snapshots, cloning, and linked clones.
• Management: VMware Workstation provides a user-friendly interface for managing
virtual machines and supports advanced features like virtual networking and virtual
machine sharing.
3. Parallels Desktop:
This hypervisor is designed for macOS users who want to run Windows or Linux virtual
machines on their Macs. It provides seamless integration with the Mac OS and allows users to
run Windows applications side-by-side with Mac applications.
• Performance: Parallels Desktop is known for its good performance, with efficient
resource utilization and low overhead.
• Scalability: Parallels Desktop can scale up to 32 virtual CPUs and 128 GB of RAM,
making it suitable for medium-sized workloads.
• Reliability: Parallels Desktop is generally reliable and provides seamless integration
with the host operating system.
• Management: Parallels Desktop provides a user-friendly interface for managing
virtual machines and supports advanced features like virtual machine sharing and
virtual networking.
• Performance: QEMU provides good performance for emulation and virtualization, but
it may not be as fast as other hypervisors like VirtualBox or VMware.
• Scalability: QEMU can handle a large number of VMs, making it suitable for
enterprise- level deployments.
• Reliability: QEMU is known to be stable and reliable, with a good track record of
supporting various OSs.
• Management: QEMU offers a command-line interface (CLI) for managing VMs, as
well as APIs for integration with automation and orchestration tools.
Department of Computer Engineering
Hosted hypervisors are generally suitable for small to medium-sized workloads and are
popular in development and testing environments. When it comes to performance, scalability,
reliability, and management, each hypervisor has its strengths and weaknesses, so it's
important to evaluate them based on your specific needs and requirements.
KVM:
KVM (Kernel-based Virtual Machine) is an open-source bare-metal hypervisor that is widely
used in production environments in both public and private clouds. KVM is built into Linux
as an added functionality that makes it possible to convert the Linux kernel into a hypervisor.
It is sometimes confused with a type 2 hypervisor. However, it has direct access to hardware
along with virtual machines it hosts.
• Performance: KVM is known for its excellent performance, particularly when running
workloads that require high levels of compute and memory resources. Because KVM
is integrated into the Linux kernel, it is able to leverage the full power of the host
system's hardware.
• Scalability: KVM is highly scalable, allowing cloud administrators to easily add new
hosts and scale up or down the number of VMs as needed. KVM also supports live
migration, which enables administrators to move running VMs between hosts without
any downtime or disruption to users.
Department of Computer Engineering
• Reliability: KVM is known for its reliability, with a proven track record of supporting
mission-critical workloads in production environments. KVM includes built-in fault
tolerance features, such as memory overcommitment and resource allocation policies,
which help ensure that VMs remain stable and available even in the event of hardware
failures or spikes in workload demand.
• Management: KVM can be managed using a variety of tools, including graphical user
interfaces (GUIs), command-line interfaces (CLIs), and APIs. KVM is also
compatible with a wide range of management tools and platforms, including
OpenStack, Red Hat Virtualization, and oVirt.