0% found this document useful (0 votes)
25 views

Unit 1 Ip

Uploaded by

uniqueguy824
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Unit 1 Ip

Uploaded by

uniqueguy824
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

BCA - IInd Yr

Internet Programming

Unit - I
Internet
Internet is defined as an Information super Highway, to access information over the web. However, it can be
defined in many ways as follows:
• Internet is a world-wide global system of interconnected computer networks.
• Internet uses the standard Internet Protocol (TCP/IP).
Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College
• Every computer in internet is identified by a unique IP address.
• A special computer DNS (Domain Name Server) is used to give name to the IP Address so that user
can locate a computer by a name.
• Internet is accessible to every user all over the world.

Evolution
The concept of Internet was originated in 1969 and has undergone several technological & Infrastructural
changes as discussed below:
• The origin of Internet devised from the concept of Advanced Research Project Agency Network
(ARPANET).
• ARPANET was developed by United States Department of Defense.
• Basic purpose of ARPANET was to provide communication among the various bodies of government.
• Initially, there were only four nodes, formally called Hosts.
• In 1972, the ARPANET spread over the globe with 23 nodes located at different countries and thus
became known as Internet.
• By the time, with invention of new technologies such as TCP/IP protocols, DNS, WWW, browsers,
scripting languages, etc. Internet provided a medium to publish and access information over the web.

Advantages
Internet covers almost every aspect of life, one can think of. Here, we will discuss some of the advantages of
Internet:
• Internet allows us to communicate with the people sitting at remote locations. There are various apps
available on the wed that uses Internet as a medium for communication. One can find various social
networking sites such as:
o Facebook o Twitter o
Yahoo

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


• One can surf for any kind of information over the internet. Information regarding various topics such
as Technology, Health & Science, Social Studies, Geographical Information, Information Technology,
Products etc can be surfed with help of a search engine.
• Apart from communication and source of information, internet also serves a medium for entertainment.
Following are the various modes for entertainment over internet.
o Online Television o
Online Games o Songs o
Videos o Social
Networking Apps
• Internet allows us to use many services like:
o Internet Banking o

Matrimonial Services o
Online Shopping o Online
Ticket Booking o Online
Bill Payment o Data
Sharing o E-mail
• Internet provides concept of electronic commerce, that allows the business deals to be conducted on
electronic systems

Disadvantages
However, Internet has proved to be a powerful source of information in almost every field, yet there exists
many disadvantages discussed below:

• There are always chances to loose personal information such as name, address, credit card number.
Therefore, one should be very careful while sharing such information.
• Another disadvantage is the Spamming. Spamming corresponds to the unwanted e-mails in bulk. These
e-mails serve no purpose and lead to obstruction of entire system.
• Virus can easily be spread to the computers connected to internet. Such virus attacks may cause your
system to crash or your important data may get deleted.
• Also a biggest threat on internet is pornography. There are many pornographic sites that can be found,
letting your children to use internet which indirectly affects the children healthy mental life.
• There are various websites that do not provide the authenticated information. This leads to
misconception among many people.

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


Applications
The internet is treated as one of the biggest invention. People of all ages, colors and countries freely share
ideas, data, opinions and products. It has a large number of applications:

1. Communication: Computer users around the world use the email service on internet to communicate
with each other. Pictures, documents and other files are sent as email attachments. Email can be sent
to multiple email addresses at the same time.
2. Online Shopping: The internet has also facilitated the introduction of a new market concept consisting
of virtual shops. They provide information about products or services for sale through www servers.
Using the internet services customers can submit specific product queries and request specific sales
quotes. For example, amazon.com is a www based bookshop on the internet where information of all
types of national and international books can be found and books can be ordered online.
3. Job Search: Nowadays, many people search for their jobs online as it is quicker and easy to get the
information regarding the availability of jobs in various sectors. People can publish resume online for
prospective job. Some of the web sites providing these services are naukri.com, monster.com,
summerjob.com, etc.
4. Travel: Using internet, people can plan their vacations. Internet can be used for booking hotels, flights,
buses, holiday tours, etc. One can use internet to gather information about various tourist places. Some
of the websites providing these services are goibibo.com, makemytrip.com, olacabs.com, etc.
5. Research: A large number of people are using internet for research purpose. Students and writers are
looking for information, business people are using it for marketing information, researchers and
scientists are downloading up-to-date research results from around the world. The internet acts as a
library for today as well as for the future.
6. Education and Training: Colleges and other organizations are offering online courses over the
internet. Lectures and study material are available online. Virtual classroom are designed for students
at far off places.
7. Health and Medicine: Internet provides knowledge and information in the field of health and
medicine. People can get information about various diseases and can also receive advice and help from
the doctors. Some of the websites providing these services are telemedicine.com, earthmed.com, etc.
8. Stock Market Updates: People can sell or buy shares while sitting on the computer through internet.
Several websites provides the information about the proper way of investment so that the money may
be invested at a good place. The websites like ndtvprofit.com, moneycontrol.com, etc.

