Network Programming. Simulation Engines 2008 Chalmers University of Technology. Markus Larsson

Size: px
Start display at page:

Download "Network Programming. Simulation Engines 2008 Chalmers University of Technology. Markus Larsson"

Transcription

1 Network Programming Simulation Engines 2008 Chalmers University of Technology Markus Larsson Simulation Engines 2008, Markus Larsson 1

2 Networked games Most games are played against some form of opponent Last lecture we spoke about computer controlled opponents This lecture we will discuss human controlled opponents Human opponents often allows a lot more interesting gameplay Massively Multiplayer Online Games are interesting examples Simulation Engines 2008, Markus Larsson 2

3 Example: Counterstrike One of the most successful online games ever Hundreds of thousands of active players Simulation Engines 2008, Markus Larsson 3

4 Example: World of Warcraft Ridiculously successful MMOG, released by Blizzard on November 23rd, accounts were created during the first day Simulation Engines 2008, Markus Larsson 4

5 Networking issues Regardless of whether we want to create a small scale networked game such as Counterstrike or a huge MMOG like WoW the following issues need to be looked in to Which network architecture is suitable for our game? Client/server or peer to peer (or a combination)? What kind of network protocols are useful for a computer game? How will we handle the issues of high lag (latency), low bandwidth, and packet loss that exist on the Internet? The type of game naturally affects which kind of network programming techniques we will use. What differs from a small scale and a massive scale multiplayer game? Chalmers has many interesting courses on networking programing in general and Internet programming in particular Simulation Engines 2008, Markus Larsson 5

6 Fundamentals Packet Network message. All information sent over a network is split up into indivisible packets. Packets can be lost and may have to be resent depending on the protocol. Latency Network lag or latency is the delay associated with the time between sending a message from a source and receiving it at the destination. Bandwidth Maximum information rate that can be sent over a particular network connection (remember to distinguish bandwidth from latency!) Simulation Engines 2008, Markus Larsson 6

7 Fundamentals Packet loss Most networks are not perfect, and packets might be lost due to corrupted links or collisions. Packet loss is a measure of how high ratio of all packets are lost in transmission. Protocol Data format specification for embedding packets as well as routines for reliability, acknowledgment, transfer, etc. Network architecture Topology of a particular network (or subset of a network) involved in a particular system or protocol instance. Most common examples in this context include peer to peer (P2P) and client server (C/S) architectures Simulation Engines 2008, Markus Larsson 7

8 Terms more related to games Lobby service Players often need a virtual meeting place outside the game itself where they can meet, chat, and form games. This place is often called a lobby, and a lobby service is a middleware allowing for the creation of such lobbies. Dead reckoning The imperfect nature of the Internet means that games will be plagued by high latency and high packet loss. This means that we will often be unable to send frequent updates of the object state to the players participating in a game. In order to avoid jerky in game behaviour, each client extrapolates the position of the objects given their old position and velocity. Security There are lots of malicious users on the Internet and we must take care to protect our game as well as the players from these. Security in multiplayer games is a whole lecture in itself (maybe even a whole course!), but we will just talk briefly about this subject Simulation Engines 2008, Markus Larsson 8

9 Protocols Definition A protocol is a convention or standard that controls or enables the connection, communication, and data transfer between two computing endpoints Simulation Engines 2008, Markus Larsson 9

10 Protocols A protocol typically defines the following Detection of the underlying physical connection (wired or wireless), or the existence of the other endpoint or node Handshaking Negotiation of various connection characteristics How to start and end a message How to format a message What to do with corrupted or improperly formatted messages (error correction) How to detect unexpected loss of the connection, and what to do next Termination of the session or connection Simulation Engines 2008, Markus Larsson 10

11 Protocol families Of the protocol families listed here, we are mostly interested in the last one, Internet protocol suite Simulation Engines 2008, Markus Larsson 11

12 Socket programming The standard way of doing Internet programming is to make use of a network socket library Berkeley sockets originated with the 4.2BSD system in 1983 The Windows implementation of the BSD Socket API is called WinSock and includes a number of extensions specific to network sockets on Windows Definition of Socket A socket can be used in computer networking to form one end of a bi directional communication link between two programs Simulation Engines 2008, Markus Larsson 12

13 Socket programming The following header files are involved in C programming with BSD sockets under UNIX (similar on Windows) sys/socket.h Definitions for the most basic of socket structures sys/types.h Basic data types associated with structures within the API netinet/in.h Definitions for socketaddr in and other base data structures sys/un.h Definitions and data type declarations for SOC UNIX streams sys/select.h Definitions for the use of the select family of functions Simulation Engines 2008, Markus Larsson 13

14 Socket programming A socket is an endpoint in a two way communication link between two parties. An Internet (TCP/IP) socket is (explicitly or implicitly) bound to a specific address (hostname and portnumber) and can be connected to another socket with another address Potentially on another computer Simulation Engines 2008, Markus Larsson 14

15 Internet adress Internet addresses are 32 bit numbers, usually represented as four bytes on the form xxx.yyy.zzz.www They are also identified by a 16 bit port number Normal connection sockets do not care about the exact address, but a server usually binds a specific server socket to a pre defined address Such a server socket listens for inbound connections and then creates a new socket for the actual client server communication Only one socket can be bound to a specific address at any time Port numbers below 2000 are ordinarily reserved Port numbers below 1024 need Root access to bind HTTP is port 80, FTP is port 21, Telnet is port 23, etc Simulation Engines 2008, Markus Larsson 15

16 Socket tutorial A brief overview Simulation Engines 2008, Markus Larsson 16

17 Socket tutorial: Server code int sockfd, newsockfd, portno, clilen, n; struct sockaddr_in serv_addr, cli_addr; char buffer[256]; sockfd = socket(af_inet, SOCK_STREAM, 0); // (1) bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(port_number); serv_addr.sin_addr.s_addr = INADDR_ANY; bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)); // (2) listen(sockfd, 5); // (3) clilen = sizeof(cli_addr); newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen); // (4) bzero(buffer, 256); n = read(newsockfd, buffer, 255); // (5) printf("message: %s\n", buffer); Simulation Engines 2008, Markus Larsson 17

