# L3

* [IPv4 Packet](#ipv4-packet)
* [IPv6 Packet](#ipv6-packet)
  * [Header](#header)
* [Protocol](#protocol)
* [DB](#db)

## IPv4 Packet

<https://en.wikipedia.org/wiki/Internet\\_Protocol\\_version\\_4> ![](https://upload.wikimedia.org/wikipedia/commons/6/60/IPv4_Packet-en.svg)

## IPv6 Packet

<https://en.wikipedia.org/wiki/IPv6>

* An IPv6 packet has two parts: a header and payload. ![](https://upload.wikimedia.org/wikipedia/commons/6/6e/IPv6_packet.svg)

### Header

Extension headers: The IPv6 packet header has a minimum size of 40 octets (320 bits). Options are implemented as extensions. ![](https://upload.wikimedia.org/wikipedia/commons/9/9a/IPv6_headers_sequence-en.svg) ![](https://upload.wikimedia.org/wikipedia/commons/a/ab/Ipv6_header.svg)

## Protocol

<https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml>

* IPv4\[[RFC791](https://www.iana.org/go/rfc791)]: "Protocol" field, 8 bit
* IPv6\[[RFC8200](https://www.iana.org/go/rfc8200)]: "Next Header" field

## DB

v4/v6 ASN/Country/API: <https://networksdb.io/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.ferro.pro/nw/l3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
