Internet + Wireless Computer Networks COPY Flashcards
User Datagram Protocol (UPD)
- Connectionless: UDP is a connectionless protocol, meaning it does not establish a connection before data transfer.
- Unreliable Delivery: UDP does not guarantee reliable delivery of data, and it does not use acknowledgments or retransmissions.
- No Error Checking: UDP does not perform extensive error checking, and any lost or corrupted data is not retransmitted.
- Faster: UDP is faster and more lightweight than TCP because it lacks the overhead associated with connection establishment, acknowledgment mechanisms, and error recovery.
- Used for Real-Time Applications: UDP is often used for real-time applications like streaming media, online gaming, DNS (Domain Name System) queries, and voice over IP (VoIP) where speed and low latency are more critical than guaranteed delivery.
Transmission Control Protocol (TCP)
- Connection-Oriented: TCP is a connection-oriented protocol, which means it establishes a reliable and ordered connection between the sender and receiver before data transfer.
- Reliable Delivery: TCP ensures reliable delivery of data by using acknowledgment mechanisms, retransmissions, and flow control.
- Error Checking: TCP performs error checking to detect any lost or corrupted data and ensures data integrity.
- Ordered Data Transfer: Data is transferred in a specific order, and reordering is done at the receiving end to deliver the data in the correct sequence.
- Slower: TCP is generally slower than UDP due to the overhead associated with establishing and maintaining connections, error checking, and retransmissions.
Ports in Computer Networking and Communications
A port is a logical endpoint for communication in a networked system. Ports are used to distinguish different services or applications running on a single device (e.g., computer, server) and allow multiple networked services to coexist on the same device.
- Both TCP and UDP use port numbers to identify the destination service or application on a device.
- When a TCP or UDP packet is received by a device, the port number in the packet header is used to determine which application should receive the data.
Port Numbers in Computer Networking and Communications
- A port is identified by a number, known as a port number, which is a 16-bit unsigned integer ranging from 0 to 65535.
- Port numbers from 0 to 1023 are reserved for well-known services and protocols (e.g., HTTP uses port 80, HTTPS uses port 443).
- Port numbers from 1024 to 49151 are registered ports, assigned by the Internet Assigned Numbers Authority (IANA) for specific purposes or applications.
- Port numbers from 49152 to 65535 are dynamic or private ports, which can be used by applications dynamically and temporarily.
Socket Communication
- A combination of an IP address and a port number is referred to as a socket. Sockets enable communication between applications over a network.
- When a packet of data is sent from one device to another, it is addressed to a specific IP address and port combination, allowing the receiving device to route the data to the appropriate application or service.
Purpose of Ports
- Ports help to ensure that the correct application or service on a device receives the data sent over the network.
- They enable multiple network services to run on a single device by using different port numbers for each service.
File Transfer Protocol (FTP)
TCP on Port 20/21
File Transfer Protocol (FTP) is a standard network protocol used for transferring files between a client and a server on a computer network. It is one of the oldest and most commonly used protocols for file transfers over the Internet. FTP operates on the client-server model and uses a set of rules and conventions for communication between the client and the server.
1) Client-Server Architecture:
- FTP operates on a client-server architecture, where an FTP client initiates a connection to an FTP server to transfer files.
2) Two Modes of Operation:
- FTP operates in two primary modes: Active Mode and Passive Mode.
- Active Mode: The FTP server initiates the data connection to the client for file transfers.
- Passive Mode: The client initiates both the control and data connections to the server.
3) Control and Data Channels:
- FTP uses two separate channels for communication: the control channel and the data channel.
- Control Channel: Handles commands, responses, and other control information between the client and server.
- Data Channel: Handles the actual file transfers and can be established in active or passive mode.
4) Commands and Responses:
- FTP uses a set of commands and responses to control file transfers and other operations.
- Common commands include FTP commands for listing directories, uploading files, downloading files, etc.
5) Authentication and Security:
- FTP supports various authentication mechanisms, including plain text, username-password authentication, and secure variants like FTPS (FTP Secure) which adds SSL/TLS encryption for secure file transfers.
6) File Operations:
- FTP allows a variety of file operations, including uploading files from the client to the server (put), downloading files from the server to the client (get), renaming files, deleting files, creating directories, and more.
7) FTP uses port 21 for the control channel (the channel used for commands and responses), and it establishes additional data connections on port 20 (Active Mode) or dynamically negotiated ports (Passive Mode) for file transfers.
Secure Shell (SSH)
TCP, Port: 22
Secure Shell (SSH) is a widely used network protocol that provides secure encrypted communication over a computer network. It is used primarily for remote access to shell accounts on various operating systems, allowing users to execute commands and manage files on a remote machine securely. SSH provides a secure alternative to traditional insecure remote protocols like Telnet and FTP.
- Secure Communication: SSH encrypts the communication between the client and the server, providing confidentiality and integrity of data during transmission.
- Authentication:
- SSH uses various authentication methods, including passwords, public key authentication, and more secure methods like multi-factor authentication (MFA).
- Public key authentication involves generating a key pair (public and private keys). The public key is placed on the server, and the private key is kept securely by the user. The private key is used for authentication.
- Encrypted Tunnels: SSH allows the creation of encrypted tunnels for secure communication, commonly used for port forwarding and secure access to other services (e.g., database connections) within a network.
- Remote Shell Access: SSH provides remote shell access (command-line interface) to a server, allowing users to execute commands, manage files, and perform administrative tasks on the remote machine.
- File Transfer: SSH can be used for secure file transfers using tools like Secure Copy (SCP) or SFTP (SSH File Transfer Protocol).
- Port Forwarding: SSH supports port forwarding, allowing secure access to services running on a remote machine, as if they were local services.
- Port Number: SSH typically uses port 22 for communication.
The Physical Layer of the OSI model
The Physical Layer is the first layer in the OSI (Open Systems Interconnection) model, providing the fundamental building blocks for network communication. It deals with the physical medium of data transmission and sets the rules and specifications for how raw data bits are transmitted over a network. The primary functions and characteristics of the Physical Layer include:
- Physical Medium:
- Defines the physical components used for data transmission, such as cables, switches, routers, network interface cards (NICs), and other physical devices.
- Specifies characteristics like voltage levels, data rates, signal modulation, and physical topologies (e.g., bus, star, ring).
- Physical Signaling:
- Defines how bits are encoded into electrical, optical, or radio signals for transmission over the physical medium.
- Specifies signal levels, waveforms, and modulation techniques used to represent digital data (0s and 1s) as physical signals.
- Bit Synchronization:
- Ensures that the sender and receiver are synchronized in terms of bit timing, allowing accurate interpretation of transmitted data.
- Transmission Modes: Specifies different transmission modes, such as simplex (one-way communication), half-duplex (communication in both directions, but only one at a time), and full-duplex (simultaneous two-way communication).
- Physical Topologies: Defines the arrangement of devices on the network, including point-to-point, bus, star, ring, and mesh topologies.
- Physical Addressing: Specifies the physical addressing scheme used to uniquely identify devices on the network, such as MAC (Media Access Control) addresses for Ethernet.
- Error Detection and Handling: Involves mechanisms to detect errors that may occur during data transmission and how to handle these errors for reliable communication.
Data Link Layer of the OSI Model
The Data Link Layer is the second layer in the OSI (Open Systems Interconnection) model, situated just above the Physical Layer. Its primary role is to provide reliable point-to-point and point-to-multipoint communication over a physical link or channel. The Data Link Layer is responsible for ensuring error-free transmission of data frames between directly connected nodes in a network. Key functions and features of the Data Link Layer include:
Frame Encapsulation:
Frames are used to encapsulate data packets received from the Network Layer (Layer 3). The Data Link Layer adds frame headers and trailers to the packet, providing structure for transmission over the physical medium.
Physical Addressing (MAC Addressing):
The Data Link Layer uses MAC (Media Access Control) addresses, also known as hardware addresses or physical addresses, to uniquely identify devices on a local network segment. MAC addresses are assigned to network interface cards (NICs) and enable frame delivery within a LAN.
Error Detection and Correction:
Implements error detection mechanisms to identify errors, such as CRC (Cyclic Redundancy Check), to ensure data integrity. Some implementations may also include error correction techniques.
Flow Control:
Controls the rate of data transmission between sender and receiver to avoid overwhelming the receiving device with data. Flow control mechanisms prevent congestion and buffer overflow.
Access Control:
Manages access to the physical medium to avoid collisions and conflicts in shared media environments. Protocols like CSMA/CD (Carrier Sense Multiple Access with Collision Detection) and CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) are often used.
Logical Link Control (LLC):
Provides flow control, acknowledgment, and error-checking functions, ensuring reliable data transmission between the sender and receiver.
Media Access Control (MAC):
Handles the addressing of frames, controlling access to the physical medium, and managing the data link layer interface with the physical layer.
Frame Addressing and Control:
Frame addressing includes source and destination MAC addresses, while frame control includes flags for frame synchronization, addressing information, and error detection.
The Data Link Layer is vital for communication between devices on a local network, especially in a LAN environment. It serves as a bridge between the Physical Layer (responsible for raw bit transmission) and the Network Layer (which focuses on end-to-end communication). By providing reliable communication between directly connected nodes, the Data Link Layer contributes to the overall reliability and efficiency of data transfer in a network.
Network Layer of the OSI Model
The Network Layer is the third layer in the OSI (Open Systems Interconnection) model, residing above the Data Link Layer and below the Transport Layer. The primary function of the Network Layer is to facilitate end-to-end communication between devices across different networks. It handles logical addressing, routing, and forwarding of data packets from the source to the destination across multiple network devices and subnets. Key functions and features of the Network Layer include:
Logical Addressing:
Assigns a unique logical address (e.g., IP address in the case of the Internet) to each device on the network. This addressing allows for routing and destination identification.
Routing:
Determines the optimal path for data packets to reach their intended destinations across multiple networks. Routers, the devices operating at the Network Layer, are responsible for making these routing decisions based on the destination address.
Forwarding:
Involves moving data packets from one router to the next along the chosen path toward the destination. Each router examines the packet’s destination address to determine the appropriate outgoing interface.
Packet Switching:
Utilizes packet switching techniques, where data is broken into smaller packets that are independently routed across the network. This allows for efficient utilization of network resources.
Congestion Control:
Monitors and manages network congestion to maintain optimal performance and prevent network degradation due to congestion or overload.
Fragmentation and Reassembly:
Handles packet fragmentation when data packets are too large to traverse a network link. The Network Layer is responsible for fragmenting and reassembling these packets at their destination.
Quality of Service (QoS):
Supports QoS mechanisms to prioritize and manage the quality of service for different types of traffic, ensuring better performance for critical applications.
Tunneling:
Enables the encapsulation of one type of network protocol within the packets of another protocol. This is commonly used for VPNs (Virtual Private Networks) and other network services.
The Network Layer plays a crucial role in enabling communication across diverse network topologies and technologies. It ensures that data packets are efficiently and reliably routed from the source to the destination, even when traversing multiple networks. By providing logical addressing and routing capabilities, the Network Layer enables a global communication infrastructure, allowing devices to communicate regardless of their physical locations on the network.
Transport Layer in the OSI Model
The Transport Layer is the fourth layer of the OSI (Open Systems Interconnection) model, situated above the Network Layer and below the Session Layer. Its primary purpose is to provide end-to-end communication between applications on different devices over a network. The Transport Layer ensures that data is reliably and accurately delivered between the source and destination by managing aspects such as error detection, flow control, and data segmentation. Key functions and features of the Transport Layer include:
Segmentation and Reassembly:
Breaks down data from the upper layers into smaller, manageable units called segments. This segmentation allows for efficient transmission over the network. At the receiving end, the Transport Layer reassembles these segments into complete data units.
Error Detection and Correction:
Implements error detection mechanisms to identify errors in segments and ensure data integrity. Error correction techniques may also be used to fix detected errors.
Flow Control:
Regulates the flow of data between the sender and receiver to prevent congestion and overwhelm the recipient. Flow control mechanisms ensure a smooth and steady flow of data.
Connection Management:
Establishes, maintains, and terminates connections between applications. The Transport Layer determines whether the communication will be connection-oriented (e.g., TCP) or connectionless (e.g., UDP).
Reliability:
Provides reliable data delivery by using acknowledgment mechanisms, retransmissions, and sequencing to ensure that data is received in the correct order and without loss.
Congestion Control:
Monitors and manages network congestion to maintain optimal performance and prevent network degradation due to congestion or overload.
Port Addressing:
Utilizes port numbers to identify the source and destination applications. Port numbers help direct data to the appropriate application on the receiving device.
Multiplexing and Demultiplexing:
Multiplexes data from multiple applications into a single network connection, and demultiplexes incoming data to the appropriate application.
The Transport Layer acts as an intermediary between the upper-layer application protocols and the lower-layer network protocols, ensuring smooth and reliable communication between applications running on different devices. Two common protocols associated with the Transport Layer are:
Transmission Control Protocol (TCP):
A connection-oriented protocol that guarantees reliable and ordered delivery of data between applications. TCP includes features such as acknowledgment, retransmission, and flow control.
User Datagram Protocol (UDP):
A connectionless protocol that offers faster but less reliable data transmission compared to TCP. UDP is commonly used for applications that prioritize speed over data integrity.
The Transport Layer is crucial for efficient and reliable communication in networked environments, providing a foundation for various applications to communicate effectively over the network.
Session Layer of the OSI Model
The Session Layer is the fifth layer of the OSI (Open Systems Interconnection) model, positioned above the Transport Layer and below the Presentation Layer. Its primary objective is to establish, manage, and terminate communication sessions between applications running on different devices across a network. A session represents a logical connection between applications, allowing them to exchange data in a structured and organized manner. Key functions and features of the Session Layer include:
Session Establishment and Termination:
Establishes and terminates communication sessions between applications, managing the setup and teardown of sessions to enable effective data exchange.
Session Maintenance:
Maintains and manages ongoing communication sessions, ensuring that data is exchanged in an organized and controlled manner.
Dialog Control:
Controls the dialog or conversation between applications by managing turn-taking, allowing applications to take turns in sending data and ensuring orderly communication.
Synchronization:
Synchronizes data exchange between applications, ensuring that data is transmitted and received in a coordinated and organized fashion.
Checkpointing and Recovery:
Implements mechanisms to enable the resumption of interrupted or failed sessions, allowing for recovery and continuation of data exchange.
Token Management:
Handles the assignment and management of tokens, which control access to shared resources during a communication session.
Named Pipes and Remote Procedure Calls (RPCs):
Supports the use of named pipes and remote procedure calls, allowing processes or applications on different devices to communicate as if they were on the same device.
The Session Layer plays a vital role in managing and coordinating the communication between applications, ensuring that data is transmitted in an organized and structured manner. It abstracts the lower-level transport and network complexities, providing a seamless communication experience for applications. The concepts and functionality of the Session Layer are often utilized in the development of network protocols and applications that require persistent communication or cooperation between multiple devices.
The Presentation Layer of the OSI Model
The Presentation Layer is the sixth layer of the OSI (Open Systems Interconnection) model, located above the Session Layer and below the Application Layer. The primary purpose of this layer is to ensure that data is presented in a format that can be easily interpreted by the receiving application. The Presentation Layer handles data representation, encoding, encryption, compression, and other aspects that facilitate the exchange of information between applications on different devices. Key functions and features of the Presentation Layer include:
Data Translation and Encryption:
Translates data from one format to another, ensuring that data from various sources can be understood by the receiving application. This layer may also handle encryption and decryption for secure communication.
Data Compression:
Compresses data to reduce bandwidth usage and improve transmission efficiency. Compression can be lossless (original data can be fully recovered) or lossy (some data is discarded during compression).
Data Formatting and Structure:
Formats data in a specific structure (e.g., XML, JSON) to ensure compatibility and interoperability between different systems.
Character Encoding and Translation:
Handles character encoding to ensure that text-based data is represented correctly in different character sets (e.g., ASCII, Unicode).
Syntax Processing:
Validates and verifies the syntax of the data being exchanged to detect any errors or inconsistencies.
Graphic and Image Handling:
Manages the translation, compression, and encryption of graphical and image data.
MIME (Multipurpose Internet Mail Extensions) Encoding:
Facilitates the encoding of multimedia content (e.g., images, audio, video) in email messages.
Data Integrity:
Implements mechanisms to ensure data integrity during transmission and reception.
The Presentation Layer abstracts the differences in data representation and ensures that applications can communicate without being concerned about the encoding, compression, or encryption methods used by the other end. It plays a critical role in enabling communication between diverse applications by standardizing data formats and ensuring that data can be accurately interpreted by the recipient.
Applications and services in the Application Layer can rely on the Presentation Layer to handle the intricacies of data representation, allowing for seamless and consistent communication across various devices and systems.
Application Layer of the OSI Model
The Application Layer is the topmost layer of the OSI (Open Systems Interconnection) model, responsible for providing a platform and interface for end-user applications to communicate over a network. This layer allows different software applications to communicate and exchange data with each other, regardless of the underlying hardware or network topology. Key functions and features of the Application Layer include:
Interface to User Applications:
Provides a platform for user applications to interact with the network. It offers various services and protocols that applications can use for communication.
Interprocess Communication:
Enables communication and data exchange between processes or applications running on different devices. It supports processes running on the same device or on different devices.
Data Exchange and Synchronization:
Facilitates the exchange of data between applications, including synchronization and coordination of data exchange processes.
Network Services and APIs (Application Programming Interfaces):
Offers a set of network services and APIs that allow applications to access the network’s capabilities and services. This includes protocols like HTTP, SMTP, FTP, etc.
File Transfer and Access:
Supports mechanisms for file transfer, file access, and directory services over a network.
Remote Access and Remote Procedure Calls (RPCs):
Enables remote access to files, devices, and applications over the network. Allows applications to invoke procedures or functions on remote devices.
Electronic Mail Services:
Provides services for email communication, allowing users to send, receive, and manage email messages.
Directory Services:
Enables applications to access and manage directory information services, such as LDAP (Lightweight Directory Access Protocol).
Distributed Information Services:
Supports distributed databases and information services, allowing applications to access and manage distributed data.
Presentation and GUI Services:
Provides services for the presentation of data and graphical user interface (GUI) interactions.
The Application Layer serves as a bridge between the underlying network services (Transport Layer and below) and the end-user applications. It allows applications to utilize network services and protocols to communicate, send and receive data, and perform various functions essential for their operation. Different applications, such as web browsers, email clients, file transfer clients, and other software, operate at this layer and use specific protocols to achieve their respective functions.
In summary, the Application Layer facilitates high-level communication and interaction between applications, enabling a wide array of services and functionalities that users expect from networked systems.
Telnet Protocol
TCP, Port: 23
Telnet, which stands for “teletype network,” is a network protocol that allows users to establish a remote terminal session and communicate with another computer or device over a network. It enables users to access and control a remote system as if they were physically present at that system’s terminal. Telnet provides a bidirectional interactive text-oriented communication facility using a virtual terminal connection.
Key features and aspects of the Telnet protocol include:
Remote Terminal Access:
Telnet enables a user to log in to a remote system and interact with it using a text-based terminal interface. Users can execute commands and run applications on the remote system as if they were using a local terminal.
Terminal Emulation:
Telnet supports different terminal emulation types, allowing the client-side terminal to mimic various types of physical terminals (e.g., VT100, VT220). This ensures compatibility with a wide range of systems and applications.
Protocol Port:
Telnet typically uses port 23 for communication between the client and the server. Port 23 is the well-known port number for Telnet services.
Clear Text Transmission:
Traditional Telnet operates in clear text, meaning the communication between the client and the server is not encrypted. This can pose security risks, especially when sensitive information, such as passwords, is transmitted.
Authentication:
Telnet usually requires a username and password for authentication to access the remote system. However, due to security concerns associated with clear text transmission, modern implementations often use more secure alternatives.
Use Cases:
Telnet is commonly used for remote administration, configuration, and troubleshooting of network devices and servers. It is also utilized for accessing text-based applications and services remotely.
Security Risks:
The use of Telnet in its traditional form poses significant security risks since the communication is susceptible to eavesdropping and interception, compromising sensitive data.
Secure Alternatives:
Due to security concerns, Secure Shell (SSH) has largely replaced Telnet for secure remote access. SSH encrypts the communication between the client and the server, providing a more secure method for remote administration.
In summary, Telnet is a protocol that allows users to access and control remote systems over a network. However, due to its lack of encryption and security vulnerabilities, it is often replaced by more secure alternatives like SSH for remote terminal access and administration.