CH 1
CH 1
CH 1
Introduction to internet
Introduction to TCP/IP
1|Page
Known as the OSI model
TCP/IP does not strictly follow this 7 layer model
TCP/IP follows a simplified 4- layer model
Why Layering?
To provide well-defined interface between adjacent layers.
A change in one layer does not affect the other layers.
Interface must remain the same
Allows a structured development of network software.
The 7-layer OSI model
Application
Presentation
Session
Transport
Network
Datalink
Physical
2|Page
TCP provide a connection –oriented, reliable service for sending messages.
Split a message into packets
Reassemble packet at destination.
Resend packets that were lost in transmit.
Interface with IP:
Each packet forwarded to IP for delivery.
Error control is done by packet.
A way to access and provide information in various media via the Internet.
A hypertext based system for providing, organizing and accessing information that allows users
to jump from one information space to another.
Comprises servers and client computers on the Internet that communicate using the hypertext
transfer protocol (http)
Body of information available on the Web
Where do the documents reside?
On web servers
Also called Hyper Text Transfer Protocol(HTTP)servers
They are typically written in
Hyper Text Markup Language(HTML)
Computer running application software that listens and responds to a client computer’s request
made through a web browser
Machine that hosts web pages and other web documents
Provides web documents and other online services using HTTP
Example of Web server
Apache
IIS
Document get formatted /displayed using
Web browsers
Application software that is used to locate and issue a request for the page on the web server
that hosts the document
It also interpret the page sent back by the web server and display it on the monitor of the client
computer
3|Page
Computer program that lets you view and explore information on the World Wide Web
Example of Web browsers
o Internet Explorer
o Netscape
o Mozilla Firefox
o Google chrome
4|Page
Requires host identification.
Allows multi-homed servers
More than one domain living on same server.
Default support for persistent connections.
Multiple transactions over a single connection.
Support for content negotiation.
Decides on the best among the available representations
Server –driven or browser-driven.
Browsers can request part of document.
Specify the bytes using range header.
Browser can ask for more than one range
Continue interrupted downloads
Range bytes =1200-3500
Efficient caching support
A document caching model that allows both the server and the client to control
the level of cachablity and update condition and requirement.
HTTP 1.1 requires several extra things from both clients and servers.
Mandatory to know these if one is trying to write a HTTP client or server.
Secure HTTP is a secure message-oriented communications protocol designed for use in
conjunction with HTTP. It is designed to coexist with HTTP's messaging model and to be easily
integrated with HTTP applications.
Secure HTTP provides a variety of security mechanisms to HTTP client and servers, providing the
security service options appropriate to the wide range of potential end uses possible for the
World-Wide Web.
Hypertext Transfer Protocol over Secure Sockets Layer (SSL), which secures communication
between the browser client and the IIS server, uses a certificate and a public key to encrypt the
data that is transferred over the internet.
What is a URL?
They are the mechanism by which documents are addressed in the www.
A URL contains the following:
Name of the site containing the resource.
The type of service to be used to access the resource(ftp,http,etc)
The port number of the service
Location of the resource (path name) in the server.
URLs specify internet addresses.
General format for URL:
Scheme://address:port/path/filename
Example
http://www.xyz.edu:2345/home/rose.jpg
http://www.rediff.com/news/ab1.html
5|Page
Standard model for developing network applications.
Notion of client and server.
A server is a process that is offering some service
A client is a process that is requesting the service.
Server or client may be running on different machines.
Server waits for requests from client(s).
Typical scenario:
The server process starts on some computer system.
Initializes itself, then goes to sleep waiting for a client request.
A client process starts, either on the same system or on some other system.
Sends a request to the server.
When the server process has finished providing its service to the client ,the server goes
back to sleep ,waiting for the next client request to arrive.
The process repeats
Roles of the client and the server processes are asymmetric.
Iterative servers
Used when the server process knows in advance how long it takes to handle each request and it
handles each request itself.
Single copy of server runs at all times.
A client may have to wait if the server is busy.
Concurrent servers
Used when the amount of work required handling a request is unknown; the server starts
another process to handle each request.
A copy of the server caters to a client’s request in a dedicated fashion
As many copies of server as there are client requests.
What is DNS?
6|Page
The global database system for internet addressing ,mail and other information.
Much easier to use and memorize
Concept of domains and sub-domains.
Domain management is distributed.
DNS servers translate domain names to IP addresses.
.com –commercial
.org-non profit
.net –network service provider
.edu-education
.in-indian
.it-italian
What is domain?
A set of computers related by either their geographic location ,or the way they function
Web Protocols
A network protocol is the set of rules governing a conversation between a client and a server
Standard set of rules that governs how computers communicate with each other, There are
many protocols i.e. SMTP, FTP, HTTP
HTTP is the underlying protocol used to transmit information over the Web
The Web supports several Internet protocols aside from HTTP such as SMTP, FTP, allowing
access to huge collection of information and services
FTP :(File transfer protocol) - One of the most oldest and probably the most popular protocol to
be used to move files on the Internet.
SMTP: (the e-mail message protocol) - A protocol to allow two users to communicate through
e-mail messages over the Internet. Multipurpose Internet Mail Extensions is an Internet
standard that extends the format of email to support
Web page
What is a Web page?
Electronic document that typically contains several types of information accessible via the World
Wide Web
Set of information created, and organized, using HTML and/or other web page authoring and
development tools
Interpreted and displayed on the screen according to the instructions of the web page authoring
tool
How web page works
Sample web page and its source.
The source contains the instructions that define the contents, layout, and structure of a web
page.
7|Page
The instructions are written in HTML or another web authoring tool used in creating the page.
The browser uses these instructions to interpret and display the web page on the screen.
Web site
What is a web site?
A collection of related web pages of a certain individual, group, or organization, connected
through a system of hyperlinks, hosted in a particular domain
Can be a single web page that contains links to related information located on several web sites
Home page
What is a home page?
The main page of a web site that typically serves as an index or table of contents to other web
pages
Usually the first web page or the welcome page the users see when they visit a web site
Why validate?
Validation provides an independent means of quality assuring webpage code; valid code is less likely to
be ‘misunderstood’ by programs that are used to view webpages (web browsers).
As use of the web evolves, and the features websites provide become more sophisticated, the integrity
of the underlying code becomes more important—invalid code may ‘break’ a webpage.
Valid code is easier to reinterpret and transform; new methods of accessing the web, such as mobile
phones, benefit from different ‘views’ of webpage content; creating alternative views is easier when the
underlying markup is standardized.
For a webpage to be validated:
The validation program must be able to link to the webpage.
8|Page
The webpage include a document-type declaration (DTD) that identifies the language used to
markup content; if a DTD is not provided, the validator may ‘guess’ the language based on the
markup used in the webpage.
The validation process:
9|Page
CHAPTER -2
HTML Editor
You can use a notepad or notepad++ but have another editor
Multi-platform HTML WYSIWYG Editors are Dreamweaver,KompoZer and Amaya.
HTML Tags
The left and right angle bracket are used to enclose all special instructions,called tags
Two classes of tags
Those which appear in pairs
o <i>good morning</i>
Those which appear individually.
o <img src=”baby.jpg”>
Browsers interpret the tags to display a HTML page in properly formatted form.
Most of the tags belong to the first category.
<tag name>…directives…</tag name>
Tags are case insensitive
<HEAD>,<Head> and<head> are all equivalent
Tags may be nested
<html><head>...</head><body>…</body></html>
Most browsers have a VIEW SOURCE menu option.
The HTML version of the page can be displayed.
10 | P a g e
Some tags can have one or more named attribute to define some additional characteristics of
the tag.
Browsers ignore all extra spaces and carriage returns within a HTML document
Why?
Browsers have to reformat the document to fit in the current display area.
It is good practice to use white spaces in a HTML document.
Improves readability
Unrecognized tags
Browsers normally ignore tags it does not recognize.
Comment lines
Comments are included between <!...and….!>
Comments cannot be nested
HTML Document Structure
A HTML document consists of two major portions:
Head
Contains information about the document ,like the title and
“meta”data describing the content.
Body
Contains the actual matter of the document
Gets displayed within the browser window
Example : first.html
Create a simple web page
<html><head>
<title> title of the document</title>
</head>
<body bgcolor=”blue”>
This is the content of the document
</body>
</html>
Explanation:
The HTML page is enclosed between <html> and </html>.
The visible contents of the page are enclosed between <body> and </body>
The tags h1 and p are used to display heading and paragraph respectively.
Example:
<html>, <head>, <body>, <p>, <h1> ... etc
An HTML element always represent with start tag and end tag.
Syntax :
<starttag>content</endtag>
An HTML element having starting tag and ending tag
11 | P a g e
12 | P a g e