18 Socket tutorial: Client code int sockfd, portno, n; struct sockaddr_in serv_addr; struct hostent *server; sockfd = socket(af_inet, SOCK_STREAM, 0); // (1) server = gethostbyname(server_name); bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; bcopy((char *) server->h_addr, (char *) &serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(port_number); connect(sockfd, &serv_addr, sizeof(serv_addr)); // (2) fgets(buffer, 255, stdin); write(sockfd, buffer, strlen(buffer)); // (3) Simulation Engines 2008, Markus Larsson 18

19 Managing several clients The client/server examples only support one client and one server In a real system, we will want to continue listening to other connections on the connect socket while simultaneously handling communication with the already connected clients as well There are two approaches to this Input/Output multiplexing Switch the communication sockets to be non blocking and use the select() system call to manage input and output from a number of sockets in a sequential way (select() allows you to wait for input/output on a set of sockets). Introduce concurrency Implement concurrency in our server program so that different parts of the server can handle the clients and the connections simultaneously. The traditional UNIX way is to fork() child processes off the main server process to handle clients; this is however not very practical for a game server where clients co exist in the same virtual world, so here it is better to assign individual threads to users Simulation Engines 2008, Markus Larsson 19

20 UDP datagrams The previous example used TCP (Transmission Control Protocol) for the transfer TCP is a reliable stream based protocol that guarantees ordered delivery of all information sent over the socket Bad connectivity and high packet loss might produce a large overhead when resending and reordering packets UDP (User Datagram Protocol) is an unreliable message based protocol where information is sent in variable sized chunks called datagrams UDP datagrams have no guarantee of delivery, but this is sufficient for non critical game information In order to create an UDP socket, we specify SOCK DGRAM instead of SOCK STREAM when creating our socket. In addition, we use the sendto() and recvfrom() calls for sending and receiving datagrams, respectively Simulation Engines 2008, Markus Larsson 20

21 Final words about sockets It often makes sense to have two connections per client A TCP socket for game critical information (messages, deaths, etc) A UDP socket for non critical information (position updates, etc) TCP like functionality can be manually recreated using UDP Simulation Engines 2008, Markus Larsson 21

22 Network architectures The network architecture of a game specifies the topology of the hosts involved in the game and their communication structure and protocol Typically, game developers will implement their own game protocol on top of TCP/UDP and design it to fit the network architecture selected Client/Server Star network with a central server through which all clients (hosts) communicate. The server may or may not be an active participant in the game itself. Client/Server cluster Similar as C/S architectures, except the server load is shared among a cluster of interconnected computers instead of a single one. Peer to Peer No central server, all peers communicate (more or less) directly with each other. Truly distributed system Simulation Engines 2008, Markus Larsson 22

23 Client/Server A client/server multiplayer game has two kinds of entities Clients Servers Benefits The normal computers playing the game over the network The coordinating hosts storing the universal game state and arbitrating the actions of individual clients Relatively easy to implement Synchronization and consistency easy Cheating can be controlled by the server Communication is minimized Drawbacks All communication goes through the server Usually requires planning in the design stages of a game, adding it last will be difficult Single point of failure; If the server goes down, the whole game goes down Simulation Engines 2008, Markus Larsson 23

24 Client/Server Simulation Engines 2008, Markus Larsson 24

25 Peer to peer A peer to peer networked game has no single server, but rather the world state is shared among the various peers which are all Benefits No single point of failure, no bottleneck Simple implementation Easy to build on top of an existing game Drawbacks Lots of communication Synchronization and consistency can become difficult Scalability is poor without an extremely well thought out design Easy to cheat on clients Firewalls can be a major pain in the *** Simulation Engines 2008, Markus Larsson 25

26 Peer to peer Simulation Engines 2008, Markus Larsson 26

27 Advanced P2P techniques There are many obvious drawbacks to P2P mechanisms for multiplayer games, here are a few possible solutions Poor scalability Clearly, not everyone in the world needs to know about every event that affects other peers, especially if they are not geographically close. Use an interest management technique to filter out relevant information. Costly communication Use techniques for broadcast and multicast (group communication) to cut down on communication costs (problem: not supported by all network hardware, must be implemented in software). Easy to cheat Involve a trusted (or randomly selected) third party to arbitrate all critical transactions (i.e. ask C whether A hit B). Can be difficult (but not impossible) to solve. Many of these areas are still being researched and very few commercial games use peer to peer communication Simulation Engines 2008, Markus Larsson 27

28 Break 15 minutes Simulation Engines 2008, Markus Larsson 28

29 Network programming for games An extremely basic multiplayer game loop might look like this 1. Receive messages from other peers (or the server). 2. Process messages, updating local copy of game state accordingly. 3. Send message about my status to other peers (or server). 4. Render the frame and perform other world updates. In the following slides, we will look at the issues that effect these steps as well as take a peek at middleware solutions that can be of assistance Simulation Engines 2008, Markus Larsson 29

30 A few issues The internet The Internet is dreadful for multiplayer gaming simply due to his high lag, low bandwidth, and high packet loss. We need to come up with ways to provide a playable game despite this. Encryption We may have to encrypt our network data to avoid eavesdropping by malicious users. Firewalls Many players are behind firewalls on the Internet, yet still want to participate in multiplayer games. Denial of service Players can be denied access to a game, usually through flooding Simulation Engines 2008, Markus Larsson 30

31 Lag, bandwidth and packet loss Three fundamental issues that we must face as network programmers Limited bandwidth The data transfer rate over a network is limited and certainly magnitudes smaller than that within the internal memory bus of a computer. Packet loss Networks are unreliable and packets are often lost in transit. High latency The delay between sending and receiving a message over the network can be long, especially for games played over the Internet Simulation Engines 2008, Markus Larsson 31

