Vai al contenuto

ping - Network Connectivity Testing

Traduzione: Copia tutti i comandi Traduzione: Generare PDF < > Comandi ping completi e test di connettività di rete su Windows, Linux e macOS. ## Uso di base ### Connettività semplice Test | | Platform | Command | Description | | | --- | --- | --- | | | **All** | `ping hostname` | Basic connectivity test | | | | **All** | `ping 8.8.8.8` | Test with Google DNS | | | | **All** | `ping google.com` | Test with domain name | | ### Differenze Piattaforma-Specifiche | | Feature | Windows | Linux/macOS | | | --- | --- | --- | | | **Default count** | 4 packets | Continuous | | | | **Stop continuous** | N/A | Ctrl+C | | | | **IPv6** | `ping -6` | `ping6` or `ping -6` | | ## Opzioni avanzate ### Conteggio e Timing dei pacchetti | | Platform | Command | Description | | | --- | --- | --- | | | **Windows** | `ping -n 10 hostname` | Send 10 packets | | | | **Linux/macOS** | `ping -c 10 hostname` | Send 10 packets | | | | **Windows** | `ping -t hostname` | Continuous ping | | | | **Linux/macOS** | `ping hostname` | Continuous (default) | | ### Dimensione del pacchetto e Intervallo | | Platform | Command | Description | | | --- | --- | --- | | | **Windows** | `ping -l 1024 hostname` | Set packet size to 1024 bytes | | | | **Linux/macOS** | `ping -s 1024 hostname` | Set packet size to 1024 bytes | | | | **Windows** | `ping -w 5000 hostname` | Timeout in milliseconds | | | | **Linux/macOS** | `ping -W 5 hostname` | Timeout in seconds | | | | **Linux/macOS** | `ping -i 2 hostname` | 2-second interval between packets | | ### Prova avanzata | | Platform | Command | Description | | | --- | --- | --- | | | **All** | `ping -f hostname` | Flood ping (requires root on Linux/macOS) | | | | **Linux/macOS** | `ping -D hostname` | Print timestamp | | | | **Linux/macOS** | `ping -a hostname` | Audible ping | | | | **Windows** | `ping -a hostname` | Resolve hostname to IP | | ## Supporto IPv6 ### Comandi IPv6 Ping | | Platform | Command | Description | | | --- | --- | --- | | | **Windows** | `ping -6 hostname` | IPv6 ping | | | | **Linux** | `ping6 hostname` | IPv6 ping (traditional) | | | | **Linux** | `ping -6 hostname` | IPv6 ping (modern) | | | | **macOS** | `ping6 hostname` | IPv6 ping | | ### Esempi di IPv6 Traduzione: ## Diagnostica di rete ### MTU Discovery | | Platform | Command | Description | | | --- | --- | --- | | | **Windows** | `ping -f -l 1472 hostname` | Test MTU (don't fragment) | | | | **Linux/macOS** | `ping -M do -s 1472 hostname` | Test MTU (don't fragment) | | ### Test di rotta Traduzione: ## Risoluzione dei problemi ### Questioni e soluzioni comuni | | Problem | Symptoms | Solution | | | --- | --- | --- | | | **Request timeout** | No response | Check firewall, network connectivity | | | | **Destination unreachable** | ICMP error | Check routing, DNS resolution | | | | **Permission denied** | Flood ping fails | Use sudo/administrator privileges | | | | **Name resolution failed** | Unknown host | Check DNS settings | | ### Comandi diagnostici Traduzione: ## Analisi delle prestazioni ### Interpretazione statistica | | Metric | Description | Good Value | | | --- | --- | --- | | | **RTT (Round Trip Time)** | Time for packet round trip | < 50ms local, < 200ms internet | | | | **Packet Loss** | Percentage of lost packets | 0% ideal, < 1% acceptable | | | | **Jitter** | Variation in RTT | < 10ms | | ### Monitoraggio continuo Traduzione: ## Scrittura e automazione ### Bash Scripting Esempi Traduzione: ### Esempi PowerShell Traduzione: ## Considerazioni di sicurezza ### Firewall e ICMP - Molti firewall bloccano il traffico ICMP - Alcune reti disabilitano le risposte ping - Utilizzare strumenti alternativi se ping è bloccato ### Limitamento del tasso - Evitare le tubazioni di inondazione sulle reti di produzione - Rispetto delle politiche di rete e dei limiti di tasso - Utilizzare intervalli appropriati per il monitoraggio ## Migliori Pratiche ### Test di rete 1. **Start Simple**: Iniziare con ping di base agli host noti 2. **Test Layers**: Test IP, quindi DNS, quindi applicazione 3. ** Risultati del documento**: Tenere registri dei test di rete 4. **Utilizzare obiettivi multipli**: testare varie destinazioni 5. **Consider Time**: Le prestazioni della rete variano di volta in volta ### Monitoraggio 1. **Baseline**: Stabilire metriche di prestazioni normali 2. **Alerting**: Impostare gli avvisi per la perdita di pacchetti o ad alta latenza 3. **Trending**: Tracciare le prestazioni nel tempo 4. **Correlazione**: Correlate con altre metriche di rete 5. **Documentazione**: topologia della rete di documenti e prestazioni previste