惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Full Disclosure
WordPress大学
WordPress大学
小众软件
小众软件
Cloudbric
Cloudbric
AWS News Blog
AWS News Blog
腾讯CDC
量子位
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
Scott Helme
Scott Helme
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Hacker News
The Hacker News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
Jina AI
Jina AI
Attack and Defense Labs
Attack and Defense Labs
S
SegmentFault 最新的问题
Simon Willison's Weblog
Simon Willison's Weblog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
博客园 - 【当耐特】
Google Online Security Blog
Google Online Security Blog
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
罗磊的独立博客
L
LINUX DO - 最新话题
博客园 - Franky
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
The Last Watchdog
The Last Watchdog
J
Java Code Geeks
AI
AI
C
Cisco Blogs
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
博客园 - 三生石上(FineUI控件)
雷峰网
雷峰网
Help Net Security
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
I
Intezer
S
Securelist

Ittavern.com

Wimage - Hosting Open-Source Image Uploader with Podman and external S3 Storage Switching from Hugo to picopaper Encryption using SSH Keys with age in Linux ETag in nginx - Simple Resource Caching Sending nginx Logs to Loki with Grafana Alloy How to: Cisco ISE backup to SFTP repository with public key authentication Dummy IP & MAC Addresses for Documentation & Sanitization Deploying ISSO Commenting System for Static Content using Docker Generate a Vanity v3 Hidden Service Onion Address with mkp224o ssh-audit Primer - Audit your SSH Server mtr - More Detailed Traceroute - Network Troubleshooting My Personal Backup Strategy - August 2024 iperf3 - User Authentication with Password and RSA Public Keypair Adding a trash can to Linux with trash-cli Bandwidth Measurement using netcat on Linux Getting started with rsync - Comprehensive Guide Cron Jobs on Linux - Comprehensive Guide with Examples SSH Server Hardening Guide v2 Port Knocking with knockd and Linux - Server Hardening Getting started with rclone - Data transmission Getting started with dig - DNS troubleshooting Getting started with Fail2Ban on Linux Getting started with netcat on Linux with examples URL explained - The Fundamentals Troubleshooting Asking The Right Questions Create tmux layouts using bash scripts Getting started with tcpdump - Ittavern.com Curl on Linux - Reference Guide Getting started with nmap scripts My Offsite Backup - March 2023 Getting started with iperf3 - Network Troubleshooting Simulate an unreliable network connection with tc and netem on Linux Detecting Rogue DHCP Server - Ittavern.com Basics of the Linux Bash Command History with Examples Getting started with GNU screen - Beginners Guide Basics of Power over Ethernet (PoE) Difference between RSS and Atom SSH Troubleshooting Guide - Ittavern.com Backup Guide - how to secure crucial data SSH - run script or command at login Linux - unmount a busy target safely Visual guide to SSH tunneling and port forwarding Guide to Wireshark display filters Online Security Guide - Ittavern.com My IT EDC tool kit v2212 10 prompts - 1000 AI generated images - openAI Dall-E SSH - How to use public key authentication on Linux Ways to support open-source projects Getting started with nmap - Ittavern.com nginx - simple and native authentication function Linux - How to work with complex commands EICAR test file - riskless method to test your antivirus and firewall solution Linux - connect to a serial port with screen Podman / Docker - expose port only to the localhost of the host machine Tmux - reload .tmux.conf configuration file My use cases for CyberChef Nginx - simple permanent or temporary redirects Getting started with tmux - Ittavern.com Tmux - synchronize the input of all panes within a window Nginx - check your public IP CyberChef - How to remove empty lines
ICMP echo requests on Linux and Windows - Reference Guide
2023-03-05 · via Ittavern.com

Just as a heads-up, this is going to be a quick reference guide for the use of the ICMP echo request - or better known as PING. I have to look up some options multiple times a week, so I thought it is beneficial to write it up in a post like this. I might add more options at some point, but those are the most important ones in my experience.

In a nutshell: ICMP echo requests can be used to check the reachability of two hosts on layer 3. This is indispensable in any troubleshooting session if the network is involved.

Side note: All Linux references should work on MacOS too.

Simple ping without any options

Linux:
ping 10.10.20.1

Results


kuser@pleasejustwork:~$ ping 10.10.20.1
PING 10.10.20.1 (10.10.20.1) 56(84) bytes of data.
64 bytes from 10.10.20.1: icmp_seq=1 ttl=255 time=0.594 ms
64 bytes from 10.10.20.1: icmp_seq=2 ttl=255 time=0.489 ms
64 bytes from 10.10.20.1: icmp_seq=3 ttl=255 time=0.501 ms
64 bytes from 10.10.20.1: icmp_seq=4 ttl=255 time=0.504 ms
64 bytes from 10.10.20.1: icmp_seq=5 ttl=255 time=0.534 ms
^C
--- 10.10.20.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4075ms
rtt min/avg/max/mdev = 0.489/0.524/0.594/0.037 ms
Windows - Cmd Line:
ping 10.10.20.1

Results

C:\Users\windows-sucks>ping 10.10.20.1

Pinging 10.10.20.1 with 32 bytes of data:
Reply from 10.10.20.1: bytes=32 time<1ms TTL=255
Reply from 10.10.20.1: bytes=32 time<1ms TTL=255
Reply from 10.10.20.1: bytes=32 time<1ms TTL=255
Reply from 10.10.20.1: bytes=32 time<1ms TTL=255

Ping statistics for 10.10.20.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
Windows - Powershell - Test-Connection:
Test-Connection 10.10.20.1

Side note: this will take longer. The internet says it takes longer since the output is a Win32_PingStatus object you can work with. You can get a quick True or False with the -Quiet argument.

Side note: Not all options are available for PS 5.1. You can check your current version with $PSVersionTable.PSVersion.

Results

PS C:\Users\windows-sucks> Test-Connection -Computername 10.10.20.1

Source        Destination     IPV4Address      IPV6Address                              Bytes    Time(ms)
------        -----------     -----------      -----------                              -----    --------
DESKTOP-GP... 10.10.20.1                                                                32       0
DESKTOP-GP... 10.10.20.1                                                                32       0
DESKTOP-GP... 10.10.20.1                                                                32       0
DESKTOP-GP... 10.10.20.1                                                                32       0
Notable Mention: Windows - Powershell 5.1+ - Test-NetConnection:
Test-NetConnection 10.10.20.1 / tnc 10.10.20.1
Test-NetConnection can be abbreviated with tnc

Test-NetConnection on only suited for ping requests without any options. I'll write about Test-Connection in the rest of the post since it offers more options.

Results

PS C:\Users\windows-sucks> Test-NetConnection 10.10.20.1                                                                                                                                                       ComputerName           : 10.10.20.1
RemoteAddress          : 10.10.20.1
InterfaceAlias         : Ethernet
SourceAddress          : 10.10.20.54
PingSucceeded          : True
PingReplyDetails (RTT) : 0 ms

Continuous ping requests #

Linux:
continuous pings by default
Windows - Cmd Line:
/t or -t
Can be interrupted with CTRL + c
Windows - Powershell 7.2+ - Test-Connection:
-Repeat

Number of ping requests #

Sets the number of pings

Linux:
-c NUMBER
Default is continuous ping
Windows - Cmd Line:
/n NUMBER / -n NUMBER
Default is 4
Windows - Powershell 5.1+ - Test-Connection:
-Count NUMBER
Default is 4

Using a specific interface #

Linux:
-I INTERFACE-NAME
just use the name of the specific interface you want to use
Windows - Cmd Line:
-S SOURCE-IP
you have to choose the IP of the interface to use it for a ping

domain name resolution #

You get results faster if you can avoid domain name resolution.

Linux:
does the name resolution by default. Use -n to avoid it
-n
Windows - Cmd Line:
check IP for domain name
/a / -a

Avoid output / quiet mode #

Linux:
-q
only shows the start and end summary
Windows - Cmd Line:
ping 10.10.20.2 > nul 2>&1
no output at all
Windows - Powershell 5.1+ - Test-Connection:
-Quiet
Just outputs True / False

Add timestamp #

Linux:
-D
adds the timestamp in front of it in the UNIX format.
Windows:
haven't found an option. There are multiple ways with bash scripting

Packet Size #

Linux:
-s NUMBER
data bytes. The default is 56 bytes + 8 bytes ICMP header data.
Windows - Cmd Line:
/l NUMBER / -l NUMBER
data bytes. The default is 32 bytes + 8 bytes ICMP header data. Max is 65527.
Windows - Powershell 5.1+ - Test-Connection:
-BufferSize NUMBER
data bytes. The default is 32 bytes + 8 bytes ICMP header data.

TTL / Time to live #

Sets the IP Time to live!

Linux:
-t NUMBER
Windows - Cmd Line:
/i NUMBER / -i NUMBER
Windows - Powershell 5.1+ - Test-Connection:
-MaxHops NUMBER
default is 128

Sets "Don't Fragment" bit #

Sets the DF flag in the IP header.

Linux:
-M hint
Windows - Cmd Line:
/f / -f
Windows - Powershell 7.2+ - Test-Connection:
-DontFragment

IP Protocol 4 or 6 #

Linux:
-4 # IPv4
-6 # IPv6
Windows - Cmd Line:
/4 / -4 # IPv4
/6 / -6 # IPv6
Windows - Powershell 7.2+ - Test-Connection:
-IPv4 # IPv4
-IPv6 # IPv6