32 Managing bandwidth Static data Caching Transmit information once and thereafter use a integer identifier for it Initialization Transmit static information once when the client connects, never during actual game play Data compression Packing Use an algorithm to tightly pack messages; encode booleans as bits, floats as fixed point numbers, etc Compression Use a data compression scheme (i.e. Huffman coding) to compress messages Relevance filtering Define a metric to decide whether a specific event is relevant or not for a specific client Simulation Engines 2008, Markus Larsson 32

33 Managing bandwidth Message prioritization Important messages should not be clogged down by less important messages; implement a priority scheme to allow client programmers to specify the importance of a message. Incremental updates Game objects rarely change their whole state at the same time. We cannot rely on incremental updates indefinitely; sooner or later, packet loss will ensure that the players view of the game objects will drift from their true state. Once in a while we need to synchronize game object state Simulation Engines 2008, Markus Larsson 33

34 Managing packet loss TCP does a good job of ensuring reliable message transfer, but the considerable overhead associated with the protocol is not a desirable property for a real time networked simulation Similarly, the totally unreliable UDP protocol is also not suitable for a real time simulation where we may have to ensure message delivery for some messages Two basic solutions Use two connections per client, one TCP and one UDP. This is a workable solution that is used by a few games, but which results in slightly more complex network code than for just one connection. Implement our own protocol on top of UDP that provides us with the features we need Simulation Engines 2008, Markus Larsson 34

35 Our own UDP based protocol We have already remarked that there are different kinds of network data Important and less important Because of this, it makes sense to provide different policies in our network protocol Guaranteed order Messages are required to be guaranteed delivery at the destination in the same order they were sent. This is the strongest transmission policy and is essentially the same as TCP. Guaranteed Messages are required to be delivered at the destination, but not necessarily in the order they were sent. Unguaranteed Messages have no requirements on delivery; they are processed by the destination if they arrive and are not resent if they do not Simulation Engines 2008, Markus Larsson 35

36 Managing latency Latency (or lag) is the delay from the sender sending a message to the receiver actually receiving it Caused by hardware and the limited speed of light In network gaming we are often mostly interested in roundtrip times (the time for server >client >server) Roundtrip times of 250 milliseconds are not uncommon All clients involved in a network game see an outdated version of the world; only the server knows the real version Simulation Engines 2008, Markus Larsson 36

37 Managing latency Interpolation Interpolation is used perform smooth transitions between old and new object state (usually position and velocity) to avoid visible pops. Extrapolation We take our best guess at the new state of an object given its past state and predict future behaviour Positional state is easily extrapolated by adding the velocity vector times the time difference to the old position vector If we know the acceleration vector of the object, we can update the velocity vector as well Client side prediction Player controlled entities move unpredictably and cannot be easily extrapolated In some cases, it is possible to forward the input commands of one player to observing players so that they can more accurately predict the player's behavior Simulation Engines 2008, Markus Larsson 37

38 Security and encryption We have virtually no control over which networks our data is sent, and in many cases we send sensitive information (i.e. credit card information etc.) Symmetric encryption Two parties communicating over a shared but insecure connection and sharing a common and secret key The key is used for both encoding and decoding the data so that no malicious eavesdroppers can read it Requires secure key exchange Simulation Engines 2008, Markus Larsson 38

39 Security and encryption Assymetric encryption Also known as public key cryptography, this scenario also involves two parties on an insecure connection, but here each user has a public and a private key. A user s public key is used to encode messages for a that user so that only the user himself can decode it using his private key. Computationally much more expensive than symmetric encryption Very useful for key exchange for symmetric encryption Message authentication In order to detect malicious tampering with messages, we can tag each message with a message authentication code (MAC) generated using a secure cryptographical hashing function Digital signatures and certificates Certificates and signatures allow for the verification of the public key of a user to avoid Man in the Middle attacks Simulation Engines 2008, Markus Larsson 39

40 Distributed objects In a game networking layer it might be a good idea to raise the abstraction level from sockets and packets to distributed objects One useful metaphor for implementing distribut,ed objects is the RPC mechanism (Remote Procedure Call) Allows nodes to remotely execute methods in an object over the network Allows us to implement our game objects as first class objectoriented distributed entities living on the network and which support method invocations Also allows programmers to specify properties for different parts of the state of a game object to control updates and relevance filtering For example, a client in a first person shooter can receive a network object reference to a Player object residing on the server, allowing it to call methods such as Player.Shoot(), Player.Run(), Player.Duck(), etc Simulation Engines 2008, Markus Larsson 40

41 Existing game networking APIs We will take a brief look at two existing game network engines OpenTNL The open source version of the Torque Network Layer Quazal Net Z A commercial multiplayer engine Simulation Engines 2008, Markus Larsson 41

42 Torque Network Layer The Torque Network Layer (TNL) and OpenTNL is the network layer on the Torque engine UDP based delivery notification connection protocol Two phase connect for prevention of IP spoofing attacks Client puzzle system for server CPU depletion Denial of Service protection ECC key exchange and certificate authentication AES symmetric encryption with SHA 256 message authentication Efficient packet streaming architecture for consistent bandwidth utilization Bit level compression for optimal bandwidth utilization Huffman encoded strings and common substring skipping Simple and efficient event and RPC (remote procedure call) framework Extensible master server framework Simulation Engines 2008, Markus Larsson 42

43 Quazal Net Z Quazal Net Z API is a commercial multiplayer engine for games Used in Company of Heroes, Supreme Commander, Hitman, etc The key feature is that it deals with distributed game objects described using DDL (Data Description Language) Client programmers only have to worry about integrating Net Z objects into their game code Simulation Engines 2008, Markus Larsson 43

