networking:mtu
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
networking:mtu [2025/10/03 18:42] – aperez | networking:mtu [2025/10/04 15:48] (current) – aperez | ||
---|---|---|---|
Line 44: | Line 44: | ||
- | ====== Pruebas de MTU y PMTU (ICMP + tracepath) ====== | ||
- | Esta sección documenta cómo validar MTU efectiva y Path MTU (PMTU) hacia Internet usando **ping** con *DF* y **tracepath**. | + | <note tip> |
+ | **MTU & PMTU Validation | ||
- | ===== 1) Verificación rápida con ICMP (Linux) ===== | + | Quick reference on how to confirm the effective MTU and Path MTU (PMTU) end-to-end. Use these tests when enabling jumbo frames or troubleshooting connectivity. |
- | **Objetivo: | + | ---- |
- | **Comando (debe responder):** | + | **1) ICMP Check with ping** |
+ | Command: | ||
<code bash> | <code bash> | ||
ping -M do -s 1472 8.8.8.8 | ping -M do -s 1472 8.8.8.8 | ||
- | </ | + | </ |
- | **Interpretación: | + | Expected output (OK, MTU 1500): |
- | * **OK:** respuestas ICMP sin “Frag needed” ⇒ MTU efectiva ≈ **1500**. | + | |
- | * **FAIL:** mensaje *“Frag needed”* o *“Message too long”* ⇒ hay un salto con MTU < 1500. | + | |
- | + | ||
- | **Ejemplo de salida (OK):** | + | |
< | < | ||
PING 8.8.8.8 (8.8.8.8) 1472(1500) bytes of data. | PING 8.8.8.8 (8.8.8.8) 1472(1500) bytes of data. | ||
- | 1480 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=8.06 ms | + | 1480 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=8.0 ms |
- | 1480 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=7.82 ms | + | 1480 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=7.9 ms |
--- 8.8.8.8 ping statistics --- | --- 8.8.8.8 ping statistics --- | ||
- | 2 packets transmitted, | + | 2 packets transmitted, |
- | </ | + | </ |
- | **Notas:** | + | 👉 If **1472 passes**, effective MTU ≈ **1500**. |
- | * Para encontrar el máximo exacto, prueba binario alrededor de 1472 (p. ej., 1473 falla, 1472 pasa). | + | 👉 If it fails (e.g., *Frag needed*), the link is forcing MTU <1500. |
- | | + | |
- | < | + | |
- | ping -f -l 1472 8.8.8.8 | + | |
- | </ | + | |
- | ===== 2) Descubrimiento de Path MTU con tracepath ===== | + | ---- |
- | **Objetivo:** ver el PMTU anunciado a lo largo de la ruta. | + | **2) Path MTU Discovery with tracepath** |
- | + | Command: | |
- | **Comando:** | + | |
<code bash> | <code bash> | ||
tracepath -n 8.8.8.8 | tracepath -n 8.8.8.8 | ||
- | </ | + | </ |
- | **Interpretación típica: | + | **Case A — Standard network |
- | * En redes estándar, verás **pmtu 1500** en los primeros saltos. | + | |
- | * Si tienes **jumbo end-to-end**, | + | |
- | * Si algún enlace reduce MTU, verás una caída (p. ej., de 9000 → 1500). | + | |
- | + | ||
- | **Ejemplo de salida | + | |
< | < | ||
- | 1: 192.168.1.1 | + | 1: 192.168.1.1 |
- | 1: 192.168.1.1 | + | 1: 192.168.1.1 |
- | 2: 10.10.10.1 | + | 2: 10.10.10.1 |
- | 3: 8.8.8.8 | + | 3: 8.8.8.8 |
| | ||
- | </ | + | </ |
- | **Ejemplo de salida | + | **Case B — Jumbo end-to-end |
< | < | ||
- | 1: 10.0.0.1 | + | 1: 10.0.0.1 |
- | 1: 10.0.0.1 | + | 1: 10.0.0.1 |
- | 2: 172.20.0.1 | + | 2: 172.20.0.1 |
- | 3: 8.8.8.8 | + | 3: 8.8.8.8 |
| | ||
- | </ | + | </ |
- | + | ||
- | ===== 3) Criterios de validación ===== | + | |
- | + | ||
- | ^ Prueba | + | |
- | | `ping -M do -s 1472` | Responde sin fragmentación | + | |
- | | `tracepath -n` | Muestra `pmtu 1500` (o tu jumbo real) | PMTU coherente en la ruta | | + | |
- | + | ||
- | ===== 4) Troubleshooting rápido ===== | + | |
- | + | ||
- | * **Falla a 1472** pero responde a 1464–1460 ⇒ algún enlace está forzando MTU < 1500 (p. ej., **1492** PPPoE). | + | |
- | * **Jumbo configurado localmente** pero `tracepath` marca `pmtu 1500` ⇒ un salto intermedio **no soporta** jumbo. | + | |
- | * **Firewalls** que bloquean *ICMP Fragmentation Needed* rompen PMTU: habilitar/ | + | |
+ | 👉 If you see **`pmtu 1500`**, the path is limited to standard frames. | ||
+ | 👉 If you see **`pmtu 9000`** (or similar), jumbo frames are preserved across the path. | ||
+ | 👉 If it drops (e.g., 9000 → 1500 mid-path), a hop does not support jumbo. | ||
+ | ---- | ||
+ | **Validation summary** | ||
+ | ^ Test ^ Expected outcome | ||
+ | | `ping -M do -s 1472` | Successful reply ⇒ effective MTU ≈ 1500 | | ||
+ | | `tracepath -n` | Reports PMTU 1500 (standard) or 9000 (jumbo)| | ||
+ | </ | ||
---- | ---- | ||
Line 172: | Line 156: | ||
+ | ---- | ||
+ | |||
+ | > **Note: PMTU and PMTUD (Path MTU / Path MTU Discovery)** | ||
+ | |||
+ | The *Path Maximum Transmission Unit (PMTU)* is the **largest IP packet size that can travel end-to-end without fragmentation**. | ||
+ | It is determined by the **smallest MTU along the entire path**. | ||
+ | |||
+ | Example: | ||
+ | * Link 1: MTU = 9000 | ||
+ | * Link 2: MTU = 1500 | ||
+ | * Link 3: MTU = 1400 | ||
+ | → **PMTU = 1400 bytes** | ||
+ | |||
+ | --- | ||
+ | |||
+ | **Path MTU Discovery (PMTUD): | ||
+ | A dynamic mechanism to discover the PMTU using the **DF (Don’t Fragment)** bit. | ||
+ | |||
+ | Steps: | ||
+ | - Source sends a large packet with DF=1. | ||
+ | - If a router cannot forward due to its MTU, it discards the packet and replies with ICMP *Fragmentation Needed* (Type 3, Code 4). | ||
+ | - The source reduces the size until it learns the **real PMTU**. | ||
+ | |||
+ | --- | ||
+ | |||
+ | **Verification on Linux**:: | ||
+ | |||
+ | ping -M do -s 1472 8.8.8.8 | ||
+ | → If it replies: path supports 1500 (1472+28 headers). | ||
+ | → If it fails: PMTU is smaller. | ||
+ | |||
+ | tracepath -n 8.8.8.8 | ||
+ | → Displays estimated PMTU along the route. | ||
+ | |||
+ | --- | ||
+ | |||
+ | **Common pitfalls** | ||
+ | * Blocking ICMP → breaks PMTUD (TCP sessions may hang). | ||
+ | * Tunnel/VPN overhead → reduces MTU (e.g., IPSec 1500 → ~1400). | ||
+ | * Misconfigured Jumbo Frames → one 1500 hop breaks 9000 end-to-end. | ||
+ | |||
+ | --- | ||
+ | |||
+ | **In summary: | ||
+ | * **PMTU** = max packet size without fragmentation. | ||
+ | * **PMTUD** = process to dynamically discover it using ICMP + DF. | ||
Line 282: | Line 312: | ||
+ | {{ : | ||
- | + | {{pdfjs 46em >: | |
---- | ---- | ||
---- | ---- |
networking/mtu.1759534972.txt.gz · Last modified: 2025/10/03 18:42 by aperez