Basic Terminologies
Web Browser
A browser is a software program that is used to explore, retrieve, and display the information available on the
World Wide Web. This information may be in the form of pictures, web pages, videos, and other files that all
are connected via hyperlinks and categorized with the help of URLs (Uniform Resource Identifiers). The most
commonly used web browsers are Internet-Explorer, Firefox, Google Chrome, etc.

World Wide Web(WWW)


The World Wide Web (www) or W3 or Web is one of the most important internet services which were
developed by Timothy Berners-Lee in 1989. It is a mechanism for accessing linked documents spread over
thousands of servers all over the Internet. These documents are also known as webpages.

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


Webpage
A webpage is an electronic document available on the World Wide Web. These webpages are stored on the
web servers and are identified by a unique address. A webpage generally contains a large amount of
information which may include text, graphics, audio, video as well as links to other webpages. The webpagesa
are generally written in Hyper Text Markup Language (HTML).

Web Site
A web site is a collection of linked webpages that are stored on a web server. It is usually maintained by a
company, organization or an individual. A website contains a home page and several linked pages. For
example, www.yahoo.com is a website that contains a large number of linked webpages related to various
topics.

Web Servers
A web server is a computer that runs websites. It's a computer program that distributes web pages as they are
requisitioned. The basic objective of the web server is to store, process and deliver web pages to the users.
This intercommunication is done using Hypertext Transfer Protocol (HTTP). Types of web servers are:

• Apache HTTP Server. This is the most popular web server in the world developed by the Apache
Software Foundation.
• Internet Information Services. The Internet Information Server (IIS) is a high performance Web
Server from Microsoft.
• Sun Java System Web Server.
• Jigsaw Server.
URL
A URL is a type of uniform resource identifier and is address of a resource on the World Wide Web and the
protocol used to access it. It is used to indicate the location of a web resource to access the web pages. A URL
(Uniform Resource Locator) contains the information, which is as follows:

o The port number on the server, which is optional. o It contains a


protocol that is used to access the resource.
o The location of the server o A fragment identifier o In the
directory structure of the server, it contains the location of the
resource.

A URL generally takes the form

Protocol: // Domain name: Port/Path

For Example:

http://www.yahoo.com

Here, the first part of the URL specifies the protocol that will be used to retrieve the specific file. The various
protocols that can be used are http, ftp, etc.
Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College
The second part of the URL specifies the domain name of the server on which the file resides. The domain is
prefixed with :// i.e. colon and two slashes.

URL can also contain a port number of the server which is optional. Web servers normally run on port number
80.

IP Address
IP address is a unique logical address assigned to a machine over the network. An IP address exhibits the
following properties:
• IP address is the unique address assigned to each host present on Internet.
• IP address is 32 bits (4 bytes) long.
• IP address consists of two components: network component and host component.
• Each of the 4 bytes is represented by a number from 0 to 255, separated with dots. For example
137.170.4.124

DNS

The Domain Name System (DNS) is the Internet's system for mapping alphabetic names to numeric Internet
Protocol (IP) addresses like a phone book maps a person's name to a phone number. For example, when a
Web address (URL) is typed into a browser, a DNS query is made to get an IP address of a Web server
associated with that name.
Protocol
A protocol is a set of rules that governs the communications between computers on a network. These rules
include what type of data may be transmitted, what commands are used to send and receive data, and how data
transfers are confirmed. Types of protocols are:

(A) FTP (File Transfer Protocol):

• FTP stands for File transfer protocol.


• FTP is a standard internet protocol provided by TCP/IP used for transmitting the files from
one host to another.
• It is mainly used for transferring the web page files from their creator to the computer that acts
as a server for other computers on the internet.
• It is also used for downloading the files to computer from other servers.

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


The above figure shows the basic model of the FTP. The FTP client has three components: the
user interface, control process, and data transfer process. The server has two components: the
server control process and the server data transfer process.

Advantages of FTP:
o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest ways to
transfer the files from one computer to another computer.
o Efficient: It is more efficient as we do not need to complete all the operations to get the entire
file. o Security: To access the FTP server, we need to login with the username and password.
Therefore, we can say that FTP is more secure.
o Back & forth movement: FTP allows us to transfer the files back and forth. Suppose you are
a manager of the company, you send some information to all the employees, and they all send
information back on the same server.
Disadvantages of FTP:
o FTP serves two operations, i.e., to send and receive large files on a network. However, the size
limit of the file is 2GB that can be sent. It also doesn't allow you to run simultaneous transfers
to multiple receivers.
o Passwords and file contents are sent in clear text that allows unwanted eavesdropping. So, it is
quite possible that attackers can carry out the brute force attack by trying to guess the FTP
password.
o It is not compatible with every system.

(B) HTTP (Hyper Text Transfer Protocol): HTTP is a communication protocol. It defines
mechanism for communication between browser and the web server. It is also called request and
response protocol because the communication between browser and server takes place in request
and response pairs. When a user want to retrieve a webpage, the web browser initiates the
communication by issuing a request and after receiving a request, the web server sends back a
response.

There are two types of HTTP messages, requests and responses, each with its own format

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


HTTP Request: The http request consists of a series of lines which contains request line, header
fields and optionally contents of the message.

HTTP Response: The http response consists of

• The version of the HTTP protocol they follow.


• A status code, indicating if the request was successful, or not.
• A status message.
• HTTP headers, like those for requests.
• Optionally, a body containing the fetched resource.

(C) TCP/IP (Transmission Control Protocol / Internet Protocol): A set of protocols that are used
as a standard for communicating on the Internet is TCP/IP. It is not a single protocol but a collection
of protocols – TCP (Transmission Control Protocol) and IP (Internet Protocol) and some other
protocols.
TCP/IP specifies how data is exchanged over the internet by providing end-to-end communications
that identify how it should be broken into packets, addressed, transmitted, routed and received at
the destination.
TCP defines how applications can create channels of communication across a network. It also
manages how a message is assembled into smaller packets before they are then transmitted over
the internet and reassembled in the right order at the destination address.
IP defines how to address and route each packet to make sure it reaches the right destination.

ISP (Internet Service Provider)


Internet Service Provider (ISP) is a company offering access to internet. They offer various services:
• Internet Access
• Domain name registration
• Dial-up access

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


• Leased line access
In order to access the Internet, one can connect to an ISP using different type of connections such as Dialup,
ISDN, Lease Line, Satellite and Wireless, which differ in speed and cost. An ISP provides each user with a
username and password and a phone number to enable them to connect to the Internet. Some of ISPs are:
VSNL, MTNL, BSNL, Bharti Infotel, Jio, Satyam Infoway, etc.
ISP Types
ISPs can broadly be classified into six categories as shown in the following diagram:

Access providers
They provide access to internet through telephone lines, cable Wi-Fi or fiber optics.
Mailbox Provider
Such providers offer mailbox hosting services.
Hosting ISPs
Hosting ISPs offers e-mail, and other web hosting services such as virtual machines, clouds etc.
Virtual ISPs
Such ISPs offer internet access via other ISP services.
Free ISPs
Free ISPs do not charge for internet services.

Electronic-Mail (E-Mail)
Electronic mail or email is one of the most widely used Internet application. It allows a message to be sent
electronically among individuals connected to the internet or some other computer networks. It offers an
efficient, inexpensive and real time mean of distributing information among people.