44 Quazal Net Z Duplicated objects Decentralized, distributed objects describing all the network relevant information about that game object Duplicated object migration Duplication master objects can migrate from one station to another DObject & session fault tolerance When a station fails, any distributed objects will migrate to another station to ensure that the object survives the fault Dead reckoning Net Z s dead reckoning (data extrapolation) reduces bandwidth usage by avoiding sending unnecessary updates across the network Latency masking techniques Application topology Objects are known globally but programmers can dictate who controls what Synchronized user inputs Functionality for to propagating and synchronizing user inputs across the network Simulation Engines 2008, Markus Larsson 44

45 Massively Multiplayer Online Games The rise of the Internet led to the development of text only multiplayer games known as MUDs MUDs, modern computer graphics and conventional single player games eventually combined to spawn a whole new generation of MMOGs Some of the first commercial 3D MMOGs include Meridian 59, Everquest and Asheron's Call Nowadays people tend to think about games such as WoW, Eve Online, Lineage These games show potential for a lot of business but bring a whole new array of network issues Simulation Engines 2008, Markus Larsson 45

46 Special issues for MMOGs Network architecture With thousands of simultaneous connected users, the issue of which network architecture to choose is difficult: a single server can quickly become a bottleneck. Cluster architectures are common. Security and cheating Competitive online games are very welcome targets for malicious users who want to gain an upper hand. Therefore, we must work hard to minimize possibilities of tampering with the client or the network traffic to cheat. Reliability, patching and updating The more players we have connected to our server, the more unhappy customers we will get if the server goes down (planned or not). We have to deal with issues how to update (or patch ) the game as well as the clients Simulation Engines 2008, Markus Larsson 46

47 Special issues for MMOGs Relevance filtering Managing the interest of players and only sending them information that is relevant to them is vital in a game with thousands of connected users. Operating system limits In some cases, we may for instance have to increase the total number of open sockets in the operating system to support a huge online game Simulation Engines 2008, Markus Larsson 47

48 Example: Quazal Eterna Eterna is Quazal's middleware framework for MMOGs Based on the same principles as Net Z, but has been adapted to support large scale network applications Duplication spaces Dynamically configurable objects that partition the virtual world based on a publish/subscribe mechanism. Configurable network topology Control over how information is sent over the network, including restrictions on where Duplicated Objects are created, where they reside, who may discover them, and who may modify them Simulation Engines 2008, Markus Larsson 48

49 Example: Quazal Eterna Load balancing Duplicated objects migration allowing for exploiting the server cluster s available processing power and reduce bandwidth usage via workload distribution. Fault tolerance Automatic migration of duplicated objects to ensure their survival. Hierarchical messaging Individual stations (server or client) to update all of their duplicas using a hierarchy of intermediate stations Simulation Engines 2008, Markus Larsson 49

50 Summary Multiplayer functionality in computer games has become more and more important as connectivity increases There are lots of issues plaguing networked games that we have to take into account; network programming for games is (much) more than sockets and packets Different network architectures are suitable for different kinds of games The three major factors of network programming are low bandwidth, packet loss, and high latency We also have to consider aspects of security and encryption Massively multiplayer online games (MMOGs) introduce a whole new set of issues that we have to deal with to create a successful game Simulation Engines 2008, Markus Larsson 50

Applications and Layered Architectures. Chapter 2 Communication Networks Leon-Garcia, Widjaja

Applications and Layered Architectures. Chapter 2 Communication Networks Leon-Garcia, Widjaja Applications and Layered Architectures Chapter 2 Communication Networks Leon-Garcia, Widjaja Network Architecture Architecture: Any design or orderly arrangement perceived by man. The goals of a network:

More information

Introduction to Client-Server Model

Introduction to Client-Server Model Preview Introduction to Client-Server Model Motivation of Client-Server Model Terminologies and Concepts in Client-Server Model Connectionless vs. Connection-Oriented Stateless vs. Stateful Server Identify

More information

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC)

COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC) COMMUNICATION PROTOCOLS: REMOTE PROCEDURE CALL (RPC) 1 2 CONVENTIONAL PROCEDURE CALL (a) (b) Parameter passing in a local procedure call: the stack before the call to read. The stack while the called procedure

More information

CS307 Operating Systems Processes

CS307 Operating Systems Processes CS307 Processes Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2018 Process Concept Process a program in execution An operating system executes a variety of

More information

Processes. Process Concept. The Process. The Process (Cont.) Process Control Block (PCB) Process State

Processes. Process Concept. The Process. The Process (Cont.) Process Control Block (PCB) Process State CS307 Process Concept Process a program in execution Processes An operating system executes a variety of programs: Batch system jobs Time-shared systems user programs or tasks All these activities are

More information

The BSD UNIX Socket Interface (CS 640 Lecture) Assignment 1. Interprocess Communication (IPC) Work Individually (no groups)

The BSD UNIX Socket Interface (CS 640 Lecture) Assignment 1. Interprocess Communication (IPC) Work Individually (no groups) The BSD UNIX Socket Interface (CS 640 Lecture) Assignment 1 Work Individually (no groups) Due Date: in class, Monday, September 19 Robert T Olsen olsen@cswiscedu 7390CS Office Hours: 3-5T, 11-12F - exception

More information

Distributed Systems. 02. Networking. Paul Krzyzanowski. Rutgers University. Fall 2017

Distributed Systems. 02. Networking. Paul Krzyzanowski. Rutgers University. Fall 2017 Distributed Systems 02. Networking Paul Krzyzanowski Rutgers University Fall 2017 1 Inter-computer communication Without shared memory, computers need to communicate Direct link Direct links aren't practical

More information

Piotr Mielecki Ph. D.

Piotr Mielecki Ph. D. Piotr Mielecki Ph. D. http://mielecki.ristel.pl/ piotr.mielecki@pwr.edu.pl pmielecki@gmail.com Building blocks of client-server applications: Client, Server, Middleware. Simple client-server application:

More information

(Refer Slide Time: 1:09)

(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 information

Chapter 5.6 Network and Multiplayer

Chapter 5.6 Network and Multiplayer Chapter 5.6 Network and Multiplayer Multiplayer Modes: Event Timing Turn-Based Easy to implement Any connection type Real-Time Difficult to implement Latency sensitive 2 Multiplayer Modes: Shared I/O Input

More information

UNIX Network Programming. Overview of Socket API Network Programming Basics

UNIX Network Programming. Overview of Socket API Network Programming Basics UNIX Network Programming Overview of Socket API Network Programming Basics 1 Client-Server Model Client Machine A Network Server Machine B Web browser and server FTP client and server Telnet client and

More information

Networking interview questions

Networking interview questions Networking interview questions What is LAN? LAN is a computer network that spans a relatively small area. Most LANs are confined to a single building or group of buildings. However, one LAN can be connected

More information

Sockets. Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University Embedded Software Lab.

Sockets. Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University  Embedded Software Lab. 1 Sockets Dong-kun Shin Embedded Software Laboratory Sungkyunkwan University http://nyx.skku.ac.kr Internet Connections (1) 2 Connection Clients and servers communicate by sending streams of bytes over

More information

Randall Stewart, Cisco Systems Phill Conrad, University of Delaware

Randall 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 information

Sockets. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Sockets. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Sockets Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Internet Connections (1) Connection Clients and servers communicate by sending streams of

More information

The User Datagram Protocol

The 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 information

CS 428/528 Computer Networks Lecture 01. Yan Wang

CS 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 information

UDP CONNECT TO A SERVER

UDP 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 information

Elementary TCP Sockets

Elementary 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 information

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University

Hyo-bong Son Computer Systems Laboratory Sungkyunkwan University Sockets Hyo-bong Son (proshb@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Client-Server Model Most network application is based on the client-server model: A server

More information

Data and Computer Communications. Tenth Edition by William Stallings

Data and Computer Communications. Tenth Edition by William Stallings Data and Computer Communications Tenth Edition by William Stallings Data and Computer Communications, Tenth Edition by William Stallings, (c) Pearson Education - Prentice Hall, 2013 CHAPTER 2 Protocol

More information

Socket Programming. Dr. -Ing. Abdalkarim Awad. Informatik 7 Rechnernetze und Kommunikationssysteme

Socket 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 information

CS321: Computer Networks Introduction to Application Layer

CS321: 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 information

IP Mobility vs. Session Mobility

IP Mobility vs. Session Mobility IP Mobility vs. Session Mobility Securing wireless communication is a formidable task, something that many companies are rapidly learning the hard way. IP level solutions become extremely cumbersome when

More information

ECE 650 Systems Programming & Engineering. Spring 2018

ECE 650 Systems Programming & Engineering. Spring 2018 ECE 650 Systems Programming & Engineering Spring 2018 Networking Introduction Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) Computer Networking A background of important areas

More information

Socket Programming. CSIS0234A Computer and Communication Networks. Socket Programming in C

Socket 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 information

20-CS Cyber Defense Overview Fall, Network Basics

20-CS Cyber Defense Overview Fall, Network Basics 20-CS-5155 6055 Cyber Defense Overview Fall, 2017 Network Basics Who Are The Attackers? Hackers: do it for fun or to alert a sysadmin Criminals: do it for monetary gain Malicious insiders: ignores perimeter

More information

Networking Presented by: Marcin Chady

Networking Presented by: Marcin Chady Networking Presented by: Marcin Chady Networking Present and Future Originally the domain of PC games PC networked games are very popular Everquest, Diablo, Starcraft, WoW, EVE Online Counterstrike, Unreal

More information

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

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet Chapter 2 - Part 1 The TCP/IP Protocol: The Language of the Internet Protocols A protocol is a language or set of rules that two or more computers use to communicate 2 Protocol Analogy: Phone Call Parties

More information

Oral. Total. Dated Sign (2) (5) (3) (2)

Oral. 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 information

Review. Preview. Closing a TCP Connection. Closing a TCP Connection. Port Numbers 11/27/2017. Packet Exchange for TCP Connection

Review. 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 information

Part 17: Networking Technology for Virtual Environments

Part 17: Networking Technology for Virtual Environments Part 17: Networking Technology for Virtual Environments Virtuelle Realität Wintersemester 2006/07 Prof. Bernhard Jung Overview Introduction Data transfer Communication architectures Managing dynamic shared

More information

Defining Networks with the OSI Model. Module 2

Defining Networks with the OSI Model. Module 2 Defining Networks with the OSI Model Module 2 Objectives Skills Concepts Objective Domain Description Objective Domain Number Understanding OSI Basics Defining the Communications Subnetwork Defining the

More information

PA #2 Reviews. set_name, get_name, del_name. Questions? Will be modified after PA #4 ~

PA #2 Reviews. set_name, get_name, del_name. Questions? Will be modified after PA #4 ~ Sockets Prof. Jin-Soo Kim( jinsookim@skku.edu) TA Dong-Yun Lee(dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu PA #2 Reviews set_name, get_name, del_name Will

More information

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link. Internet Layers Application Application Transport Transport Network Network Network Network Link Link Link Link Ethernet Fiber Optics Physical Layer Wi-Fi ARP requests and responses IP: 192.168.1.1 MAC:

More information

CS4700/CS5700 Fundamentals of Computer Networks

CS4700/CS5700 Fundamentals of Computer Networks CS4700/CS5700 Fundamentals of Computer Networks Lecture 14: TCP Slides used with permissions from Edward W. Knightly, T. S. Eugene Ng, Ion Stoica, Hui Zhang Alan Mislove amislove at ccs.neu.edu Northeastern

More information

UNIT 1 TCP/IP PROGRAMMING CONCEPTS

UNIT 1 TCP/IP PROGRAMMING CONCEPTS UNIT 1 TCP/IP PROGRAMMING CONCEPTS TCP/IP Programming Concepts Structure Page Nos. 1.0 Introduction 5 1.1 Objectives 5 1.2 Client Server Communication 6 1.2.1 Designing Client/Server Programs 7 1.2.2 Socket

More information

Introduction to Socket Programming

Introduction to Socket Programming Introduction to Socket Programming (Advanced Computer Networks) By Priyank Shah NET ID : pss160530 A Simple Question What are Sockets? Sockets are communication points on the same or different computers

More information

ELEC5616 COMPUTER & NETWORK SECURITY

ELEC5616 COMPUTER & NETWORK SECURITY ELEC5616 COMPUTER & NETWORK SECURITY Lecture 17: Network Protocols I IP The Internet Protocol (IP) is a stateless protocol that is used to send packets from one machine to another using 32- bit addresses

More information

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 16, 2008 Agenda 1 Introduction and Overview Introduction 2 Socket

More information

Net Centric Computing - Graphics

Net Centric Computing - Graphics Net Centric Computing - Graphics Sandro Spina Computer Graphics and Simulation Group Computer Science Department University of Malta 1 Graphics + Web = Web3D2009 Web3D 2009 Symposium, 14th International

More information

Networks and distributed computing

Networks and distributed computing Networks and distributed computing Abstractions provided for networks network card has fixed MAC address -> deliver message to computer on LAN -> machine-to-machine communication -> unordered messages

More information

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / 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 information

Introduction and Overview Socket Programming Lower-level stuff Higher-level interfaces Security. Network Programming. Samuli Sorvakko/Nixu Oy

Introduction and Overview Socket Programming Lower-level stuff Higher-level interfaces Security. Network Programming. Samuli Sorvakko/Nixu Oy Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 5, 2009 Agenda 1 Introduction and Overview 2 Socket Programming 3

More information

Networking and Internetworking 1

Networking and Internetworking 1 Networking and Internetworking 1 Today l Networks and distributed systems l Internet architecture xkcd Networking issues for distributed systems Early networks were designed to meet relatively simple requirements

More information

SOCKET. Valerio Di Valerio

SOCKET. Valerio Di Valerio SOCKET Valerio Di Valerio The Problem! Communication between computers connected to a network Network Network applications! A set of processes distributed over a network that communicate via messages!

More information

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

Networking for Data Acquisition Systems. Fabrice Le Goff - 14/02/ ISOTDAQ Networking for Data Acquisition Systems Fabrice Le Goff - 14/02/2018 - ISOTDAQ Outline Generalities The OSI Model Ethernet and Local Area Networks IP and Routing TCP, UDP and Transport Efficiency Networking

More information

Lecture 33. Firewalls. Firewall Locations in the Network. Castle and Moat Analogy. Firewall Types. Firewall: Illustration. Security April 15, 2005

Lecture 33. Firewalls. Firewall Locations in the Network. Castle and Moat Analogy. Firewall Types. Firewall: Illustration. Security April 15, 2005 Firewalls Lecture 33 Security April 15, 2005 Idea: separate local network from the Internet Trusted hosts and networks Intranet Firewall DMZ Router Demilitarized Zone: publicly accessible servers and networks

More information

416 Distributed Systems. Networks review; Day 2 of 2 Fate sharing, e2e principle And start of RPC Jan 10, 2018

416 Distributed Systems. Networks review; Day 2 of 2 Fate sharing, e2e principle And start of RPC Jan 10, 2018 416 Distributed Systems Networks review; Day 2 of 2 Fate sharing, e2e principle And start of RPC Jan 10, 2018 1 Last Time Modularity, Layering, and Decomposition Example: UDP layered on top of IP to provide

More information

SPDY - A Web Protocol. Mike Belshe Velocity, Dec 2009

SPDY - A Web Protocol. Mike Belshe Velocity, Dec 2009 SPDY - A Web Protocol Mike Belshe Velocity, Dec 2009 What is SPDY? Concept SPDY is an application layer protocol for transporting content over the web with reduced latency. Basic Features 1. Multiplexed

More information

Java Basics 5 - Sockets. Manuel Oriol - May 4th, 2006

Java Basics 5 - Sockets. Manuel Oriol - May 4th, 2006 Java Basics 5 - Sockets Manuel Oriol - May 4th, 2006 Connected / Disconnected Modes Connected mode: path chosen and packets arrive all, in correct order (e.g. Phone) Disconnected mode: path not chosen

More information

Tutorial on Socket Programming

Tutorial 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 information

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

OSI Transport Layer. Network Fundamentals Chapter 4. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1 OSI Transport Layer Network Fundamentals Chapter 4 Version 4.0 1 Transport Layer Role and Services Transport layer is responsible for overall end-to-end transfer of application data 2 Transport Layer Role

More information

Communication in Distributed Systems

Communication in Distributed Systems Communication in Distributed Systems Sape J. Mullender Huygens Systems Research Laboratory Universiteit Twente Enschede 1 Introduction Functions of Communication Transport data between processes, machines,

More information

peer) Poorly-connected hosts subscribe to a forwarding server packet compression and aggregation altering visual and temporal perceptions

peer) Poorly-connected hosts subscribe to a forwarding server packet compression and aggregation altering visual and temporal perceptions Peer-Server Systems Peer-to to-peer: minimizes latency, consumes bandwidth Client-server: effective aggregation and filtering, increases latency Hybrid peer-server: over short-haul, haul, high- bandwidth

More information

Remote Procedure Calls

Remote Procedure Calls CS 5450 Remote Procedure Calls Vitaly Shmatikov Abstractions Abstractions for communication TCP masks some of the pain of communicating over unreliable IP Abstractions for computation Goal: programming

More information

Programming with TCP/IP. Ram Dantu

Programming 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 information

Student ID: CS457: Computer Networking Date: 5/8/2007 Name:

Student ID: CS457: Computer Networking Date: 5/8/2007 Name: CS457: Computer Networking Date: 5/8/2007 Name: Instructions: 1. Be sure that you have 10 questions 2. Write your Student ID (email) at the top of every page 3. Be sure to complete the honor statement

More information

NETWORK PROGRAMMING. Instructor: Junaid Tariq, Lecturer, Department of Computer Science

NETWORK 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 information

Transport Layer (TCP/UDP)

Transport Layer (TCP/UDP) Transport Layer (TCP/UDP) Where we are in the Course Moving on up to the Transport Layer! Application Transport Network Link Physical CSE 461 University of Washington 2 Recall Transport layer provides

More information

Experiential Learning Workshop on Basics of Socket Programming

Experiential Learning Workshop on Basics of Socket Programming Experiential Learning Workshop on Basics of Socket June 28, 2018 Dr. Ram P Rustagi Professor, CSE Dept KSIT, Bangalore rprustagi@ksit.edu.in Resources https://rprustagi.com/elnt/experiential- Learning.html

More information

Overview. SSL Cryptography Overview CHAPTER 1

Overview. SSL Cryptography Overview CHAPTER 1 CHAPTER 1 Secure Sockets Layer (SSL) is an application-level protocol that provides encryption technology for the Internet. SSL ensures the secure transmission of data between a client and a server through

More information

Network Protocols - Revision

Network Protocols - Revision Network Protocols - Revision Luke Anderson luke@lukeanderson.com.au 18 th May 2018 University Of Sydney Overview 1. The Layers 1.1 OSI Model 1.2 Layer 1: Physical 1.3 Layer 2: Data Link MAC Addresses 1.4

More information

EEC-682/782 Computer Networks I

EEC-682/782 Computer Networks I EEC-682/782 Computer Networks I Lecture 16 Wenbing Zhao w.zhao1@csuohio.edu http://academic.csuohio.edu/zhao_w/teaching/eec682.htm (Lecture nodes are based on materials supplied by Dr. Louise Moser at

More information

Client Server & Distributed System. A Basic Introduction

Client Server & Distributed System. A Basic Introduction Client Server & Distributed System A Basic Introduction 1 Client Server Architecture A network architecture in which each computer or process on the network is either a client or a server. Source: http://webopedia.lycos.com

More information

Outline. 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 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 information

Unit 2.

Unit 2. Unit 2 Unit 2 Topics Covered: 1. PROCESS-TO-PROCESS DELIVERY 1. Client-Server 2. Addressing 2. IANA Ranges 3. Socket Addresses 4. Multiplexing and Demultiplexing 5. Connectionless Versus Connection-Oriented

More information

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016 Internet Technology 06. Exam 1 Review Paul Krzyzanowski Rutgers University Spring 2016 March 2, 2016 2016 Paul Krzyzanowski 1 Question 1 Defend or contradict this statement: for maximum efficiency, at

More information

OSI Layer OSI Name Units Implementation Description 7 Application Data PCs Network services such as file, print,

OSI Layer OSI Name Units Implementation Description 7 Application Data PCs Network services such as file, print, ANNEX B - Communications Protocol Overheads The OSI Model is a conceptual model that standardizes the functions of a telecommunication or computing system without regard of their underlying internal structure

More information

MODELS OF DISTRIBUTED SYSTEMS

MODELS OF DISTRIBUTED SYSTEMS Distributed Systems Fö 2/3-1 Distributed Systems Fö 2/3-2 MODELS OF DISTRIBUTED SYSTEMS Basic Elements 1. Architectural Models 2. Interaction Models Resources in a distributed system are shared between

More information

Outline. What is TCP protocol? How the TCP Protocol Works SYN Flooding Attack TCP Reset Attack TCP Session Hijacking Attack

Outline. What is TCP protocol? How the TCP Protocol Works SYN Flooding Attack TCP Reset Attack TCP Session Hijacking Attack Attacks on TCP Outline What is TCP protocol? How the TCP Protocol Works SYN Flooding Attack TCP Reset Attack TCP Session Hijacking Attack TCP Protocol Transmission Control Protocol (TCP) is a core protocol

More information

Internetworking Models The OSI Reference Model

Internetworking Models The OSI Reference Model Internetworking Models When networks first came into being, computers could typically communicate only with computers from the same manufacturer. In the late 1970s, the Open Systems Interconnection (OSI)

More information

MODELS OF DISTRIBUTED SYSTEMS

MODELS OF DISTRIBUTED SYSTEMS Distributed Systems Fö 2/3-1 Distributed Systems Fö 2/3-2 MODELS OF DISTRIBUTED SYSTEMS Basic Elements 1. Architectural Models 2. Interaction Models Resources in a distributed system are shared between

More information

Memory-Mapped Files. generic interface: vaddr mmap(file descriptor,fileoffset,length) munmap(vaddr,length)

Memory-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 information

CSEP 561 Connections. David Wetherall

CSEP 561 Connections. David Wetherall CSEP 561 Connections David Wetherall djw@cs.washington.edu Connections Focus How do we (reliably) connect processes? This is the transport layer Topics Naming processes Connection setup / teardown Sliding

More information

A set of processes distributed over a network that communicate via messages. Processes communicate via services offered by the operating system

A set of processes distributed over a network that communicate via messages. Processes communicate via services offered by the operating system SOCKET Network applications A set of processes distributed over a network that communicate via messages Ex: Browser Web, BitTorrent, ecc Processes communicate via services offered by the operating system

More information

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

Agenda. Before we start: Assignment #1. Routing in a wide area network. Protocols more concepts. Internetworking. Congestion control Agenda Last time (Tues) No class Tuesday Jan 30 (Marty at conference) Will be made up Thurs Feb 8 / Fri Feb 9 This time Continue with Networks (chpt 3) Interprocess Communication (chpt 4) 1 st HW/PA out

