CS 5523 Operating Systems: Network

Similar documents
Operating Systems CS 571

Module 2 Overview of Computer Networks

Module 2 Overview of. Computer Networks

Slides for Chapter 3: Networking and Internetworking

Lecture 7: Internetworking See Chapter 3 of Colouris

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Process Communication COMPUTER NETWORKING Part 1

Network and Security: Introduction

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

Introduction to TCP/IP networking

Data & Computer Communication

Defining Networks with the OSI Model. Module 2

The Internet Protocol (IP)

Chapter 7. Local Area Network Communications Protocols

CSCI-GA Operating Systems. Networking. Hubertus Franke

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

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

TCP /IP Fundamentals Mr. Cantu

Interconnecting Networks with TCP/IP. 2000, Cisco Systems, Inc. 8-1

Introduction to Protocols

Introduction to Open System Interconnection Reference Model

Chapter 09 Network Protocols

User Datagram Protocol

Need For Protocol Architecture

Need For Protocol Architecture

Introduction to Internetworking

Network Model. Why a Layered Model? All People Seem To Need Data Processing

UDP, TCP, IP multicast

Interconnecting Networks with TCP/IP

NT1210 Introduction to Networking. Unit 10

Vorlesung Kommunikationsnetze

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

Lecture 04: Networking & Internetworking

Internetwork Protocols

Networking interview questions

TCP/IP and the OSI Model

Introduction to Networks

ECE4110 Internetwork Programming. Introduction and Overview

Introduction to Internet. Ass. Prof. J.Y. Tigli University of Nice Sophia Antipolis

TSIN02 - Internetworking

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 8

ET4254 Communications and Networking 1

The OSI Model. Open Systems Interconnection (OSI). Developed by the International Organization for Standardization (ISO).

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

Chapter 12 Network Protocols

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

TSIN02 - Internetworking

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

Chapter 16 Networking

Data and Computer Communications. Chapter 2 Protocol Architecture, TCP/IP, and Internet-Based Applications

Network.... communication system for connecting end- systems. End-systems a.k.a. hosts PCs, workstations dedicated computers network components

TSIN02 - Internetworking

Networking and TCP/IP. John Kalbach November 8, 2004

Computer Networks (Introduction to TCP/IP Protocols)

===================================================================== Exercises =====================================================================

What is a Network? TCP / IP. The ISO OSI Model. Protocols. The TCP/IP Protocol Suite. The TCP/IP Protocol Suite. Computer network.

Computer Communication & Networks / Data Communication & Computer Networks Week # 03

Layering in Networked computing. OSI Model TCP/IP Model Protocols at each layer

Chapter 2 Network Models 2.1

Networking Fundamentals

Networking and Internetworking 1

OSI Reference Model. Computer Networks lab ECOM Prepared By : Eng. Motaz Murtaja Eng. Ola Abd Elatief

Network Protocols - Revision

Copyleft 2005, Binnur Kurt. Objectives

CS3600 SYSTEMS AND NETWORKS

Networking Technologies and Applications

Networking and Internetworking 1

5105: BHARATHIDASAN ENGINEERING COLLEGE NATTARMPALLI UNIT I FUNDAMENTALS AND LINK LAYER PART A

Networking for Data Acquisition Systems. Fabrice Le Goff - 14/02/ ISOTDAQ

OSI Transport Layer. objectives

THE OSI MODEL. Application Presentation Session Transport Network Data-Link Physical. OSI Model. Chapter 1 Review.

CS-461 Internetworking. Dr. Mohamed Aboutabl

Business Data Communications and Networking

CS61C Machine Structures Lecture 37 Networks. No Machine is an Island!

ECE 650 Systems Programming & Engineering. Spring 2018

Fundamental Questions to Answer About Computer Networking, Jan 2009 Prof. Ying-Dar Lin,

Fundamentals of Networking. OSI & TCP/IP Model. Kuldeep Sonar 1

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

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

