CS 145A Protocols Netlab.caltech.edu/course. Misc. Extension Extension Textbooks Textbooks.

Slides:



Advertisements
Similar presentations
Service Bus Service Bus Access Control.
Advertisements

CS 145A Case Study: Simplified BGP Finite State Machine Netlab.caltech.edu/course.
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Lecture 2b Sockets Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
1 Modeling based on Petri-nets. Lecture 8. 2 High-level Petri nets The classical Petri net was invented by Carl Adam Petri in A lot of research.
TCP Lightweight Agent Project Goal : Implementation of a generic agent that will be able to measure connection parameters between a client and a server.
COEN 445 Communication Networks and Protocols Lab 4
28.2 Functionality Application Software Provides Applications supply the high-level services that user access, and determine how users perceive the capabilities.
Real-Time Authentication Using Digital Signature Schema Marissa Hollingsworth BOISECRYPT ‘09.
UDP and Multi-thread Socket Programming
Reliable Networking Tom Roeder CS sp. Last minute questions on Part II?
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
1 Java Networking – Part I CS , Spring 2008/9.
Programming project #4 1 CS502 Spring 2006 Programming Project #4 Web Server CS-502 Operating Systems Spring 2006.
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
Reliable Networking Systems Software Systems Laboratory Presented by : Iliya Golub Galina Sagdeev Supervisor : Yonatan Kaspi.
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
CS-3013 & CS-502, Summer 2006 Network Input & Output1 CS-3013 & CS-502, Summer 2006.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.
CS-3103 & CS-502, Summer 2006 Programming Project #31 Programming Project #3 Web Server CS-3103 & CS-502 Operating Systems.
P2P Project Mark Kurman Nir Zur Danny Avigdor. Introduction ► Motivation:  Firewalls may allow TCP or UDP connections on several specific ports and block.
Aalborg Media Lab 15-Jul-15 Java & EyesWeb Lecture 14 Java Client / Server Communication.
TCP/IP Tools Lesson 5. Objectives Skills/ConceptsObjective Domain Description Objective Domain Number Using basic TCP/IP commands Understanding TCP/IP3.6.
TCP Sockets Reliable Communication. TCP As mentioned before, TCP sits on top of other layers (IP, hardware) and implements Reliability In-order delivery.
19-Aug-15 About the Chat program. 2 Constraints You can't have two programs (or two copies of the same program) listen to the same port on the same machine.
Speak A Simple VoIP Application Project 2 Due date: March 3 rd by 11:59pm.
Socket Programming References: redKlyde ’ s tutorial set Winsock2 for games (gamedev.net)
Hands On Networking Socket Programming Ram P Rustagi, ISE Dept Abhishek Gupta, ISE Dept Laxmi Kuber, MCA Dept June 28-30, 2012.
Assignment 3 A Client/Server Application: Chatroom.
Review: –What is AS? –What is the routing algorithm in BGP? –How does it work? –Where is “policy” reflected in BGP (policy based routing)? –Give examples.
Socket Lab Info. Computer Network. Requirement Use TCP socket to implement a pair of programs, containing a server and a client. The server program shall.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
CS/EE 145A Reliable Transmission over Unreliable Channel Netlab.caltech.edu/course.
Discussion 2 Sockets Programming Applets TCP UDP HTTP Delay Estimation
Application Layer 2-1 ESERCITAZIONE SOCKET PROGRAMMING.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
RGEC MEERUT(IWT CS703) 1 Java Networking RGEC Meerut.
Day16 Protocols. TCP “Transmission Control Protocol” –Connection oriented Very like a phone call, an actual connection is made between the 2 parties.
Lecture91 Administrative Things r Return homework # 1 r Review some problems in homework # 1 r Questions about grading? Yona r WebCT for CSE245 is working!
CS 158A1 1.4 Implementing Network Software Phenomenal success of the Internet: – Computer # connected doubled every year since 1981, now approaching 200.
CS 145A Implementation Issues Netlab.caltech.edu/course.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Ch5: Software Specification. 1 Petri Nets  Introduced by C. Adams Petri in  Widely used in the modeling and analysis of computer systems.  Basic.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
Computer Science, FSU1 CNT5505 DATA/COMUTER COMMUNICATIONS Fall 2010.
UNIT-6. Basics of Networking TCP/IP Sockets Simple Client Server program Multiple clients Sending file from Server to Client Parallel search server.
CS/EE 145A Reliable Transmission over Unreliable Channel II Netlab.caltech.edu/course.
4343 X2 – The Transport Layer Tanenbaum Ch.6.
Petri-Nets and Other Models
© 2002, Cisco Systems, Inc. All rights reserved..
CS 145A Reliable Communication Netlab.caltech.edu/course.
COMP2322 Lab 4 Socket Programming Toby Lam March 2, 2016.
Client-server communication Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
EAP Applicability IETF-86 Joe Salowey. Open Issues Open Issues with Retransmission and re- authentication Remove text about lack of differentiation in.
COMP2322 Lab 4 Socket Programming
UDP Socket Programming
The Transport Layer Implementation Services Functions Protocols
Dr. Eng Amr T. Abdel-Hamid
MCA – 405 Elective –I (A) Java Programming & Technology
Socket Programming Cal Poly Pomona Young CS380.
Chat Refs: RFC 1459 (IRC).
Chapter 5 TCP Control Flow
Starting TCP Connection – A High Level View
TA: Donghyun (David) Kim
Server-side Programming CSE 333 Summer 2018
Chapter 5 TCP Control Flow
Last Class: Communication in Distributed Systems
Presentation transcript:

CS 145A Protocols Netlab.caltech.edu/course

Misc. Extension Extension Textbooks Textbooks

Project 1 Q&A: Can the tcp client send two packets instead of one? Can the tcp client send two packets instead of one? What happens if the udp client cannot receive my message? What happens if the udp client cannot receive my message? Shall I receive and print the message on the client side? Shall I receive and print the message on the client side? How do you grade my work? How do you grade my work?

Project 1 Clients: Clients: Get UDP message 1~3 times get TCP message, then client disconnects get TCP message server udpclient udptest1 udpclient udptest2 udpclient udptest3 date tcpclient clienttimeout 8 date (8 seconds) tcpclient servertimeout 12 date (10 seconds)

Project 1 Server (Basic Functions): Server (Basic Functions): Server udpclient udptest1 (see "udptest1") udpclient udptest2 (see "udptest2") udpclient udptest3 (see "udptest3") date tcpclient clienttimeout 8 (see "clienttimeout") date (8) tcpclient servertimeout 12 (See "servertimeout") date (10)

Project 1 Server (Advanced Function 1, Multi-connection): Server (Advanced Function 1, Multi-connection): Login.cs: (script3) server Tcpclient logincs tcp3 8 (see “ tcp3 ” ) udpclient login.cs udp (see "udp") Local: (script3) tcpclient login.cs tcp1 8 (see “ tcp1 ” ) tcpclient login.cs tcp2 8 (get refused) udpclient login.cs udp (see "udp")

Project 1 Server (Advanced Function 2, 5-connections): Server (Advanced Function 2, 5-connections):

Project 1 Multiple Processes:  One process for each active TCP connection, one UDP process and one Listening process  How to tell the main process when the child processes finish the TCP connection?  SIGCHILD (with a handler in the main function)

Project 1 Multiple Threads:  Similar to Multiple Processes  pthread_create

Project 1 Single Process:  One “ select ” for UDP + TCP Listen + All the active TCP connections  Timeout of the “ select ” :  Check each connection in the active set returned by “ select ”

Protocol

Protocol Specification (External services and internal operations) Specification (External services and internal operations) Verification (completeness and correctness) Verification (completeness and correctness) Implementation Implementation Testing Testing

Protocol Request For Comments Reference Guide: RFC 1000 Reference Guide: RFC 1000 Keywords: RFC 2119 ( “ Must ” / ” Shall ”, “ should ”, “ may ”… ) Keywords: RFC 2119 ( “ Must ” / ” Shall ”, “ should ”, “ may ”… )

Formal Methods State Transition Graph State Transition Graph Petri Net Petri Net Process Algebra Process Algebra …

Petri-Net (By Carl Adam Petri at 1962) Structure: Place Place Transition Transition Arc Arc Dynamic element: Token Token

Petri-Net

Petri-Net

Petri-Net

Petri-Net

Petri-Net

Petri-Net

Petri-Net

Petri-Net Extensions: Weighted Arcs / Multiple Tokens Weighted Arcs / Multiple Tokens Token with different colors Token with different colors Time Petri Net Time Petri Net Random Petri Net Random Petri Net …

State Transition Graph

Basic (FSM): Possible State Set Possible State Set Possible Input Set Possible Input Set Possible Output (Action) Set* Possible Output (Action) Set* State Transition Set: State Transition Set: {(origin_state, input, output, target_state)} Initial State Set Initial State Set

State Transition Graph Extended (EFSM, etc): Variables Variables Timers Timers Non-deterministic behaviors … Non-deterministic behaviors …

+ Timer

States for TCP Connection

Modeling is a bridge.

Lab 2

Task Design a simple protocol for: Two machines talk with each other; Two machines talk with each other; Either machine is able to establish the conversation. Either machine is able to establish the conversation. During the conversation, if one machine sends some message to the other machine, the other machine displays the message on the screen. During the conversation, if one machine sends some message to the other machine, the other machine displays the message on the screen. If one machine does not want to talk any more (or dies, or is disconnected from the network), the other machine should have a way to know about that. (although maybe after some delay – the delay should be bounded.) If one machine does not want to talk any more (or dies, or is disconnected from the network), the other machine should have a way to know about that. (although maybe after some delay – the delay should be bounded.)

Lab 2 Assumptions: We can use TCP (reliable connection) We can use TCP (reliable connection) The TCP may return error when you tries to do socket operations. (not so “ reliable ” !!!) The TCP may return error when you tries to do socket operations. (not so “ reliable ” !!!)

Lab 2 Requirements: Read RFC Read RFC Use state transition graph to help you design Use state transition graph to help you design Use texts to specify the details (use the key words as defined in RFC 2119) Use texts to specify the details (use the key words as defined in RFC 2119) Think about different scenarios to test your design Think about different scenarios to test your design

Lab 2 Grading: Correctness and Completeness (80%) Correctness and Completeness (80%) Feasibility (20%) Feasibility (20%) Due: Nov Submission: As homework submission.