CSc 450/550 Computer Networks Network Architectures & Client-Server Model

Similar documents
Internet applications

Context. Distributed Systems: Sockets Programming. Alberto Bosio, Associate Professor UM Microelectronic Departement

Tutorial on Socket Programming

CSc 450/550 Computer Networks Introduction. Jianping Pan Summer 2007

Processes communicating. Network Communication. Sockets. Addressing processes 4/15/2013

Hybrid of client-server and P2P. Pure P2P Architecture. App-layer Protocols. Communicating Processes. Transport Service Requirements

CLIENT-SIDE PROGRAMMING

Socket Programming TCP UDP

Ports under 1024 are often considered special, and usually require special OS privileges to use.

CSE 124 Discussion Section Sockets Programming 10/10/17

Socket Programming. #In the name of Allah. Computer Engineering Department Sharif University of Technology CE443- Computer Networks

Sockets. Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University Embedded Software Lab.

TCP: Three-way handshake

A Client-Server Exchange

Sockets. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

UNIX Sockets. Developed for the Azera Group By: Joseph D. Fournier B.Sc.E.E., M.Sc.E.E.

Networked Applications: Sockets. Goals of Todayʼs Lecture. End System: Computer on the ʻNet. Client-server paradigm End systems Clients and servers

Networked Applications: Sockets. End System: Computer on the Net

CSC209H Lecture 9. Dan Zingaro. March 11, 2015

Announcements. CS 5565 Network Architecture and Protocols. Queuing. Demultiplexing. Demultiplexing Issues (1) Demultiplexing Issues (2)

CS 3516: Computer Networks

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University

Socket Programming. Dr. -Ing. Abdalkarim Awad. Informatik 7 Rechnernetze und Kommunikationssysteme

PA #2 Reviews. set_name, get_name, del_name. Questions? Will be modified after PA #4 ~

CS321: Computer Networks Introduction to Application Layer

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1

Network Communication

Computer Networks Prof. Ashok K. Agrawala

Socket Programming(2/2)

Oral. Total. Dated Sign (2) (5) (3) (2)

2/13/2014. A protocol is an agreed-upon convention that defines how communication occurs between two (or more?) endpoints

Session NM056. Programming TCP/IP with Sockets. Geoff Bryant Process software

Programming with TCP/IP. Ram Dantu

sottotitolo Socket Programming Milano, XX mese 20XX A.A. 2016/17 Federico Reghenzani

Lecture 2. Outline. Layering and Protocols. Network Architecture. Layering and Protocols. Layering and Protocols. Chapter 1 - Foundation

What s an API? Do we need standardization?

Socket Programming. CSIS0234A Computer and Communication Networks. Socket Programming in C

SOCKET PROGRAMMING. What is a socket? Using sockets Types (Protocols) Associated functions Styles

Outline. Distributed Computing Systems. Socket Basics (1 of 2) Socket Basics (2 of 2) 3/28/2014

Lab 0. Yvan Petillot. Networks - Lab 0 1

Outline. Distributed Computer Systems. Socket Basics An end-point for a IP network connection. Ports. Sockets and the OS. Transport Layer.

Introduction to Lab 2 and Socket Programming. -Vengatanathan Krishnamoorthi

CS321: Computer Networks Socket Programming

Elementary TCP Sockets

System Programming. Sockets

CS 43: Computer Networks. Layering & HTTP September 7, 2018

Applications and Layered Architectures. Chapter 2 Communication Networks Leon-Garcia, Widjaja

MSc Integrated Electronics Networks Assignment. Investigation of TCP/IP Sockets and Ports. Gavin Cameron

Different Layers Lecture 21

Communication Networks

Topics for this Week

NETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science

Types (Protocols) Associated functions Styles We will look at using sockets in C Java sockets are conceptually quite similar

Web Technology. COMP476 Networked Computer Systems. Hypertext and Hypermedia. Document Representation. Client-Server Paradigm.

Agenda. Before we start: Assignment #1. Routing in a wide area network. Protocols more concepts. Internetworking. Congestion control

Application Protocols and HTTP

The TCP Protocol Stack

CS 428/528 Computer Networks Lecture 01. Yan Wang

A Socket Example. Haris Andrianakis & Angelos Stavrou George Mason University

Socket Programming. Sungkyunkwan University. Hyunseung Choo Copyright Networking Laboratory

Sockets 15H2. Inshik Song

CS 43: Computer Networks. 05: Socket Programming September 12-14, 2018