Chapter 2 Communicating Over the Network

CS 416: Operating Systems Design April 11, 2011

CSC 634: Networks Programming

Novell TCP IP for Networking Professionals.

Verteilte Systeme (Distributed Systems)

Introduction to computer networking

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Chapter 6. The Protocol TCP/IP. Introduction to Protocols

Raj Jain. The Ohio State University Columbus, OH

Data Communication Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 34 TCP/ IP I

cs144 Midterm Review Fall 2010

ECE 158A: Lecture 7. Fall 2015

TCP/IP Protocol Suite and IP Addressing

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

CPEG514 Advanced Computer Networks. Atef Abu Salim University of Nizwa Spring 2013/2014

Applied Networks & Security

Different Layers Lecture 20

Chapter 2 Network Models 2.1

Position of IP and other network-layer protocols in TCP/IP protocol suite

EE-379 Embedded Systems and Applications Introduction to Ethernet

CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay

Transcription:

CS 5523 Operating Systems: Network Instructor: Dr. Tongping Liu Thank Dr. Dakai Zhu, Dr. Palden Lama for providing their slides. CS5523: Operating Systems @ UTSA 1

What are the Problems? A OS Tongping Liu, Assistant Professor, CS Dept UTSA, x5550 network B OS Process A want to send process B a message Ø Tongping Liu, Assistant Professor,CS Dept. UTSA, x5550 Application-level agreement Ø Which part is what (name, title, contact) Network: actual message transmission Ø Issues with addressing, performance, scalability, reliability, security CS5523: Operating Systems @ UTSA 2

Outline: Network Communication Layered network models Ø OSI 7-layer model (Open System Interconnection) Ethernet: local area network Inter-network Protocols (IP) Ø Addressing and routing etc. TCP/UDP protocols Ø communication ports and sockets Multicast: more than one recipients CS5523: Operating Systems @ UTSA 3

Layered Structure and ISO OSI Model Layered structure: layer n uses layer n-1 services Protocols: pairs of software in send/receive nodes Layers Applic ation Pres ent ation Ses sion Transport Network Data l ink Ø Specify the sequence of messages for transmission Ø Specify the format, contents and meanings of data in messages Message sent Message received Phy sic al Sender Communic at ion medium Rec ipi ent CS5523: Operating Systems @ UTSA 4

Summary for OSI Protocols Layer Description Examples Application Presentation Session Transport Protocols that are designed to meet the communication requirements of specific applications, often defining the interface to a service. Protocols at this level transmit data in a network representation that is independent of the representations used in individual computers, which may differ. Encryption is also performed in this layer, if required. At this level reliability and adaptation are performed, such as detection of failures and automatic recovery. This is the lowest level at which messages (rather than packets) are handled. Messages are addressed to communication ports attached to processes, HTTP, FTP, SMTP, CORBA IIOP Secure Sockets ( SSL),CORBA Data Rep. TCP, UDP Network Data link Physical Transfers data packets between computers in a specific network. In a WAN or an internetwork this involves the generation of a route passing through routers. In a single LAN no routing is required. Responsible for transmission of packets between nodes that are directly connected by a physical link. In a WAN transmission is between pairs of routers or between routers and hosts. In a LAN it is between any pair of hosts. The circuits and hardware that drive the network. It transmits sequences of binary data by analogue signalling, using amplitude or frequency modulation of electrical signals (on cable circuits), light signals (on fibre optic circuits) or other electromagnetic signals (on radio and microwave circuits). IP, ATM virtual circuits Ethernet MAC, ATM cell transfer, PPP Ethernet base- band signalling, ISDN CS5523: Operating Systems @ UTSA 5

Commonly Used Layer Structure La yers Me ssag e Application Transport TCP & UDP In tern etwo rk pr otocols In tern etwo rk Net work inter face Underlyin g ne twor k IP In tern etwo rk pa ckets Ethernet Net work- specif ic packe ts Underlyin g ne twor k pr otocols CS5523: Operating Systems @ UTSA 6

