1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.

Slides:



Advertisements
Similar presentations
Chapter 17 Networking Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Advertisements

Spring 2000CS 4611 Introduction Outline Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics.
Spring 2003CS 4611 Introduction, Continued COS 461.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based.
Network Architectures Professor Jinhua Guo CIS 527 Fall 2002.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based.
Spring 2004 EE4272 EE4272: Computer Networks Instructor: Dr. Tricia Chigan Dept.: Elec. & Comp. Eng.
Socket Programming.
CIS 527 Computer Networks Introduction Professor Jinhua Guo (updated version) Fall 2003.
Spring 2003CS 4611 Welcome to COS 461 Vivek Pai. Spring 2003CS 4612 Mechanics First time teaching 461 –But have been doing some level of networking for.
CSE/EE 461 Getting Started with Networking. Basic Concepts  A PROCESS is an executing program somewhere.  Eg, “./a.out”  A MESSAGE contains information.
1/20 Introduction Outline Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics Implementation Issues.
Networks 1 CS502 Spring 2006 Network Input & Output CS-502 Operating Systems Spring 2006.
Spring 2001CS 4611 Elements of a Protocol Implementation Outline Service Interface Process Model Common Subroutines Example Protocol.
Gursharan Singh Tatla Transport Layer 16-May
Chapter Overview TCP/IP Protocols IP Addressing.
UNIX Sockets COS 461 Precept 1. Clients and Servers Client program – Running on end host – Requests service – E.g., Web browser Server program – Running.
Fundamentals of Computer Networks ECE 478/578 Lecture #2 Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University of Arizona.
Introduction to Linux Network 劉德懿
UNIX Sockets COS 461 Precept 1.
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Process-to-Process Delivery:
Fall 2009COSC 6501 Welcome to COSC650 Towson University Yanggon Kim.
Fall 2000Datacom 11 Lecture 4 Socket Interface Programming: Service Interface between Applications and TCP.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
CS 6401 Internetworking Outline Internet Architecture Best Effort Service Model.
Data and Computer Communications Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based Applications.
TCP/IP fundamentals Unit objectives Discuss the evolution of TCP/IP Discuss TCP/IP fundamentals.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_b Protocol Layering Instructor: Dr. Li-Chuan Chen Date: 09/15/2003 Based in part upon slides of Prof.
Computer Security Workshops Networking 101. Reasons To Know Networking In Regard to Computer Security To understand the flow of information on the Internet.
Remote Shell CS230 Project #4 Assigned : Due date :
1 Chapter 8 – TCP/IP Fundamentals TCP/IP Protocols IP Addressing.
William Stallings Data and Computer Communications
CS 158A1 1.4 Implementing Network Software Phenomenal success of the Internet: – Computer # connected doubled every year since 1981, now approaching 200.
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 3: Sockets.
Distributed Computing A Programmer’s Perspective.
1 Pre-Introduction What is computer network?. 2 Pre-Introduction Suppose you want to build a computer network The question is: –What available technologies.
UNIX Sockets COS 461 Precept 1. Socket and Process Communication The interface that the OS provides to its networking subsystem application layer transport.
1 Chapter Overview Network Communications The OSI Reference Model.
Spring 2002CS 4611 Introduction Outline Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics Implementation Issues.
CSS CSS432 Foundation Textbook Ch1 Professor: Munehiro Fukuda.
CSE/EE 461 Getting Started with Networking. 2 Basic Concepts A PROCESS is an executing program somewhere. –Eg, “./a.out” A MESSAGE contains information.
CS 6401 Introduction to Computer Networks 09/21/2010 Outline - UNIX sockets - A simple client-server program - Project 1 - LAN bridges and learning.
Requirements Connectivity Resource Sharing Support for Common Services Performance.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
CSCI 330 UNIX and Network Programming Unit XV: Transmission Control Protocol.
S OCKET P ROGRAMMING IN C Professor: Dr. Shu-Ching Chen TA: HsinYu Ha.
S OCKET P ROGRAMMING IN C Professor: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
1 Introduction Outline Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics Implementation Issues.
UNIX Sockets Outline UNIX sockets CS 640.
1 Network Architecture Section Network Architecture Challenge –Fill the gap between hardware capabilities and application expectations, and to.
Advanced Higher Computing Computer Networking Topic 1: Network Protocols and Standards.
Performance Metrics & Network Architectures Professor Jinhua Guo CIS 427 Winter 2003.
Data and Computer Communications Chapter 2 – Protocol Architecture, TCP/IP, and Internet-Based Applications.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Sockets and Beginning Network Programming
UNIX Sockets COS 461 Precept 1.
Transport layer API: Socket Programming
Review of Important Networking Concepts
UNIX Sockets Outline Homework #1 posted by end of day
Process-to-Process Delivery:
University of Houston Datacom II Lecture 1B Review Dr Fred L Zellner
1 TRANSMISSION CONTROL PROTOCOL / INTERNET PROTOCOL (TCP/IP) K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University, Puducherry –
Elements of a Protocol Implementation
Introduction and Foundation
Presentation transcript:

1 CS716 Advanced Computer Networks By Dr. Amir Qayyum

Lecture No. 3

Protocol Machinery Multiplexing and Demultiplexing (demux key) Encapsulation (header/body) in peer-to-peer interfaces indirect communication (except at hardware level) each protocol adds a header part of header includes demultiplexing field (e.g., pass up to request/reply or to message stream?)

4 Encapsulation Host 1Host 2 Application program Application program Data RRP Data RRPData HHP RRPData HHP

5 Message Transmission Using Layers

6 Standard Architectures Open System Interconnect (OSI) Architecture –International Standards Organization (ISO) –International Telecommunications Union (ITU), formerly CCITT –“X dot” series: X.25, X.400, X.500 –Primarily a reference model

7 OSI Architecture Application Presentation Session Transport End host One or more nodes within the network Network Data link Physical Network Data link Physical Network Data link Physical Application Presentation Session Transport End host Network Data link Physical Application Data formatting Connection management Process-to-process communication channel Host-to-host packet delivery Framing of data bits Transmission of raw bits User level OS kernel

8 Internet Architecture TCP/IP Architecture –Developed with ARPANET and NSFNET –Internet Engineering Task Force (IETF) Culture: implement, then standardize OSI culture: standardize, then implement –Became popular with release of Berkeley Software Distribution (BSD) Unix; i.e. free software –Standard suggestions traditionally debated publically through “Request For Comments” (RFC’s)

9 Internet Architecture Implementation and design done together Hourglass Design (bottleneck is IP) Application vs Application Protocol (FTP, HTTP) … NET n 2 1 IP TCP UDP FTPHTTPNV TFTP

10 Internet Architecture Layering is not very strict Application TCP UDP IP Network

11 Network Models

12 How Layers Fit Together in Practice

13 Networking in the Internet Age

14 Protocol Acronyms (T)FTP – (Trivial) File Transfer Protocol HTTP – Hyper Text Transport Protocol NV – Network Video SMTP – Simple Mail Transfer Protocol NTP – Network Time Protocol TCP – Transmission Control Protocol UDP – User Datagram Protocol IP – Internet Protocol FDDI – Fiber Distributed Data Interface ATM – Asynchronous Transfer Mode

15 Elements of a Protocol Implementation Outline –Service Interface –Process Model –Common Subroutines –Example Protocol

16 Network Software Major factors for runaway success of the Internet: –most functionalities provided by software running on general-purpose computers new services can be added readily with just a small matter of programming Understanding how to implement network software is essential to understand computer networks

17 Network Application Programming Interface (API) Interface that the OS provides to its networking subsystem –most network protocols are implemented in software –all systems implement network protocols as part of the OS –each OS is free to define its own network API –applications can be ported from one OS to another if APIs are similar *IF* application program does not interact with other parts of the OS other than the network (file system, fork processes, display …)

18 Protocols and API Protocols provide a certain set of services API provides a syntax by which those services can be invoked Implementation is responsible for mapping API syntax onto protocol services

19 Socket API Use sockets as “abstract endpoints” of communication Issues –Creating & identifying sockets –Sending & receiving data Mechanisms –UNIX system calls and library routines socket process

20 Socket API Creating a socket int socket(int domain, int type, int protocol) domain (family) = AF_INET, PF_UNIX, AF_OSI type = SOCK_STREAM, SOCK_DGRAM protocol = TCP, UDP, UNSPEC return value is a handle for the newly created socket

21 Sockets (cont) Passive Open (on server) int bind(int socket, struct sockaddr *addr, int addr_len) int listen(int socket, int backlog) int accept(int socket, struct sockaddr *addr, int addr_len) Active Open (on client) int connect(int socket, struct sockaddr *addr, int addr_len)

22 Sockets (cont) Sending Messages int send(int socket, char *msg, int mlen, int flags) Receiving Messages int recv(int socket, char *buf, int blen, int flags)

23 Protocol-to-Protocol Interface A protocol interacts with a lower level protocol like an application interacts with underlying network Why not using available network APIs for PPI ? –Inefficiencies built into the socket interface application programmer tolerate them to simplify their task –inefficiency at one level protocol implementers do not tolerate them –inefficiencies at several layers of protocols

24 Protocol-to-Protocol Interface Issues Configure multiple layers –static versus extensible Process Model –avoid context switches Buffer Model –avoid data copies

25 Process Model (a)(b) Process-per-ProtocolProcess-per-Message inter-process communication procedure call

26 Process Model (cont.) int send(Protocol llp, Msg *message) int deliver(Protocol hlp, Msg *message)

27 Buffer Model buffer copy

28 Message Library Add header abcdefg bcopy (“xyz”,hdr, 3); msgAddHdr (m,hdr, 3); xyzabcdefg m m abcdefg hdr =msgStripHdr (m, 3); defg+hdr =“abc” m m Strip header

29 Message Library (cont) Fragment message new m m abcdefg defg + abc msgFragment (m,new, 3); m1m2 new abcdefg msgReassemble(new, m1, m2) Reassemble messages abcdefg

30 Network Programming Things to learn –Internet protocols (IP, TCP, UDP, …) –Sockets API (Application Programming Interface) Why IP and sockets allows a common name space across most of Internet –IP (Internet Protocol) is standard reduces number of translations, which incur overhead –Sockets: reasonably simple and elegant Unix interface (most servers run Unix)

31 OSI ModelInternet Protocols … physical data link network transport application layers TFTP NVHTTPFTP UDP TCP IP FDDI Ethernet ATM

32 learn to use Internet for communication (with focus on implementation of networking concepts) learn to build network from ground up physical data link network transport Programming Principles and concepts

33 Socket Programming Reading: Stevens 2nd edition, Chapter 1-6 Sockets API: a transport layer service interface –introduced in 1981 by BSD 4.1 –implemented as library and/or system calls –similar interfaces to TCP and UDP –can also serve as interface to IP (for super-user); known as “raw sockets” –Linux also provides interface to MAC layer (for super- user); known as “data-link sockets”

34 Outline Client-server model TCP connections UDP services Addresses and data Sockets API Example of usage

35 Client-Server Model Asymmetric relationship Server/daemon –well-known name –waits for contact –process requests, sends replies Client –initiates contact –waits for response server client

36 Client-Server Model Bidirectional communication channel Service models –sequential: server processes only one client’s requests at a time –concurrent: server processes multiple clients’ requests simultaneously –hybrid: server maintains multiple connections, but processes requests sequentially Server and client categories not disjoint –server can be client of another server –server as client of its own client (peer-to-peer architecture)

37 Review Lecture 3 Protocol Machinery - Encapsulation Standard architectures: OSI, Internet Network models and layering Elements of protocol implementation Network software Network API – Socket API – PPI Process and buffer model Programming – Client server model