Each user of email is assigned a unique name for his email account. This name is known as E-mail address.
Different users can send and receive messages according to the e-mail address.
E-mail is generally of the form

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


username@domainname
For example, [email protected] is an e-mail address where amitsingla70 is username and
yahoo.com is domain name.
The following points should remember while using e-mail address
• The username and the domain name are separated by @ (at) symbol.
• E-mail addresses are not case sensitive.

• Spaces are not allowed in e-mail address.

Anatomy or Component of E-mail messages


E-mail message comprises of different components: E-mail Header, Greeting, Text, and Signature. These
components are described in the following diagram:

E-mail Header
The first five lines of an E-mail message is called E-mail header. The header part comprises of following
fields:

• From
The From field indicates the sender’s address i.e. who sent the e-mail.

• Date
The Date field indicates the date when the e-mail was sent.

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


• To
The To field indicates the recipient’s address i.e. to whom the e-mail is sent.

• Subject
The Subject field indicates the purpose of e-mail. It should be precise and to the point.

• CC
CC stands for Carbon copy. It includes those recipient addresses who receive a copy of the e-mail
message.

• BCC
BCC stands for Black Carbon Copy. It is used when we do not want one or more of the recipients to
know that someone else was copied on the message.
Greeting
Greeting is the opening of the actual message. Eg. Hi Sir or Hi Guys etc.

Text
It represents the actual content of the message.

Signature
This is the final part of an e-mail message. It includes Name of Sender, Address, and Contact Number.

Advantages

E-mail has proved to be powerful and reliable medium of communication. Here are the benefits of E-mail:

• Reliable: Many of the mail systems notify the sender if e-mail message was undeliverable.

• Convenience: There is no requirement of stationary and stamps. One does not have to go to post office.

• Speed: E-mail is very fast. However, the speed also depends upon the underlying network.

• Inexpensive: The cost of sending e-mail is very low.

• Printable: It is easy to obtain a hardcopy of an e-mail.

• Global: E-mail can be sent and received by a person sitting across the globe.

Disadvantages

Apart from several benefits of E-mail, there also exist some disadvantages as discussed below:

• Misdirection: It is possible that user may send e-mail to an unintended recipient.


Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College
• Junk: Junk emails are undesirable and inappropriate emails. Junk emails are sometimes referred to as
spam.

• No Response: It may be frustrating when the recipient does not read the e-mail and respond on a
regular basis.

E-mail Protocols
E-mail Protocols are set of rules that help the client to properly transmit the information to or from the mail
server. The various E-mail protocols are SMTP, POP, and IMAP.

• SMTP: SMTP stands for Simple Mail Transfer Protocol. It was first proposed in 1982. It is a
standard protocol used for sending e-mail efficiently and reliably over the internet.

▪ SMTP is application level, connection oriented and text based protocol.


▪ It handles exchange of messages between e-mail servers over TCP/IP network.
▪ Apart from transferring e-mail, SMPT also provides notification regarding incoming
mail.
▪ When you send e-mail, your e-mail client sends it to your e-mail server which further
contacts the recipient mail server using SMTP commands.
▪ These SMTP commands specify the sender’s and receiver’s e-mail address, along with
the message to be send.
▪ In case, message cannot be delivered, an error report is sent to the sender which makes
SMTP a reliable protocol. Some of the SMTP commands are
▪ HELO - Used to identify sender to receiver
▪ MAIL - Initiates a mail transaction
▪ RCPT - Used to identify recipient of the message
▪ DATA - Message body

• POP: POP stands for Post Office Protocol. It is generally used to support a single client. There are
several versions of POP but the POP 3 is the current standard.
▪ POP is an application layer internet standard protocol.
▪ Since POP supports offline access to the messages, thus requires less internet usage
time.
▪ POP does not allow search facility.
▪ In order to access the message, it is necessary to download them.
▪ It allows only one mailbox to be created on server. ▪ POP commands are generally
abbreviated into codes of three or four letters. Eg. STAT.
Some of the POP commands are
▪ STAT - used to display number of messages currently in the mailbox.
Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College
▪ DELE - used to delete a message.
▪ QUIT - used to log off the session.

