Explain The Structure of An Internet Address:-: Protocol
Explain The Structure of An Internet Address:-: Protocol
Explain The Structure of An Internet Address:-: Protocol
Each web page, as any document stored in Internet, has its unique address. This
address is called URL - Universal Resource Locator. URL consists of characters
and the resource is searched according this character string.
Protocol
A protocol indicates which one of the Internet browser conventions should be
used for access to Internet. Basic protocols are:
Server name
This part of an Internet address specifies a physical computer storing web pages
or other documents. URL usually starts with www.
Folder
Documents at a web server are stored in folders having the same properties as
folders of your computer.
Document
Internet documents are called HTML documents. Their common extensions are:
.htm, .html, but also others, e.g. .php, .asp, .nsf, etc.
IP functions at layer 3 of the OSI model. It can therefore run on top of different
data link interfaces including Ethernet and Wi-Fi.
FTP (Also Known As: File Transfer Protocol) allows you to transfer files
between two computers on the Internet. FTP is a simple network protocol based
on Internet Protocol and also a term used when referring to the process of
copying files when using FTP technology.
To transfer files with FTP, you use a program often called the client. An FTP
client program initiates a connection to a remote computer running FTP server
software. After the connection is established, the client can choose to send
and/or receive copies of files, singly or in groups. To connect to an FTP server,
a client requires a username and password as set by the administrator of the
server. Many public FTP archives follow a special convention for that accepts a
username of "anonymous."
Simple FTP clients are included with most network operating systems, but most
of these clients (such as FTP.EXE on Windows) support a relatively unfriendly
command-line interface. Many alternative third-party FTP clients have been
developed that support graphic user interfaces (GUIs) and additional
convenience features. In any FTP interface, clients identify the FTP server
either by its IP address (such as 192.168.0.1) or by its host name (such as
ftp.about.com).
FTP supports two modes of data transfer: plain text (ASCII), and binary. You
set the mode in the FTP client. A common error when using FTP is attempting
to transfer a binary file (such as a program or music file) while in text mode,
causing the transferred file to be unusable.
Applications developed for TCP/IP generally use several of the protocols in the
suite. The layers of the protocol suite is also known as the protocol stack. User
applications communicate with the top layer of the protocol suite. The top-level
protocol layer on the source computer passes information to the lower layers of
the stack, which in turn pass it to the physical network. The physical network
transfers the information to the destination computer. The lower layers of the
protocol stack on the destination computer pass the information to higher layers,
which in turn pass it to the destination application.
Each protocol layer within the TCP/IP suite has various functions; these
functions are independent of the other layers. Each layer, however, expects to
receive specific services from the layer beneath it, and each layer provides
specific services to the layer above it.
Figure shows the TCP/IP protocol layers. The layers at the same level on the
source and destination computers are peers. For example, the application on the
source computer and the application on the destination computer are peers. Each
layer of the protocol stack on the source computer communicates with its peer
layer on the destination computer. From the perspective of the software
developer or user, the transfer takes place as if the peer layers sent their packets
directly to one another.
There are four Layers are there in TCP/IP:
Link Layer
Internet Layer
Transport Layer
Application Layer
Link Layer:
The link layer is used to move packets between the Internet layer interfaces of
two different hosts on the same link. The TCP/IP model includes specifications
of translating the network addressing methods used in the Internet Protocol to
data link addressing, such as Media Access Control (MAC). All other aspects
below that level, however, are implicitly assumed to exist in the link layer, but
are not explicitly defined.
Internet Layer:
The internet layer has the responsibility of sending packets across potentially
multiple networks. Internetworking requires sending data from the source
network to the destination network. This process is called routing.[19]
In the Internet protocol suite, the Internet Protocol performs two basic
functions:
Application Layer:
The application layer includes the protocols used by most applications for
providing user services or exchanging application data over the network
connections established by the lower level protocols, but this may include some
basic network support services, such as many routing protocols, and host
configuration protocols. Examples of application layer protocols include the
Hypertext Transfer Protocol (HTTP), the File Transfer Protocol (FTP), the
Simple Mail Transfer Protocol (SMTP), and the Dynamic Host Configuration
Protocol (DHCP).[20] Data coded according to application layer protocols are
encapsulated into transport layer protocol units (such as TCP or UDP
messages), which in turn use lower layer protocols to effect actual data transfer.
A HTML document is basically separated in two parts: the head (HTML head
tag) and the body (HTML body tag). We also add a Document type declaration
on top of it to get the basic document structure and HTML version. The
structure of a HTML document is shown below.
Structure:
<! DOCTYPE …> version information
<HTML>
<HEAD>
...information about document, scripts, styles….
</HEAD>
<BODY>
...visible content of document….
</BODY>
</HTML>
<HTML> tag:
The html tag acts as a container for the whole document. Every character in the
document should be in between the html start and end tags. The html tag can
also be used to define the language of the contained document through the
"lang" attribute. The content of the html tag is divided in two parts using the
head (HTML head tag) and the body (HTML body tag).
<HEAD> tag:
This section is the document's head. All the information contained in the
document's head is loaded first, before any other thing in the document, as it's
defined before the body segment. It includes tags like title, script, style, meta
and so on.
<BODY> tag:
This is the document's body: The body is the container for the visual part of a
document. All the things written here will be shown when the document is
rendered. Most of the tags in HTML can be inserted in the body section (inside
the HTML body tag) and will take care of the visual aspects of the document.
Example:
<HTML>
<HEAD>
<TITLE> My first Page </TITLE>
</HEAD>
<BODY>
<H1> Hello HTML <H1>
</BODY>
</HTML>
List:
There are Three types of List in HTML:
Ordered List
Unordered List
Definition List or Description List
Ordered Lists
Use the <ol> tag (the ending </ol> tag is required), to create a numbered list
with numbers starting at 1. The elements are created with the <li> tag (the
ending </li> tag is not required in HTML, but required in XHTML).
For Example:
<ol>
<li>Entry 1</li>
<li>Entry 2</li>
<li>Entry 3</li>
</ol>
Unordered Lists
Use the <ul> tag (the ending </ul> tag is required) to create a list with bullets
instead of numbers. Just like with the ordered list, the elements are created with
the <li> tag. For example:
<ul>
<li>Entry 1</li>
<li>Entry 2</li>
<li>Entry 3</li>
</ul>
Definition Lists
Definition lists create a list with two parts to each entry: the name or term to be
defined and the definition. This creates lists similar to a dictionary or glossary.
There are three tags associated with the definition list:
HTML does not require the closing tag for the <dt> or the <dd>, but it's a good
idea to use them so other parts of your design aren't confused. And the ending
tags are required in XHTML.
Here is how a definition list looks:
<dl>
<dt>This is a definition term</dt>
<dd>And this is the definition</dd>
<dt>term 2</dt>
<dd>definition 2</dd>
<dt>term 3</dt>
<dd>definition 3</dd>
</dl>
Like any other advance programming language, JavaScript also supports all the
features necessary to write modular code using functions.
Function Definition:
Before we use a function we need to define that function. The most common
way to define a function in JavaScript is by using the function keyword,
followed by a unique function name, a list of parameters (that might be empty),
and a statement block surrounded by curly braces. The basic syntax is shown
here:
Syntax: Example
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
function functionname(parameter-list) function sayHello()
{ {
Statements alert(“Hello there”);
} }
//--> //
</script> </script>
Calling a Function:
To invoke a function somewhere later in the script, you would simple need to
write the name of that function as follows:
<script type="text/javascript">
<!--
sayHello();
//-->
</script>
Function Parameters:
Till now we have seen function without a parameters. But there is a facility to
pass different parameters while calling a function. These passed parameters can
be captured inside the function and any manipulation can be done over those
parameters. A function can take multiple parameters separated by comma.
Example:
<script type="text/javascript">
<!--
function sayHello(name, age)
{
alert( name + " is " + age + " years old.");
}
//-->
</script>
Note: We are using + operator to concatenate string and number all together. JavaScript does
not mind in adding numbers into strings. Now we can call this function as follows:
<script type="text/javascript">
<!--
sayHello('Zara', 7 );
//-->
</script>
For example you can pass two numbers in a function and then you can expect
from the function to return their multiplication in your calling program.
Example:
<script type="text/javascript">
<!--
function concatenate(first, last)
{
var full;