Outline: Network Communication Layered network models Ø OSI 7-layer model (Open System Interconnection) Ethernet: local area network Inter-network Protocols (IP) Ø Addressing and routing etc. TCP/UDP protocols Ø communication ports and sockets Multicast: more than one recipients CS5523: Operating Systems @ UTSA 7

Ethernet: Local Area Network (LAN) not me Shared medium Shared medium: Carrier Sensing Multi-Access. Ø CSMA/CD: collision detection Every Ethernet interface has a unique 48 bit address (a.k.a. hardware address). Ø Example: C0:B3:44:17:21:17 Addresses are assigned to vendors by a central authority (IEEE to manufacturers) CS5523: Operating Systems @ UTSA 8

Wireless LAN Lapto ps A B C rad io obs truction Palmtop D E Wir eless LA N Server Base station/ access point LA N CS5523: Operating Systems @ UTSA 9

Approaches for Packet Delivery Datagram (vs. mailed letters) Ø each packet contains full network address of source-todestination; Ø no setup of paths, one-at-a-time, hop-by-hop transmission of packets, Ø unreliable, e.g., Internet IP datagram in network layer Virtual circuits (vs. phone call) Ø set up end-to-end path, packets contains virtual circuit #, Ø more reliable, Ø links can be shared CS5523: Operating Systems @ UTSA 10

Outline: Network Communication Layered network models Ø OSI 7-layer model (Open System Interconnection) Ethernet: local area network Inter-network Protocols (IP) Ø Addressing and routing etc. TCP/UDP protocols Ø communication ports and sockets Multicast: more than one recipients CS5523: Operating Systems @ UTSA 11

What is IP? Internet Protocol Ø packet delivery service (host-to-host). Ø translation on data-link protocols (Ethernet). IP provides connectionless, unreliable delivery of IP datagram. Ø Connectionless: each datagram is independent. Ø Unreliable (best effort): no guarantee for datagrams to be delivered correctly or at all. CS5523: Operating Systems @ UTSA 12

IP Packet IP address of source header IP address of destination up to 64 kilobytes VERS HL Service Fragment Length Datagram ID FLAG Fragment Offset TTL Protocol Header Checksum Source Address Destination Address Options (if any) data 1 byte 1 byte 1 byte 1 byte Data CS5523: Operating Systems @ UTSA 13

IP Address Requirements Universal any host must be able to send packets to any other host in the internet. Routing - include information that makes routing feasible and efficient Address Space large and efficient IP addresses are assigned by a central authority (American Registry for Internet Numbers) CS5523: Operating Systems @ UTSA 14

Internet Addresses Logical addresses (0.0.0.0 ~255.255.255.255) Ø 32 bits (4 billion, population in early 80s) Includes a network ID and a host ID. Ø Network ID is assigned to an organization by the authority Ø Host IDs are assigned locally by a system administrator Different classes of addresses Ø Class A ü 128 possible network IDs and over 4 million host IDs per network ID Ø Class B ü 16K possible network IDs and 64K host IDs per network ID Ø Class C ü over 2 million possible network IDs and about 256 host IDs per network ID CS5523: Operating Systems @ UTSA 15

Internet Addresses (cont.) octet 1 octet 2 octet 3 Netwo rk ID Hos t ID Cl ass A: 1 to 127 0 to 255 0 to 255 0 to 255 Netwo rk ID Hos t ID Cl ass B: 128 to 191 0 to 255 0 to 255 0 to 255 Netwo rk ID Hos t ID Cl ass C: 192 to 223 0 to 255 0 to 255 1 to 254 Mu lt i cas t a dd ress Cl ass D (mu lti cas t): 224 to 239 0 to 255 0 to 255 1 to 254 Ran ge of ad dre sse 1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 Cl ass E (rese rve d): 240 to 255 0 to 255 0 to 255 1 to 254 128.0.0.0 to 247.255.255.255 CS5523: Operating Systems @ UTSA 16

