Networking Part 2 Charles Severance Review... Layered Network Model A layered approach allows the problem of implementing a network to be broken into.

Slides:



Advertisements
Similar presentations
BASIC CRYPTOGRAPHY CONCEPT. Secure Socket Layer (SSL)  SSL was first used by Netscape.  To ensure security of data sent through HTTP, LDAP or POP3.
Advertisements

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
Network Services Networking for Home & Small Business.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
Layer 7- Application Layer
Cornell CS502 Web Basics and Protocols CS 502 – Carl Lagoze Acks to McCracken Syracuse Univ.
TCP: Software for Reliable Communication. Spring 2002Computer Networks Applications Internet: a Collection of Disparate Networks Different goals: Speed,
Implementing Application Protocols. Overview An application protocol facilitates communication between applications. For example, an client uses.
POP3 Post Office Protocol v.3. Intro The Post Office Protocol (POP) is currently the most popular TCP/IP access and retrieval protocol. It implements.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Application Layer Functionality and Protocols Network Fundamentals – Chapter 3.
Electronic Mail (SMTP, POP, IMAP, MIME)
Process-to-Process Delivery:
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Human-Computer Interface Course 5. ISPs and Internet connection.
Intro to Computer Networks Internet and Networking Terms Bob Bradley The University of Tennessee at Martin.
Hands-On Microsoft Windows Server 2003 Networking Chapter Three TCP/IP Architecture.
Intro to Computer Networks Bob Bradley The University of Tennessee at Martin.
Lesson 24. Protocols and the OSI Model. Objectives At the end of this Presentation, you will be able to:
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.
Network Protocols. Why Protocols?  Rules and procedures to govern communication Some for transferring data Some for transferring data Some for route.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 3: TCP/IP Architecture.
FTP (File Transfer Protocol) & Telnet
© 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.
How Web Servers and the Internet Work by by: Marshall Brainby: Marshall Brain
1.1 What is the Internet What is the Internet? The Internet is a shared media (coaxial cable, copper wire, fiber optics, and radio spectrum) communication.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
Network Services Networking for Home & Small Business.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Network Services Networking for Home and Small Businesses – Chapter 6.
1 CSC111H Client-Server: An Introduction Dennis Burford
TCP/IP Transport and Application (Topic 6)
The Internet The internet is simply a worldwide computer network that uses standardised communication protocols to transmit and exchange data.
Internet Protocol B Bhupendra Ratha, Lecturer School of Library and Information Science Devi Ahilya University, Indore
Application Layer Khondaker Abdullah-Al-Mamun Lecturer, CSE Instructor, CNAP AUST.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
TCP/IP (Transmission Control Protocol / Internet Protocol)
Protocols COM211 Communications and Networks CDA College Olga Pelekanou
TCP =Transmission Control Protocol IP = Internet Protocol TCP/IP Protocol.
Networks Part 2: Infrastructure + Protocols NYU-Poly: HSWP Instructor: Mandy Galante.
Transmission Control Protocol (TCP) Internet Protocol (IP)
Protocols Monil Adhikari. Agenda Introduction Port Numbers Non Secure Protocols FTP HTTP Telnet POP3, SMTP Secure Protocols HTTPS.
Enterprise Network Systems TCP Mark Clements. 3 March 2008ENS 2 Last Week – Client/ Server Cost effective way of providing more computing power High specs.
Python for Informatics: Exploring Information
Computer Network Architecture Lecture 6: OSI Model Layers Examples 1 20/12/2012.
Internet Flow By: Terry Hernandez. Getting from the customers computer onto the internet Internet Browser
The Transport Layer Implementation Services Functions Protocols
Application layer tcp/ip
Instructor Materials Chapter 5 Providing Network Services
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Using MIS 2e Chapter 6 Appendix
Understand the OSI Model Part 2
Networking for Home and Small Businesses – Chapter 6
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Working at a Small-to-Medium Business or ISP – Chapter 7
Web Development & Design Chapter 1, Sections 4, 5 & 6
Networking for Home and Small Businesses – Chapter 6
Working at a Small-to-Medium Business or ISP – Chapter 7
Topic 5: Communication and the Internet
Working at a Small-to-Medium Business or ISP – Chapter 7
Process-to-Process Delivery:
Lecture 2: Overview of TCP/IP protocol
Protocols 2 Key Revision Points.
Networking for Home and Small Businesses – Chapter 6
Protocol Application TCP/IP Layer Model
Presentation transcript:

Networking Part 2 Charles Severance

Review...

