Introduction to Python Network Programming for Network Architects and Engineers
|
|
- Cynthia Gilmore
- 6 years ago
- Views:
Transcription
1
2 Introduction to Python Network Programming for Network Architects and Engineers Vince Kelly TSA Session ID: DEVNET-1040
3 Agenda Python Basics The Python Socket Module Security Higher Layer Protocols & APIs: XMLRPC Higher Layer Protocols: REST & HTTP Conclusion
4 Python Basics Working with the Command Line Python Basics: Working With files, Directories and Strings DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 4
5 Sockets: What Can We Get Just From the Python Standard Library Alone? Python Socket Library Starting Out With UDP What Are Sockets? B R I E F Primer on OOP versus POP The Big Five Questions to Answer Socket Objects Socket Names DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 5
6 Sockets: Moving on To TCP Parsing Directories and Files with OS.Walk Simple Message Passing Using TCP Simple File Transfer Using TCP Simple File Transfer With Directory Search Using TCP DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 6
7 SECURITY One-way Hash Creation Display All Available Hash Algorithms Generate a One-way Hash for a File Verifying a File Has Not Been Tampered With Step 1: Client Side, Server Side Verifying a File Has Not Been Tampered With Step 2 Client Side, Server Side Establish Client/Server Connection Over SSL Client Side, Server Side DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 7
8 Higher Layer Protocols & APIs Building A Spreadsheet Primer XMLRPC DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 8
9 Higher Layer Protocols: REST & HTTP REST and HTTP TCP Send a REST Request to Google Screen Scraping using Python URLLIB APIC REST Interface DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 9
10 WHAT S THE POINT of ALL THIS?? Good Programmers write code, GREAT Programmers steal code DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 10
11 Python Basics Follow Along: followcmd_line.py followfiles.py followfile_info.py followfile_encrypt.py followfile_decrypt.py followping.py Parsing command line Working with files, directories and strings Retrieves file size, creation, modified and accessed on a file Encodes content and writes to disk Decodes file and prints to screen Detect what OS we are on, Make system call to execute ping (windows) DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 11
12 Python Basics: Working with the Command Line Start python Interpreter (python.exe) Find & execute this program (Program_xyz.py) Save whatever comes after the program name as command line arguments ( ) argv = [ Program_xyz.py, ] print argv[0] print argv[1] print argv[2] Program_xyz.py DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 12
13 Python Basics: Working with the Command Line followcmd_line.py - Uses built-in SYS module: sys.argv() and len() built-in methods - Displays: - The programs (empty) command line, number of arguments, etc - Appends Hello World to the command line - The programs (non-empty command line, number of arguments, etc - Removes the last entry from the cmd line - Example of Type Casting a string value entered by user into an integer DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 13
14 Python Basics: Working With files, Directories and Strings DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 14
15 Python Basics: Working With files, Directories and Strings followfiles.py - Uses built-in os module: os.getcwd() built-in method and.lower() string method - Concatenates IP address, User Name and Password entered by user - Calls a function with the concatenated message as a parameter - Takes directory and file name from user (or defaults to CWD) - Opens file in append mode - Loops waiting forever on more input from user DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 15
16 DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 16
17 Python Basics: Working With files, Directories and Strings followfile_info.py - Uses built-in getsize(),.stat() built-in methods - Uses time.ctime() to return file creation, modification and last access DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 17
18 Python Basics: Working With files, Directories and Strings followencrypt.py - Uses built-in codecs and os modules: - Encodes user input with ROT-13 - Loops forever on user input DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 18
19 Python Basics: Working With files, Directories and Strings followdecrypt.py - Uses built-in codecs and os modules: - Decodes user input using ROT-13 - Loops forever on user input DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 19
20 Python Basics: Working With files, Directories and Strings followping.py - Uses built-in os module: os.name() returns the operating system ('posix', 'nt', 'mac', 'os2', 'ce', 'java', 'riscos ) - Makes system call to execute ping and display the results - Displays warning if host doesn t respond after timeout - Loops forever on user input DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 20
21 Network Communications
22 SERVER CLIENT Data Warehou se Pytho n Enviro nment Web Service s App Pytho n Enviro nment Operating System Web Browse r Communications Stack(s) Operating System CLIENT App Pytho n Enviro nment Web Browse r Operating System DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 22
23 Python Socket Library TCP/IP PROTOCOL STACK Sockets: What Can We Get Just From the Python Standard Library Alone? ACI APIC XMLRPC Firefox Browser Higher Layer Libraries HTTP, etc. Web 80 FTP 20,21 Telnet 23 SMTP 25 SNMP 161 DNS 53 TCP UDP IP Device Drivers Tx Buffers B U S Rx Buffers Framer/ Protocol decode LAYER 1 NIC DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 23
24 Python Socket Library Follow Along: followsocket_examples.py followsock_scan1.py followdisplay_socketprotocols.py followudp_client.py followudp_server.py followudp_clientencoded.py followudp_countdownserver.py Displays local socket information Scans remote services Displays basic IPv4 and IPv6 stack information Basic UDP Client Basic UDP Server Receives an encoded ROT-13 message and decodes it Broadcasts an encoded message DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 24
25 gethostname() return the current hostname gethostbyname() map a hostname to its IP number 'gethostbyname_ex() IPv4 Only gethostbyaddr() -- map an IP number or hostname to DNS info getservbyname() map a service name and a protocol name to a port number getprotobyname() map a protocol name (e.g. 'tcp') to a number getaddrinfo() getfqdn() getnameinfo() getservbyport() socket.setdefaulttimeout() set the default timeout value socket.getdefaulttimeout() get the default timeout value 'has_ipv6', DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 25
26 Sockets: Let s Start with UDP Python Socket Library TCP/IP PROTOCOL STACK ACI APIC XMLRPC Firefox Browser Higher Layer Libraries HTTP, etc. Web 80 FTP 20,21 Telnet 23 SMTP 25 SNMP 161 DNS 53 TCP UDP IP Device Drivers Tx Buffers B U S Rx Buffers Framer/ Protocol decode LAYER 1 NIC DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 26
27 What Are Sockets? Is an abstract concept that represents an end point. Programs use sockets to communicate with other programs which may or may not be on the same computer. A socket is defined by IP address, the port it listens on and the protocol used Client/Server sockets: represent endpoints of a conversation. Server sockets just produce more client sockets e.g., Web Browser uses a client socket, Web server uses a server socket to listen on.. To create a client/server connection you: Create/ spin up a socket object. This contains all the methods needed to communicate Bind to the port you want. If successful, the socket exists for the length of the session.. Client sockets are normally only used for one exchange (or a small set of sequential exchanges). They are created and torn down frequently. DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 27
28 socket.getaddrinfo(" ", 80, 0, 0, socket.sol_tcp) Socket Name: 2 Tuple [ (2, 0, 6, '', (' ', 80)) ] Family Socket Type Protocol Type Canonical Name socket.getaddrinfo('2a04:4e42:5::223',80, 0, 0, socket.sol_tcp) Socket Name: 6 Tuple [(23, 0, 6, '', ('2a04:4e42:5::223', 80, 0, 0))] IPv6 1 STREAM, 2 DATAGRAM, 3 RAW, TCP Canonical Name Flow Label Scope 4 RDM, 5 SEQPACKET DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 28
29 But Before We Jump In, a B R I E F Primer on OOP versus POP. DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 29
30 The Big Five Questions to Answer: 1) What kind of network do we want to talk to? What address family? IPv4 (AF_INET) or IPv6 (AF_INET6), etc. 2) What type of connection do we want? Do we want a datagram service (UDP) or a connection oriented stream service (TCP)? 3) What kind of protocol do we need? Answers 1 and 2 already narrowed this down 4) What IP address to use? 5) What UDP or TCP port number should we use? DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 30
31 Socket Objects Retrieve (and use) the Python socket module import socket Python socket module s METHOD c = socket.socket(socket.af_inet, socket.sock_stream) New socket object What Protocol Stack Version? INET: use IPv4 INET6: use IPv6 What Part of the Protocol Stack Do You Want? SOCK_STREAM: use TCP SOCK_DGRAM: use UDP What do we mean by a socket object? DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 31
32 Sockets client import socket c = socket.socket(socket.af_inet, socket.sock_stream) c.connect(( Socket object c Socket object - Gets instantiated/ spun up (on each side) through the python socket module - Handles setting up the session - Handles sending & receiving data - Handles Error recovery - Handles ending/tearing down the session DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 32
33 Sockets server import socket s = socket.socket(socket.af_inet, socket.sock_stream) serveraddr = S.gethostname() s.bind((serveraddr,12345)) s.listen(5) while 1: client, cleintaddr = s.accept() NIC DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 36
34 Sockets server import socket s = socket.socket(socket.af_inet, socket.sock_stream) import socket client c = socket.socket(socket.af_inet, socket.sock_stream) serveraddr = s.bind((serveraddr,12345)) s.listen(5) client c.connect(( ,80) c.send( Hello Server!!! ) c.shutdown(socket.shut_rdwr)) Socket object Socket object while 1: client, clientaddr = s.accept() c client print I just got a connection request from:, clientaddr client.close() Hello Server!!! TCP IP NIC NIC DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 37
35 Sockets server import socket s = socket.socket(socket.af_inet, socket.sock_stream) import socket client c = socket.socket(socket.af_inet, socket.sock_stream) serveraddr = s.gethostname() s.bind((serveraddr,12345)) s.listen(5) client c.connect(( c.send( Hello Server!!! ) c.shutdown(socket.shut_rdwr) Socket object c Socket object3 Socket object2 Socket object client client client client client while 1: client, clientaddr = s.accept() print I just got a connection request from:, clientaddr client.close() Hello Server!!! TCP IP NIC NIC DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 38
36 Sockets El-cheapo_UDP_server.py: import socket,sys sp = socket.socket(socket.af_inet, socket.sock_dgram) sp.setsockopt(socket.sol_socket, socket.so_broadcast, 1) count = 0 port = 5678 dest = ('<broadcast>', port) print 'Sending message...' while True: msg = 'Hello World' sp.sendto(msg, dest) # send message out on port 5678 to address 'ffffff' DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 39
37 Sockets El-cheapo_UDP_client.py: import socket,time s=socket.socket(socket.af_inet,socket.sock_dgram) s.setsockopt(socket.sol_socket, socket.so_broadcast, 1) # spin up socket object # tell it to use broadcasts s.bind(('',5678)) # 'glue' this program onto any address using port 5678 print "waiting..." data,addr = s.recvfrom(1024) # get a message up to to 1024 bytes - and where it came from print '\r', data, addr # display the message DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 40
38 Thank You
39 Q & A
40 Complete Your Online Session Evaluation Please complete your Online Session Evaluations after each session Complete 4 Session Evaluations & the Overall Conference Evaluation (available from Thursday) to receive your Cisco Live T-shirt All surveys can be completed via the Cisco Live Mobile App or the Communication Stations Don t forget: Cisco Live sessions will be available for viewing on-demand after the event at CiscoLive.com/Online DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 43
41 Continue Your Education Demos in the Cisco campus Walk-in Self-Paced Labs Lunch & Learn Meet the Engineer 1:1 meetings Related sessions DEVNET Cisco and/or its affiliates. All rights reserved. Cisco Public 44
42 Thank You
43
Networking. Chapter How to identify machines on internet Ports
Chapter 1 Networking Computer networks allow communication between multiple computers, regardless of their physical location. Internet provides us with an infrastructure that allows computers to interact
More informationNetwork Programming in Python. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island
Network Programming in Python Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island Transmission Control Protocol (TCP) Connection-oriented Two
More informationNXOS in the Real World Using NX-API REST
NXOS in the Real World Using NX-API REST Adrian Iliesiu Corporate Development Engineer Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this session
More information4.5 Accessing Networks
4.5 Accessing Networks Python is a good language that can manage networking very easily and efficiently. Network services can be managed from a low level to a high level. Services over networks are carried
More informationSOCKET. 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 informationLECTURE 10. Networking
LECTURE 10 Networking NETWORKING IN PYTHON Many Python applications include networking the ability to communicate between multiple machines. We are going to turn our attention now to the many methods of
More informationThe Application Layer: Sockets Wrap-Up
Overview The Application Layer: Sockets Wrap-Up CSC 249 February 13, 2017 qreview the Socket API v Defined for UNIX v Used by most operating systems qreview TCP and UDP examples and flow charts q Methods
More informationNetwork Programming in Python. based on Chun, chapter 2; plus material on classes
Network Programming in Python based on Chun, chapter 2; plus material on classes What is Network Programming? Writing programs that communicate with other programs Communicating programs typically on different
More informationECE 435 Network Engineering Lecture 2
ECE 435 Network Engineering Lecture 2 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 6 September 2018 Announcements Homework 1 will be posted. Will be on website, will announce
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 informationIEMS 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 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 informationA 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 informationTRex Realistic Traffic Generator
DEVNET-1120 TRex Realistic Traffic Generator Hanoch Haim, Principal Engineer Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this session in the Cisco
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 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 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 informationLecture 2. Outline. Layering and Protocols. Network Architecture. Layering and Protocols. Layering and Protocols. Chapter 1 - Foundation
Lecture 2 Outline Wireshark Project 1 posted, due in a week Lab from a different textbook Work through the lab and answer questions at the end Chapter 1 - Foundation 1.1 Applications 1.2 Requirements 1.3
More informationDistributed 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 informationInterconnecting Networks with TCP/IP. 2000, Cisco Systems, Inc. 8-1
Interconnecting Networks with TCP/IP 2000, Cisco Systems, Inc. 8-1 Objectives Upon completion of this chapter you will be able to perform the following tasks: Identify the IP protocol stack, its protocol
More informationECE 435 Network Engineering Lecture 2
ECE 435 Network Engineering Lecture 2 Vince Weaver http://web.eece.maine.edu/~vweaver vincent.weaver@maine.edu 31 August 2017 Announcements Homework 1 will be posted. Will be on website, will announce
More informationLESSON PLAN. Sub. Code & Name : IT2351 & Network Programming and Management Unit : I Branch: IT Year : III Semester: VI.
Unit : I Branch: IT Year : III Semester: VI Page: 1 of 6 UNIT I ELEMENTARY TCP SOCKETS 9 Introduction to Socket Programming Overview of TCP/IP Protocols Introduction to Sockets Socket address Structures
More informationContext. Distributed Systems: Sockets Programming. Alberto Bosio, Associate Professor UM Microelectronic Departement
Distributed Systems: Sockets Programming Alberto Bosio, Associate Professor UM Microelectronic Departement bosio@lirmm.fr Context Computer Network hosts, routers, communication channels Hosts run applications
More informationCoding Getting Started with Python
DEVNET-3602 Coding 1002 - Getting Started with Python Matthew DeNapoli, DevNet Developer Evangelist Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find
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 informationFoundations of Python
Foundations of Python Network Programming The comprehensive guide to building network applications with Python Second Edition Brandon Rhodes John Goerzen Apress Contents Contents at a Glance About the
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 informationDifferent Layers Lecture 21
Different Layers Lecture 21 10/17/2003 Jian Ren 1 The Transport Layer 10/17/2003 Jian Ren 2 Transport Services and Protocols Provide logical communication between app processes running on different hosts
More informationPemrograman Jaringan Network Client
Pemrograman Jaringan Network Client PTIIK - 2012 In This Chapter How to implement an application protocol on the client side. Course Contents 1 Understanding Socket 2 Creating Socket 3 Communicationg With
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 informationNETWORK PROGRAMMING AND MANAGEMENT 1 KINGS DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK
NETWORK PROGRAMMING AND MANAGEMENT 1 KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK Subject Code & Name: Network Programming and Management Year / Sem : III / VI UNIT-
More informationContiv installation and integration with ACI
Contiv installation and integration with ACI http://contiv.ciscolive.com Haroun Dass Customer Solutions Architect hdass@cisco.com Luis Flores System Engineer luflores@cisco.com @Luis_E_Flores Cesar Obediente
More informationUNIX 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 informationInsights into your WLC with Wireless Streaming Telemetry
Insights into your WLC with Wireless Streaming Telemetry Jeremy Cohoe Technical Marketing Engineer Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this
More informationYour API Toolbelt Tools and techniques for testing, monitoring, and troubleshooting REST API requests
DEVNET-1631 Your API Toolbelt Tools and techniques for testing, monitoring, and troubleshooting REST API requests Adam Kalsey, Spark Developer Relations Cisco Spark How Questions? Use Cisco Spark to communicate
More informationCSE 333 SECTION 8. Sockets, Network Programming
CSE 333 SECTION 8 Sockets, Network Programming Overview Domain Name Service (DNS) Client side network programming steps and calls Server side network programming steps and calls dig and ncat tools Network
More informationHands-On with IoT Standards & Protocols
DEVNET-3623 Hands-On with IoT Standards & Protocols Casey Bleeker, Developer Evangelist @geekbleek Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this
More informationGet Hands On With DNA Center APIs for Managing Intent
DEVNET-3620 Get Hands On With DNA Center APIs for Managing Intent Adam Radford Distinguished Systems Engineer Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session
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 informationConcept Questions Demonstrate your knowledge of these concepts by answering the following questions in the space provided.
113 Chapter 9 TCP/IP Transport and Application Layer Services that are located in the transport layer enable users to segment several upper-layer applications onto the same transport layer data stream.
More informationAutomation with Meraki Provisioning API
DEVNET-2120 Automation with Meraki Provisioning API Courtney M. Batiste, Solutions Architect- Cisco Meraki Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1.
More informationCSE 333 SECTION 7. C++ Virtual Functions and Client-Side Network Programming
CSE 333 SECTION 7 C++ Virtual Functions and Client-Side Network Programming Overview Virtual functions summary and worksheet Domain Name Service (DNS) Client side network programming steps and calls dig
More informationInterconnecting Networks with TCP/IP
Chapter 8 Interconnecting s with TCP/IP 1999, Cisco Systems, Inc. 8-1 Introduction to TCP/IP Internet TCP/IP Early protocol suite Universal 1999, Cisco Systems, Inc. www.cisco.com ICND 8-2 TCP/IP Protocol
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 informationNetwork Security. Introduction to networks. Radboud University, The Netherlands. Autumn 2015
Network Security Introduction to networks Radboud University, The Netherlands Autumn 2015 What is a (computer) network Definition A computer network is two or more computers that are connected, so that
More informationCSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1
CSMC 412 Computer Networks Prof. Ashok K Agrawala 2015 Ashok Agrawala Set 2 September 15 CMSC417 Set 2 1 Contents Client-server paradigm End systems Clients and servers Sockets Socket abstraction Socket
More informationChapter 7. Local Area Network Communications Protocols
Chapter 7 Local Area Network Communications Protocols The Network Layer The third layer of the OSI Model is the network layer. The network layer is concerned with providing a means for hosts to communicate
More informationCS321: Computer Networks Socket Programming
CS321: Computer Networks Socket Programming Dr. Manas Khatua Assistant Professor Dept. of CSE IIT Jodhpur E-mail: manaskhatua@iitj.ac.in Socket Programming It shows how the network application programs
More informationCS 351 Design of Large Programs Java and Socket Communication
CS 351 Design of Large Programs Java and Socket Communication Instructor: Joel Castellanos e-mail: joel@unm.edu 4/6/2017 Transmission Control Protocol The Transmission Control Protocol (TCP) is one of
More informationCSE 333 SECTION 7. Client-Side Network Programming
CSE 333 SECTION 7 Client-Side Network Programming Overview Domain Name Service (DNS) Client side network programming steps and calls dig and ncat tools Network programming for the client side Recall the
More informationSystems software design NETWORK COMMUNICATIONS & RPC SYSTEMS
Systems software design NETWORK COMMUNICATIONS & RPC SYSTEMS outline network programming BSD/POSIX Socket API RPC systems object-oriented bridges CORBA DCOM RMI WebServices WSDL/SOAP XML-RPC REST network
More informationThe Application Layer: Sockets Wrap-Up
The Application Layer: Sockets Wrap-Up CSC 249 February 13, 2018 slides mostly from J.F Kurose and K.W. Ross,copyright 1996-2012 1 Overview qreview the Socket API vdefined for UNIX v Used by most operating
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 informationOverview. Exercise 0: Implementing a Client. Setup and Preparation
Overview This Lab assignment is similar to the previous one, in that you will be implementing a simple clientserver protocol. There are several differences, however. This time you will use the SOCK_DGRAM
More informationNT1210 Introduction to Networking. Unit 10
NT1210 Introduction to Networking Unit 10 Chapter 10, TCP/IP Transport Objectives Identify the major needs and stakeholders for computer networks and network applications. Compare and contrast the OSI
More informationClient/Server Computing & Socket Programming
COMP 431 Internet Services & Protocols Client/Server Computing & Socket Programming Jasleen Kaur January 29, 2019 Application-Layer Protocols Overview Application-layer protocols define:» The types of
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 informationComputer Communication Networks Socket Programming
Computer Communication Networks Socket Programming ICEN/ICSI 416 Fall 2018 Prof. Aveek Dutta 1 Application Programming Interface Interface exported by the network Since most network protocols are implemented
More informationCS321: Computer Networks FTP, TELNET, SSH
CS321: Computer Networks FTP, TELNET, SSH Dr. Manas Khatua Assistant Professor Dept. of CSE IIT Jodhpur E-mail: manaskhatua@iitj.ac.in FTP File Transfer Protocol (FTP) is the standard protocol provided
More informationInterprocess Communication
Interprocess Communication Nicola Dragoni Embedded Systems Engineering DTU Informatics 4.2 Characteristics, Sockets, Client-Server Communication: UDP vs TCP 4.4 Group (Multicast) Communication The Characteristics
More informationCloudCenter for Developers
DEVNET-1198 CloudCenter for Developers Conor Murphy, Systems Engineer Data Centre Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this session in the
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 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 informationKuber-what?! Learn about Kubernetes
DEVNET-1999 Kuber-what?! Learn about Kubernetes Ashley Roach, Principal Engineer Evangelist Agenda Objectives A brief primer on containers The problems with running containers at scale Orchestration systems
More informationSet of IP routers. Set of IP routers. Set of IP routers. Set of IP routers
Smart Sensor Application Sensor Framework Source End IP Address Set of IP routers IoT Application Layer TCP/IP Appl. Protocols Transport Layer TCP/IP IoT Comm. Framework Application Framework IoT Comm.
More informationBasics. Once socket is configured, applica6ons. Socket is an interface between applica6on and network
Socket Programming Basics Socket is an interface between applica6on and network Applica6on creates a socket Socket type dictates the style of communica6on Once socket is configured, applica6ons Pass data
More informationComputer Systems and Networks
University of the Pacific LECTURE 12: PYTHON BYTES, TCP/IP (LAB 08) Computer Systems and Networks Dr. Pallipuram (vpallipuramkrishnamani@pacific.edu) Today s Agenda Python exercises to simulate network
More informationCSE 333 SECTION 6. Networking and sockets
CSE 333 SECTION 6 Networking and sockets Overview Network Sockets IP addresses and IP address structures in C/C++ DNS Resolving DNS names Demos Section exercise Sockets Network sockets are network interfaces
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 informationOBJECT ORIENTED PROGRAMMING
1 OBJECT ORIENTED PROGRAMMING Lecture 14 Networking Basics Outline 2 Networking Basics Socket IP Address DNS Client/Server Networking Class & Interface URL Demonstrating URL Networking 3 Java is practically
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 informationCSE 333 Section 8 - Client-Side Networking
CSE 333 Section 8 - Client-Side Networking Welcome back to section! We re glad that you re here :) Networking Quick Review What are the following protocols used for? (bonus: what layer of the networking
More informationNetworked Applications: Sockets. Goals of Todayʼs Lecture. End System: Computer on the ʻNet. Client-server paradigm End systems Clients and servers
Networked Applications: Sockets CS 375: Computer Networks Spring 2009 Thomas Bressoud 1 Goals of Todayʼs Lecture Client-server paradigm End systems Clients and servers Sockets and Network Programming Socket
More informationDefining 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 informationComputer Networks Prof. Ashok K. Agrawala
CMSC417 Computer Networks Prof. Ashok K. Agrawala 2018Ashok Agrawala September 6, 2018 Fall 2018 Sept 6, 2018 1 Overview Client-server paradigm End systems Clients and servers Sockets Socket abstraction
More informationFinesse APIs: Getting started with the REST APIs and XMPP events
Finesse APIs: Getting started with the REST APIs and XMPP events Denise Kwan, Software Engineer @ DevNet Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1.
More informationDevNet Workshop-Learning Cisco platform Exchange Grid (pxgrid) Dynamic Topics
DevNet Workshop-Learning Cisco platform Exchange Grid (pxgrid) Dynamic Topics Syam Appala, Principal Engineer DEVNET-2433 Agenda Introduction to pxgrid pxgrid Operation Lab on Dynamic Topics Contextual
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 informationMagical Chatbots with Cisco Spark and IBM Watson
DEVNET-2321 Magical Chatbots with Cisco Spark and IBM Watson Lauren Ramgattie, Technical Marketing Engineer Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session
More informationCSE 333 Lecture 16 - network programming intro
CSE 333 Lecture 16 - network programming intro Hal Perkins Department of Computer Science & Engineering University of Washington Today Network programming - dive into the Berkeley / POSIX sockets API -
More informationIPv6 Porting Applications
IPv6 Porting Applications US IPv6 Summit Dec 8-11, 8 2003 Eva M. Castro eva@gsyc.escet.urjc.es Systems and Communications Group (GSyC( GSyC) Experimental Sciences and Technology Department (ESCET) Rey
More informationThe Application Layer: Sockets Wrap-Up
The Application Layer: Sockets Wrap-Up CSC 249 February 8, 2018 slides mostly from J.F Kurose and K.W. Ross,copyright 1996-2012 1 Socket Overview q Examples with socket-api programming q Differences between
More informationChapter 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 informationHybrid Cloud Automation using Cisco CloudCenter API
Hybrid Cloud Automation using Cisco CloudCenter API Ray Doerr, Advanced Services Engineer Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this session
More informationCisco UCS Director and ACI Advanced Deployment Lab
Cisco UCS Director and ACI Advanced Deployment Lab Michael Zimmerman, TME Vishal Mehta, TME Agenda Introduction Cisco UCS Director ACI Integration and Key Concepts Cisco UCS Director Application Container
More informationCS UDP: User Datagram Protocol, Other Transports, Sockets. congestion worse);
CS314-26 UDP: User Datagram Protocol, Other Transports, Sockets! IP is an unreliable datagram protocol " congestion or transmission errors cause lost packets " multiple routes may lead to out-of-order
More informationChapter 2: outline. 2.1 principles of network applications. 2.6 P2P applications 2.7 socket programming with UDP and TCP
Chapter 2: outline 2.1 principles of network applications app architectures app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming
More informationReal time Location Services Overview and Use cases
Real time Location Services Overview and Use cases Ashutosh Malegaonkar, Principal Engineer @amalegaonkar DEVNET-1071 /me Maker Breaker Meditate @amalegaonkar DEVNET-1071 2017 Cisco and/or its affiliates.
More informationSockets. 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 informationConfigure Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) Service Settings on a Switch
Configure Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) Service Settings on a Switch Objective Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are transportation
More informationContiv installation and integration with ACI. LTRCLD-2003
Contiv installation and integration with ACI LTRCLD-2003 http://contiv.ciscolive.com Cesar Obediente CCIE#5620 Principal Systems Engineer Gaurav Dalvi Software Engineer Future of IT is Changing People/Process
More informationJAVA Network API. 2 - Connection-Oriented vs. Connectionless Communication
JAVA Network API To be discussed 1 - java.net... 1 2 - Connection-Oriented vs. Connectionless Communication... 1 3 - Connectionless:... 1 4 - Networking Protocols... 2 5 - Sockets... 2 6 - Multicast Addressing...
More informationOSI 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 informationCSE 124 Discussion Section Sockets Programming 10/10/17
CSE 124 Discussion Section Sockets Programming 10/10/17 Topics What s a socket? Creating a socket Connecting a socket Sending data Receiving data Resolving URLs to IPs Advanced socket options Live code
More informationSocket Programming. Omer Ozarslan
Socket Programming Omer Ozarslan omer@utdallas.edu 1 Outline Background Using TCP Example: hello_tcp Using UDP Example: hello_udp Blocking Calls and Threads Some Advises Code Examples Questions 2 Socket
More informationLab Assignment 3 for ECE374
Lab Assignment 3 for ECE374 Posted: 02/25/18 Due: 03/08/18 In this lab, we ll take a quick look at the UDP and TCP transport protocol. Whenever possible you should hand in a Wireshark screenshot that you
More informationECE4110 Internetwork Programming. Introduction and Overview
ECE4110 Internetwork Programming Introduction and Overview 1 EXAMPLE GENERAL NETWORK ALGORITHM Listen to wire Are signals detected Detect a preamble Yes Read Destination Address No data carrying or noise?
More informationOutline. Option Types. Socket Options SWE 545. Socket Options. Out-of-Band Data. Advanced Socket. Many socket options are Boolean flags
Outline SWE 545 Socket Options POSIX name/address conversion Out-of-Band Data Advanced Socket Programming 2 Socket Options Various attributes that are used to determine the behavior of sockets Setting
More informationTypes (Protocols) Associated functions Styles We will look at using sockets in C Java sockets are conceptually quite similar
Socket Programming What is a socket? Using sockets Types (Protocols) Associated functions Styles We will look at using sockets in C Java sockets are conceptually quite similar - Advanced Data Communications:
More informationL1/L2 NETWORK PROTOCOL TESTING
L1/L2 NETWORK PROTOCOL TESTING MODULE 1 : BASIC OF NETWORKING OSI Model TCP/IP Layers Service data unit & protocol data unit Protocols and standards Network What is network & Internet Network core circuit
More information