Routing Problem: Where to Send? Decide the route for each packet Ø necessary in MANs and WANs Update knowledge of the network Ø Adaptive/dynamic routing is usually used: traffic patterns, topological changes Routing decision Ø hop-by-hop, with period update and distribution of traffic data, e.g., the distance-vector, dynamic, distributed algorithm CS5523: Operating Systems @ UTSA 17

Routing in Wide Area Networks (WANs) A 1 B Hosts or local networks 3 D Links 6 E 4 5 2 C Routers CS5523: Operating Systems @ UTSA 18

CS5523: Operating Systems @ UTSA 19 Routing Tables Routings from D Routings from E To Link Cost To Link Cost A B C D E 3 3 6 local 6 1 2 2 0 1 A B C D E 4 4 5 6 local 2 1 1 1 0 Routings from A Routings from B Routings from C To Link Cost To Link Cost To Link Cost A B C D E local 1 1 3 1 0 1 2 1 2 A B C D E 1 local 2 1 4 1 0 1 2 1 A B C D E 2 2 local 5 5 2 1 0 2 1

IP Routing Routing algorithms: Ø RIP: routing information protocol Ø RIP-2: better multicasting, authentication Ø Open shortest path first (OSPF) Default routes CS5523: Operating Systems @ UTSA 20

Interaction with Link Layer: ARP ARP: address resolution protocol For given IP address, ARP is used to find out the Ethernet address of the destination Ø Broadcast protocol Ø The right one responds. Ø Not for every IP datagram routers remember addresses CS5523: Operating Systems @ UTSA 21

ARP Example others HEY - Everyone please listen! Will 129.115.177.56 please send me your Ethernet address? Router not me Hi Blue! I m 129.115.177.56, and my Ethernet address is 00:0C:F1:98:B3:DE CS5523: Operating Systems @ UTSA 22

Programmer's View of TCP/IP Application TCP Application UDP IP Transport layer: TCP (Transmission Control Protocol): connection-oriented stream service UDP(User Datagram Protocol): connectionless datagram service CS5523: Operating Systems @ UTSA 23

Outline: Network Communication Layered network models Ø OSI 7-layer model (Open System Interconnection) Ethernet: local area network Inter-network Protocols (IP) Ø Addressing and routing etc. TCP/UDP protocols Ø communication ports and sockets Multicast: more than one recipients CS5523: Operating Systems @ UTSA 24

Concept of Ports 16 bits, allow different applications on the same computer to share network resources simultaneously. Ø well-known ports: 1 1023 ü Telnet server: port 23; FTP server: port 21; HTTP server: port 80 Ø registered ports: 1024 49151 Ø dynamic or private ports: 49152-65535 socket any port agreed port socket client message other ports server Internet address = 138.37.94.248 Internet address = 138.37.88.249 CS5523: Operating Systems @ UTSA 25

Socket Abstraction A socket must be bound to a local port Endpoints for communication between processes Socket pair - (local IP address, local port, foreign IP address, foreign port) uniquely identifies a communication CS5523: Operating Systems @ UTSA 26

TCP: Transmission Control Protocol TCP is connection-oriented. Ø 3-way handshake used for connection setup Ø Acknowledge each pack (pigback) (Active) Client Syn (Passive) Server (Active) Client Data:N (Passive) Server Syn + Ack (Data :N+1) Ack Ack Connection Setup 3-way handshake Acknowledgement data packets CS5523: Operating Systems @ UTSA 27

TCP Characteristics Provides bi-directional stream of bytes between two distributed components. Buffers at both sides Reliable but slow protocol. Ø Acknowledgements indicate delivery of data à retransmitted after a timeout. Ø Checksums are used to detect corrupted data. Ø Sequence numbers à missing, or mis-sequenced data. Ø (Sliding-Window-based) Flow control prevents over-run of receiver CS5523: Operating Systems @ UTSA 28