Chapter 6. The Transport Layer. Transport Layer 3-1

Introduction to Socket Programming

UNIX Sockets. COS 461 Precept 1

Unix Network Programming

CSE 333 SECTION 8. Sockets, Network Programming

Network Software Implementations

Review. Preview. Closing a TCP Connection. Closing a TCP Connection. Port Numbers 11/27/2017. Packet Exchange for TCP Connection

Computer Systems and Networks

Review of Previous Lecture

CSE 333 SECTION 7. Client-Side Network Programming

Computer Networks. HTTP and more. Jianping Pan Spring /20/17 CSC361 1

CSCD 330 Network Programming

UDP. Networked Systems (H) Lecture 15

CS118 Discussion 1B, Week 1. Taqi Raza BUNCHE 1209B, Fridays 12:00pm to 1:50pm

Uniform Resource Locators (URL)

Outline. Operating Systems. Socket Basics An end-point for a IP network connection. Ports. Network Communication. Sockets and the OS

CSE 333 SECTION 6. Networking and sockets

Introduction to Socket Programming

CSE 333 SECTION 7. C++ Virtual Functions and Client-Side Network Programming

OSI Transport Layer. objectives

DATA COMMUNICATOIN NETWORKING

Advanced Java Programming. Networking

Networking Fundamentals

Concept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space provided.

IP Addresses, DNS. CSE 333 Summer Teaching Assistants: Renshu Gu William Kim Soumya Vasisht

CSE 333 Lecture network programming intro

Writing Network Applications using the TCP/IP Protocol Stack: Socket Programming

UNIT 1 TCP/IP PROGRAMMING CONCEPTS

Data Communication & Computer Networks MCQ S

CSE 333 Lecture 16 - network programming intro

Last Lecture. methods. ! How to send data from end to end: two switching. ! Packet loss and delay in a packet switched network. !

Christian Tschudin (basierend auf einem Foliensatz von C. Jelger und T. Meyer) Departement Mathematik und Informatik, Universität Basel

Internet Routing. Review of Networking Principles. What s the Internet: nuts and bolts view. Communication links

Internet Routing. Review of Networking Principles

CPSC156a: The Internet Co-Evolution of Technology and Society. Lecture 4: September 16, 2003 Internet Layers and the Web

CompSci 356: Computer Network Architectures. Lecture 3: Network Architecture Examples and Lab 1. Xiaowei Yang

Notes beforehand... For more details: See the (online) presentation program.

SOCKETS. COMP750 Distributed Systems

Transcription:

CSc 450/550 Computer Networks Network Architectures & Client-Server Model Jianping Pan Summer 2007 5/17/07 CSc 450/550 1

Last lectures So far, nuts and bolts views of the Internet Internet evolution and state-of-the-art UVicNet, BCNET, CA*Net4 Internet access technologies Internet backbone technologies How does the Internet work indeed? network protocol design and implementation network protocol: machine-to-machine language syntax, semantics, synchronization 5/17/07 CSc 450/550 2

Today's topics Network architectures why do we need an architecture? layers, services, protocols Service models client-server model client-server programming HTTP a client-server application-layer protocol HTML and simple HTTP request-reply 5/17/07 CSc 450/550 3

Network architectures Layered architecture (Q: why layered?) service vs protocol 5/17/07 CSc 450/550 4

Network services Connection-oriented vs connectionless connection establishment data transfer connection release Reliable vs unreliable error checking error correction error recovery Q: reliable services always connection-oriented? 5/17/07 CSc 450/550 5

Switching technologies Circuit switching e.g., telephone network Packet switching virtual circuit e.g., ATM datagram e.g., the Internet Q: IP/ATM/SONET/WDM? 5/17/07 CSc 450/550 6

Circuit switching Message switching Packet switching Internet: store-and-forward packet switching Q: transmission, propagation, processing, queuing delay? 5/17/07 CSc 450/550 7

OSI and TCP/IP models Q: where're the missing layers? 5/17/07 CSc 450/550 8

Protocol hierarchies HTTP message TCP segment IP packet M1 +M 2 =M Ethernet frame Bit stream H: header; T: tail 5/17/07 CSc 450/550 9

Internet Protocol Suite Hour-glass model application: telnet, ftp, email, Web, VoIP,... Web/HTTP: a client-server application layer protocol transport: TCP, UDP, RTP, SCTP network: IP subnetwork: Ethernet, ATM, FDDI, PPP, FR,... Everything over IP IP over everything 5/17/07 CSc 450/550 10

