Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Ludhiana
IT Methodologies Lab
Submitted By :
Submitted To: Aakash Raj
RANJODH KAUR 1507884/156096
Assistant Professor Group-D2 IT A1
Semester:-3
IT Methodologies Lab 1507884
1
IT Methodologies Lab 1507884
and is really a dedicated and continuously connected path for its duration. Today, an ordinary
voice phone call generally uses circuit-switching.
Most data today is sent, using digital signals, over networks that use packet-switching. Using
packet-switching, all network users can share the same paths at the same time and the particular
route a data unit travels can be varied as conditions change. In packet-switching, a message is
divided into packets, which are units of a certain number of bytes. The network addresses of the
sender and of the destination are added to the packet. Each network point looks at the packet
to see where to send it next. Packets in the same message may travel different routes and may
not arrive in the same order that they were sent. At the destination, the packets in a message are
collected and reassembled into the original message.
HUB
In general, a hub is the central part of a wheel where the spokes come together. The term is familiar
to frequent fliers who travel through airport hubs to make connecting flights from one point to
another. In data communications, a hub is a place of convergence where data arrives from one or
more directions and is forwarded out in one or more other directions. A hub usually includes a
switch of some kind. (And a product that is called a switch could usually be considered a hub
as well.) The distinction seems to be that the hub is the place where data comes together and
the switch is what determines how and where data is forwarded from the place where data comes
together. Regarded in its switching aspects, a hub can also include a router.
In describing network topologies, a hub topology consists of a backbone (main circuit) to which a
number of outgoing lines can be attached (dropped), each providing one or more connection port
for device to attach to. For Internet users not connected to a local area network, this is the general
topology used by your access provider. Other common network topologies are the bus network and
the ring network. (Either of these could possibly feed into a hub network, using a bridge.)
As a network product, a hub may include a group of modem cards for dial-in users, a gateway
card for connections to a local area network (for example, an Ethernet or a token ring), and a
connection to a line (the main line in this example).
2
IT Methodologies Lab 1507884
Routers
In packet-switched networks such as the Internet, a router is a device or, in some cases, software in
a computer, that determines the next network point to which a packet should be forwarded toward
its destination.
A router is a device that forwards data packets along networks. A router is connected to at least
two networks, commonly two LANs or WANs or a LAN and its ISPs network. Routers are located
at gateways, the places where two or more networks connect.
Routers use headers and forwarding tables to determine the best path for forwarding the packets,
and they use protocols such as ICMP to communicate with each other and configure the best route
between any two hosts.
3
IT Methodologies Lab 1507884
Bridges
In telecommunication networks, a bridge is a product that connects a local area network (LAN)
to another local area network that uses the same protocol (for example, Ethernet or token ring).
You can envision a bridge as being a device that decides whether a message from you to someone
else is going to the local area network in your building or to someone on the local area network in
the building across the street. A bridge examines each message on a LAN, passing those known
to be within the same LAN, and forwarding those known to be on the other interconnected LAN
(or LANs).
4
IT Methodologies Lab 1507884
First and foremost, attach the RJ-45 connector to the Ethernet network port on
your PC.
5
IT Methodologies Lab 1507884
Right click on ?My Network Places? icons located on the desktop and in the popup
menu click on properties. You can also find it through the My Computer window.
Alternatively, click ?Start? from the taskbar and right click on ?My Network Places?
option from the popup menu. In the menu that appears select ?Properties? In the
new Window that appears, under the LAN or High-Speed internet, right on ?Local
Area Connection? and select properties in the popup menu that appears.
6
IT Methodologies Lab 1507884
In the local area connection dialog box that appears under the connection box, scroll
down and select ?Internet Protocol (TCP/IP) and click on ?Properties.
Step 5 To obtain the settings automatically, select ?Obtain an IP Address Automatically?. How-
ever, to use this option, you will need to have a DHCP server that will function in allocating and
managing IP address to ensure that there are no conflicts. To configure your PC to the network
manually, follow the procedures listed below:
Click the option ?Use the following IP Address?. Enter the IP address to use. It is important that
you consult your network administrator on the IP to use so as to avoid conflicts occurring in the
network, i.e. a situation where two PCs have similar IP addresses. Thereafter, enter the Subnet
Mask and Default gateway. The subnet mask is used to identify the network level you are in while
the default gateway identifies the router connection
7
IT Methodologies Lab 1507884
Thereafter, enter the Preferred DNS server and Alternate DNS server address
Check the option ?Show icon in notification area when connected? and click ?OK?. This will
enable you to know if the local area connection is connected or disconnected.
8
IT Methodologies Lab 1507884
2 Open the Advanced category. It is on the right end of the category list. Click on the Network
tab.
3 Click the Settings button. This will open the Connection Settings window.
4 Choose ?Manual proxy configuration?. This will allow you to enter information in the fields
below
9
IT Methodologies Lab 1507884
Enter your proxy information. Enter the proxy server that you are connecting to in the ?HTTP
Proxy? field. If you need to enter a specific port, enter it into the ?Port? field.
Then press ok button
10
IT Methodologies Lab 1507884
Ping The ping command sends ICMP echo request packets to a destination. For example, you
could run ping google.com or ping 173.194.33.174 to ping a domain name or IP address.
These packets ask the remote destination to reply. If the remote destination is configured to reply,
it will respond with packets of its own. You?ll be able to see how long the round-trip time is
between your computer and the destination. You?ll see a ?request timed out? message if packet
loss is occurring, and you?ll see an error message if your computer can?t communicate with the
remote host at all.
This tool can help you troubleshoot Internet connection problems, but bear in mind that many
servers and devices are configured not to reply to pings.
11
IT Methodologies Lab 1507884
Ipconfig
The ipconfig command is used on Windows, while the ifconfig command is used on Linux, Mac OS
X, and other Unix-like operating systems. These commands allow you to configure your network
interfaces and view information about them.
For example, you can use the ipconfig /all command on Windows to view all your configured
network interfaces, their IP addresses, DNS servers, and other information. Or, you can use the
ipconfig /flushdns command to flush your DNS cache, forcing Windows to get new addresses from
its DNS servers every time you contact a new hostname. Other commands can force your computer
to release its IP address and get a new one from its DHCP server. This utility can quickly display
your computer?s IP address or help you troubleshoot problems.
ARP
The ARP utility helps diagnose problems associated with the Address Resolution Protocol (ARP).
TCP/IP hosts use ARP to determine the physical (MAC) address that corresponds with a specific
IP address. Type arp with the ? a option to display IP addresses that have been resolved to MAC
addresses recently.
Traceroute
The traceroute, tracert, or tracepath command is similar to ping, but provides information about
the path a packet takes. traceroute sends packets to a destination, asking each Internet router
along the way to reply when it passes on the packet. This will show you the path packets take
12
IT Methodologies Lab 1507884
13
IT Methodologies Lab 1507884
MTR
MTR is a powerful network diagnostic tool that enables administrators to diagnose and isolate
networking errors and provide helpful reports of network status to upstream providers. MTR
represents an evolution of the traceroute command by providing a greater data sample, as if aug-
menting traceroute with ping output. This document provides an in depth overview of MTR, the
data it generates, and how to properly interpret and draw conclusions based on the data provided
by it.
For a basic overview of network diagnostic techniques consider our introduction to network diag-
nostics. If you suspect that you?re having some other issue with your system, you may consider
our overview of general system diagnostics. As a matter of course, it is assumed that all Linode
deployments will have completed our getting started guide prior to beginning with this document.
Tcpdump
The tcpdump program was developed at the Lawrence Berkeley Laboratory at the University of
California, Berkeley, by Van Jacobson, Craig Leres, and Steven McCanne. It was originally devel-
oped to analyze TCP/IP performance problems. A number of features have been added over time
although some options may not be available with every implementation. The program has been
ported to a wide variety of systems and comes preinstalled on many systems.
For a variety of reasons, tcpdump is an ideal tool to begin with. It is freely available, runs on many
Unix platforms, and has even been ported to Microsoft Windows. Features of its syntax and its file
format have been used or supported by a large number of subsequent programs. In particular, its
capture software, libpcap, is frequently used by other capture programs. Even when proprietary
programs with additional features exist, the universality of tcpdump makes it a compelling choice.
If you work with a wide variety of platforms, being able to use the same program on all or most
of the platforms can easily outweigh small advantages proprietary programs might have. This is
particularly true if you use the programs on an irregular basis or dont otherwise have time to fully
master them. It is better to know a single program well than several programs superficially. In
such situations, special features of other programs will likely go unused.
Since tcpdump is text based, it is easy to run remotely using a Telnet connection. Its biggest
disadvantage is a lack of analysis, but you can easily capture traffic, move it to your local machine,
and analyze it with a tool like ethereal. Typically, I use tcpdump in text-only environments or
on remote computers. I use ethereal in a Microsoft Windows or X Window environment and to
analyze tcpdump files.
windump
Windows ports of the most powerful and widely used Unix command-line tools actually are fairly
common. Ive used various Windows versions of the search tool grep, for instance. Among the most
useful is tcpdump, a tool for capturing and reporting packet headers in network traffic for further
analysis. The folks at Cace Technologies have compiled a Windows port of the program named
WinDump, with just about the entire feature set of its Unix-based brethren. The full source code
for the program is also included, in the event that you want to compile a custom version.
Dumping network traffic has many possible applications. Ive used it to determine if malware was
installed in a given machine by seeing if packets were being broadcast from the computer when
there should not have been anything else running (it could also divine their header information
and destination). Aside from logging all available traffic, the program can capture and report only
the packets that have certain matching information in their headers useful if you already know
what youre looking for and just want to cut to the chase.
installation and basic use
WinDump comes in two parts. The first is a set of network capture drivers called WinPcap, which
14
IT Methodologies Lab 1507884
WinDump uses to obtain packet-level access to network interfaces in the computer. The second
part is the program itself, windump, which is invoked from the command line after youve installed
the WinPcap library.
The first option youll want to use when you run windump is -D, which lists all available network
interfaces in the current system. By default, the program listens on the first available interface,
but in Windows, it is typically the software dial-up adapter, not a physical network adapter. The
results from -D usually look something like this
Nslookup
If you are running a DNS server on your Windows NT or Windows 2000 network, you know that
various problems can arise and cause the system to go haywire. When that happens, you dig into
your arsenal of troubleshooting tools and go to work. If you are running Windows NT, chances
are you head to the DNS Manager, since it is the primary tool for managing Windows NT DNS
name servers. If you are running Windows 2000, you typically head to the DNS Console, since it
is the primary tool for administering Windows 2000 DNS name servers.
However, regardless of which operating system you are running, there is another DNS troubleshoot-
ing tool that is often overlooked, yet incredibly handy?the Nslookup utility. This clever little
service, which can run from the client (either Windows NT Workstation or Windows 2000 Profes-
sional) in addition to the server platform, is a DOS-based program designed to display information
from a DNS name server that can help you set your sights on DNS-related problems.
In this Daily Drill Down, I will introduce you to the Nslookup utility and explain how the utility
works. I will also pass on some basic DNS name server troubleshooting techniques that you can
perform with the Nslookup utility.
Like many of the other TCP/IP utilities that come with Windows NT/2000, you run the Nslookup
utility from a command prompt. Unlike the other TCP/IP utilities that come with Windows
NT/2000, the Nslookup utility has two modes of operation: interactive and noninteractive. The
mode you will use depends on how much information you want the Nslookup utility to return.
Netstat
netstat stands for network statistics. This command displays incoming and outgoing network con-
nections as well as other network information. It?s available on Windows, Mac, and Linux ? each
version has its own command-line options you can tweak to see different types of information.
netstat stands for network statistics. This command displays incoming and outgoing network con-
nections as well as other network information. It?s available on Windows, Mac, and Linux ? each
version has its own command-line options you can tweak to see different types of information.
15
IT Methodologies Lab 1507884
16
IT Methodologies Lab 1507884
time.
Manual Installation
Manual installation offers several benefits:
backing up, reinstalling, or moving the web server can be achieved in seconds (see 8 Tips for Sur-
viving PC Failure)
you have more control over how and when Apache starts
you can install Apache anywhere, such as a portable USB drive (useful for client demonstrations).
textbfStep 1: configure IIS, Skype and other software (optional)
If you have a Professional or Server version of Windows, you may already have IIS installed. If
you would prefer Apache, either remove IIS as a Windows component or disable its services.
Apache listens for requests on TCP/IP port 80. The default installation of Skype also listens
on this port and will cause conflicts. To switch it off, start Skype and choose Tools Options
Advanced Connection. Ensure you untick ?Use port 80 and 443 as alternatives for incoming
connections?.
Step 2: download the files
We are going to use the unofficial Windows binary from Apache Lounge. This version has per-
formance and stability improvements over the official Apache distribution, although I am yet to
notice a significant difference. However, it is provided as a manually installable ZIP file from
www.apachelounge.com/download/
You should also download and install the Windows C++ runtime from Microsoft.com. You may
have this installed already, but there is no harm installing it again.
As always, remember to virus scan all downloads.
Step 2: extract the files
We will install Apache in C:Apache2, so extract the ZIP file to the root of the C: drive.
Apache can be installed anywhere on your system, but you will need to change the configuration
file paths accordingly?
Step 3: configure Apache
Apache is configured with the text file confhttpd.conf contained in the Apache folder. Open it with
your favourite text editor.
Note that all file path settings use a ?/? forward-slash rather than the Windows backslash. If you
installed Apache anywhere other than C:Apache2, now is a good time to search and replace all
references to ?c:/Apache2?.
There are several lines you should change for your production environment:
Line 46, listen to all requests on port 80:
Listen 80
Line 116, enable mod-rewrite by removing the (optional, but useful):
LoadModule rewrite module modules/mod rewrite.so
Line 172, specify the server domain name:
ServerName localhost:80
Line 224, allow .htaccess overrides:
AllowOverride All
Step 4: change the web page root (optional)
By default, Apache return files found in its htdocs folder. I would recommend using a folder on
an another drive or partition to make backups and re-installation easier. For the purposes of this
example, we will create a folder called D:WebPages and change httpd.conf accordingly:
Line 179, set the root:
DocumentRoot D:/WebPages
and line 204:
Directory D:/WebPages
17
IT Methodologies Lab 1507884
18
IT Methodologies Lab 1507884
19
IT Methodologies Lab 1507884
Output
Figure 1: Practical:-5
20
IT Methodologies Lab 1507884
<htmal>
<head>
<title>Practical 6</title>
</head>
<body>
<body bgcolor="#F5F6A2">
<a href="file:///Users/aakashraj/Desktop/im%20lab%20html/Aakash%208.html">
<p align=center><img src="Aakash Raj.webp" alt="Aakash Raj" width="300" height="300" border="1"></
<h1 align=center>Aakash Raj</h1>
<legend>Qualification information:</legend>
<table border="1" width="100%">
<tr>
<th colspan="2">Class</th>
<th>College/school</th>
<th>Marks%</th>
<th>Passed year</th>
</tr>
<tr>
<td colspan="2">10th</td>
<td>F.N.S. Academy</td>
<td>76%</td>
<td>2013</td>
</tr>
<tr>
<td colspan="2">12th</td>
<td>S.G.G.S College</td>
<td>78%</td>
<td>2015</td>
</tr>
<th rowspan="2" >B.Tech:</th>
<td>1st semester</td>
<td>GNDEC,Ludhiana</td>
<td>78%</td>
<td> 2015 Dec</td>
</tr>
<tr>
<td>2nd semester</td>
<td>GNDEC,ludhiana</td>
<td>72%</td>
<td>2016 May</td>
</tr>
</table>
21
IT Methodologies Lab 1507884
</body>
</htmal>
output
Figure 2: Practical:-6
22
IT Methodologies Lab 1507884
<html>
<head>
<title>Practical 7
</title>
</head>
<frameset rows="50%,50%">
<frame src="file:///Users/aakashraj/Desktop/im%20lab%20html/Aakash%206.html" name="top">
<frameset cols="50%,50%">
<frame src="file:///Users/aakashraj/Desktop/im%20lab%20html/Aakash%205.html" name="left">
<frame src="file:///Users/aakashraj/Desktop/im%20lab%20html/Aakash%208.html" name="right">
</frameset>
</html>
Output
Figure 3: Practical:-7
23
IT Methodologies Lab 1507884
<html>
<head>
<title>Practical 8
</title>
</head>
<body>
<body bgcolor="#F7E1B4">
<form >
<fieldset>
<legend>Personal information:</legend>
<h1 align=center>
First Name:<input type="text" name="First Name"><br>
Last Name:<input type="text" name="laste Name"><br>
Email Address: <input type="Email" name="email address"><br>
Gender:<input type="radio" name="gender">Male<br>
<input type="radio" name="gender">Female<br>
Hobbies:
<select >
<option value="Reading">Reading</option>
<option value="Watching TV">Watching TV</option>
<option value="Computer">Computer</option>
<option value="Walking">Walking</option>
<option value="Listening to Music">Listening to Music</option>
<option value="Shopping">Shopping</option>
<option value="Traveling">Traveling</option>
<option value="Sleeping">Sleeping</option>
<option value="Swimming">Swimming</option>
<option value="Writing">Writing</option>
<option value="Bowling">Bowling</option>
<option value="Dancing">Dancing</option>
</select><br>
Comment: <textarea name="comment" rows="5" cols="40"></textarea><br>
Password:<input type="password" name="password"><br>
<input type="submit" value="Submit">
</fieldset>
</form>
</body>
</html>
24
IT Methodologies Lab 1507884
Output
Figure 4: Practical:-8
25
IT Methodologies Lab 1507884
26
IT Methodologies Lab 1507884
Figure 5: Practical:-9
27
IT Methodologies Lab 1507884
28
IT Methodologies Lab 1507884
Figure 6: Practical:-10
29
IT Methodologies Lab 1507884
h1 {
color: green;
text-decoration: underline;
}
h2 {
text-align: right;
text-transform: capitalize;
}
h3 {
text-align: right;
}
div {
border: 1px solid black;
padding: 10px;
width: 100%px;
height: 250px;
text-align: justify;
}
p1{
font-style: italic;
font-size: 20px;
font-weight: bold;
}
a:link {
background-color: yellow;
}
a:visited {
background-color: cyan;
}
a:hover {
background-color: lightgreen;
}
30
IT Methodologies Lab 1507884
a:active {
background-color: hotpink;
}
ul.a {
list-style-type: circle;
}
ul.b {
list-style-type: square;
}
ol.c {
list-style-type: disc;
}
ol.d {
list-style-type: lower-alpha;
}
</style>
<body>
<h1>Practical:-11</h1>
<p1>To create an html file to implement the styles related to text, fonts, links, lists using casc
sheets.</p1>
<P align=right><a href="file:///Users/aakashraj/Desktop/im%20lab%20html/Aakash%206.html">Aakash R
<div>
<ol><li>The best surfing games</li>
<ul class="c">
<li>vicecity</li>
</ul>
<ul class="a">
<li>surfertoday</li>
</ul>
<ul class="b">
<li>stabmag</li>
</ul><br>
<li>
The best surfing sites
</li>
<ol class="d">
<li>YouTube</li>
<li>facebook</li>
<li>google</li>
<li>amazon</li>
<li>yahoo</li>
</ol>
</ol>
</div>
<h2>
guru nanak dev engineering college, ludhiana</h2>
31
IT Methodologies Lab 1507884
<h3><a href="http://gndec.ac.in/">WWW.gndec.ac.in</a></h3>
</body>
</body>
</html>
Output
Figure 7: Practical:-11
32
IT Methodologies Lab 1507884
th {
height: 30px;
}
td {
height: 30px;
}
th, td {
padding: 15px;
}
tr:nth-child(even){background-color:#F2F7B4}
</style></head>
<body>
<body bgcolor="#F5F6A2">
<a href="file:///Users/aakashraj/Desktop/im%20lab%20html/Aakash%208.html">
<p align=center><img src="Aakash Raj.webp" alt="Aakash Raj" width="300" height="300" border="1"></
<h1 align=center>Aakash Raj</h1>
<legend>Qualification information:</legend>
<table >
<tr>
<th colspan="2">Class</th>
<th>College/school</th>
<th>Marks%</th>
<th>Passed year</th>
</tr>
<tr>
<td colspan="2">10th</td>
<td>F.N.S. Academy</td>
<td>76%</td>
<td>2013</td>
</tr>
<tr>
33
IT Methodologies Lab 1507884
<td colspan="2">12th</td>
<td>S.G.G.S College</td>
<td>78%</td>
<td>2015</td>
</tr>
<th rowspan="2" >B.Tech:</th>
<td>1st semester</td>
<td>GNDEC,Ludhiana</td>
<td>78%</td>
<td> 2015 Dec</td>
</tr>
<tr>
<td>2nd semester</td>
<td>GNDEC,ludhiana</td>
<td>72%</td>
<td>2016 May</td>
</tr>
</table>
</body>
</htmal>
Output
Figure 8: Practical:-12
34
IT Methodologies Lab 1507884
35
IT Methodologies Lab 1507884
Output
Figure 9: Practical:-13
36
IT Methodologies Lab 1507884
37
IT Methodologies Lab 1507884
result = a++;
document.write(result);
document.write(linebreak);
b = b--;
document.write("b-- = ");
result = b--;
document.write(result);
document.write(linebreak);
</script>
</center>
<hr>
<h2><P align=right>
Guru Nanak Dev Engineering College, Ludhiana</P></h2>
<h3><P align=right><a href="http://gndec.ac.in/">WWW.gndec.ac.in</a></P></h3>
</body>
</html>
Output
38
IT Methodologies Lab 1507884
function dialog_box()
{
var person = prompt("Please enter your name", "Aakash Raj");
if (person != null)
{
document.getElementById("demodialog").innerHTML ="Hello "+person+"! How are you today?";
}
}
function confirm_box()
{
var x;
if(confirm("Press a button!")==true)
{
x="Pressed OK!";
}
else
{
39
IT Methodologies Lab 1507884
x="Pressed Cancel!";
}
document.getElementById("democonfirm").innerHTML = x;
}
</script>
</center>
<hr>
<h2><P align=right>
Guru Nanak Dev Engineering College, Ludhiana</P></h2>
<h3><P align=right><a href="http://gndec.ac.in/">WWW.gndec.ac.in</a></P></h3>
</body>
</body>
</html>
Output
40
IT Methodologies Lab 1507884
<script>
document.getElementById("demo").innerHTML =
"The temperature is " + toCelsius(77) + " Celsius";
function toCelsius(fahrenheit) {
return (5/9) * (fahrenheit-32);
}
</script>
<button onclick="get_first()">Click to Get First Element</button>
<p id="demo1"></p>
<script>
function get_first()
{
var cars=[
"Volvo",
"BMW"
];
document.getElementById("demo1").innerHTML=cars[1];
}
</script>
</center>
<hr>
<h2><P align=right>
Guru Nanak Dev Engineering College, Ludhiana</P></h2>
<h3><P align=right><a href="http://gndec.ac.in/">WWW.gndec.ac.in</a></P></h3>
</body>
</body>
</html>
41
IT Methodologies Lab 1507884
Output
42
IT Methodologies Lab 1507884
43
IT Methodologies Lab 1507884
Output
44
IT Methodologies Lab 1507884
45
IT Methodologies Lab 1507884
Output
46
IT Methodologies Lab 1507884
47
IT Methodologies Lab 1507884
Output
48
IT Methodologies Lab 1507884
49
IT Methodologies Lab 1507884
Output
50
IT Methodologies Lab 1507884
51
IT Methodologies Lab 1507884
Output
52
IT Methodologies Lab 1507884
53
IT Methodologies Lab 1507884
54