TCP Socket Primitives Primitive Socket Bind Listen Accept Connect Send Recv Close Function Create a new communication endpoint Attach a local address to a socket Announce willingness to accept connections Block caller until a connection request arrives Actively attempt to establish a connection Send some data over the connection Receive some data over the connection Release the connection CS5523: Operating Systems @ UTSA 29

Client-Server Using TCP Socket CS5523: Operating Systems @ UTSA 30

UDP (User Datagram Protocol) Pass a message from one to another component Ø abstraction is a datagram Sender creates a socket bound to (local port, local IP address) Ø Sender can use the socket to send to any destination Ø destination (host, port) is explicitly included in messages Receiver must have a socket bound to the specified port and receive from any Ø receive(buffer) doesn t specify which senders Ø anyone can send CS5523: Operating Systems @ UTSA 31

UDP Characteristics Restricted message length Unreliable (but fast) protocol: 10% loss Ø Omission failures: optional checksum Ø Messages can be delivered out of order Application enhancements Ø Timeouts resend to prevent indefinite waiting Ø Queuing at receiver Ø Packet numbering etc. CS5523: Operating Systems @ UTSA 32

Outline: Network Communication Layered network models Ø OSI 7-layer model (Open System Interconnection) Ethernet: local area network Inter-network Protocols (IP) Ø Addressing and routing etc. TCP/UDP protocols Ø communication ports and sockets Multicast: more than one recipients CS5523: Operating Systems @ UTSA 33

Multicast Communication: More Receivers Broadcast sends a single message from one process to all processes (hosts) Multicast sends a single message from one process to members of a group of processes (hosts) What are needed? Ø Address to identify all members in the group Ø Multicast routers to forward multicast packet CS5523: Operating Systems @ UTSA 34

Uses of Multicast and Its Effects Fault tolerance based on replicated services Ø Requests multicast to group of servers Discovery in spontaneous networking Ø Locate available discovery services Performance from replicated data Ø Multicast changes to all replicas Propagation of event notifications in a distributed environment Ø News group: news à group of interested users CS5523: Operating Systems @ UTSA 35

Multicast IP address octet 1 octet 2 octet 3 Netwo rk ID Hos t ID Cl ass A: 1 to 127 0 to 255 0 to 255 0 to 255 Netwo rk ID Hos t ID Cl ass B: 128 to 191 0 to 255 0 to 255 0 to 255 Netwo rk ID Hos t ID Cl ass C: 192 to 223 0 to 255 0 to 255 1 to 254 Mu lt i cas t a dd ress Cl ass D (mu lti cas t): 224 to 239 0 to 255 0 to 255 1 to 254 Ran ge of ad dre sse 1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 Cl ass E (rese rve d): 240 to 255 0 to 255 0 to 255 1 to 254 128.0.0.0 to 247.255.255.255 224.0.0.0 to 224.0.0.255 (224.0.0.0/24) à local subnet multicast traffic 224.0.1.0 to 238.255.255.255 à globally scoped addresses 239.0.0.0 to 239.255.255.255 (239.0.0.0/8) à administratively scoped addresses, boundary CS5523: Operating Systems @ UTSA 36

IP Multicast Process Each multicast address à identify a group Internet Group Membership Protocol (IGMP) Ø Processes register a group with local router using IGMP Router update its multicast routing table Processes send message to a group Ø Do not need to be a member Router forward multicast messages CS5523: Operating Systems @ UTSA 37

Multicast Architecture CS5523: Operating Systems @ UTSA 38

Summary Layered network models Ø OSI 7-layer model Ethernet: local area network Inter-network Protocols (IP) Ø Addressing and routing etc. TCP/UDP protocols Ø communication ports and sockets Multicast: more than one recipients CS5523: Operating Systems @ UTSA 39