+ All Categories
Home > Documents > CS734 Internet Programming Unit 1

CS734 Internet Programming Unit 1

Date post: 21-Jul-2016
Category:
Upload: sujy-cau
View: 16 times
Download: 4 times
Share this document with a friend
Description:
prestentation on ip
24
Internet Programming
Transcript
Page 1: CS734 Internet Programming Unit 1

Internet Programming

Page 2: CS734 Internet Programming Unit 1

AIM and Objectives

▪ To explain Internet Programming concepts and related programming and scripting languages.

▪ To describe basic Internet Protocols.

▪ Explain JAVA and HTML tools for Internet programming.

▪ Describe scripting languages – Java Script.

▪ Explain dynamic HTML programming.

▪ Explain Server Side Programming tools.

Page 3: CS734 Internet Programming Unit 1

Basic Network and Web Concepts

▪ Internet standards – TCP and UDP protocols – URLs – MIME – CGI –Introduction to SGML.

Page 4: CS734 Internet Programming Unit 1

What is a Network?

▪ Definition: A network is a collection of computers and other devices that can send data to and receive data from each other, more or less in real time.

▪ How is it connected?

▪ How the data flows?

▪ Medium of propagation – Wires, Wireless

▪ What is a Node, Host?

▪ How is a node identified?

Page 5: CS734 Internet Programming Unit 1

What is a Network?

▪ How are addresses assigned?

▪ What are Ethernet addresses?

▪ Why are they unique?

▪ Who assigns Internet addresses?

▪ Internet Service Provider (ISP)?

▪ Internet Registrars?

▪ Internet Corporation for Assigned Names and Numbers (ICANN)

Page 6: CS734 Internet Programming Unit 1

What is a Network?

▪ How to remember addresses for the format 192.168.0.1?

▪ Can the addresses be named?

▪ Domain Name & address association.

▪ Protocol: A protocol is a precise set of rules defining how computers communicate: the format of addresses, how data is split into packets., so on. E.g. TCP, HTTP, FTP

Page 7: CS734 Internet Programming Unit 1

Network Layers

Page 8: CS734 Internet Programming Unit 1

Internet Layer

▪ Internet layer protocol defines how bits and bytes of data are organized into the larger groups called packets, and the addressing scheme by which different machines find each other or otherwise called as Internet Protocol (IP).

▪ Each network layer protocol is independent of the lower layers.

▪ Data is sent across the internet layer in packets called datagrams. Each IP datagram contains a header between 20 and 60 bytes long and a payload that contains up to 65,515 (64K) bytes of data. (In implementation, most IP datagrams range from a few dozen bytes to a little more than eight kilobytes.)

Page 9: CS734 Internet Programming Unit 1

Header of each IP datagram

Page 10: CS734 Internet Programming Unit 1

Transport Layer

▪ Ensures all data received by requesting for re-transmit to sender.

▪ Guarantees all the packets has arrived to the receiver.

▪ Ensures the stream of packets is in correct receive order since each datagrams follow individual route.

▪ Additional headers are required for 2 protocols:

▪ TCP – allows retransmission of lost/corrupted data, delivery of bytes in order sent.

▪ UDP – detects corrupted packets, doesn’t ensure correct order.

Page 11: CS734 Internet Programming Unit 1

Application Layer

▪ Delivers data to the user. E.g. HTTP protocol in this layer knows how to display data in the web browser – image/text.

▪ Lower layers responsible to transmit data to one host to another.

▪ Gamut of protocols:

▪ HTTP, FTP, TFTP

▪ NFS

▪ NNTP

▪ SMTP, POP, IMAP

Page 12: CS734 Internet Programming Unit 1

IP, TCP and UDP – Summary

▪ TCP layered on top of IP – guarantees retransmission of corrupt or lost data, ensures the correct order of data to match with the receiving end to that of sender.

▪ Disadvantage of TCP – overhead of ensuring packet arrival correctly. E.g.?

▪ Is UDP acceptable? Where?

▪ What is ICMP?

Page 13: CS734 Internet Programming Unit 1

IP Addresses and Domain Names

▪ IPv4 address – 4 byte number written in quad format e.g. 194.168.23.39, 4 billion possible addresses.

▪ IPv6 – eight blocks of four hexadecimal digits separated by colons, such as FEDC:AB98:7764:3210:FEDC:BA95:7654:3210

▪ Domain Name System (DNS) – The domain name system (DNS) is the way that Internet domain names are located and translated into Internet Protocol addresses.

▪ Ports – used in combination with protocol and is a logical abstraction. Some standard ports are 80 for HTTP, 21 for FTP, 23 for telnet, 25 for smtp, 110 for POP3