• IMAP: The Internet Message Access Protocol is the most recent and much improved protocol for
accessing mails. It was first proposed in 1986 followed by IMAP2 in 1987 and then IMP4 in 1994
which is the current version till date.
▪ IMAP allows the client program to manipulate the e-mail message on the server without
downloading them on the local computer.
▪ The e-mail is hold and maintained by the remote server.
▪ It enables us to take any action such as downloading, delete the mail without reading
the mail. It enables us to create, manipulate and delete remote message folders called
mail boxes.
▪ IMAP enables the users to search the e-mails.
▪ It allows concurrent access to multiple mailboxes on multiple mail servers. Some of the
IMAP commands are
▪ SELECT - used to select a mailbox to access the messages.
▪ DELETE - used to permanently delete a mailbox with a given name.
▪ RENAME - used to change the name of a mailbox.

Basics of Sending & Receiving E-mail (Working of E-mail)


Email working follows the client server approach. In this client is the mailer i.e. the mail application or mail
program and server is a device that manages emails.
Suppose that a user ankur with an e-mail address [email protected] wants to send an e-mail to his
friend vikram with an e-mail address [email protected]. The following steps specify how the email
is delivered:
▪ The user ankur compose an e-mail message using a mailer program i.e. mail client (Outlook
Express) and then select send option.
▪ The message sends to the SMTP server using the port 25 at mailserver1.com. The SMTP
server checks whether the recipient address belongs to mailserver1.com or not. If it is the same
then it simply transfers the message to the POP server at the mailserver1.com.
▪ After getting the IP address from DNS server, it sends the message to the SMTP server at
mailserver2.com using port 25.
▪ When the email message reaches vikram’s SMTP server, it transfer the message to the POP3
server. The POP3 holds the message until vikram ask for it.
▪ When vikram’s email client software connects to the POP3 server using the port 110 by
providing a valid username and password, all the pending email messages are automatically
downloaded to the vikram’s computer.
The following diagram gives pictorial representation of the steps discussed above:

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


Mailing List
Mailing List provides a way for group of Internet users to have public discussions on a specific topic through
the use of E-mail. There are thousands of mailing lists that cover every topic such as related to computers,
politics, science, jokes, etc. A mailing list management software that is responsible for management and
distribution of a mailing list to multiple subscribers is also known as a List Server. Some of the commonly
used List Servers are ListSERV, Majordomo, LISTPROC, Lyris, Listar, etc.

There are different types of mailing list which can be classified as follows

▪ Announcement lists and Discussion Lists: Announcement list is just like a newsletter in which only
the owner of the mailing list will send messages to the subscribed users. In discussion list, any
subscriber can post messages to the mailing list.

▪ Public Lists and Private Lists: In public list, anyone can subscribe to the list whereas in private list
if anyone wants to subscribe the list, then an approval is required from the owner of the list.

Subscribing to mailing list:


To subscribe to a list, send an e-mail message to the administrative address of the mailing list containing one
or more commands.

For example, if user want to subscribe the Harry Potter list in gurus.com where name of the List Server is
Majordomo then user send an e-mail message to [email protected] (administrative address)
containing the text, subscribe harry potter in its body. User will then receive a message confirming its
subscription.

There are many List Servers available, each having its own set of commands for subscribing to the list. Some
of them are

List Server Command Example


LISTSERV subscribe listname yourname subscribe commdhtml amit

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College


Majordomo subscribe listname subscribe commdhtml

ListProc subscribe listname yourname subscribe commdhtml amit

Unsubscribing from mailing list:


To unsubscribe from a list, send an e-mail message to the administrative address of the mailing list by typing
command for unsubscribe in the body of the message. User will receive e-mail reply from the List Server
confirming its unsubscription.

There are many List Servers available, each having its own set of commands for unsubscribing to the list.
Some of them are
Command to be placed in the body
List Server of the message Example

LISTSERV signoff listname signoff commdhtml

Majordomo unsubscribe listname unsubscribe commdhtml

ListProc signoff listname signoff commdhtml

Aman Choudhary Student (BCA-II) Seth G. L. Bihani S. D. PG College

You might also like