Motivation of VPN! Overview! VPN addressing and routing! Two basic techniques for VPN! ! How to guarantee privacy of network traffic?!
|
|
- Loreen Reynolds
- 6 years ago
- Views:
Transcription
1 Overview!! Last Lecture!! Daemon processes and advanced I/O functions!! This Lecture!! VPN, NAT, DHCP!! Source: Chapters 19&22 of Comer s book!! Unix domain protocols and non-blocking I/O!! Source: Chapters 15&16&17 of Stevens book!! Next Lecture!! Advanced UDP sockets and Threads!! Source: Chapters 22&26 of Stevens book! TELE 402 Lecture 11: Unix domain 1! Motivation of VPN!! How to guarantee privacy of network traffic?!! Leased line (circuit) from phone companies!! Too expensive!! Isolation of the private network!! not possible for most organizations!! Encryption of network traffic used by VPN!! It is cheap!! It guarantees privacy!! It has the flexibility of using Internet that has redundant routes without adding extra cost! TELE 402 Lecture 11: Unix domain 2! Two basic techniques for VPN! VPN addressing and routing!! Tunneling: uses IP-in-IP encapsulation!! Encryption! TELE 402 Lecture 11: Unix domain 3! TELE 402 Lecture 11: Unix domain 4!
2 VPN with private addresses! TELE 402 Lecture 11: Unix domain 5! Access Internet with private addresses?!! Application gateway (application program)!! Each application gateway handles only one specific service!! Multiple gateways are required for multiple services!! It lacks generality!! Network Address Translation (NAT)!! Provides transparent IP-level access to the Internet from a host with a private address.!! Change the source address of each outgoing datagram with G and replace the destination address in each incoming datagram with the private address of the right host! TELE 402 Lecture 11: Unix domain 6! NAT translation table creation!! Manual initialization!! By system admin!! Outgoing datagrams!! As a side effect of an internal host sending a datagram!! Incoming name lookups!! As a side effect of handling DNS lookups! Concurrent access!! How to allow multiple hosts to access a given external address concurrently?!! Multi-address NAT!! Assign multiple globally valid addresses to the NAT box!! Port-mapped NAT (NAPT)! TELE 402 Lecture 11: Unix domain 7! TELE 402 Lecture 11: Unix domain 8!
3 Issues on NAT!! NAT/NAPT problems with FTP!! How to make a protocol NAT friendly?!! How to find the global address of the NAT box?!! Differences between application gateway and NAT!! What are the problems with banning IP addresses at a web-server? What are the alternatives?! TELE 402 Lecture 11: Unix domain 9! DHCP!! Dynamic Host Configuration Protocol!! A successor to BOOTP!! Motivation!! Uses UDP messages for DHCP!! How can UDP be used without IP address for the client yet?!! The client uses the broadcast address in the request!! The server has to use the broadcast address as well. Why?! TELE 402 Lecture 11: Unix domain 10! DHCP message! DHCP states! TELE 402 Lecture 11: Unix domain 11! TELE 402 Lecture 11: Unix domain 12!
4 DHCP options! Options in DHCP reply! TELE 402 Lecture 11: Unix domain 13! TELE 402 Lecture 11: Unix domain 14! Discussion on DHCP!! Based on the DHCP states, use two DHCP servers and a client as a scenario to draw the sequence of actions in the protocol!! Pay attention to the destination address of the messages.!! Discuss the security risks associated with DHCP!! Consider a host that has a disk and uses DHCP to obtain an IP address. If the host stores its address on disk along with the date the lease expires, and then reboots within the lease period, can it use the address? Why or why not?! Unix domain sockets!! A way of performing client-server communication on a single host using the same socket API!! Two types: stream and datagram!! Why use Unix domain sockets?!! Unix domain sockets are twice as fast as a TCP socket!! Example: X Window System!! Can be used to pass descriptors between processes on the same host!! Can provide the client s credentials (user ID and group IDs) to the server for additional security check (newer implementations)! TELE 402 Lecture 11: Unix domain 15! TELE 402 Lecture 11: Unix domain 16!
5 Unix domain socket protocol address!! Are pathnames within the normal filesystem!! Cannot read from or write to these files except as a socket! TELE 402 Lecture 11: Unix domain 17! Socket address structure! struct sockaddr_un {sa_family_t sun_family;! char sun_path[104]; }!! sun_family should be AF_LOCAL!! sun_path is a pathname string terminated with a \0. The unspecified address is indicated by a null string as the pathname.!! The pathname should be an absolute pathname, not a relative pathname.!! The macro SUN_LEN calculates the length of a sockaddr_un structure.! TELE 402 Lecture 11: Unix domain 18! sockpair function 1!! Creates two sockets that are then connected together! int socketpair(int family,! int type,! int protocol,! int sockfd[2])! sockpair function 2!! The two sockets created are returned as sockfd[0] and sockfd[1], which are unnamed.!! There is no implicit bind involved.!! They form a stream pipe if their type is SOCK_STREAM. The pipe is full-duplex.!! family must be AF_LOCAL!! protocol must be 0!! type can be either SOCK_STREAM or SOCK_DGRAM.! TELE 402 Lecture 11: Unix domain 19! TELE 402 Lecture 11: Unix domain 20!
6 Differences from inet sockets 1!! Default file permissions for a pathname created by bind should be 0777, modified by umask value.!! The pathname associated with a Unix domain socket should be an absolute pathname, not a relative name.!! The pathname specified in a call to connect must be a pathname currently bound to an open Unix domain socket of the same type.!! A bind will fail if the pathname already exists (use unlink before bind)!! The permission testing for connect of a Unix domain socket is the same as if open had been called for writeonly access.! Differences from inet sockets 2!! Unix domain stream sockets are similar to TCP sockets!! They provide a byte stream with no record boundaries.!! If a call to connect finds that the listening socket s queue is full, ECONNREFUSED is returned immediately!! DGRAM sockets are similar to UDP sockets!! They provide an unreliable datagram service that preserves record boundaries.!! Sending a datagram on an unbound Unix domain datagram socket does not bind a pathname to the socket (bind must be called).! TELE 402 Lecture 11: Unix domain 21! TELE 402 Lecture 11: Unix domain 22! Passing descriptors 1!! Descriptors can be shared between processes in the following ways!! A child process shares all the open descriptors with the parent after a call to fork!! All descriptors normally remain open when exec is called!! Pass descriptors using Unix domain sockets and recvmsg! Passing descriptors 2!! Steps involved in passing a descriptor!! Create Unix domain sockets (preferably SOCK_STREAM) and connect them for communication between a server and a client!! One process opens a descriptor. Any type of descriptor can be exchanged.!! Sender builds a msghdr structure containing the descriptor to be passed, and calls sendmsg with the structure across one of the Unix domain sockets!! Reciever calls recvmsg to receive the descriptor from the other Unix domain socket.!! Client and server must have an application protocol so they know when the descriptor is to be passed.! TELE 402 Lecture 11: Unix domain 23! TELE 402 Lecture 11: Unix domain 24!
7 Example 1! Example 2!! Refer to unixdomain/mycat.c, unixdomain /myopen.c, unixdomain/openfile.c, lib/read_fd.c, and lib/write_fd.c! TELE 402 Lecture 11: Unix domain 25! TELE 402 Lecture 11: Unix domain 26! Passing user credentials 1!! User credentials (user ID, group IDs) can be passed along a Unix domain socket as the fcred structure! struct fcred { uid_t fc_ruid;! gid_t fc_rgid;! char fc_login[maxlogname];! uid_t fc_uid;! short fc_ngroups;! gid_t fc_groups[ngroups];}! Passing user credentials 2!! The above information is always available on a Unix domain socket, subject to the following conditions!! The credentials are sent as ancillary data when data is sent on the Unix domain socket, but only if the receiver of the data has enabled the LOCAL_CREDS socket option. The level for this option is 0.!! On a datagram socket, the credentials accompany every datagram. On a stream socket, the credentials are sent only once (the first time data is sent)!! Credentials cannot be sent along with a descriptor!! Users are not able to forge credentials! TELE 402 Lecture 11: Unix domain 27! TELE 402 Lecture 11: Unix domain 28!
8 Blocking and nonblocking 1!! Input operations: read, readv, recv, recvfrom, and recvmsg!! Blocking: if there is no data available in the socket receive buffer, the process is put to sleep!! Nonblocking: if there is no data available, the process is returned an error of EWOULDBLOCK! Blocking and nonblocking 2!! Output operations: write, writev, send, sendto, and sendmsg!! Blocking: if there is no room in the socket send buffer, the process is put to sleep!! Nonblocking: if there is no room at all in the socket send buffer, the process is returned an error of EWOULDBLOCK!! In general UDP does not block since it does not have a socket send buffer. Some implementations might block in the kernel due to buffering and flow control.! TELE 402 Lecture 11: Unix domain 29! TELE 402 Lecture 11: Unix domain 30! Blocking and nonblocking 3!! Accepting incoming connections: accept!! Blocking: if there is no new connection available, the process is put to sleep!! Nonblocking: if there is no new connection available, the process is returned an error of EWOULDBLOCK!! Initiating outgoing connections: connect!! Blocking: the process is blocked for at least the round trip time (RTT) to the server!! Nonblocking: if a connection cannot be established immediately, the connection establishment is initiated but the error of EINPROGRESS is returned!! Some connections can be established immediately, e.g. when the server and the client are on the same host! Simple version of example1!! Use fork to remove blocking factors!! Refer to strclifork.c! TELE 402 Lecture 11: Unix domain 31! TELE 402 Lecture 11: Unix domain 32!
9 Nonblocking connect 1!! To set a socket nonblocking, use fcntl to set O_NONBLOCK flag!! Three uses for nonblocking connect!! Overlap other processing with the three-way handshake!! Should use select to test the connection later!! Establish multiple connections at the same time!! Shorten the timeout for connect using select with a specified time limit!! Example!! Overlap other processing with three-way handshake!! Use select to shorten timeout.! TELE 402 Lecture 11: Unix domain 33! Nonblocking connect 2!! There are a couple of details to attend if we use this technique:!! If the server is on the same host, the connection is normally established immediately. We need to handle this.!! Berkeley derived have the following rules:!! The descriptor is writable when the connection completes successfully!! If connection establishment encounters an error, the descriptor becomes both readable and writable! TELE 402 Lecture 11: Unix domain 34! Web client!! Use multiple connections to send requests and to receive response. (refer to nonblock/web.c)!! Control flow!! Associate each request with a nonblocking socket whose connection is initiated, depending on the maximum allowable connections.!! Use select to wait for any socket to be ready!! Scan the request array to find out if their sockets are readable or writable, and react to each situation accordingly!! Writable: send request.!! readable: receive response.!! Repeat the above until all requests are processed! TELE 402 Lecture 11: Unix domain 35! Nonblocking accept!! Normally nonblocking accept is not necessary if we use select, since when select returns there must be a completed connection!! However, there is a possibility (because the server is doing something else) that between the call select and the call accept, the client sends a RST to close the connection, which will cause accept to block!! To fix the problem!! Always set a listening socket nonblocking!! Ignore the following errors on the call to accept: EWOULDBLOCK, ECONNABORTED, EPROTO, and EINTR! TELE 402 Lecture 11: Unix domain 36!
10 ioctl!! ioctl has traditionally been the system interface used for everything that did not fit into some other nicely defined category!! Posix is getting rid of ioctl!! However, numerous ioctls remain for implementation-dependent features related to network programming!! Obtaining the interface information!! Accessing the routing table!! Accessing the ARP cache!! The ioctls introduced here are implementation dependent and may not be supported by Linux! TELE 402 Lecture 11: Unix domain 37! ioctl! int ioctl(int fd,! int request,! void *arg)!! Requests can be divided into six categories!! Socket operations!! File operations!! Interface operations!! ARP cache operations!! Routing table operations!! Streams system! TELE 402 Lecture 11: Unix domain 38! Interface configuration! SIOCGIFCONF!! Get interface configuration information!! Use SIOCGIFCONF, SIOCGIFFLAGS, and SIOCGIFBRDADDR requests!! And others!! ifconf structure is used as the argument! TELE 402 Lecture 11: Unix domain 39! TELE 402 Lecture 11: Unix domain 40!
11 SIOCGIFCONF! TELE 402 Lecture 11: Unix domain 41!
Overview. Last Lecture. This Lecture. Daemon processes and advanced I/O functions
Overview Last Lecture Daemon processes and advanced I/O functions This Lecture Unix domain protocols and non-blocking I/O Source: Chapters 15&16&17 of Stevens book Unix domain sockets A way of performing
More informationLecture 5 Overview! Last Lecture! This Lecture! Next Lecture! I/O multiplexing! Source: Chapter 6 of Stevens book!
Lecture 5 Overview! Last Lecture! I/O multiplexing! Source: Chapter 6 of Stevens book! This Lecture! Socket options! Source: Chapter 7 of Stevens book! Elementary UDP sockets! Source: Chapter 8 of Stevens
More informationEEC-484/584 Computer Networks
EEC-484/584 Computer Networks Lecture 15 wenbing@ieee.org (Lecture nodes are based on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall) Outline 2 Review of last lecture The network layer
More informationOverview. Daemon processes and advanced I/O. Source: Chapters 13&14 of Stevens book
Overview Last Lecture Broadcast and multicast This Lecture Daemon processes and advanced I/O functions Source: Chapters 13&14 of Stevens book Next Lecture Unix domain protocols and non-blocking I/O Source:
More informationLecture 10 Overview!
Lecture 10 Overview! Last Lecture! Wireless Sensor Networks! This Lecture! Daemon processes and advanced I/O functions! Source: Chapters 13 &14 of Stevens book! Next Lecture! Unix domain protocols and
More informationInterprocess Communication Mechanisms
Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name
More informationshared storage These mechanisms have already been covered. examples: shared virtual memory message based signals
Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name
More informationInterprocess Communication Mechanisms
Interprocess Communication 1 Interprocess Communication Mechanisms shared storage shared virtual memory shared files message-based sockets pipes signals Interprocess Communication 2 Message Passing Indirect
More informationInterprocess Communication Mechanisms
Interprocess Communication 1 Interprocess Communication Mechanisms shared storage shared virtual memory shared files message-based sockets pipes signals... Interprocess Communication 2 Message Passing
More informationCptS 360 (System Programming) Unit 17: Network IPC (Sockets)
CptS 360 (System Programming) Unit 17: Network IPC (Sockets) Bob Lewis School of Engineering and Applied Sciences Washington State University Spring, 2018 Motivation Processes need to talk to each other
More informationInterprocess Communication
Interprocess Communication B.Ramamurthy CSE421 11/5/02 B.R 1 Topics Pipes (process level) Sockets (OS level) Distributed System Methods (Java s) Remote Method Invocation (PL Level) Other communication
More informationMemory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length)
File Systems 38 Memory-Mapped Files generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length) mmap call returns the virtual address to which the file is mapped munmap call unmaps
More informationA Client-Server Exchange
Socket programming A Client-Server Exchange A server process and one or more client processes Server manages some resource. Server provides service by manipulating resource for clients. 1. Client sends
More informationUNIX Sockets. Developed for the Azera Group By: Joseph D. Fournier B.Sc.E.E., M.Sc.E.E.
UNIX Sockets Developed for the Azera Group By: Joseph D. Fournier B.Sc.E.E., M.Sc.E.E. Socket and Process Communication application layer User Process Socket transport layer (TCP/UDP) network layer (IP)
More informationOutline. Distributed Computer Systems. Socket Basics An end-point for a IP network connection. Ports. Sockets and the OS. Transport Layer.
Outline Distributed Computer Systems Socket basics Socket details (TCP and UDP) Socket options Final notes Sockets Socket Basics An end-point for a IP network connection what the application layer plugs
More informationSockets Sockets Communication domains
Sockets Sockets The original method for process communication in UNIX is pipes. A disadvantage with pipes is that they can only be used by processes that have the same parent process. When communicating
More informationNETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science
NETWORK PROGRAMMING CSC- 341 25 Instructor: Junaid Tariq, Lecturer, Department of Computer Science 26 9 Lecture Sockets as means for inter-process communication (IPC) application layer Client Process Socket
More informationCS631 - Advanced Programming in the UNIX Environment Interprocess Communication II
CS631 - Advanced Programming in the UNIX Environment Slide 1 CS631 - Advanced Programming in the UNIX Environment Interprocess Communication II Department of Computer Science Stevens Institute of Technology
More informationElementary TCP Sockets
Elementary TCP Sockets Chapter 4 UNIX Network Programming Vol. 1, Second Ed. Stevens Distributed Computer Systems 1 socket interface Application 1 Application 2 socket interface user kernel user kernel
More informationNetwork programming(ii) Lenuta Alboaie
Network programming(ii) Lenuta Alboaie adria@info.uaic.ro 1 Content let s remember: iterative TCP client/server UDP client/server model I/O primitives Advanced programming aspects in Internet socket API
More informationLecture 7. Followup. Review. Communication Interface. Socket Communication. Client-Server Model. Socket Programming January 28, 2005
Followup symbolic link (soft link): pathname, can be across file systems, replacement of file will be active on all symbolic links, consumes at least an inode. hard link: pointers to an inode, only in
More informationOutline. Operating Systems. Socket Basics An end-point for a IP network connection. Ports. Network Communication. Sockets and the OS
Outline Operating Systems Socket basics Socket details Socket options Final notes Project 3 Sockets Socket Basics An end-point for a IP network connection what the application layer plugs into programmer
More informationIntroduction! Overview! Signal-driven I/O for Sockets! Two different UDP servers!
Overview Last Lecture Advanced UDP sockets and threads Source: Chapters 22&26 of Stevens book This Lecture Signal-driven I/O, Raw sockets Source: Chapters 25&28&29 of Stevens book Next Lecture WSN and
More informationApplication Programming Interfaces
Application Programming Interfaces The TCP/IP protocol suite provides only the protocols that can be used by processes to communicate across a network. Though standarized, how these protocols are implemented
More informationCS 351 Week 15. Course Review
CS 351 Week 15 Course Review Objectives: 1. To review the contents from different weeks. 2. To have a complete understanding of important concepts from different weeks. Concepts: 1. Important Concepts
More informationContents. Part 1. Introduction and TCP/IP 1. Foreword Preface. xix. I ntroduction 31
Foreword Preface Xvii xix Part 1. Introduction and TCP/IP 1 Chapter 1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 Chapter 2. 2.1 2.2 2.3 I ntroduction I ntroduction 3 A Simple Daytime Client 6
More informationProgramming with TCP/IP. Ram Dantu
1 Programming with TCP/IP Ram Dantu 2 Client Server Computing Although the Internet provides a basic communication service, the protocol software cannot initiate contact with, or accept contact from, a
More informationClient Server Computing
Client Server Computing Although the Internet provides a basic communication service, the protocol software cannot initiate contact with, or accept contact from, a remote computer. Instead, two application
More informationGroup-A Assignment No. 6
Group-A Assignment No. 6 R N Oral Total Dated Sign (2) (5) (3) (10) Title : File Transfer using TCP Socket Problem Definition: Use Python for Socket Programming to connect two or more PCs to share a text
More informationLecture 3 Overview! Last Lecture! TCP/UDP and Sockets introduction!
Lecture 3 Overview! Last Lecture! TCP/UDP and Sockets introduction! This Lecture! Elementary TCP sockets! TCP Client-Server example! Source: Stevens book(chapters 4,5), Comer s book (Chapters 20, 21)!
More informationOral. Total. Dated Sign (2) (5) (3) (2)
R N Oral Total Dated Sign (2) (5) (3) (2) Assignment Group- A_07 Problem Definition Write a program using TCP socket for wired network for following Say Hello to Each other ( For all students) File transfer
More informationStandards / Extensions C or C++ Dependencies POSIX.1 XPG4 XPG4.2 Single UNIX Specification, Version 3
read() Read From a File or Socket z/os V1R10.0 XL C/C++ Run-Time Library Reference SA22-7821-10 Standards Standards / Extensions C or C++ Dependencies POSIX.1 XPG4 XPG4.2 Single UNIX Specification, Version
More informationOutline. Distributed Computing Systems. Socket Basics (1 of 2) Socket Basics (2 of 2) 3/28/2014
Outline Distributed Computing Systems Sockets Socket basics Socket details (TCP and UDP) Socket options Final notes Socket Basics (1 of 2) An end-point for an Internet network connection what application
More informationPorts under 1024 are often considered special, and usually require special OS privileges to use.
1 2 Turns out that besides an IP address (used by the IP layer), there is another address that is used by TCP (stream sockets) and, coincidentally, by UDP (datagram sockets). It is the port number. It's
More informationSockets 15H2. Inshik Song
Sockets 15H2 Inshik Song Internet CAU www server (www.cau.ac.kr) Your web browser (Internet Explorer/Safari) Sockets 2 How do we find the server? Every computer on the Internet has an Internet address.
More informationLecture 11: IP routing, IP protocols
Lecture 11: IP routing, IP protocols Contents Routing principles Local datagram delivery ICMP Protocol UDP Protocol TCP/IP Protocol Assuring requirements for streaming TPC Building and terminating TCP
More informationsottotitolo Socket Programming Milano, XX mese 20XX A.A. 2016/17 Federico Reghenzani
Titolo presentazione Piattaforme Software per la Rete sottotitolo Socket Programming Milano, XX mese 20XX A.A. 2016/17 Outline 1) Introduction to Sockets 2) UDP communication 3) TCP communication 4) RAW
More informationNetwork Implementation
CS 256/456: Operating Systems Network Implementation John Criswell! University of Rochester 1 Networking Overview 2 Networking Layers Application Layer Format of Application Data Transport Layer Which
More informationThe User Datagram Protocol
The User Datagram Protocol Stefan D. Bruda Winter 2018 UDP Very similar to the TCP in terms of API Dissimilar with TCP in terms of innards (and hence programming techniques) Many-to-many communication.
More informationIntroduction to Computer Systems. Networks 2. c Theodore Norvell. The Sockets API
The Sockets API [Wait! If you are not familiar with file descriptors and the UNIX read and write system calls, read chapter 10 of Bryant and O Hallaron and/or my summary before going on.] In this section
More informationSTUDY OF SOCKET PROGRAMMING
STUDY OF SOCKET PROGRAMMING Sockets : An application programming interface(api) used for inter process communication. Sockets allow communication between two different processes on the same or different
More informationSOCKETS: INTRODUCTION
SOCKETS: INTRODUCTION Sockets are a method of IPC that allow data to be exchanged between applications, either on the same host (computer) or on different hosts connected by a network. The first widespread
More informationLight & NOS. Dan Li Tsinghua University
Light & NOS Dan Li Tsinghua University Performance gain The Power of DPDK As claimed: 80 CPU cycles per packet Significant gain compared with Kernel! What we care more How to leverage the performance gain
More informationECE 650 Systems Programming & Engineering. Spring 2018
ECE 650 Systems Programming & Engineering Spring 2018 Networking Transport Layer Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) TCP/IP Model 2 Transport Layer Problem solved:
More informationADVANCED I/O. ISA 563: Fundamentals of Systems Programming
ADVANCED I/O ISA 563: Fundamentals of Systems Programming Agenda File Locking File locking exercise Unix Domain Sockets Team Projects Time File Locking Background Both high-performance and general-purpose
More informationUNIX Sockets. COS 461 Precept 1
UNIX Sockets COS 461 Precept 1 Socket and Process Communica;on application layer User Process Socket transport layer (TCP/UDP) OS network stack network layer (IP) link layer (e.g. ethernet) Internet Internet
More informationChapter 2 Applications and
Chapter 2 Applications and Layered Architectures Sockets Socket API API (Application Programming Interface) Provides a standard set of functions that can be called by applications Berkeley UNIX Sockets
More informationCSC Systems Programming Fall Lecture - XXIII Final Review. Tevfik Koşar. Louisiana State University
CSC 4304 - Systems Programming Fall 2008 Lecture - XXIII Final Review Tevfik Koşar Louisiana State University December 4 th, 2008 1 Using make 2 Implicit Rules 3 Using Variables in Makefiles 4 Libraries
More informationSistemas Operativos /2016 Support Document N o 1. Files, Pipes, FIFOs, I/O Redirection, and Unix Sockets
Universidade de Coimbra Departamento de Engenharia Electrotécnica e de Computadores Sistemas Operativos - 2015/2016 Support Document N o 1 Files, Pipes, FIFOs, I/O Redirection, and Unix Sockets 1 Objectives
More informationUsing make. Using Variables in Makefiles. Implicit Rules. Static vs Dynamic Libraries. Libraries. Tevfik Ko!ar
CSC 4304 - Systems Programming Fall 2008 Using make Lecture - XXIII Final Review Tevfik Ko!ar Louisiana State University December 4 th, 2008 1 2 Implicit Rules Using Variables in Makefiles 3 4 Libraries
More informationCS 43: Computer Networks. 07: Concurrency and Non-blocking I/O Sep 17, 2018
CS 43: Computer Networks 07: Concurrency and Non-blocking I/O Sep 17, 2018 Reading Quiz Lecture 5 - Slide 2 Today Under-the-hood look at system calls Data buffering and blocking Inter-process communication
More informationUDP CONNECT TO A SERVER
UDP The User Datagram Protocol Stefan D. Bruda Winter 2018 Very similar to the TCP in terms of API Dissimilar with TCP in terms of innards (and hence programming techniques) Many-to-many communication.
More informationWe will cover in this order: 2.1, 2.7, 2.5, 2.4, 2.2
CSE 422 Notes, Set 2 These slides contain materials provided with the text: Computer Networking: A Top Down Approach,5 th edition, by Jim Kurose and Keith Ross, Addison-Wesley, April 2009. Additional figures
More informationCSE/EE 461 Lecture 14. Connections. Last Time. This Time. We began on the Transport layer. Focus How do we send information reliably?
CSE/EE 461 Lecture 14 Connections Last Time We began on the Transport layer Focus How do we send information reliably? Topics ARQ and sliding windows Application Presentation Session Transport Network
More informationIPv4 and ipv6 INTEROPERABILITY
IT2351-NPM/UNIT-4/ 1 IPv4 and ipv6 INTEROPERABILITY Till the time, IPv6 is established all over the world, there is a need for one to host dual stacks that is both IPv4 and IPv6 are running concurrently
More informationUnix Network Programming Chapter 4. Elementary TCP Sockets 광운대학교컴퓨터과학과 정보통신연구실 석사과정안중현
Unix Network Programming Chapter 4. Elementary TCP Sockets 광운대학교컴퓨터과학과 정보통신연구실 석사과정안중현 4.1 Introduction A Time line of the typical scenario that takes place between a TCP client and server. Describes the
More informationUNIT IV- SOCKETS Part A
1. Define sockets - SOCKETS Part A A socket is a construct to provide a communication between computers. It hides the underlying networking concepts and provides us with an interface to communicate between
More informationSocket Programming. Sungkyunkwan University. Hyunseung Choo Copyright Networking Laboratory
Socket Programming Sungkyunkwan University Hyunseung Choo choo@skku.edu Copyright 2000-2019 Networking Laboratory Contents Goals Client-Server mechanism Introduction to socket Programming with socket on
More informationSocket Programming. CSIS0234A Computer and Communication Networks. Socket Programming in C
1 CSIS0234A Computer and Communication Networks Socket Programming in C References Beej's Guide to Network Programming Official homepage: http://beej.us/guide/bgnet/ Local mirror http://www.cs.hku.hk/~c0234a/bgnet/
More informationELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition
ELEC / COMP 177 Fall 2014 Some slides from Kurose and Ross, Computer Networking, 5 th Edition Project #1 Starts in one week Is your Linux environment all ready? Bring your laptop Work time after quick
More informationReview. Preview. Closing a TCP Connection. Closing a TCP Connection. Port Numbers 11/27/2017. Packet Exchange for TCP Connection
Review Preview Algorithms and Issues in Client Software Design Client Architecture Identifying the Location of a Parsing an Address Argument Looking Up a Domain Name Looking Up a Well-Known Port by Name
More informationAny of the descriptors in the set {1, 4} have an exception condition pending
Page 1 of 6 6.3 select Function This function allows the process to instruct the kernel to wait for any one of multiple events to occur and to wake up the process only when one or more of these events
More information(Refer Slide Time: 1:09)
Computer Networks Prof. S. Ghosh Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecturer # 30 UDP and Client Server Good day, today we will start our discussion
More informationInterprocess Communication Mechanisms
Interprocess Communication 1 Interprocess Communication Mechanisms shared storage These mechanisms have already been covered. examples: shared virtual memory shared files processes must agree on a name
More informationDepartment of Computer Science
Department of Computer Science Notes on Interprocess Communication in Unix Jean Dollimore,Oct.1990, last revised Feb. 1996 These notes explain how you can write "distributed programs" in C or C++ running
More informationProcesses and Threads
Process Processes and Threads A process is an abstraction that represent an executing program A program in execution An instance of a program running on a computer The entity that can be assigned to and
More informationInterprocess Communication Mechanisms
Interprocess Communication 1 Interprocess Communication Mechanisms ffl shared storage These mechanisms have already been covered. examples: Λ shared virtual memory Λ shared files processes must agree on
More informationsocketservertcl a Tcl extension for using SCM_RIGHTS By Shannon Noe - FlightAware
socketservertcl a Tcl extension for using SCM_RIGHTS By Shannon Noe - FlightAware Presented at the 24th annual Tcl/Tk conference, Houston Texas, October 2017 Abstract: Horizontal scaling is used to distribute
More informationTutorial on Socket Programming
Tutorial on Socket Programming Computer Networks - CSC 458 Department of Computer Science Hao Wang (Slides are mainly from Seyed Hossein Mortazavi, Monia Ghobadi, and Amin Tootoonchian, ) 1 Outline Client-server
More informationUser Datagram Protocol
Topics Transport Layer TCP s three-way handshake TCP s connection termination sequence TCP s TIME_WAIT state TCP and UDP buffering by the socket layer 2 Introduction UDP is a simple, unreliable datagram
More informationOperating Systems. Lecture 06. System Calls (Exec, Open, Read, Write) Inter-process Communication in Unix/Linux (PIPE), Use of PIPE on command line
Operating Systems Lecture 06 System Calls (Exec, Open, Read, Write) Inter-process Communication in Unix/Linux (PIPE), Use of PIPE on command line March 04, 2013 exec() Typically the exec system call is
More informationSocket Programming for TCP and UDP
CSCI4430 Data Communication and Computer Networks Socket Programming for TCP and UDP ZHANG, Mi Jan. 19, 2017 Outline Socket Programming for TCP Introduction What is TCP What is socket TCP socket programming
More informationNetwork programming(i) Lenuta Alboaie
Network programming(i) Lenuta Alboaie adria@info.uaic.ro 2017 2018 Computer Network http://www.info.uaic.ro/~computernetworks 1 Content Client/server paradigm API for network programming BSD Socket Characteristics
More informationCS 351 Week Advanced UNIX Programming: Rochkind, Marc J. 1. To learn about System Interprocess Communication (IPC). 2. To learn about Sockets.
CS 351 Week 11 Reading: 1. Advanced UNIX Programming: Rochkind, Marc J. Objectives: 1. To learn about System Interprocess Communication (IPC). 2. To learn about Sockets. Concepts: 1. Interprocess Communication
More informationWhat s an API? Do we need standardization?
Network Interface z The network protocol stack is a part of the OS z Need an API to interface applications to the protocol stack. What s an API? Do we need standardization? z The socket interface is the
More informationCS321: Computer Networks Introduction to Application Layer
CS321: Computer Networks Introduction to Application Layer Dr. Manas Khatua Assistant Professor Dept. of CSE IIT Jodhpur E-mail: manaskhatua@iitj.ac.in Basic Application layer provides services to the
More informationHybrid of client-server and P2P. Pure P2P Architecture. App-layer Protocols. Communicating Processes. Transport Service Requirements
Announcements CS 5565 Network Architecture and Protocols Lecture 5 Godmar Back Problem Set 1 due Feb 17 Project 1 handed out shortly 2 Layer The Layer Let s look at some s (in keeping with top-down) architectures:
More informationAsynchronous Events on Linux
Asynchronous Events on Linux Frederic.Rossi@Ericsson.CA Open System Lab Systems Research June 25, 2002 Ericsson Research Canada Introduction Linux performs well as a general purpose OS but doesn t satisfy
More informationChapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control
Chapter 6 What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control OSI Model Hybrid Model Software outside the operating system Software inside
More informationSocket Programming. Dr. -Ing. Abdalkarim Awad. Informatik 7 Rechnernetze und Kommunikationssysteme
Socket Programming Dr. -Ing. Abdalkarim Awad Informatik 7 Rechnernetze und Kommunikationssysteme Before we start Can you find the ip address of an interface? Can you find the mac address of an interface?
More informationComputer Networks SYLLABUS CHAPTER - 2 : NETWORK LAYER CHAPTER - 3 : INTERNETWORKING
i SYLLABUS UNIT - 1 CHAPTER - 1 : INTRODUCTION Uses of Computer Networks, Network Hardware, Network Software, Reference Models (ISO-OSI, TCP/IP). CHAPTER - 2 : NETWORK LAYER Network Layer Design Issues,
More informationECE 650 Systems Programming & Engineering. Spring 2018
ECE 650 Systems Programming & Engineering Spring 2018 Programming with Network Sockets Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) Sockets We ve looked at shared memory vs.
More informationCSC209H Lecture 9. Dan Zingaro. March 11, 2015
CSC209H Lecture 9 Dan Zingaro March 11, 2015 Socket Programming (Kerrisk Ch 56, 57, 59) Pipes and signals are only useful for processes communicating on the same machine Sockets are a general interprocess
More informationLinux Kernel Application Interface
Linux Kernel Application Interface Arseny Kurnikov Aalto University School of Electrical Engineering PO Box 13000, FI-00076 Aalto Espoo, Finland arseny.kurnikov@aalto.fi ABSTRACT This paper describes different
More informationNetworked Applications: Sockets. End System: Computer on the Net
Networked Applications: Sockets Topics Programmer s view of the Internet Sockets interface End System: Computer on the Net Internet Also known as a host 2 Page 1 Clients and Servers Client program Running
More informationRandall Stewart, Cisco Systems Phill Conrad, University of Delaware
SCTP: An Overview Randall Stewart, Cisco Systems Phill Conrad, University of Delaware 1 Our Objectives Be able to explain what SCTP is, and what its major features are when and why you might use it (instead
More informationChapter 8: I/O functions & socket options
Chapter 8: I/O functions & socket options 8.1 Introduction I/O Models In general, there are normally two phases for an input operation: 1) Waiting for the data to arrive on the network. When the packet
More informationCSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files
CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files ... and systems programming C basic syntax functions arrays structs
More informationCSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.
CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files... and systems programming C basic syntax functions arrays structs
More informationCS 428/528 Computer Networks Lecture 01. Yan Wang
1 CS 428/528 Computer Lecture 01 Yan Wang 2 Motivation: Why bother? Explosive growth of networks 1989, 100,000 hosts on the Internet Distributed Applications and Systems E-mail, WWW, multimedia, distributed
More informationProblem Set: Processes
Lecture Notes on Operating Systems Problem Set: Processes 1. Answer yes/no, and provide a brief explanation. (a) Can two processes be concurrently executing the same program executable? (b) Can two running
More informationProgramming Internet with Socket API. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806
Programming Internet with Socket API Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806 10/19/2015 CSCI 445 - Fall 2015 1 Acknowledgements Some pictures
More informationOperating Systems. 17. Sockets. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski
Operating Systems 17. Sockets Paul Krzyzanowski Rutgers University Spring 2015 1 Sockets Dominant API for transport layer connectivity Created at UC Berkeley for 4.2BSD Unix (1983) Design goals Communication
More informationThe Fundamentals. Port Assignments. Common Protocols. Data Encapsulation. Protocol Communication. Tevfik Ko!ar
CSC 4304 - Systems Programming Fall 2008 Lecture - XXII Network Programming Tevfik Ko!ar Louisiana State University December 2 nd, 2008 1 The Fundamentals The Computer Systems Research Group (CSRG) at
More informationTCP/IP Stack Introduction: Looking Under the Hood!
TCP/IP Stack Introduction: Looking Under the Hood! Shiv Kalyanaraman shivkuma@ecse.rpi.edu http://www.ecse.rpi.edu/homepages/shivkuma 1 Example program 1. Create UDP datagram socket; fill in server address
More informationSocket Programming. #In the name of Allah. Computer Engineering Department Sharif University of Technology CE443- Computer Networks
#In the name of Allah Computer Engineering Department Sharif University of Technology CE443- Computer Networks Socket Programming Acknowledgments: Lecture slides are from Computer networks course thought
More informationCSE 43: Computer Networks Structure, Threading, and Blocking. Kevin Webb Swarthmore College September 14, 2017
CSE 43: Computer Networks Structure, Threading, and Blocking Kevin Webb Swarthmore College September 14, 2017 1 Agenda Under-the-hood look at system calls Data buffering and blocking Processes, threads,
More informationUNIX Network Programming
UNIX Network Programming The Sockets Networking API Volume 1 Third Edition W. Richard Stevens Bill Fenner Andrew M. Rudoff AAddison-Wesley Boston San Francisco New York Toronto Montreal London Munich Paris
More informationInterprocess Communication. Originally multiple approaches Today more standard some differences between distributions still exist
Interprocess Communication Originally multiple approaches Today more standard some differences between distributions still exist Pipes Oldest form of IPC provided by all distros Limitations Historically
More informationCHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1
CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK SUBJECT: NETWORK PROGRAMMING/MC9241 YEAR/ SEM: II /I V 1 CCET UNIT 1 1. What are the steps involved in obtaining a shared
More information