3. Networks Flashcards

1
Q

What is IP and TCP, and what is the difference?

A

IP (Internet Protocol):
* IP stands for Internet Protocol.
* It is a network layer protocol that provides the addressing and routing of data packets across a network.
* IP is responsible for delivering data packets from the source device to the destination device.
* It assigns unique IP addresses to devices on a network.
* IP is connectionless, which means it does not establish a dedicated connection before sending data.

TCP (Transmission Control Protocol):
* TCP stands for Transmission Control Protocol.
* It is a transport layer protocol that provides reliable, ordered, and error-checked delivery of data packets.
* TCP breaks data into smaller segments and reassembles them at the destination.
* It ensures that all data packets are delivered without errors and in the correct order.
* TCP establishes a connection between the source and destination before transmitting data.
*
Difference between IP and TCP:
IP is a network layer protocol, while TCP is a transport layer protocol.
IP handles the addressing and routing of data packets, while TCP ensures reliable and ordered delivery of those packets.
IP is connectionless, while TCP is connection-oriented.
IP operates at a lower level in the network stack compared to TCP.
IP is responsible for the logical addressing of devices, while TCP focuses on data stream management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Is a TCP segment encapsulated in an IP packet, or vice versa?

A

A TCP segment is encapsulated within an IP packet.

The TCP segment is the data structure used by the TCP protocol to transmit data.
The IP packet is the data structure used by the IP protocol to transmit data across networks.
When data is transmitted using TCP, the TCP segment containing the data is encapsulated within an IP packet.
The TCP segment is nested within the IP packet and carries the actual data being transmitted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How many bits are there in an IP address, and how is the address usually written?

A

32 bits for IPv4 (& 128 bits for IPv6)

IPv4 (Internet Protocol version 4):
* IPv4 addresses are written in the format of four sets of numbers separated by periods (dots).
* Each set contains a value from 0 to 255, representing 8 bits of the IP address.
* For example: 192.168.0.1

IPv6 (Internet Protocol version 6):
* IPv6 addresses are written in the format of eight sets of hexadecimal numbers separated by colons.
* Each set contains four hexadecimal digits, representing 16 bits of the IP address.
* For example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a subnet?

A

A subnet (subnetwork) is a smaller division of an IP network. It allows for the segmentation and organization of IP addresses within a larger network.

  • A subnet is created by taking a range of IP addresses from a larger network and dividing it into smaller, more manageable sections.
  • Subnetting helps improve network performance, security, and management by logically grouping devices into smaller subnetworks.
  • Each subnet has its own unique subnet mask, which determines the range of IP addresses that belong to that subnet.
  • Subnets can be used to separate devices into different logical groups, such as departments or physical locations within an organization.
  • Subnetting enables efficient utilization of IP addresses by allocating them only where they are needed, reducing IP address wastage.
  • Subnets can be connected and communicate with each other through routers or other networking devices.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the difference between Classful and Classless Addressing?

A

Classful Addressing:
* Classful addressing is the original method used for IP addressing before the introduction of classless addressing.
* In classful addressing, IP addresses were divided into fixed and predefined classes: Class A, Class B, and Class C.
* The class of an IP address was determined by the range of the first few bits of the address.
* Each class had a fixed network portion and host portion, with Class A having a large network range and fewer hosts, and Class C having a smaller network range and more hosts.
* Classful addressing assumed a uniform allocation of IP addresses, which led to inefficient usage of IP address space.

Classless Addressing:
* Classless addressing, also known as Classless Inter-Domain Routing (CIDR), is a more flexible method of IP addressing that replaced classful addressing.
* In classless addressing, the IP address space is not rigidly divided into fixed classes.
* IP addresses are represented with a subnet mask, which allows for variable-length subnetting (VLSM) and more efficient allocation of IP addresses.
* Classless addressing allows for the allocation of IP addresses in arbitrary-sized blocks, based on the specific needs of a network.
* CIDR notation is used in classless addressing to represent IP addresses with their associated subnet masks, using the format IP address/subnet mask.

Difference between Classful and Classless Addressing:
* Classful addressing relies on fixed and predefined classes, while classless addressing allows for variable-length subnetting.
* Classful addressing has rigid divisions of IP address space, while classless addressing offers more flexibility in allocating IP addresses.
* Classful addressing is less efficient in utilizing IP address space, while classless addressing allows for more efficient allocation and conservation of IP addresses.
* Classful addressing uses classes to determine network and host portions, while classless addressing uses subnet masks to define the network and host portions of an IP address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is NAT, and what is its purpose?

A

NAT (Network Address Translation) is a networking technique used to translate IP addresses between different networks. Its purpose is to enable communication between devices with private IP addresses and the internet.

  • NAT allows devices with private IP addresses, typically used within local networks, to access the internet using a single public IP address.
  • It acts as a gateway between the private network and the public internet.
  • When a device from the private network wants to communicate with the internet, NAT translates the private IP address to the public IP address before forwarding the traffic.
  • NAT also performs the reverse translation by translating the public IP address back to the appropriate private IP address when the response traffic is received.
  • This translation process helps conserve public IP addresses, as multiple devices within a local network can share a single public IP address.
  • NAT enhances network security by hiding the private IP addresses from the external internet, making it more difficult for malicious actors to target specific devices.
  • It enables the use of IPv4 addressing despite the limited availability of public IPv4 addresses.
  • NAT can be implemented using different techniques, such as static NAT, dynamic NAT, or Network Address Port Translation (NAPT) also known as Port Address Translation (PAT).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is IPv6, and what is it good for?

A