Service models Client-server model server: services at well-known socket (WKS) client: request services from anywhere! client-server: request-reply transactions Later, client-intermediary-server model web caching and content distribution In csc485b, peer-to-peer model client/server-server/client 5/17/07 CSc 450/550 11

Client-server model client server Server request a process (running program) on a (server) computer (hosted in a server farm) reply waiting for incoming requests process and reply Client a process on a client computer making requests Q: many clients? 5/17/07 CSc 450/550 12 process

Client-server programming E.g., socket API Client socket() connect() send() recv() close() Server socket() bind() listen() accept() recv() send() close() 5/17/07 CSc 450/550 13

Socket API int socket(int domain, int type, int protocol); domain PF_INET (Internet protocol family), and others type SOCK_STREAM (supported by TCP) SOCK_DGRAM (supported by UDP) and others protocol normally implied by socket type 5/17/07 CSc 450/550 14

Service offered by TCP Service offered by TCP reliable in-sequence stream-like data transfer TCP protocol mechanisms (stay tuned!) connection management flow, error, congestion control 5/17/07 CSc 450/550 15

Socket, IP address, port number int bind (int sockfd, struct sockaddr my_addr, socklen_t addrlen); struct sockaddr_in {short int sin_family; unsigned short int sin_port; //16-bit port# struct in_addr sin_addr; // 32-bit IP address unsigned char sin_zero[8];}; struct in_addr {unsigned long s_addr;}; /etc/services, /etc/hosts, DNS 5/17/07 CSc 450/550 16

Worldwide web Tim Berners-Lee 1989, CERN Hypertext and hypermedia linked documents Marc Andreessen 1993, Mosaic, NCSA@UIUC Netscape Comm Netscape navigator vs MS Internet explorer 5/17/07 CSc 450/550 17

Web overview 5/17/07 CSc 450/550 18

Uniform Resource Locator http://user:pass@host:port/path/file?input 5/17/07 CSc 450/550 19

HTML tags Anchors <a href=''...''>...</a> Objects <img src=''...''> 5/17/07 CSc 450/550 20

HTTP Hyper text transfer protocol application layer protocol, ASCII format HTTP/1.0: RFC1945 (1996); 1.1: RFC2068 (1997) typical client-server model: request-reply client (browser): Navigator, Mozilla, Opera, IE server (web server) Apache, Microsoft Internet information server (IIS) normally uses service offered by TCP http: 80; https: 443 (HTTP over SSL over TCP) 5/17/07 CSc 450/550 21

HTTP requests Request methods Request parameters (control headers) 5/17/07 CSc 450/550 22

HTTP responses Response codes 400: bad request Response parameters Response data 5/17/07 CSc 450/550 23

HTTP examples # wget -d www.google.com Connecting to www.google.com:80... Caching www.google.com <-> 66.102.7.104 Created fd 3. connected! client server ---request begin--- request GET / HTTP/1.0 User-Agent: Wget/1.7 Host: www.google.com Accept: */* Connection: Keep-Alive ---request end--- reply HTTP request sent, awaiting response... HTTP/1.0 302 Found Location: http://www.google.ca/ Cache-Control: private Content-Type: text/html synchronization? 5/17/07 Server: GWS/2.1 CSc 450/550 24 Content-Length: 218 Q: syntax, semantics,

Web browsing examples http://www.a.com/index.html <html> <img src=''http://www.a.com/x.gif''> <a ref=''http://www.b.com/y.gif''> <img src=''http://www.b.com/z.gif''></a> </html> In your favorite web browser URL: http://www.a.com how many HTTP requests? 5/17/07 CSc 450/550 25

This lecture Internet architecture Client-server model HTTP HTML basics: anchors and objects simple HTTP request and response Explore further how efficient is HTTP? Ethereal lab next Wednesday! 5/17/07 CSc 450/550 26

Project 1: multi-thread web server Specification Specification walk-through Design assistance Implementation assistance Demo Submission 5/17/07 CSc 450/550 27

For CSc 550 students Course project (15%) course project topics and ideas due: May 18 1-page course project proposal due: June 1 midterm checkpoint due: June 29 final deliverables course project report and prototype due: the end of the term 5/17/07 CSc 450/550 28

Next lectures May 24: HTTP (2) HTTP connections how HTTP and TCP can fit better Web caching May 28: DNS May 31: 1st midterm exam 5/17/07 CSc 450/550 29