Page 14: CS734 Internet Programming Unit 1

Programming Exercise – 4th June 2014

▪ Create a web page and perform the following:

1) Asks for your name and greets you at the title of the page.

2) Depending on the time of the day, greets you specifically:

3) For the above (2) display a corresponding image to reflect the time of the day.

4) Use information from the college website to fill text, images.

5) Ask for an integer input in the range 1 – 25 and print that many Fibonacci numbers.

Page 15: CS734 Internet Programming Unit 1

Internet and Address classes

▪ Largest IP network and amorphous group of computers across the globe communicating via IP protocol.

▪ IP addresses are assigned by ISPs by regional registry.

▪ To setup a network, a block of addresses are provided by ISP.

▪ Different blocks of addresses: Class A, B, C.

▪ Class C block

▪ Class B block

▪ Class A block

Page 16: CS734 Internet Programming Unit 1

Internet and CIDR addressing

▪ Limitations of the number of addresses, solution is CIDR (Classless Inter-Domain Routing)

▪ Solution uses the mechanism of prefix bits /nn. E.g. /24 is Class C address.

▪ E.g. 2 ) /19 has 13 bits for individual network, means 32 separate Class C network.

▪ E.g. 3) /28 means 4 bits for identifying local nodes – 16 nodes.

▪ All IPv4 addresses that begin with 10., 172.16. through 172.31., and 192.168. are not assigned.

Page 17: CS734 Internet Programming Unit 1

Recap

▪ IPv4 Addresses format, Class C, Class B, Class A addresses

▪ CIDR – naming and addressing, Problem?

▪ HTTP protocol with Fiddler tool (Request & Response headers and response codes).

▪ Simple HTML page, Tags and the DOM (Document Object Model).

▪ Jumpstart on Javascript (details to be followed).

▪ Client-Server architecture – how client communicates with server.

▪ Content – HTML and Protocol – HTTP.

Page 18: CS734 Internet Programming Unit 1

Network Address Translation (NAT)

▪ NAT too devices way to conserve of IP address space and security.

▪ How different is it from CIDR? (which uses /nn)E.g. /28 is sufficient for my house.

▪ How does NAT work?1) IP address provided by ISP2) Addresses assigned to my machines in a non-routable block.

▪ How does the router of ISP use NAT?

▪ Side-effects?

Page 19: CS734 Internet Programming Unit 1

Firewall

▪ Just another machine (hardware + software) put into the network in between the internet and local network.

▪ One of the tasks of Firewall is NAT.

▪ Inspects each packet that passes into the network interface that pass into and out of the local network and governed by certain rules that could be specified/configured in them.

▪ E.g. 1) incoming telnet may not be allowed.E.g. 2) Particular site may be blocked.

▪ Operates at the level of transport or internet layer.

Page 20: CS734 Internet Programming Unit 1

Proxy servers

▪ Similar to firewall, used as go-between.

▪ Operates at application layer.

▪ Security advantage: Blocks external host from local address.External host only sees the proxy server and makes it difficult to hack into the local network.

▪ Aware of HTTP, FTP protocols, but limited to few protocols.

▪ Could be used for local caching and speed up the transfer of a file.

▪ Could be used to monitor web request from individual machines.

Page 21: CS734 Internet Programming Unit 1

Client Server Model

▪ Modern day applications are designed client-server.

▪ Are there any other model? Peer-to-Peer.

Page 22: CS734 Internet Programming Unit 1

Web Concepts

▪ HTTP is designed as REST based protocol.

▪ HTML is a descriptive language used to transfer data across web.

▪ Example of HTML page

▪ URI, URL, URN

▪ Uniform Resource Identifiers – 2 types

▪ URL – Uniform Address Locator (URLs)

▪ URN – Uniform Resource Names (URNs)

Page 23: CS734 Internet Programming Unit 1

Web Concepts

▪ URL Scheme: protocol://username@hostname:port/path/filename?query#fragment

▪ E.g. ftp://username:[email protected]:007/CSE/InternetProgrammingImportantQuestions.docx

▪ URN Scheme: urn:namespace:resource_name

▪ E.g. urn:CSE_InternetProgramming:ImportantQuestions

Page 24: CS734 Internet Programming Unit 1

MIME Media types

▪ MIME – Multipurpose Internet Mail Extensions

▪ MIME is open standard used to send multipart, multimedia data through Internet where data could be binary, multi ASCII and non-ASCII

▪ Content-types

▪ E.g. HTML is text/html

▪ Text/plain, image/gif, application/xml

▪ Server Side Programming


Recommended