IPv6 (Internet Protocol version 6) is an updated version of the Internet Protocol that succeeds IPv4. It was developed to address the limitations of IPv4 and accommodate the growing number of devices connected to the internet.

IPv6 offers a larger address space, improved network efficiency, enhanced security features, and better support for the growing number of connected devices, making it essential for the continued development and expansion of the internet.

  • IPv6 uses 128-bit addresses, providing a significantly larger address space compared to the 32-bit addresses used in IPv4.
  • With its expanded address space, IPv6 supports a virtually unlimited number of unique IP addresses, allowing for the growing number of devices and users on the internet.
  • IPv6 includes features that improve network efficiency and performance, such as simplified header structure and more efficient routing.
  • It provides built-in support for features like auto-configuration, which simplifies the process of assigning IP addresses to devices on a network.
  • IPv6 includes built-in security features, such as IPsec (Internet Protocol Security), which enhances data privacy and integrity.
  • IPv6 supports multicasting more effectively, making it easier to send data to multiple devices simultaneously.
  • The transition from IPv4 to IPv6 is underway to meet the increasing demand for IP addresses. Both IPv4 and IPv6 can coexist in a network during the transition phase.
  • IPv6 adoption is crucial for the future growth of the internet and to ensure connectivity for the expanding number of devices, particularly with the rise of Internet of Things (IoT) devices.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of the three-way handshake in TCP?

A

The three-way handshake in TCP (Transmission Control Protocol) serves the purpose of establishing a reliable and mutually agreed-upon connection between two devices before they can start exchanging data.

SYN (Synchronize):
* The initiating device (client) sends a SYN packet to the receiving device (server) to initiate a connection request.
* The SYN packet contains a random sequence number to start the session.

SYN-ACK (Synchronize-Acknowledge):
* Upon receiving the SYN packet, the receiving device responds with a SYN-ACK packet.
* The SYN-ACK packet acknowledges the receipt of the SYN packet and sends its own SYN packet back.
* The SYN-ACK packet includes an incremented sequence number and an acknowledgment number (acknowledging the initial SYN packet).

ACK (Acknowledgment):
* The initiating device receives the SYN-ACK packet and responds with an ACK packet.
* The ACK packet acknowledges the receipt of the SYN-ACK packet.
* The ACK packet includes an incremented acknowledgment number.

Purpose of the three-way handshake:
* Ensures that both devices are ready and willing to establish a connection before data transmission begins.
* Synchronizes the sequence number and acknowledgment number for reliable data transfer.
* Establishes initial parameters, such as window size, for flow control.
* Verifies the availability and responsiveness of the receiving device (server).
* Establishes a reliable connection that provides error checking and data integrity through subsequent TCP transmissions.

The three-way handshake in TCP establishes a reliable connection by ensuring synchronization, acknowledgement, and agreement between the initiating and receiving devices before data transmission commences.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is ICMP?

A

ICMP (Internet Control Message Protocol) is a network protocol that operates at the network layer of the Internet Protocol Suite. It is used for various network management and troubleshooting purposes.

  • ICMP is primarily used for reporting errors, diagnostic messages, and providing feedback about network conditions.
  • It is implemented as a protocol within the IP suite and is closely associated with IP.
  • ICMP messages are encapsulated within IP packets and typically sent in response to certain network events or requests.
  • ICMP provides functionality for several key operations, including:
    1. Error reporting: ICMP messages are used to report errors encountered during packet transmission, such as unreachable destinations or time exceeded.
    1. Network diagnostics: ICMP messages, such as “ping,” are commonly used to test network connectivity and measure round-trip time (RTT).
    1. Router and network congestion notification: ICMP messages like “source quench” can be sent by routers to inform a sender to reduce transmission rate due to congestion.
    1. Path MTU (Maximum Transmission Unit) discovery: ICMP messages help determine the maximum packet size that can be transmitted without fragmentation along a network path.
  • ICMP does not establish connections or transport application data but rather provides support services and feedback for IP-based communication.
  • ICMP messages are identified by their specific message types and codes, which indicate the purpose and nature of the message.
  • ICMP plays a crucial role in network troubleshooting, monitoring, and diagnostic tools.

ICMP is a network protocol used for reporting errors, diagnostic purposes, and providing feedback in IP-based networks. It helps with network troubleshooting, error reporting, and various network management functions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a port?

A

A port is a communication endpoint in a network. It is used to identify specific processes or services running on a device.
It identifies the destination within a machine.

  • A port is a numeric value that is part of the addressing information used to identify a specific application or service.
  • Ports are associated with IP addresses to enable communication between different applications or services on a network.
  • Ports are categorized into two types: TCP (Transmission Control Protocol) ports and UDP (User Datagram Protocol) ports.
  • TCP ports are used for reliable, connection-oriented communication, while UDP ports are used for connectionless, datagram-based communication.
  • Ports are represented by a 16-bit number, ranging from 0 to 65535.
  • Well-known ports are standardized and assigned to specific services by the Internet Assigned Numbers Authority (IANA). Examples include port 80 for HTTP (Hypertext Transfer Protocol) and port 22 for SSH (Secure Shell).
  • Registered ports are used by applications or services that are not well-known but have been registered with the IANA.
  • Dynamic or ephemeral ports are used by the operating system to assign temporary ports to outgoing network connections.
  • The combination of an IP address and a port number forms a socket, which is a unique address for a specific network communication.
  • Ports facilitate the multiplexing and demultiplexing of network traffic, allowing multiple applications to use the same IP address for communication.

A port is a numeric value that identifies a specific application or service within a device. Ports enable communication between different applications by associating them with specific IP addresses on a network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly