{"id":1006,"date":"2025-12-27T16:14:39","date_gmt":"2025-12-27T08:14:39","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=1006"},"modified":"2025-12-27T16:14:39","modified_gmt":"2025-12-27T08:14:39","slug":"ping-%e7%ab%af%e5%8f%a3","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/27\/ping-%e7%ab%af%e5%8f%a3\/","title":{"rendered":"ping \u7aef\u53e3"},"content":{"rendered":"\n<p><strong><code>ping<\/code> \u4e0d\u80fd\u68c0\u6d4b\u7aef\u53e3<\/strong>\uff0c\u53ea\u80fd\u6d4b\u8bd5 <strong>\u4e3b\u673a\u662f\u5426\u53ef\u8fbe\uff08ICMP\uff09<\/strong>\u3002<br>\u5982\u679c\u4f60\u60f3\u201c<strong>ping \u67d0\u4e2a\u7aef\u53e3<\/strong>\u201d\uff0c\u4e0b\u9762\u662f<strong>\u6b63\u786e\u3001\u5b9e\u7528\u7684\u51e0\u79cd\u65b9\u5f0f<\/strong>\ud83d\udc47<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u4e3a\u4ec0\u4e48 <code>ping<\/code> \u4e0d\u80fd\u6d4b\u7aef\u53e3\uff1f<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nping 192.168.1.1\n\n<\/pre><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 \u6d4b\u7684\u662f <strong>IP \u662f\u5426\u5728\u7ebf<\/strong><\/li>\n\n\n\n<li>\u274c <strong>\u4e0d\u6d89\u53ca TCP \/ UDP \u7aef\u53e3<\/strong><\/li>\n\n\n\n<li>\u5373\u4f7f\u7aef\u53e3\u5173\u95ed\uff0c<code>ping<\/code> \u4e5f\u53ef\u80fd\u662f\u901a\u7684<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u771f\u6b63\u7684\u300c\u7aef\u53e3\u6d4b\u8bd5\u300d\u65b9\u6cd5\uff08\u6309\u7cfb\u7edf\uff09<\/h2>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u65b9\u6cd5 1\uff1a<code>telnet<\/code>\uff08\u6700\u7ecf\u5178\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntelnet 192.168.1.1 80\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u7ed3\u679c\u5224\u65ad<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2705 \u8fde\u4e0a\uff08\u9ed1\u5c4f\u6216 Connected\uff09\u2192 \u7aef\u53e3 <strong>\u5f00\u653e<\/strong><\/li>\n\n\n\n<li>\u274c Connection refused \/ timeout \u2192 <strong>\u7aef\u53e3\u5173\u95ed\u6216\u88ab\u9632\u706b\u5899\u62e6\u622a<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udccc \u6ca1\u6709 telnet\uff1f<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# Ubuntu \/ Debian\nsudo apt install telnet\n\n# macOS\nbrew install telnet\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u65b9\u6cd5 2\uff1a<code>nc<\/code>\uff08\u5f3a\u70c8\u63a8\u8350\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnc -vz 192.168.1.1 3306\n\n<\/pre><\/div>\n\n\n<p>\u53c2\u6570\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-v<\/code>\uff1a\u8be6\u7ec6\u8f93\u51fa<\/li>\n\n\n\n<li><code>-z<\/code>\uff1a\u53ea\u626b\u63cf\uff0c\u4e0d\u4f20\u6570\u636e<\/li>\n<\/ul>\n\n\n\n<p>\u8f93\u51fa\u793a\u4f8b\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nConnection to 192.168.1.1 3306 port &#x5B;tcp\/mysql] succeeded!\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u65b9\u6cd5 3\uff1a<code>curl<\/code>\uff08HTTP \u670d\u52a1\u4e13\u7528\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl http:\/\/192.168.1.1:8080\n\n<\/pre><\/div>\n\n\n<p>\u6216\u53ea\u6d4b\u8bd5\u8fde\u901a\u6027\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ncurl -I http:\/\/192.168.1.1:8080\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u65b9\u6cd5 4\uff1a<code>nmap<\/code>\uff08\u4e13\u4e1a\u626b\u63cf\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnmap -p 80,443,3306 192.168.1.1\n\n<\/pre><\/div>\n\n\n<p>\u5355\u7aef\u53e3\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnmap -p 8080 192.168.1.1\n\n<\/pre><\/div>\n\n\n<p>\ud83d\udccc \u8f93\u51fa\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nPORT     STATE SERVICE\n8080\/tcp open  http-proxy\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u65b9\u6cd5 5\uff1aWindows \u4e13\u7528\uff08PowerShell\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nTest-NetConnection 192.168.1.1 -Port 22\n\n<\/pre><\/div>\n\n\n<p>\u7b80\u5199\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntnc 192.168.1.1 -p 22\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u5e38\u89c1\u9519\u8bef\u5bf9\u7167\u8868<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u73b0\u8c61<\/th><th>\u542b\u4e49<\/th><\/tr><\/thead><tbody><tr><td>ping \u901a\uff0c\u7aef\u53e3\u4e0d\u901a<\/td><td>\u670d\u52a1\u6ca1\u542f\u52a8 \/ \u9632\u706b\u5899<\/td><\/tr><tr><td>Connection refused<\/td><td>\u7aef\u53e3\u5b58\u5728\u4f46\u6ca1\u76d1\u542c<\/td><\/tr><tr><td>timeout<\/td><td>\u9632\u706b\u5899\u62e6\u622a<\/td><\/tr><tr><td>curl \u65e0\u54cd\u5e94<\/td><td>Web \u670d\u52a1\u5f02\u5e38<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001Dify \/ Docker \u573a\u666f\u5feb\u901f\u81ea\u67e5\uff08\u4f60\u521a\u597d\u7528\u5f97\u5230\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# \u67e5\u770b\u7aef\u53e3\u76d1\u542c\nss -lntp | grep 80\n\n# Docker \u7aef\u53e3\u6620\u5c04\ndocker ps\n\n# \u6d4b Dify Web\nnc -vz localhost 80\ncurl http:\/\/localhost\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u6700\u7b80\u5355\u7ed3\u8bba\uff08\u8bb0\u4f4f\u8fd9\u4e2a\uff09<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u274c <code>ping<\/code> \u2260 \u6d4b\u7aef\u53e3<br>\u2705 <strong>\u7aef\u53e3 = telnet \/ nc \/ curl \/ nmap<\/strong><\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5982\u679c\u4f60\u662f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728 <strong>Docker \/ Dify \/ \u5185\u7f51\u670d\u52a1\u5668<\/strong><\/li>\n\n\n\n<li>\u6216 <strong>\u7aef\u53e3\u80fd ping \u4f46\u8bbf\u95ee\u4e0d\u4e86<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u628a <strong>IP + \u7aef\u53e3 + \u7cfb\u7edf<\/strong> \u53d1\u6211\uff0c\u6211\u76f4\u63a5\u5e2e\u4f60\u5b9a\u4f4d\u95ee\u9898 \ud83d\udd27<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ping \u4e0d\u80fd\u68c0\u6d4b\u7aef\u53e3\uff0c\u53ea\u80fd\u6d4b\u8bd5 \u4e3b\u673a\u662f\u5426\u53ef\u8fbe\uff08ICMP\uff09\u3002\u5982\u679c\u4f60\u60f3\u201cping &#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/27\/ping-%e7%ab%af%e5%8f%a3\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1006","post","type-post","status-publish","format-standard","hentry","category-12"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=1006"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1006\/revisions"}],"predecessor-version":[{"id":1007,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1006\/revisions\/1007"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=1006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=1006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=1006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}