CSS 432 1 CSS432 Foundation Textbook Ch1 Professor: Munehiro Fukuda.

Slides:



Advertisements
Similar presentations
1 Chapter 1 Foundation Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Copyright © 2010, Elsevier Inc. All rights Reserved.
Advertisements

1 Chapter 1 Foundation Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Copyright © 2010, Elsevier Inc. All rights Reserved.
Spring 2000CS 4611 Introduction Outline Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics.
Spring 2003CS 4611 Introduction, Continued COS 461.
Network Architectures Professor Jinhua Guo CIS 527 Fall 2002.
1 Introduction 1.1 Applications 1.2 Requirements 1.3 Network Architecture 1.4 Implementing Network Software 1.5 Performance.
 Readings: Peterson & Davie, Chapter 1.  “We reject kings, presidents, and voting. We believe in rough consensus and running code.”
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.
Foundation Outline Requirements Network Architecture Implementing Network Software.
OSI Architecture  ISO / OSI (International Standard Organization / Open Systems Interconnection)  ISO the ISO, usually in conjunction with ITU (International.
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.
1/20 Introduction Outline Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics Implementation Issues.
Fundamentals of Computer Networks ECE 478/578 Lecture #2 Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University of Arizona.
Lecture 1, 1Spring 2003, COM1337/3501Computer Communication Networks Rajmohan Rajaraman COM1337/3501 Textbook: Computer Networks: A Systems Approach, L.
UNIX Sockets COS 461 Precept 1.
Computer Networks Chapter 1: Foundation
CS 6401 Introduction to Networking Aditya Akella Outline Administrivia Networking History Statistical Multiplexing Performance Metrics.
Fall 2009COSC 6501 Welcome to COSC650 Towson University Yanggon Kim.
1 Introduction to Computer Networks Foundation Ilam University Mozafar Bag-Mohammadi.
Fall 2000Datacom 11 Lecture 4 Socket Interface Programming: Service Interface between Applications and TCP.
1 An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 2: Foundation.
1 Chapter 1 Foundation Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Copyright © 2010, Elsevier Inc. All rights Reserved.
1 Chapter 1 Foundation Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Copyright © 2010, Elsevier Inc. All rights Reserved.
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.
Ch 1. Computer Networks and the Internet Myungchul Kim
Networking Tutorial Special Interest Group for Software Engineering Luke Rajlich.
CS 158A1 1.4 Implementing Network Software Phenomenal success of the Internet: – Computer # connected doubled every year since 1981, now approaching 200.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 3: Sockets.
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.
Fall 2001CS 6401 Introduction to Networking Outline Networking History Statistical Multiplexing Performance Metrics.
Spring 2002CS 4611 Introduction Outline Statistical Multiplexing Inter-Process Communication Network Architecture Performance Metrics Implementation Issues.
Lecture 1 Outline Statistical Multiplexing Inter-Process Communication.
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.
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.
Spring 2002CS 3321 Introduction Outline Statistical Multiplexing Network Architecture Performance Metrics (just a little)
Socket Programming. Computer Science, FSU2 Interprocess Communication Within a single system – Pipes, FIFOs – Message Queues – Semaphores, Shared Memory.
UNIX Sockets Outline UNIX sockets CS 640.
1 Chapter 1: Foundation Dr. Rocky K. C. Chang 30 January 2004.
Computer Networks Dr. Walid Abu-Sufah
1 Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 2: Foundation.
Performance Metrics & Network Architectures Professor Jinhua Guo CIS 427 Winter 2003.
CSE 331: Introduction to Networks and Security Fall 2000 Instructor: Carl A. Gunter Slide Set 2.
CSE331: Introduction to Networks and Security Lecture 2 Fall 2002.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 Socket Interface. 2 Client-Server Architecture The client is the one who speaks first Typical client-server situations  Client and server on the same.
Socket Programming(1/2). Outline  1. Introduction to Network Programming  2. Network Architecture – Client/Server Model  3. TCP Socket Programming.
1 Overview Administrative Networking: An Overview of Ideas and Issues.
1 Socket Interface. 2 Basic Sockets API Review Socket Library TCPUDP IP EthernetPPP ARP DHCP, Mail, WWW, TELNET, FTP... Network cardCom Layer 4 / Transport.
CS380 Intro. to Comp. Networks Introduction & Foundation1 Introduction and Foundation.
Socket Programming in C
Transport layer API: Socket Programming
CSS432 Computer Networking
CSS432 Foundation Textbook Ch1
The University of Adelaide, School of Computer Science
Socket Programming in C
University of Houston Datacom II Lecture 1B Review Dr Fred L Zellner
Introduction to Computer Networks
Introduction Outline Statistical Multiplexing Network Architecture
Introduction and Foundation
Introduction and Foundation
Network Basics and Architectures Neil Tang 09/05/2008
Presentation transcript:

CSS CSS432 Foundation Textbook Ch1 Professor: Munehiro Fukuda

CSS Building Blocks Nodes: PC, special-purpose hardware…  hosts  switches Links: coax cable, optical fiber…  point-to-point  multiple access … length #nodes limitations

CSS Clouds - Networks  A set of nodes, each connected to one or more p2p link  Switched network Circuit switch Packet switch  A set of independent clouds (networks) interconnected to forma an internetwork  Internet A network can be defined recursively as... Switch: forwarding message Router/gateway: forwarding message

CSS Strategies Circuit switching: carry bit streams  original telephone network Packet switching: store-and-forward messages  Internet

CSS Addressing and Routing Address: byte-string that identifies a node  usually unique Routing: process of forwarding messages to the destination node based on its address  Forwarding: local, static, and implemented by h/w  Routing: dynamic, complex, and implemented by s/w Types of addresses  unicast: node-specific  broadcast: all nodes on the network  multicast: some subset of nodes on the network

CSS Multiplexing Synchronous Time-Division Multiplexing (STDM) Frequency-Division Multiplexing (FDM) L1 L2 L3 R1 R2 R3 Switch 1Switch 2 Two limitations:  If a host has no data to send, the corresponding time slot or frequency becomes idle.  The maximum number of flows, (#time slots and #different frequencies) are fixed.

CSS Statistical Multiplexing On-demand time-division Schedule link on a per-packet basis Packets from different sources interleaved on link Buffer packets that are contending for the link Buffer (queue) overflow is called congestion …

CSS Inter-Process Communication Turn host-to-host connectivity into process-to- process communication. Fill gap between what applications expect and what the underlying technology provides. Host Application Host Application Host Channel

CSS IPC Abstractions Request/Reply  Examples FTP Web (HTTP) NFS  Requirements At most one message delivery FIFO order Security Stream-Based  Examples On-demand video Video conferencing  Requirements One/two-way traffic Bulk data transfer: 60Mbps Some data may be dropped off. FIFO order Security

CSS What Goes Wrong in the Network? Bit-level errors (electrical interference) Packet-level errors (congestion) Link and node failures Messages are delayed Messages are deliver out-of-order Third parties eavesdrop

CSS Layering Use abstractions to hide complexity Abstraction naturally lead to layering Alternative abstractions at each layer Request/reply channel Message stream channel Application programs Hardware Host-to-host connectivity

CSS Process-to-process channels Layering Use abstractions to hide complexity Abstraction naturally lead to layering Alternative abstractions at each layer Application programs Hardware Host-to-host connectivity Request/reply channel Message stream channel

CSS Protocols and Interfaces Protocol: Building each layer of a network architecture Each layer’s protocol has two different interfaces  service interface: operations on this protocol  peer-to-peer interface: messages exchanged with peer Host 1 Protocol Host 2 Protocol High-level object High-level object Service interface Peer-to-peer interface

CSS Protocol Machinery Protocol Graph  most peer-to-peer communication is indirect peer-to-peer is direct only at hardware level  Applications employ the protocol stack RRP/HHP File application Digital library application Video application RRPMSP HHP Host 1 File application Digital library application Video application RRPMSP HHP Host 2 RRP: Request/Reply ProtocolMSP: Message Stream Protocol HPP: Host-to-Host Protocol

CSS Machinery (cont) Encapsulation (header + body or payload) Multiplexing and Demultiplexing (a demux key in each header) RRPDataHHP Application program Application program Host 1Host 2 Data RRP Data HHP Data RRP Data HHP

CSS 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

CSS Internet Architecture Defined by Internet Engineering Task Force (IETF) Hourglass Design Application vs Application Protocol (FTP, HTTP) … FTPHTTPNV TFTP TCP UDP IP NET 1 2 n Ethernet, FDDI, etc. Internet Protocol Reliable byte-stream channel Unreliable datagram delivery Focal point for the architecture Netscape, IE, Mosaic, etc.

CSS Socket API Creating a socket int socket(int domain, int type, int protocol) domain = PF_INET, PF_UNIX type = SOCK_STREAM, SOCK_DGRAM 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)

CSS Sockets (cont) Active Open (on client) int connect(int socket, struct sockaddr *addr, int addr_len) Sending/Receiving Messages int send(int socket, char *msg, int mlen, int flags) int recv(int socket, char *buf, int blen, int flags) Or int write( int socket, char *msg, int mlen ) int read( int socket, char *buf, int blen );

CSS Sockets (Code Example) int sd, newSd; sd = socket(AF_INET, SOCK_STREAM, 0); sockaddr_in server; bzero( (char *)&server, sizeof( server ) ); server.sin_family =AF_INET; server.sin_addr.s_addr = htonl( INADDR_ANY ) server.sin_port = htons( ); bind( sd, (sockaddr *)&server, sizeof( server ) ); struct hostent *host = gethostbyname( arg[0] ); sockaddr_in server; bzero( (char *)&server, sizeof( server ) ); server.sin_family = AF_INET; server.s_addr = inet_addr( inet_ntoa( *(struct in_addr*)*host->h_addr_list ) ); server.sin_port = htons( ); connect( sd, (sockaddr *)&server, sizeof( server ) ); sockaddr_in client; socklen_t len=sizeof(client); while( true ) { newSd = accept(sd, (sockaddr *)&client, &len); write( sd, buf1, sizeof( buf ) ); write( sd, buf2, sizeof( buf ) ); if ( fork( ) == 0 ) { close( sd ); read( newSd, buf1, sizeof( buf1 ) ); read( newSd, buf2, sizeof( buf2 ) ); } close( newSd ); } read() socket() connect() write() socket() connect() write() listen( sd, 5 ); socket() bind() listen() accept() buf2, buf1 close( newsd); exit( 0 ); int sd = socket(AF_INET, SOCK_STREAM, 0);

CSS Protocol Implementation Issues Process Model  Process per protocol  Process per message avoid context switches Buffer Model  Copy from Application buffer to network buffer  Zero copy / pin-down communication avoid data copies

CSS (a)(b) Process Model Process-per-Protocol Simple message passing mechanisms between processes A context switch required at each layer Process-per-Message For sending, functions are called down from top to bottom. For receiving, functions are called up from bottom to top. Applications Presentation Transport Session Process 1 Process 2 Process 3 Static piece of code Network

CSS Buffer Model Avoid data copies Avoid OS interventions message copied message copied message passed message passed message bypassed Conventional buffer transfer Zero copy communication Pin downed communication

CSS Performance Metrics Bandwidth (throughput)  data transmitted per time unit  link versus end-to-end  notation Mbps = 10 6 bits per second Gbps = 10 9 bits per second Latency (delay)  time to send message from point A to point B  one-way versus round-trip time (RTT)  components Latency = Propagation + Transmit + Queue Propagation = Distance / SpeedOfLight Transmit = Size / Bandwidth Even in the same distance, latency varies depending on the size of message.

CSS Ideal versus Actual Bandwidth RTT dominates  Throughput = TransferSize / TransferTime  TransferTime = RTT + 1/Bandwidth x TransferSize  RTT: a request message sent out and data received back Example:  1-MB file across a 1-Gbps network with RTT=100ms.  1MB / 1Gbps = 8Mb / 1000Mbps = 8msec  TransferTime = = 108msec  Throughput = 1MB / 108msec = 74.1 Mbps

CSS Delay x Bandwidth Product Amount of data “in flight” or “in the pipe” Example: 100ms x 45Mbps = 560KB Receiver must prepare a buffer whose size is at least 2 x Delay x Bandwidth

CSS Reviews  Components: hosts, links, switches, routers and networks  Switching (circuit and packet) and multiplexing (STDM, FDM, and statistical)  OSI and Internet architectures  Socket  Performance metrics: Bandwidth and latency Exercises in Chapter 1  Ex. 5 (RTT)  Ex. 12 and 31 (STDM and FDM)  Ex. 18 (Latency)  Ex. 32 (Packet Sequence)