15-Jul-15 Basic Protocols. 2 Sockets Sockets, or ports, are a very low level software construct that allows computers to talk to one another When you.

Slides:



Advertisements
Similar presentations
Basic Internet Terms Digital Design. Arpanet The first Internet prototype created in 1965 by the Department of Defense.
Advertisements

4.01 How Web Pages Work.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 25 Networking.
© 2010, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet 1.
The Internet Useful Definitions and Concepts About the Internet.
Layer 7- Application Layer
Chapter Extension 7 How the Internet Works © 2008 Prentice Hall, Experiencing MIS, David Kroenke.
Internet…issues Managing the Internet
The Internet and the World Wide Web. Una DooneyThe Internet and WWWSlide 2 What is the Internet? A collection of networks (LANS and WANS) around the world.
28-Jun-15 Basic Protocols. 2 Sockets Sockets, or ports, are a very low level software construct that allows computers to talk to one another When you.
© 2004, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet.
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
A global, public network of computer networks. The largest computer network in the world. Computer Network A collection of computing devices connected.
TCP Sockets Reliable Communication. TCP As mentioned before, TCP sits on top of other layers (IP, hardware) and implements Reliability In-order delivery.
Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Introduction of Web programming Ins. Elaf Alhazmi LECTURE 1.
Computer Networks  Network - A system of computers interconnected in order to share information.  Data transmission - consists of sending and receiving.
Human-Computer Interface Course 5. ISPs and Internet connection.
TCP/IP protocols Communication over Internet is mostly TCP/IP (Transmission Control Protocol over Internet Protocol) TCP/IP "stack" is software which allows.
NAVIGATING THE INTERNET ALPHABET SOUP.  A global network that connects millions of computers all over the world.  The Internet backbone is the central.
Syllabus outcomes Describes and applies problem-solving processes when creating solutions Designs, produces and evaluates appropriate solutions.
 TCP/IP is the communication protocol for the Internet  TCP/IP defines how electronic devices should be connected to the Internet, and how data should.
Chapter 10 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain how the functions of the application layer,
CS134 Web Design & Development Introduction to the Internet Mehmud Abliz.
2013Dr. Ali Rodan 1 Handout 1 Fundamentals of the Internet.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
Web Page Design I Retest Terms Review. 1. Web pages are created using a language known as ___________. The coding of this language must follow specific.
How Web Servers and the Internet Work by by: Marshall Brainby: Marshall Brain
Internet Concept and Terminology. The Internet The Internet is the largest computer system in the world. The Internet is often called the Net, the Information.
4-Oct-15 Basic Protocols. 2 Sockets Sockets, or ports, are a very low level software construct that allows computers to talk to one another When you send.
Web Page Design I Basic Computer Terms “How the Internet & the World Wide Web (www) Works”
15 Semester 1 JEOPARDY IndirectnetworksupportDNSDNSNetworkApps.NetworkApps.MoreNetworkApps.Misc.Misc
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
CIS 1310 – HTML & CSS 1 Introduction to the Internet.
1 CSC111H Client-Server: An Introduction Dennis Burford
TCP/IP Transport and Application (Topic 6)
The Inter-network is a big network of networks.. The five-layer networking model for the internet.
1 Welcome to CSC 301 Web Programming Charles Frank.
Exploring Office 2003 – Grauer and Barber HTML And Basic Web page.
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
CS 11 java track: lecture 6 This week: networking basics Sockets Vectors parsing strings.
Application Block Diagram III. SOFTWARE PLATFORM Figure above shows a network protocol stack for a computer that connects to an Ethernet network and.
The Web and Web Services Jim Graham NR 621 Spring 2009.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
Introduction to Internet. Chapter 1 Objectives Origins of the Internet Packets and Routers TCP/IP DNS HTTP URL Client-Server.
TCP/IP (Transmission Control Protocol / Internet Protocol)
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
INTERNET PROTOCOLS. Microsoft’s Internet Information Server Home Page Figure IT2031 UNIT-3.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CSI 3125, Preliminaries, page 1 Networking. CSI 3125, Preliminaries, page 2 Networking A network represents interconnection of computers that is capable.
Transmission Control Protocol (TCP) Internet Protocol (IP)
Application of the Internet 1998/12/09 KEIO University, JAPAN Mikiyo
URL Programming Mimi Opkins CECS277. What is a URL?  URL is an acronym for Uniform Resource Locator and is a reference (an address) to a resource on.
TCP/IP Protocol Suite ©Richard L. Goldman September 25, 2002.
Introduction to the Internet
Instructor Materials Chapter 5 Providing Network Services
How is all that data traffic controlled on the Internet?
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Lecture 6: TCP/IP Networking By: Adal Alashban
Chapter 27 WWW and HTTP.
Basic Protocols 24-Nov-18.
Lecture 6: TCP/IP Networking 1nd semester By: Adal ALashban.
Basic Protocols 19-Feb-19.
Computer Networks Protocols
Presentation transcript:

15-Jul-15 Basic Protocols

2 Sockets Sockets, or ports, are a very low level software construct that allows computers to talk to one another When you send information from one computer to another, you send it to a port on the receiving computer If the computer is “listening” on that port, it receives the information In order for the computer to “make sense” of the information, it must know what protocol is being used Common port numbers are 80 (for web pages), 23 (for telnet) and 25 and 110 (for mail) Port numbers above 1024 are available for other kinds of communication between our programs

3 Protocols In order for computers to communicate with one another, they must agree on a set of rules (a “language”) for who says what, when they say it, and what format they say it in This set of rules is a protocol Different programs can use different protocols Protocols may be in ASCII (characters) or in binary Some common protocols are HTTP (for web pages), FTP (for file transfer), and SMTP (Simple Mail Transfer Protocol)

4 TCP/IP The Internet (and most other computer networks) are connected through TCP/IP networks TCP/IP is actually a combination of two protocols: IP, Internet Protocol, is used to move packets (chunks) of data from one place to another Places are specified by IP addresses: four single-byte (0..255) numbers separated by periods Example: TCP, Transmission Control Protocol, ensures that all necessary packets are present, and puts them together in the correct order TCP/IP forms a “wrapper” around data of any kind The data uses its own protocol, for example, FTP

5 Hostnames and DNS servers The “real” name of a computer on the internet is its four-byte IP address People, however, don’t like to remember numbers, so we use hostnames instead For example, the hostname is www.cis.upenn.edu A DNS (Domain Name Server) is a computer that translates hostnames into IP addresses Think of it as like a phone book--names to useful numbers Of course, you have to know the IP address of the DNS in order to use it! You usually get two DNS numbers from your Internet Service Provider (ISP)

6 DHCP If you have a web site, it must be hosted on a computer that is “permanently” on the Web This computer must have a permanent IP address There aren’t enough IP addresses for the number of computers there are these days If you have no permanent web site, you can be given a temporary (dynamically allocated) IP address each time you connect to the Web Similarly, if you have a home or office network, only one computer needs a permanent IP address The rest of the computers can be assigned internal, permanent IP addresses (not known to the rest of the world) They can also be assigned internal IP addresses dynamically DHCP (Dynamic Host Configuration Protocol) is a way of assigning temporary IP addresses as needed

7 URLs A URL, Uniform Resource Locater, defines a location on the Web A URL has up to five parts: Protocol -- http is used for Web pages Hostname Port is default for http requests Path to a given page Anchor -- a location within the page

8 ShowURL.java import java.net.*; // Gittleman, Example 2.2, pp import java.applet.Applet; public class ShowURL extends Applet { public void init() { try { URL url = new URL(getParameter("url")); getAppletContext().showDocument(url); } catch(MalformedURLException e) { e.printStackTrace(); } } }

9 About the ShowURL.java applet import java.net.*; This is the package that defines sockets, URLs, etc. URL url = new URL(getParameter("url")); Constructs a URL object from a text string getAppletContext() An AppletContext describes the document containing this applet and the other applets in the same document showDocument(url) Replaces the Web page currently being viewed with the given URL catch(MalformedURLException e) This exception is thrown if the given String cannot be parsed by newURL( String )

10 Running the applet (BlueJ) 1 2 3

11 Running the applet (Eclipse) 1.Choose Run --> Run... from the menus 2.In the left pane, click on ShowURL under Java applet 3.Click on the Parameters tab, then Add... or Edit... parameters (in this case, give the url parameter some appropriate URL) 4.Run the applet in the usual way

12 Applet results If the applet is run using appletviewer, you get an applet, but it’s blank Unless, that is, the page you go to has a applet on it If the applet is run using a browser, First, a web page appears, with a gray rectangle for the applet (which is just starting up) Then the initial web page is replaced by the web page specified by the URL You are now in your regular browser, just as if you had typed the URL into it

13 TryURL.java, I ShowURL.java is an applet; it runs in a browser, gets a web page, and displays it in that browser TryURL.java is an application; it runs standalone, gets a web page, and displays the HTML that it got Basic structure: import java.net.*; import java.io.*; public class TryURL { public static void main(String[] args) { try {...important code goes here.... } catch (Exception e) {... } } }

14 TryURL.java, II BufferedReader input; String line; URL url = new URL( " input = new BufferedReader( new InputStreamReader(url.openStream())); line = input.readLine(); while (line != null) { System.out.println(line); line = input.readLine(); } input.close();

15 TryURL.java, III TryURL just writes out the “raw” HTML that it receives A more complex program could use javax.swing.JEditorPane, which can display a subset of HTML JEditorPane can also display RTF (Rich Text Format)

16 The End