![Pingen Sie mehr als 56 Bytes auf macOS](https://rvso.com/image/1606696/Pingen%20Sie%20mehr%20als%2056%20Bytes%20auf%20macOS.png)
Ich verwende macOS und pinge über das Terminal. Wie kann ich mehr als 56 Bytes pingen? Ich habe gesucht, konnte die Antwort aber nicht finden.
Antwort1
ping -s
Größe Gastgeber
ping -s 1472 target.example.com
Ich habe 1472 als Beispiel angegeben, da dies bei typischen Headerlängen ein einzelnes Paket voller Größe ohne Fragmentierung erstellt.
Weitere Informationen zu den ping(1)
Optionen des Befehls erhalten Sie auf der Manualpage mit dem Befehl man ping
im Terminal.
Antwort2
Es hängt vom Host ab, den Sie anpingen
mbp ~ % ping -s 1400 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 1400 data bytes
76 bytes from 8.8.8.8: icmp_seq=0 ttl=117 time=12.969 ms
wrong total length 96 instead of 1428
76 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=12.342 ms
wrong total length 96 instead of 1428
^C
mbp ~ % ping -s 1400 bbc.co.uk
PING bbc.co.uk (151.101.64.81): 1400 data bytes
1408 bytes from 151.101.64.81: icmp_seq=0 ttl=59 time=10.415 ms
1408 bytes from 151.101.64.81: icmp_seq=1 ttl=59 time=12.601 ms
Im obigen Beispiel antwortet 8.8.8.8 nicht mit dem vollständigen Paket, bbc.co.uk jedoch schon.
Sie erhalten ein ähnliches Verhalten unter Linux, nur statt
wrong total length 96 instead of 1428
du erhältst
truncated
gleiches Beispiel unter Linux:
E520:~$ ping -s 1400 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 1400(1428) bytes of data.
76 bytes from 8.8.8.8: icmp_seq=1 ttl=117 (truncated)
76 bytes from 8.8.8.8: icmp_seq=2 ttl=117 (truncated)
E520:~$ ping -s 1400 bbc.co.uk
PING bbc.co.uk (151.101.192.81) 1400(1428) bytes of data.
1408 bytes from 151.101.192.81 (151.101.192.81): icmp_seq=1 ttl=59 time=8.27 ms
1408 bytes from 151.101.192.81 (151.101.192.81): icmp_seq=2 ttl=59 time=8.36 ms