This commit is contained in:
JMARyA 2024-06-02 20:43:53 +02:00
parent d2a058b56d
commit 2f3f94c40f
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
11 changed files with 119 additions and 21 deletions

View file

@ -19,7 +19,7 @@ To run an iPerf client, use the following command:
iperf -c <server_ip_address>
```
Replace `<server_ip_address>` with the IP address of the machine running the iPerf server. This will start an iPerf client that sends data to the server and measures the bandwidth and speed of the network.
Replace `<server_ip_address>` with the [IP](../../internet/Internet%20Protocol.md) address of the machine running the iPerf server. This will start an iPerf client that sends data to the server and measures the bandwidth and speed of the network.
By default, iPerf uses TCP as the transport protocol. If you want to use UDP instead, you can add the `-u` option to the iPerf command:
```shell

View file

@ -4,7 +4,7 @@ website: https://adguard.com/en/adguard-home/overview.html
---
# AdGuard
AdGuard Home is a network-wide software for blocking ads & tracking. It exposes a [DNS](../../internet/DNS.md) server and works similiarly to PiHole. You can also define custom [domain](../../internet/Domain.md) to IP mappings.
AdGuard Home is a network-wide software for blocking ads & tracking. It exposes a [DNS](../../internet/DNS.md) server and works similiarly to PiHole. You can also define custom [domain](../../internet/Domain.md) to [IP](../../internet/Internet%20Protocol.md) mappings.
## Docker Compose
```yml

View file

@ -10,7 +10,7 @@ Get an insight into the inner-workings of a given website: uncover potential att
## Features
### IP Info
An IP address (Internet Protocol address) is a numerical label assigned to each device connected to a network / the internet. The IP associated with a given [domain](../internet/Domain.md) can be found by querying the Domain Name System ([DNS](../internet/DNS.md)) for the [domain](../internet/Domain.md)'s A (address) record.
An IP address ([Internet Protocol](../internet/Internet%20Protocol.md) address) is a numerical label assigned to each device connected to a network / the internet. The IP associated with a given [domain](../internet/Domain.md) can be found by querying the Domain Name System ([DNS](../internet/DNS.md)) for the [domain](../internet/Domain.md)'s A (address) record.
**Use Cases**:
Finding the IP of a given server is the first step to conducting further investigations, as it allows us to probe the server for additional info. Including creating a detailed map of a target's network infrastructure, pinpointing the physical location of a server, identifying the hosting service, and even discovering other domains that are hosted on the same IP address.

View file

@ -9,4 +9,4 @@ extension: "torrent"
# BitTorrent
[BitTorrent](https://www.bittorrent.org/) is a communication protocol for peer-to-peer file sharing (P2P), which enables users to distribute data and electronic files over the Internet in a decentralized manner.
Users on the BitTorrent Network are not anonymous, because everyones IP address is known. To torrent anonymously one can use the [I2P](I2P.md) Network with i2psnark.
Users on the BitTorrent Network are not anonymous, because everyones [IP](Internet%20Protocol.md) address is known. To torrent anonymously one can use the [I2P](I2P.md) Network with i2psnark.

View file

@ -5,11 +5,11 @@ rfc: https://datatracker.ietf.org/doc/html/rfc2131
---
# Dynamic Host Configuration Protocol
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to automate the assignment of IP addresses and other network configuration parameters to devices on a network. DHCP simplifies the process of configuring devices on a network by providing a centralized mechanism for dynamic IP address allocation.
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to automate the assignment of [IP](Internet%20Protocol.md) addresses and other network configuration parameters to devices on a network. DHCP simplifies the process of configuring devices on a network by providing a centralized mechanism for dynamic [IP](Internet%20Protocol.md) address allocation.
## Key Components
### 1. DHCP Server
A DHCP server is a network device responsible for assigning IP addresses and other configuration parameters to DHCP clients. It maintains a pool of available IP addresses and leases them to clients on a temporary basis.
A DHCP server is a network device responsible for assigning [IP](Internet%20Protocol.md) addresses and other configuration parameters to DHCP clients. It maintains a pool of available [IP](Internet%20Protocol.md) addresses and leases them to clients on a temporary basis.
### 2. DHCP Client
A DHCP client is a device (computer, printer, etc.) that requests network configuration information from a DHCP server. The client typically sends a DHCP discover message to locate available DHCP servers on the network.
@ -17,21 +17,21 @@ A DHCP client is a device (computer, printer, etc.) that requests network config
## DHCP Process
1. **DHCP Discover**: When a device is connected to a network, it broadcasts a DHCP discover message to identify available DHCP servers.
2. **DHCP Offer**: DHCP servers respond with a DHCP offer message, providing the client with an IP address and other configuration parameters.
3. **DHCP Request**: The client selects one of the offered IP addresses and sends a DHCP request message to the chosen server.
4. **DHCP Acknowledge**: The selected DHCP server responds with a DHCP acknowledge message, confirming the allocation of the requested IP address and providing additional configuration details.
5. **IP Lease Period**: The DHCP server assigns an IP address to the client for a specific lease period. The client must renew its lease before expiration to retain the IP address.
2. **DHCP Offer**: DHCP servers respond with a DHCP offer message, providing the client with an [IP](Internet%20Protocol.md) address and other configuration parameters.
3. **DHCP Request**: The client selects one of the offered [IP](Internet%20Protocol.md) addresses and sends a DHCP request message to the chosen server.
4. **DHCP Acknowledge**: The selected DHCP server responds with a DHCP acknowledge message, confirming the allocation of the requested [IP](Internet%20Protocol.md) address and providing additional configuration details.
5. **IP Lease Period**: The DHCP server assigns an [IP](Internet%20Protocol.md) address to the client for a specific lease period. The client must renew its lease before expiration to retain the [IP](Internet%20Protocol.md) address.
## DHCP Configuration Parameters
DHCP servers can provide various configuration parameters, including:
- **IP Address**: The primary network identifier assigned to the device.
- **Subnet Mask**: Defines the network's subnetwork structure.
- **Default Gateway**: Specifies the router that connects the local network to other networks.
- **Domain Name System ([DNS](DNS.md)) Servers**: Identifies the servers responsible for translating [domain](Domain.md) names into IP addresses.
- **Domain Name**: Provides the domain name associated with the assigned IP address.
- **Lease Duration**: The period for which the IP address is allocated to the client.
- **Domain Name System ([DNS](DNS.md)) Servers**: Identifies the servers responsible for translating [domain](Domain.md) names into [IP](Internet%20Protocol.md) addresses.
- **Domain Name**: Provides the domain name associated with the assigned [IP](Internet%20Protocol.md) address.
- **Lease Duration**: The period for which the [IP](Internet%20Protocol.md) address is allocated to the client.
## DHCP Security Considerations
- **Rogue DHCP Servers**: Unauthorized DHCP servers can cause network disruptions. Implementing DHCP snooping can help mitigate this risk.
- **IP Address Exhaustion**: Regularly monitoring and managing the IP address pool prevents exhaustion and ensures efficient resource utilization.
- **IP Address Exhaustion**: Regularly monitoring and managing the [IP](Internet%20Protocol.md) address pool prevents exhaustion and ensures efficient resource utilization.
- **Man-in-the-Middle Attacks**: Using DHCP secure protocols, such as DHCPv6 Secure Neighbour Discovery (SEND), helps protect against man-in-the-middle attacks.

View file

@ -6,7 +6,7 @@ rev: 2024-03-14
---
# Domain Name System
The Domain Name System (DNS) is a hierarchical and distributed naming system that translates human-readable [domain](Domain.md) names into IP addresses, facilitating the mapping of hostnames to IP addresses on the internet. DNS plays a crucial role in making web browsing and various internet services accessible by allowing users to interact with websites using easy-to-remember [domain](Domain.md) names instead of numeric IP addresses.
The Domain Name System (DNS) is a hierarchical and distributed naming system that translates human-readable [domain](Domain.md) names into [IP](Internet%20Protocol.md) addresses, facilitating the mapping of hostnames to [IP](Internet%20Protocol.md) addresses on the internet. DNS plays a crucial role in making web browsing and various internet services accessible by allowing users to interact with websites using easy-to-remember [domain](Domain.md) names instead of numeric [IP](Internet%20Protocol.md) addresses.
## Components of DNS
### 1. **Domain Name Space:**
@ -32,8 +32,8 @@ The Domain Name System (DNS) is a hierarchical and distributed naming system tha
1. **User Input:** A user enters a domain name into a web browser.
2. **Local DNS Resolver:** The user's device queries a local DNS resolver (usually provided by the ISP).
3. **Recursive Query:** If the local resolver doesn't have the information, it recursively queries the root DNS servers, then TLD servers, and finally the authoritative DNS server for the specific [domain](Domain.md).
4. **Response:** The authoritative DNS server responds with the IP address associated with the requested [domain](Domain.md).
5. **Caching:** The resolved IP address is cached at various levels to speed up future requests for the same [domain](Domain.md).
4. **Response:** The authoritative DNS server responds with the [IP](Internet%20Protocol.md) address associated with the requested [domain](Domain.md).
5. **Caching:** The resolved [IP](Internet%20Protocol.md) address is cached at various levels to speed up future requests for the same [domain](Domain.md).
## DNS Security
DNS plays a crucial role in internet security, and various measures are in place to protect against attacks, including:

View file

@ -5,7 +5,7 @@ rfc: https://datatracker.ietf.org/doc/html/rfc1035
---
# Domain
A domain is a human-readable label used to identify a location or an entity on the internet. It serves as a memorable way to reference specific resources, such as websites, servers, or services, rather than relying on numerical IP addresses.
A domain is a human-readable label used to identify a location or an entity on the internet. It serves as a memorable way to reference specific resources, such as websites, servers, or services, rather than relying on numerical [IP](Internet%20Protocol.md) addresses.
Domain names are formed by the rules and procedures of the Domain Name System ([DNS](DNS.md)). Any name registered in the [DNS](DNS.md) is a domain name. Domain names are organized in subordinate levels (subdomains) of the [DNS](DNS.md) root domain, which is nameless. The first-level set of domain names are the top-level domains (TLDs), including the generic top-level domains (gTLDs), such as the prominent domains com, info, net, edu, and org, and the country code top-level domains (ccTLDs). Below these top-level domains in the [DNS](DNS.md) hierarchy are the second-level and third-level domain names that are typically open for reservation by end-users who wish to connect local area networks to the Internet, create other publicly accessible Internet resources or run web sites.

View file

@ -0,0 +1,98 @@
---
obj: concept
aliases: ["IP"]
wiki: https://en.wikipedia.org/wiki/Internet_Protocol
rfc: https://datatracker.ietf.org/doc/html/rfc791
---
# Internet Protocol (IP)
The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet.
IP has the task of delivering packets from the source host to the destination host solely based on the IP addresses in the packet headers. For this purpose, IP defines packet structures that encapsulate the data to be delivered. It also defines addressing methods that are used to label the datagram with source and destination information.
IP was the connectionless datagram service in the original Transmission Control Program introduced by Vint Cerf and Bob Kahn in 1974, which was complemented by a connection-oriented service that became the basis for the Transmission Control Protocol ([TCP](TCP.md)). The Internet protocol suite is therefore often referred to as TCP/IP.
The first major version of IP, Internet Protocol version 4 (IPv4), is the dominant protocol of the Internet. Its successor is Internet Protocol version 6 (IPv6), which has been in increasing deployment on the public Internet since around 2006.[1]
Function
Encapsulation of application data carried by [UDP](UDP.md) to a link protocol frame
The Internet Protocol is responsible for addressing host interfaces, encapsulating data into datagrams (including fragmentation and reassembly) and routing datagrams from a source host interface to a destination host interface across one or more IP networks.[2] For these purposes, the Internet Protocol defines the format of packets and provides an addressing system.
Each datagram has two components: a header and a payload. The IP header includes a source IP address, a destination IP address, and other metadata needed to route and deliver the datagram. The payload is the data that is transported. This method of nesting the data payload in a packet with a header is called encapsulation.
IP addressing entails the assignment of IP addresses and associated parameters to host interfaces. The address space is divided into subnets, involving the designation of network prefixes. IP routing is performed by all hosts, as well as routers, whose main function is to transport packets across network boundaries. Routers communicate with one another via specially designed routing protocols, either interior gateway protocols or exterior gateway protocols, as needed for the topology of the network.
# IPv4
Internet Protocol version 4 (IPv4) is the first version of the Internet Protocol (IP) as a standalone specification. It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version deployed for production on SATNET in 1982 and on the ARPANET in January 1983. It is still used to route most Internet traffic today, even with the ongoing deployment of Internet Protocol version 6 (IPv6), its successor.
## Addressing
IPv4 uses 32-bit addresses which limits the address space to 4294967296 ($2^{32}$) addresses.
IPv4 reserves special address blocks for private networks (224+220+21618 million addresses) and multicast addresses (228268 million addresses).
IPv4 addresses may be represented in any notation expressing a 32-bit integer value. They are most often written in dot-decimal notation, which consists of four octets of the address expressed individually in decimal numbers and separated by periods.
For example, the quad-dotted IP address in the illustration (`172.16.254.1`) represents the 32-bit decimal number 2886794753, which in hexadecimal format is 0xAC10FE01.
CIDR notation combines the address with its routing prefix in a compact format, in which the address is followed by a slash character (/) and the count of leading consecutive 1 bits in the routing prefix (subnet mask).
### Special-use addresses
The Internet Engineering Task Force (IETF) and IANA have restricted from general use various reserved IP addresses for special purposes. Notably these addresses are used for multicast traffic and to provide addressing space for unrestricted uses on private networks.
**Special address blocks**:
| Address block | Address range | Numberof <br>addresses | Scope | Description |
| ------------------ | --------------------------- | ------------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 0.0.0.0/8 | 0.0.0.00.255.255.255 | 16777216 | Software | Current (local, "this") network |
| 10.0.0.0/8 | 10.0.0.010.255.255.255 | 16777216 | Private network | Used for local communications within a private network |
| 100.64.0.0/10 | 100.64.0.0100.127.255.255 | 4194304 | Private network | Shared address space for communications between a service provider and its subscribers when using a carrier-grade NAT |
| 127.0.0.0/8 | 127.0.0.0127.255.255.255 | 16777216 | Host | Used for loopback addresses to the local host |
| 169.254.0.0/16 | 169.254.0.0169.254.255.255 | 65536 | Subnet | Used for link-local addresses between two hosts on a single link when no IP address is otherwise specified, such as would have normally been retrieved from a [DHCP](DHCP.md) server |
| 172.16.0.0/12 | 172.16.0.0172.31.255.255 | 1048576 | Private network | Used for local communications within a private network |
| 192.0.0.0/24 | 192.0.0.0192.0.0.255 | 256 | Private network | IETF Protocol Assignments, DS-Lite (/29) |
| 192.0.2.0/24 | 192.0.2.0192.0.2.255 | 256 | Documentation | Assigned as TEST-NET-1, documentation and examples |
| 192.88.99.0/24 | 192.88.99.0192.88.99.255 | 256 | Internet | Reserved. Formerly used for IPv6 to IPv4 relay (included IPv6 address block `2002::/16`). |
| 192.168.0.0/16 | 192.168.0.0192.168.255.255 | 65536 | Private network | Used for local communications within a private network |
| 198.18.0.0/15 | 198.18.0.0198.19.255.255 | 131072 | Private network | Used for benchmark testing of inter-network communications between two separate subnets |
| 198.51.100.0/24 | 198.51.100.0198.51.100.255 | 256 | Documentation | Assigned as TEST-NET-2, documentation and examples |
| 203.0.113.0/24 | 203.0.113.0203.0.113.255 | 256 | Documentation | Assigned as TEST-NET-3, documentation and examples |
| 224.0.0.0/4 | 224.0.0.0239.255.255.255 | 268435456 | Internet | In use for multicast (former Class D network) |
| 233.252.0.0/24 | 233.252.0.0233.252.0.255 | 256 | Documentation | Assigned as MCAST-TEST-NET, documentation and examples (Note that this is part of the above multicast space.) |
| 240.0.0.0/4 | 240.0.0.0255.255.255.254 | 268435455 | Internet | Reserved for future use (former Class E network) |
| 255.255.255.255/32 | 255.255.255.255 | 1 | Subnet | Reserved for the "limited broadcast" destination address |
### Private networks
Of the approximately four billion addresses defined in IPv4, about 18 million addresses in three ranges are reserved for use in private networks. Packets addresses in these ranges are not routable in the public Internet; they are ignored by all public routers. Therefore, private hosts cannot directly communicate with public networks, but require network address translation at a routing gateway for this purpose.
**Reserved private IPv4 network ranges**:
| Name | CIDR block | Address range | Number of addresses | Classful description |
| ------------ | -------------- | ----------------------------- | ------------------- | -------------------------------------- |
| 24-bit block | 10.0.0.0/8 | 10.0.0.0 10.255.255.255 | 16777216 | Single Class A |
| 20-bit block | 172.16.0.0/12 | 172.16.0.0 172.31.255.255 | 1048576 | Contiguous range of 16 Class B blocks |
| 16-bit block | 192.168.0.0/16 | 192.168.0.0 192.168.255.255 | 65536 | Contiguous range of 256 Class C blocks |
### Loopback
The class A network `127.0.0.0` (classless network `127.0.0.0/8`) is reserved for loopback. IP packets whose source addresses belong to this network should never appear outside a host. Packets received on a non-loopback interface with a loopback source or destination address must be dropped.
# IPv6
Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion, and was intended to replace IPv4.
## Addressing
IPv6 addresses have 128 bits. The design of the IPv6 address space implements a different design philosophy than in IPv4, in which subnetting was used to improve the efficiency of utilization of the small address space. In IPv6, the address space is deemed large enough for the foreseeable future, and a local area subnet always uses 64 bits for the host portion of the address, designated as the interface identifier, while the most-significant 64 bits are used as the routing prefix. While the myth has existed regarding IPv6 subnets being impossible to scan, RFC 7707 notes that patterns resulting from some IPv6 address configuration techniques and algorithms allow address scanning in many real-world scenarios.
The 128 bits of an IPv6 address are represented in 8 groups of 16 bits each. Each group is written as four hexadecimal digits (sometimes called hextets or more formally hexadectets and informally a quibble or quad-nibble) and the groups are separated by colons (`:`). An example of this representation is `2001:0db8:0000:0000:0000:ff00:0042:8329`.
For convenience and clarity, the representation of an IPv6 address may be shortened with the following rules:
- One or more leading zeros from any group of hexadecimal digits are removed, which is usually done to all of the leading zeros. For example, the group `0042` is converted to `42`. The group `0000` is converted to `0`.
- Consecutive sections of zeros are replaced with two colons (`::`). This may only be used once in an address, as multiple use would render the address indeterminate. RFC 5952 requires that a double colon not be used to denote an omitted single section of zeros.
An example of application of these rules:
- Initial address: `2001:0db8:0000:0000:0000:ff00:0042:8329`.
- After removing all leading zeros in each group: `2001:db8:0:0:0:ff00:42:8329`.
- After omitting consecutive sections of zeros: `2001:db8::ff00:42:8329`.
The loopback address `0000:0000:0000:0000:0000:0000:0000:0001` is defined in RFC 5156 and is abbreviated to `::1` by using both rules.
As an IPv6 address may have more than one representation, the IETF has issued a proposed standard for representing them in text.
Because IPv6 addresses contain colons, and URLs use colons to separate the host from the port number, RFC2732 specifies that an IPv6 address used as the host-part of a [URL](URL.md) should be enclosed in square brackets, e.g. http://[2001:db8:4006:812::200e] or http://[2001:db8:4006:812::200e]:8080/path/page.html.

View file

@ -16,6 +16,6 @@ layer.
| 6 | Presentation | SSL/TLS, [ASCII](../files/ASCII.md) |
| 5 | Session | Sockets |
| 4 | Transport | [TCP](TCP.md), [UDP](UDP.md), [QUIC](QUIC.md) |
| 3 | Network | IP, ICMP |
| 3 | Network | [IP](Internet%20Protocol.md), ICMP |
| 2 | Data Link | MAC, ARP |
| 1 | Physical | RJ45, WLAN, Bluetooth |

View file

@ -5,7 +5,7 @@ rfc: https://datatracker.ietf.org/doc/html/rfc9293
---
# TCP
The Transmission Control Protocol (TCP) is one of the core protocols of the Internet Protocol (IP) suite. It operates at the transport layer and provides reliable, connection-oriented communication between devices on a network. TCP ensures the ordered and error-checked delivery of data, making it suitable for applications where accuracy and reliability are paramount.
The Transmission Control Protocol (TCP) is one of the core protocols of the [Internet Protocol](Internet%20Protocol.md) (IP) suite. It operates at the transport layer and provides reliable, connection-oriented communication between devices on a network. TCP ensures the ordered and error-checked delivery of data, making it suitable for applications where accuracy and reliability are paramount.
## Key Characteristics
### 1. **Connection-Oriented:**

View file

@ -5,7 +5,7 @@ rfc: https://datatracker.ietf.org/doc/html/rfc768
---
# UDP
The User Datagram Protocol (UDP) is a connectionless transport layer protocol in the Internet Protocol (IP) suite. Unlike Transmission Control Protocol ([TCP](TCP.md)), UDP does not establish a connection before sending data and does not guarantee the delivery of data. Instead, it provides a simple and lightweight mechanism for transmitting data quickly.
The User Datagram Protocol (UDP) is a connectionless transport layer protocol in the [Internet Protocol](Internet%20Protocol.md) (IP) suite. Unlike Transmission Control Protocol ([TCP](TCP.md)), UDP does not establish a connection before sending data and does not guarantee the delivery of data. Instead, it provides a simple and lightweight mechanism for transmitting data quickly.
## Key Characteristics
### 1. **Connectionless:**