This document provides an overview of the transport layer and various transport layer protocols. It discusses socket programming and describes TCP and UDP in detail. The key points covered are:
- An introduction to the transport layer and its role in multiplexing communication between processes.
- Socket programming interfaces that allow communication between applications and transport protocols like TCP/IP.
- TCP provides reliable, connection-oriented data transfer with flow control and congestion control. UDP provides simpler connectionless datagram delivery.
- Details on TCP headers, connection establishment and closing, transmission policies, and how it provides reliable data transfer over unreliable IP.
This document provides an overview of the transport layer and protocols TCP and UDP. It discusses how the transport layer provides communication between processes on different hosts using port numbers for multiplexing. TCP provides reliable, connection-oriented transport using mechanisms like flow control, congestion control, and reliable data transfer with sequence numbers and acknowledgments. UDP provides a simpler, connectionless datagram service without reliability. The document outlines TCP and UDP header formats and explains TCP connection establishment and closing procedures. It also describes TCP congestion control algorithms like slow start, congestion avoidance, fast retransmit, and timeouts for loss recovery.
Application Layer and Socket Programmingelliando dias
The document discusses computer networking concepts related to the application layer and socket programming. It provides an overview of client-server applications and protocols, and describes how sockets allow applications to communicate over TCP and UDP. Specifically, it explains how servers can use sockets, binding, listening and accepting to establish TCP connections with clients. It also explains how clients can use sockets and connecting to communicate with servers. For UDP, it describes how servers can use sockets and binding to receive datagrams, while clients can use sockets and sending to communicate with servers.
This document provides an introduction to sockets programming in C using TCP/IP. It discusses computer networks and the TCP/IP protocol stack. It describes the Internet Protocol (IP) and how it provides a datagram service. It then covers TCP and UDP, explaining how TCP provides a reliable byte-stream channel while UDP is connectionless. The document introduces sockets as an abstraction for network communication and describes how client-server communication works. It provides details on socket creation, address binding, listening, and closing sockets in C.
Overview of socket API.
A network socket is an interface for an application to connect to a host‘s network stack (part of the OS). Sockets provide an abstraction of the network. Applications use the transport services available on the socket interface for communication with a peer application.
Transport protocol such as TCP, UDP or SCTP offer different levels of service. TCP for example provides reliable stream-oriented transport service while UDP more reflects the best-effort kind of service provided by the underlying IP protocol layer.
Sockets are bound to a transport address. For TCP/IP sockets this means an IP address and port number.
Sockets provide only very basic data transport services without any higher level functions like parameter marshaling or serialization. These functions have to be performed by the applications. These functions are often hidden in middleware platforms like distributed object technologies (CORBA, RMI, DCOM) or web service frameworks (WCF, JAX-WS).
Multicast sockets make the IP multicast capability accessible to applications. Multicast sockets are often used for streaming services where multiple applications are recipients of the same data packets.
This document provides an introduction to network socket programming concepts. It discusses what a socket is and how it serves as an interface to a host's transport application programming interface (API). It covers routing in network layers for both TCP and UDP sockets. TCP socket "spawning" during connection establishment is explained. Common socket interface functions for TCP and UDP are presented. The relationship between socket calls and TCP segments or UDP datagrams is illustrated. Other topics covered include the socket handle, parameter marshalling for remote procedure calls, low-level socket programming options, and UDP multicast sockets.
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
The document outlines a 15 week semester plan for learning network programming. It includes 7 topics covered over the semester with associated tasks, estimated time commitments, and learning outcomes. The topics progress from an overview of networking concepts to implementing client-server applications and multithreaded network programming.
This document provides an overview of the transport layer and protocols TCP and UDP. It discusses how the transport layer provides communication between processes on different hosts using port numbers for multiplexing. TCP provides reliable, connection-oriented transport using mechanisms like flow control, congestion control, and reliable data transfer with sequence numbers and acknowledgments. UDP provides a simpler, connectionless datagram service without reliability. The document outlines TCP and UDP header formats and explains TCP connection establishment and closing procedures. It also describes TCP congestion control algorithms like slow start, congestion avoidance, fast retransmit, and timeouts for loss recovery.
Application Layer and Socket Programmingelliando dias
The document discusses computer networking concepts related to the application layer and socket programming. It provides an overview of client-server applications and protocols, and describes how sockets allow applications to communicate over TCP and UDP. Specifically, it explains how servers can use sockets, binding, listening and accepting to establish TCP connections with clients. It also explains how clients can use sockets and connecting to communicate with servers. For UDP, it describes how servers can use sockets and binding to receive datagrams, while clients can use sockets and sending to communicate with servers.
This document provides an introduction to sockets programming in C using TCP/IP. It discusses computer networks and the TCP/IP protocol stack. It describes the Internet Protocol (IP) and how it provides a datagram service. It then covers TCP and UDP, explaining how TCP provides a reliable byte-stream channel while UDP is connectionless. The document introduces sockets as an abstraction for network communication and describes how client-server communication works. It provides details on socket creation, address binding, listening, and closing sockets in C.
Overview of socket API.
A network socket is an interface for an application to connect to a host‘s network stack (part of the OS). Sockets provide an abstraction of the network. Applications use the transport services available on the socket interface for communication with a peer application.
Transport protocol such as TCP, UDP or SCTP offer different levels of service. TCP for example provides reliable stream-oriented transport service while UDP more reflects the best-effort kind of service provided by the underlying IP protocol layer.
Sockets are bound to a transport address. For TCP/IP sockets this means an IP address and port number.
Sockets provide only very basic data transport services without any higher level functions like parameter marshaling or serialization. These functions have to be performed by the applications. These functions are often hidden in middleware platforms like distributed object technologies (CORBA, RMI, DCOM) or web service frameworks (WCF, JAX-WS).
Multicast sockets make the IP multicast capability accessible to applications. Multicast sockets are often used for streaming services where multiple applications are recipients of the same data packets.
This document provides an introduction to network socket programming concepts. It discusses what a socket is and how it serves as an interface to a host's transport application programming interface (API). It covers routing in network layers for both TCP and UDP sockets. TCP socket "spawning" during connection establishment is explained. Common socket interface functions for TCP and UDP are presented. The relationship between socket calls and TCP segments or UDP datagrams is illustrated. Other topics covered include the socket handle, parameter marshalling for remote procedure calls, low-level socket programming options, and UDP multicast sockets.
When we desire a communication between two applications possibly running on different machines, we need sockets. This presentation aims to provide knowledge of basic socket programming to undergraduate students. Basically, this presentation gives the importance of socket in the area of networking and Unix Programming. The presentation of Topic (Sockets) has designed according to the Network Programming Subject, B.Tech, 6th Semester syllabus of Punjab Technical University Kapurthala, Punjab.
The document outlines a 15 week semester plan for learning network programming. It includes 7 topics covered over the semester with associated tasks, estimated time commitments, and learning outcomes. The topics progress from an overview of networking concepts to implementing client-server applications and multithreaded network programming.
This document discusses various topics related to computer networking including protocols, sockets, IP addresses, URLs, reading web page source code, downloading files from the internet, TCP/IP and UDP servers and clients, file servers and clients, two-way communication between servers and clients, and sending simple emails. It provides information on networking hardware and software, protocols like TCP/IP and UDP, socket programming, parsing URLs, creating servers and clients, and sending/receiving data over networks.
This document provides an overview of network programming in Python. It discusses how Python allows both low-level socket access for building clients and servers as well as higher-level access to application protocols like FTP and HTTP. It then describes socket programming concepts like domains, types, protocols and functions for binding, listening, accepting, connecting, sending and receiving data. Simple client and server code examples are provided to demonstrate creating a basic socket connection between two programs. Finally, commonly used Python network modules for protocols like HTTP, FTP, SMTP and more are listed.
This document discusses network programming and Java sockets. It begins with an introduction to client-server computing and networking basics like TCP, UDP, and ports. It then covers Java sockets in detail, including how to implement a server that can accept multiple clients by creating a new thread for each, and how to implement a client. Sample code is provided for a simple single-threaded server and client. The document concludes that programming client-server applications in Java using sockets is easier than in other languages like C.
The document discusses network programming and Java sockets. It introduces elements of client-server computing including networking basics like TCP, UDP and ports. It then covers Java sockets, explaining how to implement both a server and client using Java sockets. Code examples are provided of a simple server and client. The conclusion emphasizes that Java makes socket programming easier than other languages like C.
This document provides an overview of socket basics, including how sockets provide an endpoint for network connections and are identified by an IP address and port number. It describes the key functions for creating, binding, listening for, and accepting TCP and UDP sockets. TCP provides a reliable connected service while UDP is unreliable and connectionless. Port numbers and common services are also outlined.
The document provides an overview of object oriented programming and network programming concepts. It discusses topics like IP addresses, ports, sockets, client-server programming, and the java.net and java.util packages. The java.net package contains classes for network programming in Java like Socket, ServerSocket, URL, and InetAddress. The java.util package contains general-purpose utility classes like ArrayList, HashMap, Properties and Date.
The Presentation given at Guru Gobind Singh Polytechnic, Nashik for Third Year Information Technology and Computer Engineering Students on 08/02/2011.
Topic: Java Network Programming
This document provides information about the Networks Laboratory course offered at Anjalai Ammal Mahalingam Engineering College. It includes the syllabus, list of experiments, objectives and outcomes of the course. The course aims to teach students socket programming, simulation tools, and hands-on experience with networking protocols. Some key experiments include implementing stop-and-wait and sliding window protocols, socket programming, simulating ARP/RARP, PING and traceroute, and studying routing algorithms. The course is intended to help students use simulation tools, implement protocols, and analyze network performance and routing.
The document discusses network programming and the client-server model. It begins with an overview of the client-server transaction process and the programmer's view of the Internet. It then covers topics like IP addresses, the Domain Name System (DNS), Internet connections using sockets, examples of clients and servers, and the sockets interface used for writing clients and servers.
The document discusses network programming and the client-server model. It provides details on:
1) The client-server transaction process where the client sends a request, the server handles it and sends a response which the client then handles.
2) The programmer's view of the internet including IP addresses, domain name system (DNS) mapping addresses to names, and internet connections between client and server processes.
3) Examples of client programs like web browsers and examples of server programs like web servers that provide services by manipulating resources for clients that connect to them.
The document describes the TCP 3-way handshake process used to establish a connection between a client and server in a TCP/IP network. It involves 3 steps: 1) the client sends a SYN packet to the server with its initial sequence number, 2) the server responds with a SYN-ACK packet containing its own initial sequence number and acknowledging the client's, and 3) the client sends an ACK packet to the server acknowledging its sequence number, completing the handshake and allowing data transfer to begin.
1. Malware - Malicious software like viruses, ransomware, spyware that infect devices.
2. Denial of Service (DoS) - Floods networks/servers with traffic to overload them. Distributed DoS (DDoS) uses multiple infected devices.
3. Man-in-the-Middle (MITM) - Hackers intercept communications between two parties to steal data or install malware. Often occurs on public WiFi.
4. Phishing - Deceptive communications like emails trick users into revealing sensitive info or installing malware.
5. SQL Injection - Malicious code inserted into databases to steal info or
Sockets provide an abstraction for network communication between processes. They define endpoints for connections that are identified by IP addresses and port numbers. There are two main types - stream sockets which provide reliable connected service using TCP, and datagram sockets which provide unreliable datagram service using UDP. To use sockets, an application creates a socket, binds it to an address, listens/accepts for incoming connections, and sends/receives data. Key functions include socket(), bind(), listen(), accept(), connect(), send(), and recv(). Select() allows monitoring multiple sockets to avoid blocking. Proper use requires consideration of addressing, port numbers, error handling, and blocking behavior.
This document discusses network programming in Python using sockets. It explains that sockets allow communication across networks and the Python socket module provides an interface to work with sockets. It then describes how to create server and client sockets, including binding, listening, accepting connections, and sending/receiving data. It also covers different socket address families like AF_INET for IPv4 and provides code examples for a basic echo server and handling multiple clients using threads or processes.
This document provides an introduction to socket programming in C on Linux. Some key points:
- Sockets allow communication between processes over a network and act as an interface between applications and the network. They are represented by file descriptors.
- There are two main types of sockets - stream sockets (TCP) which provide reliable, ordered data transmission and datagram sockets (UDP) which are unreliable but do not require a connection.
- The socket API includes functions like socket(), bind(), listen(), accept(), connect(), recv(), send(), etc. to create and manage sockets and network communication.
- Data structures like sockaddr_in are used to store socket addresses containing IP and port. Byte ordering functions like
Byte ordering refers to the arrangement of bytes when data is transmitted over a network. There are two common forms of byte ordering - big endian and little endian. Special functions like htons() and htonl() are used to convert between host byte ordering and network byte ordering when communicating between machines.
TCP and UDP are transport layer protocols that provide communication between applications on different hosts. TCP is a connection-oriented protocol that provides reliable, ordered delivery of streams of bytes. UDP is a connectionless protocol that provides best-effort delivery of datagrams but has less overhead than TCP. Both protocols use port numbers and socket APIs for processes to communicate.
If the number of spine switches were to be merely doubled, the effect of a single switch failure is halved. With 8 spine switches, the effect of a single switch failure only causes a 12% reduction in available bandwidth. So, in modern data centers, people build networks with anywhere from 4 to 32 spine switches. With a leaf-spine network, every server on the network is exactly the same distance away from all other servers – three port hops, to be precise. The benefit of this architecture is that you can just add more spines and leaves as you expand the cluster and you don't have to do any recabling. Intuition Systems will also get more predictable latency between the nodes.
As a trend, disaggregation seems to be most useful for very large companies like Facebook and Google, or cloud providers. The technology does not necessarily have significant implications for small or medium sized businesses. Historically, however, technology has a way of trickling down from the pioneering phases of existing only within large companies with tremendous resources, to becoming more standardized across the board.
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
More Related Content
Similar to CN_UNIT4.ppt notre knxckvj bjbDJKVHFL jb
This document discusses various topics related to computer networking including protocols, sockets, IP addresses, URLs, reading web page source code, downloading files from the internet, TCP/IP and UDP servers and clients, file servers and clients, two-way communication between servers and clients, and sending simple emails. It provides information on networking hardware and software, protocols like TCP/IP and UDP, socket programming, parsing URLs, creating servers and clients, and sending/receiving data over networks.
This document provides an overview of network programming in Python. It discusses how Python allows both low-level socket access for building clients and servers as well as higher-level access to application protocols like FTP and HTTP. It then describes socket programming concepts like domains, types, protocols and functions for binding, listening, accepting, connecting, sending and receiving data. Simple client and server code examples are provided to demonstrate creating a basic socket connection between two programs. Finally, commonly used Python network modules for protocols like HTTP, FTP, SMTP and more are listed.
This document discusses network programming and Java sockets. It begins with an introduction to client-server computing and networking basics like TCP, UDP, and ports. It then covers Java sockets in detail, including how to implement a server that can accept multiple clients by creating a new thread for each, and how to implement a client. Sample code is provided for a simple single-threaded server and client. The document concludes that programming client-server applications in Java using sockets is easier than in other languages like C.
The document discusses network programming and Java sockets. It introduces elements of client-server computing including networking basics like TCP, UDP and ports. It then covers Java sockets, explaining how to implement both a server and client using Java sockets. Code examples are provided of a simple server and client. The conclusion emphasizes that Java makes socket programming easier than other languages like C.
This document provides an overview of socket basics, including how sockets provide an endpoint for network connections and are identified by an IP address and port number. It describes the key functions for creating, binding, listening for, and accepting TCP and UDP sockets. TCP provides a reliable connected service while UDP is unreliable and connectionless. Port numbers and common services are also outlined.
The document provides an overview of object oriented programming and network programming concepts. It discusses topics like IP addresses, ports, sockets, client-server programming, and the java.net and java.util packages. The java.net package contains classes for network programming in Java like Socket, ServerSocket, URL, and InetAddress. The java.util package contains general-purpose utility classes like ArrayList, HashMap, Properties and Date.
The Presentation given at Guru Gobind Singh Polytechnic, Nashik for Third Year Information Technology and Computer Engineering Students on 08/02/2011.
Topic: Java Network Programming
This document provides information about the Networks Laboratory course offered at Anjalai Ammal Mahalingam Engineering College. It includes the syllabus, list of experiments, objectives and outcomes of the course. The course aims to teach students socket programming, simulation tools, and hands-on experience with networking protocols. Some key experiments include implementing stop-and-wait and sliding window protocols, socket programming, simulating ARP/RARP, PING and traceroute, and studying routing algorithms. The course is intended to help students use simulation tools, implement protocols, and analyze network performance and routing.
The document discusses network programming and the client-server model. It begins with an overview of the client-server transaction process and the programmer's view of the Internet. It then covers topics like IP addresses, the Domain Name System (DNS), Internet connections using sockets, examples of clients and servers, and the sockets interface used for writing clients and servers.
The document discusses network programming and the client-server model. It provides details on:
1) The client-server transaction process where the client sends a request, the server handles it and sends a response which the client then handles.
2) The programmer's view of the internet including IP addresses, domain name system (DNS) mapping addresses to names, and internet connections between client and server processes.
3) Examples of client programs like web browsers and examples of server programs like web servers that provide services by manipulating resources for clients that connect to them.
The document describes the TCP 3-way handshake process used to establish a connection between a client and server in a TCP/IP network. It involves 3 steps: 1) the client sends a SYN packet to the server with its initial sequence number, 2) the server responds with a SYN-ACK packet containing its own initial sequence number and acknowledging the client's, and 3) the client sends an ACK packet to the server acknowledging its sequence number, completing the handshake and allowing data transfer to begin.
1. Malware - Malicious software like viruses, ransomware, spyware that infect devices.
2. Denial of Service (DoS) - Floods networks/servers with traffic to overload them. Distributed DoS (DDoS) uses multiple infected devices.
3. Man-in-the-Middle (MITM) - Hackers intercept communications between two parties to steal data or install malware. Often occurs on public WiFi.
4. Phishing - Deceptive communications like emails trick users into revealing sensitive info or installing malware.
5. SQL Injection - Malicious code inserted into databases to steal info or
Sockets provide an abstraction for network communication between processes. They define endpoints for connections that are identified by IP addresses and port numbers. There are two main types - stream sockets which provide reliable connected service using TCP, and datagram sockets which provide unreliable datagram service using UDP. To use sockets, an application creates a socket, binds it to an address, listens/accepts for incoming connections, and sends/receives data. Key functions include socket(), bind(), listen(), accept(), connect(), send(), and recv(). Select() allows monitoring multiple sockets to avoid blocking. Proper use requires consideration of addressing, port numbers, error handling, and blocking behavior.
This document discusses network programming in Python using sockets. It explains that sockets allow communication across networks and the Python socket module provides an interface to work with sockets. It then describes how to create server and client sockets, including binding, listening, accepting connections, and sending/receiving data. It also covers different socket address families like AF_INET for IPv4 and provides code examples for a basic echo server and handling multiple clients using threads or processes.
This document provides an introduction to socket programming in C on Linux. Some key points:
- Sockets allow communication between processes over a network and act as an interface between applications and the network. They are represented by file descriptors.
- There are two main types of sockets - stream sockets (TCP) which provide reliable, ordered data transmission and datagram sockets (UDP) which are unreliable but do not require a connection.
- The socket API includes functions like socket(), bind(), listen(), accept(), connect(), recv(), send(), etc. to create and manage sockets and network communication.
- Data structures like sockaddr_in are used to store socket addresses containing IP and port. Byte ordering functions like
Byte ordering refers to the arrangement of bytes when data is transmitted over a network. There are two common forms of byte ordering - big endian and little endian. Special functions like htons() and htonl() are used to convert between host byte ordering and network byte ordering when communicating between machines.
TCP and UDP are transport layer protocols that provide communication between applications on different hosts. TCP is a connection-oriented protocol that provides reliable, ordered delivery of streams of bytes. UDP is a connectionless protocol that provides best-effort delivery of datagrams but has less overhead than TCP. Both protocols use port numbers and socket APIs for processes to communicate.
If the number of spine switches were to be merely doubled, the effect of a single switch failure is halved. With 8 spine switches, the effect of a single switch failure only causes a 12% reduction in available bandwidth. So, in modern data centers, people build networks with anywhere from 4 to 32 spine switches. With a leaf-spine network, every server on the network is exactly the same distance away from all other servers – three port hops, to be precise. The benefit of this architecture is that you can just add more spines and leaves as you expand the cluster and you don't have to do any recabling. Intuition Systems will also get more predictable latency between the nodes.
As a trend, disaggregation seems to be most useful for very large companies like Facebook and Google, or cloud providers. The technology does not necessarily have significant implications for small or medium sized businesses. Historically, however, technology has a way of trickling down from the pioneering phases of existing only within large companies with tremendous resources, to becoming more standardized across the board.
Similar to CN_UNIT4.ppt notre knxckvj bjbDJKVHFL jb (20)
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesChristina Lin
Traditionally, dealing with real-time data pipelines has involved significant overhead, even for straightforward tasks like data transformation or masking. However, in this talk, we’ll venture into the dynamic realm of WebAssembly (WASM) and discover how it can revolutionize the creation of stateless streaming pipelines within a Kafka (Redpanda) broker. These pipelines are adept at managing low-latency, high-data-volume scenarios.
Embedded machine learning-based road conditions and driving behavior monitoringIJECEIAES
Car accident rates have increased in recent years, resulting in losses in human lives, properties, and other financial costs. An embedded machine learning-based system is developed to address this critical issue. The system can monitor road conditions, detect driving patterns, and identify aggressive driving behaviors. The system is based on neural networks trained on a comprehensive dataset of driving events, driving styles, and road conditions. The system effectively detects potential risks and helps mitigate the frequency and impact of accidents. The primary goal is to ensure the safety of drivers and vehicles. Collecting data involved gathering information on three key road events: normal street and normal drive, speed bumps, circular yellow speed bumps, and three aggressive driving actions: sudden start, sudden stop, and sudden entry. The gathered data is processed and analyzed using a machine learning system designed for limited power and memory devices. The developed system resulted in 91.9% accuracy, 93.6% precision, and 92% recall. The achieved inference time on an Arduino Nano 33 BLE Sense with a 32-bit CPU running at 64 MHz is 34 ms and requires 2.6 kB peak RAM and 139.9 kB program flash memory, making it suitable for resource-constrained embedded systems.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...IJECEIAES
Climate change's impact on the planet forced the United Nations and governments to promote green energies and electric transportation. The deployments of photovoltaic (PV) and electric vehicle (EV) systems gained stronger momentum due to their numerous advantages over fossil fuel types. The advantages go beyond sustainability to reach financial support and stability. The work in this paper introduces the hybrid system between PV and EV to support industrial and commercial plants. This paper covers the theoretical framework of the proposed hybrid system including the required equation to complete the cost analysis when PV and EV are present. In addition, the proposed design diagram which sets the priorities and requirements of the system is presented. The proposed approach allows setup to advance their power stability, especially during power outages. The presented information supports researchers and plant owners to complete the necessary analysis while promoting the deployment of clean energy. The result of a case study that represents a dairy milk farmer supports the theoretical works and highlights its advanced benefits to existing plants. The short return on investment of the proposed approach supports the paper's novelty approach for the sustainable electrical system. In addition, the proposed system allows for an isolated power setup without the need for a transmission line which enhances the safety of the electrical network
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...University of Maribor
Slides from talk presenting:
Aleš Zamuda: Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapter and Networking.
Presentation at IcETRAN 2024 session:
"Inter-Society Networking Panel GRSS/MTT-S/CIS
Panel Session: Promoting Connection and Cooperation"
IEEE Slovenia GRSS
IEEE Serbia and Montenegro MTT-S
IEEE Slovenia CIS
11TH INTERNATIONAL CONFERENCE ON ELECTRICAL, ELECTRONIC AND COMPUTING ENGINEERING
3-6 June 2024, Niš, Serbia
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsVictor Morales
K8sGPT is a tool that analyzes and diagnoses Kubernetes clusters. This presentation was used to share the requirements and dependencies to deploy K8sGPT in a local environment.
3. CSC 450/550
The transport layer is an end-to-end layer – this means
that nodes within the subnet do not participate in
transport layer protocols – only the end hosts.
As with other layers, transport layer protocols send data
as a sequence of packets (segments).
Part A: Introduction
4. CSC 450/550
The network layer provides communication between two
hosts.
The transport layer provides communication between
two processes running on different hosts.
A process is an instance of a program that is running on a
host.
There may be multiple processes communicating between
two hosts – for example, there could be a FTP session
and a Telnet session between the same two hosts.
2. Multiplexing (1)
5. CSC 450/550
The transport layer provides a way to multiplex /
demultiplex communication between various processes.
To provide multiplexing, the transport layer adds an
address to each segment indicating the source and
destination processes.
Note these addresses need only be unique locally on
a given host.
In TCP/IP these transport layer addresses are called
port-numbers.
3. Multiplexing (2)
6. CSC 450/550
The 5-tuple: (sending port, sending IP address, destination
port, destination IP address, transport layer protocol) uniquely
identifies a process-to-process connection in the Internet.
4. Multiplexing (3)
10. CSC 450/550
8. Transport Service Primitives
The primitives for a simple transport service.
connum = LISTEN (local)
connum = CONNECT(local, remote)
status = SEND (connum, buffer, bytes)
status = RECEIVE(connum, buffer,bytes)
status = DISCONNECT(connum)
12. CSC 450/550
PART B: SOCKET
• Software interface designed to communicate
between the user program and TCP/IP protocol
stack
• Implemented by a set of library function calls
• Socket is a data structure inside the program
• Both client and server programs communicate
via a pair of sockets
13. CSC 450/550
2. Socket Framework
Application Program
Socket Layer
TCP UDP
IP
User Space
Kernel Space
Physical Network
(driver)
14. CSC 450/550
3. Socket Families
There are several significant socket
domain families:
Internet Domain Sockets (AF_INET)
-implemented via IP addresses
and port numbers
Unix Domain Sockets (AF_UNIX)
-implemented via filenames (think
“named pipe”)
Novell IPX (AF_IPX)
AppleTalk DDS (AF_APPLETALK)
15. CSC 450/550
4. Type of Socket
• Stream (SOCK_STREAM) Uses TCP protocol.
Connection-oriented service
• Datagram (SOCK_DGRAM) Uses UDP protocol.
Connectionless service
• Raw (SOCK_RAW) Used for testing
16. CSC 450/550
#include <sys/types.h>
#include <sys/socket.h>
int socket(int domain, int type, int protocol);
• domain is one of the Protocol Families (PF_INET,
PF_UNIX, etc.)
• type defines the communication protocol semantics,
usually defines either:
– SOCK_STREAM: connection-oriented stream (TCP)
– SOCK_DGRAM: connectionless, unreliable (UDP)
• protocol specifies a particular protocol, just set this to 0 to
accept the default
5. Creating a Socket
17. CSC 450/550
Create socket
bind a port to the
socket
SERVER
listen for incoming
connections
accept an
incoming
connection
read from the
connection
write to the
connection
Create socket
connect to server's
port
read from the
connection
write to the
connection
close connection
CLIENT
loop
loop
6. TCP Client/Server
18. CSC 450/550
7. TCP Server
Sequence of calls
sock_init() Create the socket
bind() Register port with the system
listen() Establish client connection
accept() Accept client connection
read/write read/write data
close() shutdown
19. CSC 450/550
8. TCP Client
Sequence of calls
sock_init () Create socket
connect() Set up connection
write/read write/read data
close() Shutdown
20. CSC 450/550
Create socket
bind a port to the
socket
SERVER
listen for incoming
connections
accept an
incoming
connection
read from the
connection
write to the
connection
int socket(int domain, int type, int protocol)
sockfd = socket(PF_INET, SOCK_STREAM, 0);
int bind(int sockfd, struct sockaddr *server_addr, socklen_t length)
bind(sockfd, &server, sizeof(server));
int listen( int sockfd, int num_queued_requests)
listen( sockfd, 5);
int accept(int sockfd, struct sockaddr *incoming_address, socklen_t length)
newfd = accept(sockfd, &client, sizeof(client)); /* BLOCKS */
int read(int sockfd, void * buffer, size_t buffer_size)
read(newfd, buffer, sizeof(buffer));
int write(int sockfd, void * buffer, size_t buffer_size)
write(newfd, buffer, sizeof(buffer));
9. Server Side Socket Details
21. CSC 450/550
Create socket
CLIENT
connect to Server
socket
read from the
connection
write to the
connection
int socket(int domain, int type, int protocol)
sockfd = socket(PF_INET, SOCK_STREAM, 0);
int connect(int sockfd, struct sockaddr *server_address, socklen_t length)
connect(sockfd, &server, sizeof(server));
int read(int sockfd, void * buffer, size_t buffer_size)
read(sockfd, buffer, sizeof(buffer));
int write(int sockfd, void * buffer, size_t buffer_size)
write(sockfd, buffer, sizeof(buffer));
10. Client Side Socket Details
22. CSC 450/550
11. UDP Clients and Servers
Connectionless clients and servers create a socket using SOCK_DGRAM
instead of SOCK_STREAM
Connectionless servers do not call listen() or accept(), and usually do not call
connect()
Since connectionless communications lack a sustained connection, several
methods are available that allow you to specify a destination address with
every call:
• sendto(sock, buffer, buflen, flags, to_addr, tolen);
• recvfrom(sock, buffer, buflen, flags, from_addr, fromlen);
23. CSC 450/550
12. UDP Server
Sequence of calls
sock_init() Create socket
bind() Register port with the system
recfrom/sendto Receive/send data
close() Shutdown
24. CSC 450/550
13. UDP Client
Sequence of calls
socket_init() Create socket
sendto/recfrom send/receive data
close() Shutdown
28. CSC 450/550
TCP Services:
• Reliable transport
• Flow control
• Congestion control
UDP does not provide any of these services
• connection oriented.
• full duplex.
2. Introduction
30. CSC 450/550
TCP converts the unreliable, best effort service of IP into a
reliable service, i.e., it ensures that each segment is
delivered correctly, only once, and in order.
Converting an unreliable connection into a reliable
connection is basically the same problem we have
considered at the data link layer, and essentially the same
solution is used:
TCP numbers each segment and uses an ARQ protocol
to recover lost segments.
Some versions of TCP implement Go Back N and other
versions implement Selective Repeat.
4. TCP Services (1)
31. CSC 450/550
However, there are a few important differences between the transport
layer and the data link layer.
At the data link layer, we viewed an ARQ protocol as being operated
between two nodes connected by a point-to-point link.
At the transport layer, this protocol is implemented between two
hosts connected over network.
Packets can arrive out-of-order, and packets may also be stored
in buffers within the network and then arrive at much later times.
The round-trip time will change with different connections and
connection establishment is more complicated.
5. TCP Services (2)
35. CSC 450/550
9. Closing a TCP Connection (1)
client closes socket:
clientSocket.close();
Step 1: client end system sends
TCP FIN control segment to
server
Step 2: server receives FIN, replies
with ACK. Closes connection,
sends FIN.
client server
close
close
closed
timed
wait
36. CSC 450/550
10. Closing a TCP Connection (2)
Step 3: client receives FIN, replies with
ACK.
• Enters “timed wait” - will
respond with ACK to
received FINs
Step 4: server, receives ACK.
Connection closed.
Note: with small modification, can
handle simultaneous FINs.
client server
closing
closing
closed
timed
wait closed
38. CSC 450/550
In a network, it is often desirable to limit the rate at which a
source can send traffic into the subnet.
If this is not done and sources send at too high of a rate,
then buffers within the network will fill-up resulting in long
delays and eventually packets being dropped.
Moreover as packets gets dropped, retransmission may
occur, leading to even more traffic.
When sources are not regulated this can lead to
congestion collapse of the network, where very little traffic
is delivered to the destination.
12. Flow Control and Congestion Control (1)
39. CSC 450/550
Two different factors can limit the rate at which a
source sends data.
the inability of the destination to accept new data.
Techniques that address this are referred to as
flow control.
the number of packets within the subnet.
Techniques that address this are referred to as
congestion control.
13. Flow Control and Congestion Control
(2)
40. CSC 450/550
Flow control and congestion control can be addressed at the
transport layer, but may also be addressed at other layers.
For example, some DLL protocols perform flow control on
each link. And some congestion control approaches
are done at the network layer.
Both flow control and congestion control are part of TCP.
14. Flow Control and Congestion Control
(3)
41. CSC 450/550
Congestion arises when the total load on the network becomes too large. This
leads to queues building up and to long delays (recall the M/G/1 model).
If
sources retransmit messages, then this can lead to even more congestion and
eventually to congestion collapse. This is illustrated in the figure below.
Notice, as the offered load increase, the number of packets delivered at first
increases, but at high enough loads, this rapidly decreases.
15. Congestion (1)
42. CSC 450/550
Notice, as the offered load increase, the number of packets delivered at
first increases, but at high enough loads, this rapidly decreases.
16. Congestion (2)
43. CSC 450/550
Congestion control may be addressed at both the
network level and the transport layer.
At the network layer possible approaches include
Packet dropping when a buffer becomes full a router can
drop waiting packets - if not coupled with some other
technique, this can lead to greater congestion through
retransmissions.
Packet scheduling certain scheduling policies may
help in avoiding congestion - in particular scheduling can
help to isolate users that are transmitting at a high rate.
17. Approaches to Congestion Control (1)
44. CSC 450/550
Dynamic routing when a link becomes congested,
change the routing to avoid this link - this only helps up
to a point (eventually all links become congested) and
can lead to instabilities
Admission control/Traffic policing - Only allow
connections in if the network can handle them and
make sure that admitted sessions do not send at too
high of a rate - only useful for connection-oriented
networks.
18. Approaches to Congestion Control (2)
45. CSC 450/550
An approach that can be used at either the network or
transport layers is
Rate control this refers to techniques where the
source rate is explicitly controlled based on feedback
from either the network and/or the receiver.
For example, routers in the network may send a
source a "choke packet" upon becoming congested.
When receiving such a packet, the source should
lower it rate.
19. Approaches to Congestion Control (3)
46. CSC 450/550
These approaches can be classified as either
"congestion avoidance" approaches, if they try to
prevent congestion from ever occurring, or as
"congestion recovery" approaches, if they wait until
congestion occurs and then react to it. In general, “better
to prevent than to recover."
Different networks have used various combinations of all
these approaches.
Traditionally, rate control at the transport layer has
been used in the Internet, but new approaches are
beginning to be used that incorporate some of the network
layer techniques discussed above.
20. Approaches to Congestion Control (4)
47. CSC 450/550
TCP implements end-to-end congestion control. TCP
detects congestion via the ACK's from the sliding-window
ARQ algorithm used for providing reliable service.
When the source times out before receiving an ACK,
the most likely reason is because a link became
congested. TCP uses this as an indication of congestion.
In this case, TCP will slow down the transmission rate.
TCP controls the transmission rate of a source by
varying the window size used in the sliding window
protocol.
21. Congestion Control in TCP
49. CSC 450/550
23. Slow Start
Initial CW = 1.
After each ACK, CW += 1;
Continue until:
• Loss occurs OR
• CW > slow start threshold
Then switch to congestion avoidance
If we detect loss, cut CW in half
Exponential increase in window size
per RTT
sender
RTT
receiver
time
50. CSC 450/550
24. Congestion Avoidance
Until (loss) {
after CW packets ACKed:
CW += 1;
}
ssthresh = CW/2;
Depending on loss type:
SACK/Fast Retransmit:
CW/= 2; continue;
Course grained timeout:
CW = 1; go to slow start.
(This is for TCP Reno/SACK: TCP
Tahoe always sets CW=1 after a loss)
51. CSC 450/550
25. How are losses recovered?
Say packet is lost (data or ACK!)
Coarse-grained Timeout:
• Sender does not receive ACK after some
period of time
• Event is called a retransmission time-out
(RTO)
• RTO value is based on estimated round-
trip time (RTT)
• RTT is adjusted over time using
exponential weighted moving average:
RTT = (1-x)*RTT + (x)*sample
(x is typically 0.1)
First done in TCP Tahoe
loss
timeout
lost ACK scenario
X
sender receiver
time
52. CSC 450/550
26. Fast Retransmit
Receiver expects N, gets N+1:
• Immediately sends ACK(N)
• This is called a duplicate ACK
• Does NOT delay ACKs here!
• Continue sending dup ACKs for each
subsequent packet (not N)
Sender gets 3 duplicate ACKs:
• Infers N is lost and resends
• 3 chosen so out-of-order packets don’t
trigger Fast Retransmit accidentally
• Called “fast” since we don’t need to wait
for a full RTT
sender receiver
time
X
Introduced in TCP Reno
53. CSC 450/550
TCP Connection Management Modeling
The states used in the TCP connection management finite state
machine.
55. CSC 450/550
PART D: UDP
UDP (User Datagram Protocol) unreliable,
connectionless; No TCP’s flow control; applications
where prompt delivery more important than
accurate delivery (speech, video, …)
(Metaphor: postal service)
56. CSC 450/550
1. Takes the data an application provides,
2. Packs it into a UDP packet
3. Hands it to the IP layer.
4. The packet is then put on the wire, and
that is where it ends.
Datagram protocol it does not have to establish a
connection to another machine before sending data.
There is no way to guarantee that
the packet will reach its destination.
2. UDP (2)
57. CSC 450/550
Basically all UDP provides is a multiplexing capability on top of IP.
The length field gives the length of the entire packet including the header.
The checksum is calculated on the entire packet
(and also on part of the IP header).
Calculating the checksum is optional, and if an error is detected the packet
may be discarded or may be passed on to the application with an error flag.
3. UDP Packet