The Internet and Java Sockets ICW Lecture 5 Tom Chothia.

Slides:



Advertisements
Similar presentations
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
Advertisements

Introduction to the Internet and World Wide Web Design.
Network Layer and Transport Layer.
Davide Rossi 2002 Using Sockets in Java. 2Davide Rossi 2002 TCP/IP  A protocol is a set of rules that determine how things communicate with each other.
Introduction to Management Information Systems Chapter 5 Data Communications and Internet Technology HTM 304 Fall 07.
1 Review of Important Networking Concepts Introductory material. This module uses the example from the previous module to review important networking concepts:
© 2004, Robert K. Moniot Chapter 1 Introduction to Computers and the Internet.
Vocabulary URL = uniform resource locator: web address protocol –set of rules that networked computers follow in order to share data and coordinate communications.
Secure Sockets SSL/TLS ICW: Lecture 6 Tom Chothia.
Inside of a computer… What happens when you turn your computer on? What loads? Where are applications stored? How are do they run? In what form is information.
Understanding Networks Charles Zangla. Network Models Before I can explain how connections are made from across the country, I would like to provide you.
©Brooks/Cole, 2003 Chapter 6 Computer Networks. ©Brooks/Cole, 2003 Understand the rationale for the existence of networks. Distinguish between the three.
1 Review of Important Networking Concepts Introductory material. This slide uses the example from the previous module to review important networking concepts:
CS 356 Systems Security Spring Dr. Indrajit Ray
IT 210 The Internet & World Wide Web introduction.
CP476 Internet ComputingCh.1 # 1 Lecture 2. A Brief Introduction to the Internet The objective is to understand The history of Internet What the Internet.
Computer Networks  Network - A system of computers interconnected in order to share information.  Data transmission - consists of sending and receiving.
TCP/IP protocols Communication over Internet is mostly TCP/IP (Transmission Control Protocol over Internet Protocol) TCP/IP "stack" is software which allows.
Rhys McBreen (How the internet works) X. Contents The Layers and what they do IP Addressing X.
 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.
© 2006 Pearson Education 1  Obj: 1.2, to understand networks HW: Review sheet  Quiz next class Sections 1.0 – 1.2  Do Now: p.47 #1.4 and 1.5 C1 D3.
1 ELEN602 Lecture 2 Review of Last Lecture Layering.
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.
Chapter 1: Introduction to Web Applications. This chapter gives an overview of the Internet, and where the World Wide Web fits in. It then outlines the.
HTTP HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other.
School of Engineering and Computer Science Victoria University of Wellington Copyright: Peter Andreae, VUW Networking COMP # 21.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
© McLean HIGHER COMPUTER NETWORKING Lesson 1 – Protocols and OSI What is a network protocol Description of the OSI model.
Human-Computer Interface Course 4. Content History of Internet What is Internet ? Internet Protocols The OSI 7 layers model TCP/IP The World Wide Web.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Chapter 4 Networking and the Internet. © 2005 Pearson Addison-Wesley. All rights reserved 4-2 Chapter 4: Networking and the Internet 4.1 Network Fundamentals.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
The Inter-network is a big network of networks.. The five-layer networking model for the internet.
1. I NTRODUCTION TO N ETWORKS Network programming is surprisingly easy in Java ◦ Most of the classes relevant to network programming are in the java.net.
Exploring Office 2003 – Grauer and Barber HTML And Basic Web page.
4061 Session 25 (4/17). Today Briefly: Select and Poll Layered Protocols and the Internets Intro to Network Programming.
Marwan Al-Namari Week 5. Responsible for delivering packets between endpoints over multiple links Physical Link Network Transport Application.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
Lecture Number One History of the internet and a bit about how it works.
Presented by Rebecca Meinhold But How Does the Internet Work?
TCP/IP (Transmission Control Protocol / Internet Protocol)
Jeopardy ProtocolsPartsPrograms General Internet HTML Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final Jeopardy.
TCP/IP Model & How it Relates to Browsing the Internet Anonymously BY: HELEN LIN.
IP addresses IPv4 and IPv6. IP addresses (IP=Internet Protocol) Each computer connected to the Internet must have a unique IP address.
Networks Part 2: Infrastructure + Protocols NYU-Poly: HSWP Instructor: Mandy Galante.
CS1001 Lecture 7. Overview Computer Networks Computer Networks The Internet The Internet Internet Services Internet Services Markup Languages Markup Languages.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
1. Layered Architecture of Communication Networks: TCP/IP Model
CSI 3125, Preliminaries, page 1 Networking. CSI 3125, Preliminaries, page 2 Networking A network represents interconnection of computers that is capable.
Net 221D:Computer Networks Fundamentals
IT 210: Web-based IT Fall 2012 Lecture: Network Basics, OSI, & Internet Architecture.
TCP/IP. The idea behind TCP/IP is exactly the same we explained about the OSI reference model: when transmitting data, programs talk to the Application.
Computer Communication: An example What happens when I click on
Transmission Control Protocol (TCP) Internet Protocol (IP)
Internet Concept of protocols INTERNET Internet Service Provider (ISP) has connected to the Internet.
COMPUTER NETWORKS Hwajung Lee. Image Source:
1 Network Communications A Brief Introduction. 2 Network Communications.
Also known as hardware/physi cal address Customer Computer (Client) Internet Service Provider (ISP) MAC Address Each Computer has: Given by NIC card.
UDP: User Datagram Protocol. What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host – treats a computer as an.
How is all that data traffic controlled on the Internet?
Distributed Systems.
Networking COMP
Networking for Home and Small Businesses – Chapter 6
Networking for Home and Small Businesses – Chapter 6
Topic 5: Communication and the Internet
Web Design & Development
Starting TCP Connection – A High Level View
How Our Customers Communicate With Us
Networking for Home and Small Businesses – Chapter 6
Presentation transcript:

The Internet and Java Sockets ICW Lecture 5 Tom Chothia

Reminder of Last Time: Encryption can be public key or symmetric. Use a Cipher Object in Java to encrypt and decrypt. Keep your keys in a KeyStore

This Time: How the Internet works. –Some History –TCP/IP –DNS How to make socket connections between computers using Java. How to send Strings and Objects.

Before the Internet Life was solitary, poor, nasty, brutish and short. Computer Networks: –local networks, –telephone line connections, –leased line.

The Start 1969 The US Defense Advanced Research Projects Agency (then ARPA now DARPA) gives research grants to universities to buy computers. The decide to link their computers. But how?

The Problem With Leased Lines A BD C

A BD C

If A and D use the line, then C and B can't A BD C

But if everyone just sends a small packet of data, they can both use the line at the same. A BD C

The Internet Protocol Packet

IP Addresses Every computer has an IP address. e.g Every router on the Internet keeps a list of which connection it should use for which addresses.

Transmission Control Protocol 1974: daily traffic more than 3 million packets a day. Many are getting lost. TCP is a protocol than runs on top on IP, if an IP packet gets lost. It requests that it is resent. TCP/IP becomes allows Inter network connections. So in 1977:

The ARPAnet 1969 the birth of the ARPAnet the ARPAnet becomes a Inter-network first Spam message send. Admin assures users this will never happen again

The Internet 1982 :-) 1983 TCP/IP becomes standard. By 1990 most of Europe, India and South Africa have joined.

Domain Name Servers (DNS) Remembering IP address is to hard. So people associate names with addresses. e.g. news.bbc.com → A hierarchy of servers list handle requests The route for most of Europe is RIPE based in Amsterdam.

The Internet 1988 The Morris Worm, CERT formed The Web: HTTP and HTML The first ISPs and Mosaic the first web browser Yahoo

Today All computers on the Internet have an IP address. Key Internet Protocols: TCP/IP DNS to turn names into numbers.

The Internet Protocol Stack Application Transport Network Link/Hardware Internet communication uses a stack of protocols. Each protocol uses the protocol below it to sent data.

Using the Stack to Send Data Application Transport Network Link/Hardware Application Transport Network Link/Hardware Data H T (Data) H N (H T (Da) H N (H T (ta)) H L H N (H T (Da), H L H N (H T (ta)) Computer 2Computer 1 H N (H T (Da) Data H T (Data) H L H N (H T (Da) ),H L H N (H T (ta)) H T (Da) Lost

The Stack, Most of the Time: Stuff that you write TCP or UDP IP Ethernet or Application Transport Network Link/Hardware

Sockets A computer is Identified by an IP address. To allow multiple connections each computer has a port number. WWW runs on port 80, ssh on port 22, dns on 53, (free wifi). A simple connection between two computers is called a socket. Sockets are uniquely identified by (IP sender, port sender,IP receiver,port receiver).

Our View of the Stack in Java Application Java Program Sockets

Sockets in Java Use java.io.Socket to make a socket that connects to a remote computer. Use java.io.ServerSocket to make a socket that listens for an incoming connection. Sockets just give bytes, so then need a wrapper.

Code Demo Simple socket connections

Multi-Threaded Servers To receive multiple connections you can use threads. See demo. More on Threads in Lecture 11.

Sending an Object Java lets you send an object over a socket. The Object must be Serializable and have a UID (see demo). Use the ObjectStream wrapper to send Objects.

Conclusion The Internet uses a packet based routing system IP. Sockets are an easy way to connect between machines. Use the Socket and ServerSocket Class. Use a wrapper for the socket for different data types.

Next Time: All the data send was total insecure. Next lecture I will show you how how to make encrypted sockets, how to know who your talking to. i.e. what exactly does the little padlock main in my web browser?