Layered Network Model A layered approach allows the problem of implementing a network to be broken into more manageable sub problems For example the IP layer is allowed to lose a packet if things go bad It is TCP’s Responsibility to store and retransmit data. Application Layer Web, , File Transfer Transport Layer (TCP) Reliable Connections Internetwork Layer (IP) Simple, Unreliable Link Layer (IP) Physical Connections

To: To: *.* *.* To: While in the network, all that matters is the Network number. Clipart:

Transport Protocol (TCP) Built on top of IP Assumes IP might lose some data In case data gets lost - we keep a copy of the data a we send until we get an acknowledgement If it takes “too long” - just send it again Source:

System to System IP Regardless of the number of connections between two systems, the traffic is transported across the internet as a single IP address - It is the responsibility of TCP to separate (de- multiplex) each stream on each system

Transport Protocol (TCP) The responsibility of the transport layer is to present a reliable end-to-end pipe to the application Data either arrives in the proper order or the connection is closed TCP keeps buffers in the sending and destination system to keep data which has arrived out of order or to retransmit if necessary TCP provides individual connections between applications

Security for TCP

Generally, the backbone of the Internet is pretty secure to prying eyes from generic baddies... Your local connection (particularly when wireless) is your greatest exposure. TCP/IP System to System Secure TCP/IP Clipart: Photo CC BY: karindalziel (flickr)

Secure Sockets Transport Layer Security (TLS) When Secure Sockets Layer (SSL) is used, all of the data in the TCP is encrypted before it leaves your machine and decrypted in the destination machine It is very difficult but not impossible to break this security - normal people do not have the necessary compute resources to break TLS Encrypting sockets takes resources - so we use it for things when it is needed The IP and link layers are unaware when the contents of a TCP connections are encrypted (Abstraction)

Secure Sockets SSL is best thought of as a “sub” layer Like a thin shim between the application layer and transport layer Hides data from prying eyes ayer Chart: Photo CC BY: karindalziel (flickr)

Secure Application Protocols There are often secure and unencrypted application protocols Your browser tells you when using a secure connection - you should never type passwords into a non-secure connection Especially over wireless - especially at a security conference...

Source:

TCP, Ports, and Connections

System to System IP Regardless of the number of connections between two systems, the traffic is transported across the internet as a single IP address - It is the responsibility of TCP to separate (de- multiplex) each stream on each system

Incoming Login Web Server 25 Personal Mail Box blah blah blah blah Please connect me to the secure web server (port 443) on Clipart:

Common TCP Ports Telnet (23) - Login SSH (22) - Secure Login HTTP (80) HTTPS (443) - Secure SMTP (25) (Mail) IMAP (143/220/993) - Mail Retrieval POP (109/110) - Mail Retrieval DNS (53) - Domain Name FTP (21) - File Transfer

Application Protocols

HTTP - Hypertext Transport Protocol The dominant Application Layer Protocol on the Internet Invented for the Web - to Retrieve HTML, Images, Documents etc Extended to be data in addition to documents - RSS, Web Services, etc.. Basic Concept - Make a Connection - Request a document - Retrieve the Document - Close the Connection

HTTP Request / Response Cycle Browser Web Server HTTP Request HTTP Response Internet Explorer, FireFox, Safari, etc. Source:

HTTP Request / Response Cycle Browser Web Server HTTP Request HTTP Response Internet Explorer, FireFox, Safari, etc. GET /index.html.. Welcome to my application Source:

Internet Standards The standards for all of the Internet protocols (inner workings) are developed by an organization Internet Engineering Task Force (IETF) Standards are called “RFCs” - “Request for Comments” Source:

Source:

“Hacking” HTTP Last login: Wed Oct 10 04:20:19 on ttyp2 si-csev-mbp:~ csev$ telnet 80 Trying Connected to Escape character is '^]'. GET /.... HTTP Request HTTP Response Browser Web Server Port 80 is the non-encrypted HTTP port

A Bit of Python Network Software

A Simple Web Browser We will write a Python application that connects to web server and retrieves the top level page Our software will run in a client (our desktop) and talk to a server - far away in the network “cloud” Source:

Network/Internet Hardware Software Phone CC BY: Johan Larsson (flickr)flickr Servers CC BY: Jesse Wagstaff (flickr)(flickr)

Hardware Hardware Software Software InputDevices CentralProcessingUnit MainMemory OutputDevicesSecondaryMemory Network/Internet Phone CC BY: Johan Larsson (flickr)flickr

Hardware Hardware Software Software CentralProcessingUnit MainMemory SecondaryMemory Network/Internet IP Suite: Phone CC BY: Johan Larsson (flickr)

GET / import socketmysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)mysock.connect((“ 80))mysock.send("GET /\n") while 1: data = mysock.recv(512) if ( len(data) < 1 ) : break print data;mysock.close() Source:

In computer science, abstraction is a mechanism and practice to reduce and factor out details so that one can focus on a few concepts at a time.computer science import socketmysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)mysock.connect((“ 80))mysock.send("GET /\n") while 1: data = mysock.recv(512) if ( len(data) < 1 ) : break print data;mysock.close() Source:

Layered Network Model A layered approach allows the problem of implementing a network to be broken into more manageable sub problems The layers provide abstraction - each layer can focus on one problem and assume the other layers do their jobs Application Layer Web, , File Transfer Transport Layer (TCP) Reliable Connections Internetwork Layer (IP) Simple, Unreliable Link Layer (IP) Physical Connections

import socketmysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)mysock.connect((“ chuck.com”, 80))mysock.send("GET /\n") while 1: data = mysock.recv(512) if ( len(data) < 1 ) : break print data;mysock.close() A Simple Web Browser

$ python http.py Error Not found.... import socketmysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)mysock.connect((“ 80))mysock.send("GET /\n") while 1: data = mysock.recv(512) if ( len(data) < 1 ) : break print data;mysock.close()

import socket while 1: host = raw_input("Enter host: "); if ( host == "quit") : break mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) mysock.connect((host, 80)) mysock.send("GET /\n") data = "" while 1: chunk = mysock.recv(512) if ( len(chunk) < 1 ) : break # print data; data = data + chunk print "Page size:", len(data) mysock.close()

$ python browser.py Enter host: Page size: 1996 Enter host: Page size: Enter host: Page size: 6152 Enter host: Page size: 9554 Enter host: ww.dr-chuck.com Traceback (most recent call last): File "browser.py", line 10, in mysock.connect((host, 80)) File " ", line 1, in connect socket.gaierror: (8, 'nodename nor servname provided, or not known')

import socket while 1: host = raw_input("Enter host: "); if ( host == "quit") : break mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) mysock.connect((host, 80)) mysock.send("GET /\n") data = "" while 1: chunk = mysock.recv(512) if ( len(chunk) < 1 ) : break # print data; data = data + chunk print "Page size:", len(data) mysock.close() How might we recover from this error in Python more gracefully?

POP3 Protocol Post Office Protocol Your laptop/PDA is not always connected to the network Your mail is delivered to a “Post office Box” - which is always up and waiting for your mail From time to time - you connect to the “Post Office Box” and pull down your new mail CC BY: Faeryan (flickr)flickr

mail.umich.edu Incoming 25 Personal Mail Box Login and retrieve your mail at 8AM. Mail sent at 2AM. Mail received at 2:01AM. Put in Mail box. Clipart:

USER name Arguments: a string identifying a mailbox (required), which is of significance ONLY to the server Restrictions: may only be given in the AUTHORIZATION state after the POP3 greeting or after an unsuccessful USER or PASS command Discussion: To authenticate using the USER and PASS command combination, the client must first issue the USER command. If the POP3 server responds with a positive status indicator ("+OK"), then the client may issue either the PASS command to complete the authentication, or the QUIT command to terminate the POP3 session. If the POP3 server responds with a negative status indicator ("- ERR") to the USER command, then the client may either issue a new authentication command or may issue the QUIT command. The server may return a positive response even though no such mailbox exists. The server may return a negative response if mailbox exists, but does not permit plaintext password authentication. Possible Responses: +OK name is a valid mailbox -ERR never heard of mailbox name Examples: C: USER frated S: -ERR sorry, no mailbox for frated here... C: USER mrose S: +OK mrose is a real hoopy frood The Written Specification for the POP3 Protocol

$ telnet mail.comcast.net 110 Trying Connected to mail.g.comcast.net. Escape character is '^]'. +OK POP3 ready USER csev +OK PASS *********** +OK ready LIST +OK 32 messages ( ) RETR 6 +OK Received: from imta11.westchester.pa.mail.comcast.net ([ ]) X-Originating-IP: [ ] Received: by with HTTP; Tue, 10 Jun :33: (PDT) Date: Tue, 10 Jun :33: From: "Bob S." To: Subject: Blast from the past Hi Chuck, I want to comment on your router problem at home. Are you being bad and using something other than Unix/Linux to combine your network connection? Bob S.

Summary We start with a “pipe” abstraction - we can send and receive data on the same “socket” We can optionally add a security layer to TCP using SSL - Secure Socket Layer (aka TLS - Transport Layer Security) We use well known “port numbers” so that applications can find a particular application *within* a server such as a mail server, web service, etc

Summary When doing network programming we make use of a library that hide all the detail of how the Internet is put together - we simple open and use a TCP connection (Abstraction) Each application defines a set of rules of interaction between client and server (a protocol) Knowing the protocol - we can write an application to talk that protocol