1 Network Communications A Brief Introduction. 2 Network Communications.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

Introduction 1-1 Chapter 3 Transport Layer Intro and Multiplexing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
Chapter 17 Networking Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
CCNA 1 v3.1 Module 11 Review.
CPSC 441: Intro, UDP1 Transport Layer Instructor: Carey Williamson Office: ICT Class Location:
Computer Communication Digital Communication in the Modern World Transport Layer Multiplexing, UDP
Quick Overview. 2 ISO/OSI Reference Model Application Application Presentation Presentation Session Session Transport Transport Network Network Data Link.
Chapter 3: Transport Layer
Socket Programming.
1 Java Networking – Part I CS , Spring 2008/9.
Introduction to Transport Layer. Transport Layer: Motivation A B R1 R2 r Recall that NL is responsible for forwarding a packet from one HOST to another.
Transport Layer3-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Lecture 8 Chapter 3 Transport Layer
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Networking Support In Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 School of Computing Science Simon Fraser University CMPT 771/471: Internet Architecture and Protocols Socket Programming Instructor: Dr. Mohamed Hefeeda.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
UNIX Sockets COS 461 Precept 1.
Process-to-Process Delivery:
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Review: –What is AS? –What is the routing algorithm in BGP? –How does it work? –Where is “policy” reflected in BGP (policy based routing)? –Give examples.
1 ELEN602 Lecture 2 Review of Last Lecture Layering.
Huda AL_Omairl - Network 71 Protocols and Network Software.
 Socket  The combination of an IP address and a port number. (RFC 793 original TCP specification)  The name of the Berkeley-derived application programming.
Lector: Aliyev H.U. Lecture №14: Telecommun ication network software design for data bases and servers. TASHKENT UNIVERSITY OF INFORMATION TECHNOLOGIES.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 12 Omar Meqdadi Department of Computer Science and Software Engineering University.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Internet Applications and Network Programming Dr. Abraham Professor UTPA.
Vassil Roussev 2 A socket is the basic remote communication abstraction provided by the OS to processes. controlled by operating system.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.
TCP/IP Transport and Application (Topic 6)
Transport Layer: UDP, TCP
RGEC MEERUT(IWT CS703) 1 Java Networking RGEC Meerut.
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.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
Transport Layer1 Ram Dantu (compiled from various text books)
Lecture91 Administrative Things r Return homework # 1 r Review some problems in homework # 1 r Questions about grading? Yona r WebCT for CSE245 is working!
Dr. John P. Abraham Professor University of Texas Pan American Internet Applications and Network Programming.
1 Networking Chapter Distributed Capabilities Communications architectures –Software that supports a group of networked computers Network operating.
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
CS 3830 Day 13 Introduction 1-1. Announcements r Quiz 3: Wednesday, Oct 10 r Prog3 due Wednesday, Oct 10 Transport Layer 3-2.
Overview of TCP/IP protocols –Application layer (telnet, ssh, http, ftp, etc) The things that we use daily. –Transport layer (TCP, UDP) Allows processes.
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
UNIX Sockets COS 461 Precept 1. Socket and Process Communication The interface that the OS provides to its networking subsystem application layer transport.
Networking Basics CCNA 1 Chapter 11.
Socket Programming Introduction. Socket Definition A network socket is one endpoint in a two-way communication flow between two programs running over.
Networks Part 2: Infrastructure + Protocols NYU-Poly: HSWP Instructor: Mandy Galante.
Socket Programming.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Chapter 16 - TCP: Software For Reliable Communication Introduction A Packet Switching System Can Be Overrun (merging highways) TCP Helps IP Guarantee Delivery.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Introduction 1-1 source application transport network link physical HtHt HnHn M segment HtHt datagram destination application transport network link physical.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
1 K. Salah Application Layer Module K. Salah Network layer duties.
CSEN 404 Transport Layer I Amr El Mougy Lamia Al Badrawy.
Transport Layer3-1 Transport Layer Never take life seriously. Nobody gets out alive anyway.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Introduction to Networks
Introduction to Networks
September 19th, 2013 CS1652 Jack Lange University of Pittsburgh
Process-to-Process Delivery:
Process-to-Process Delivery: UDP, TCP
Network programming Lecture 1 Prepared by: Dr. Osama Mokhtar.
Presentation transcript:

1 Network Communications A Brief Introduction

2 Network Communications

3 IP Addresses 32 bits 4 bytes Usually expressed as 4 decimal numbers in the range from 0 to 255, separated by dots Example: (My home desktop computer) (office laptop wireless) local host

4 What is my IP address?

5 IP Addresses An IP address corresponds to a destination on the Internet. Typically one computer (host.) Many programs may be running on that computer and all communicating on the Internet using the same IP address. Identified by port number

Ports Multiplex using port numbers. 16 bit unsigned numbers 1 – 65,535 Numbers (typical, since vary by OS): “reserved”, must be root “ephemeral” Above 5000 for general use ( 50,000 is specified max) Well-known, reserved services (see _port_numbers _port_numbers ftp 20,21 Ssh 22 http80 6

7 Clients and Servers Network communication is typically between a client and a server. The client initiates communication. Must know the IP address of the server and the port number of the application. Like placing a telephone call. The Server accepts requests from clients. Does not know the IP address of the client in advance. Like answering a telephone call. The same computer and program can be a server for one conversation and a client for another.

8 Sockets A socket is an operating system construct used by a program to perform network I/O. Similar to an open file. Originally a Unix concept. Later implemented in Windows. Network communication is between sockets. One program writes to a socket. Another program reads from a socket. The host operating systems at end points use the network to transport bytes between sockets.

9 Server and Client TCP/UDP IP Ethernet Adapter Server TCP/UDP IP Ethernet Adapter Clients Server and Client exchange messages over the network through a common Socket API Socket API hardware kernel space user space ports

10 User Datagram Protocol(UDP): An Analogy Postal Mail Single mailbox to receive messages Unreliable Not necessarily in-order delivery Each letter is independent Must address each reply Example UDP applications Multimedia, voice over IP UDP Single socket to receive messages No guarantee of delivery Not necessarily in-order delivery Datagram – independent packets Must address each packet Postal Mail Single mailbox to receive letters Unreliable Not necessarily in-order delivery Letters sent independently Must address each reply

Lecture 3: Transmission Control Protocol (TCP): An Analogy TCP Reliable – guarantee delivery Byte stream – in-order delivery Connection-oriented – single socket per connection Setup connection followed by data transfer Telephone Call Guaranteed delivery In-order delivery Connection-oriented Setup connection followed by conversation Example TCP applications Web, , Telnet

12 Streams vs. Datagrams TCP uses a connection between sockets to provide reliable byte stream transfer. Bytes are delivered in the order sent. UDP provides a datagram service. Each datagram is handled independently May be delivered out of order. May be lost. Both TCP and UDP use IP to transport packets across the Internet.

13 TCP Connections A TCP connection requires a setup phase. “Handshake” between client an server. Server listens for connection requests. Client requests connection. Server accepts connection request. Once set up, the connection is a two-way communication channel. Either party can sent bytes to the other.

14 socket bind() listen() accept() Server socket connect() send() recv() Client “Handshake” recv() send() Data (request) Data (reply) close() End-of-File recv() close() “well-known” port (Block until connection )

Talking to Yourself Both ends of a network connection can be in the same computer. Often done during development. The IP address means "this computer“ aka localhost Looks the same to the application programs. 15

Server System.Net and System.Net.Sockets Required for using sockets A socket is needed to listen channel Socket.Bind Binds a socket to a port and IP IPAddress.Any: server must listen for client activity on all network interfaces Then apply listen Accept incoming clients 16

Server Socket.BeginAccept Begins an asynchronous operation to accept an incoming connection attempt send and receive data within a separate execution thread must create a callback method that implements the AsyncCallback delegate AsyncCallback Each client connection should be stored on a different socket After connection Send and Receive data 17

Client Needs to know servers IP and port Socket.Connect(serverIP,port); After connection Send and Receive data Data is transferred as a byte array Need to transform string  byte[] Encoding.ASCII.GetBytes(string) Encoding.ASCII.GetString(byte[]) 18

EXAMPLE 19