More information

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016 TRANSMISSION CONTROL PROTOCOL ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016 ETI 2506 - TELECOMMUNICATION SYLLABUS Principles of Telecom (IP Telephony and IP TV) - Key Issues to remember 1.

More information

CS 326: Operating Systems. Networking. Lecture 17

CS 326: Operating Systems. Networking. Lecture 17 CS 326: Operating Systems Networking Lecture 17 Today s Schedule Project 3 Overview, Q&A Networking Basics Messaging 4/23/18 CS 326: Operating Systems 2 Today s Schedule Project 3 Overview, Q&A Networking

More information

CSEP 561 Connections. David Wetherall

CSEP 561 Connections. David Wetherall CSEP 561 Connections David Wetherall djw@cs.washington.edu Connections Focus How do we (reliably) connect processes? This is the transport layer Topics Naming processes TCP / UDP Connection setup / teardown

More information

The Client Server Model and Software Design

The Client Server Model and Software Design The Client Server Model and Software Design Prof. Chuan-Ming Liu Computer Science and Information Engineering National Taipei University of Technology Taipei, TAIWAN MCSE Lab, NTUT, TAIWAN 1 Introduction

More information

Networked Virtual Environments and Distributed Rendering IGS HT Background and history. Background and history. Background and history

Networked Virtual Environments and Distributed Rendering IGS HT Background and history. Background and history. Background and history Networked Virtual Environments and Distributed Rendering IGS HT 2003-09-24 Multiplayer games 1961 Spacewar, MIT 1979 MUD, Essex University 1993 Doom, Id Software Lars Pettersson 1994 Warcraft, Blizzard

More information

CSCI Computer Networks

CSCI Computer Networks CSCI-1680 - Computer Networks Chen Avin (avin) Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti, Peterson & Davie, Rodrigo Fonseca Administrivia Sign and hand in Collaboration

More information

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol Transport Layer Transport Layer The transport layer is responsible for the delivery of a message from one process to another Types of Data Deliveries Client/Server Paradigm An application program on the

More information

BrickNet (cont d) Other Academic Projects

BrickNet (cont d) Other Academic Projects BrickNet (cont d) Object-request brokers on the servers Aimed for collaborative design environments each node is responsible for its part of design and for sharing that information Also, networked games,

More information

Introduction to Networking

Introduction to Networking Introduction to Networking Chapters 1 and 2 Outline Computer Network Fundamentals Defining a Network Networks Defined by Geography Networks Defined by Topology Networks Defined by Resource Location OSI

More information

Hybrid of client-server and P2P. Pure P2P Architecture. App-layer Protocols. Communicating Processes. Transport Service Requirements

Hybrid 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 information

Internet Technology 3/2/2016

Internet Technology 3/2/2016 Question 1 Defend or contradict this statement: for maximum efficiency, at the expense of reliability, an application should bypass TCP or UDP and use IP directly for communication. Internet Technology

More information

CMPE 80N: Introduction to Networking and the Internet

CMPE 80N: Introduction to Networking and the Internet CMPE 80N: Introduction to Networking and the Internet Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 11 CMPE 80N Fall'10 1 Announcements Forum #2 due on 11.05. CMPE 80N Fall'10 2 Last

More information

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy

Introduction and Overview Socket Programming Higher-level interfaces Final thoughts. Network Programming. Samuli Sorvakko/Nixu Oy Network Programming Samuli Sorvakko/Nixu Oy Telecommunications software and Multimedia Laboratory T-110.4100 Computer Networks October 9, 2006 Agenda 1 Introduction and Overview Introduction 2 Socket Programming

More information

Programmation système

Programmation système Programmation système Problems Problem 1 - Message from ATM to Server Message name HELLO {userid} PASSWORD {password} BALANCE WITHDRAWAL {amount} Purpose Let server know that there is a card in the ATM

More information

Ports under 1024 are often considered special, and usually require special OS privileges to use.

Ports 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 information

Sockets Sockets Communication domains

Sockets 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 information

CSE 461 Connections. David Wetherall

CSE 461 Connections. David Wetherall CSE 461 Connections David Wetherall djw@cs.washington.edu Connections Focus How do we (reliably) connect processes? This is the transport layer Topics Naming processes TCP / UDP Connection setup / teardown

More information

ITEC 350: Introduction To Computer Networking Midterm Exam #2 Key. Fall 2008

ITEC 350: Introduction To Computer Networking Midterm Exam #2 Key. Fall 2008 ITEC 350: Introduction To Computer Networking Midterm Exam #2 Key Closed book and closed notes. Fall 2008 No electronic devices allowed, e.g., calculator, laptop, PDA. Show your work. No work, no credit.

More information

IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services

IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services Lecture 7 - Network Programming Albert Au Yeung 18th October, 2018 1 / 48 Computer Networking 2 / 48 Data Communication Exchange

More information

Student ID: CS457: Computer Networking Date: 5/8/2007 Name:

Student ID: CS457: Computer Networking Date: 5/8/2007 Name: CS457: Computer Networking Date: 5/8/2007 Name: Instructions: 1. Be sure that you have 10 questions 2. Write your Student ID (email) at the top of every page 3. Be sure to complete the honor statement

More information

Sockets 15H2. Inshik Song

Sockets 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 information

The World Wide Web is widely used by businesses, government agencies, and many individuals. But the Internet and the Web are extremely vulnerable to

The World Wide Web is widely used by businesses, government agencies, and many individuals. But the Internet and the Web are extremely vulnerable to 1 The World Wide Web is widely used by businesses, government agencies, and many individuals. But the Internet and the Web are extremely vulnerable to compromises of various sorts, with a range of threats

More information

02 - Distributed Systems

02 - Distributed Systems 02 - Distributed Systems Definition Coulouris 1 (Dis)advantages Coulouris 2 Challenges Saltzer_84.pdf Models Physical Architectural Fundamental 2/58 Definition Distributed Systems Distributed System is

More information