Unit 1 Ip
Unit 1 Ip
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
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.
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.
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:
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:
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
(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.
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
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.
• 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.
• 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:
• 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.
• 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.
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.
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
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