打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
ping命令简单网络故障判断

新建文本文档.txt,黏贴以下内容,保存后重命名为ping排障.bat

cmd /c 'cls

@ECHO OFF

CLS

color 0a

::#################################################

goto MENU

:MENU

echo =-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=选择ping =-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=

echo.

echo. 1 ping网关 3 ping路由器 2 ping运营商 4 ping百度 5 ping以上所有地址

echo.

echo. 6 ping指定IP 0 退 出

echo.

set gatewayip=192.168.1.1

set routerip=10.10.1.1

set ispip=218.1.1.1

set /p ID=请输入选择项目的序号:

if '%id%'=='1' goto PINGGATEWAY

if '%id%'=='2' goto PINGROUTER

if '%id%'=='3' goto PINGISP

if '%id%'=='4' goto PINGBAIDU

if '%id%'=='5' goto PINGALL

if '%id%'=='6' goto PINGCUSTOM

if '%id%'=='0' exit

if not '%id%'=='0' goto MENU

::#################################################

:PINGGATEWAY

start cmd /k 'echo ping网关 && ping %gatewayip% /t'

goto MENU

::#################################################

:PINGROUTER

start cmd /k 'echo ping路由器 && ping %routerip% -t'

goto MENU

::#################################################

:PINGISP

start cmd /k 'echo ping运营商 && ping %ispip% -t'

goto MENU

::#################################################

:PINGBAIDU

start cmd /k 'echo ping百度 && ping www.baidu.com -t'

goto MENU

::#################################################

:PINGALL

start cmd /k 'echo ping百度 && ping www.baidu.com -t'

start cmd /k 'echo ping运营商 && ping %ispip% -t'

start cmd /k 'echo ping路由器 && ping %routerip% -t'

start cmd /k 'echo ping网关 && ping %gatewayip% /t'

goto MENU

::#######set /p='ping的网址为:'<nul 表示先显示ping的网址为,再把nul赋值给空变量##

:PINGCUSTOM

set /p='ping的网址为:'<nul

set /p id2=

start cmd /k 'ping %id2% /t'

goto MENU

::#################################################

'

注意:需要修改

set gatewayip=192.168.1.1 //你的网关

set routerip=10.10.1.1 //你的路由器或防火墙地址

set ispip=218.1.1.1 //你的公网地址

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
建立个O盘,隐藏你的好东东
bat 批处理命令 文件 类型 语法 格式 应用 详解 - 老地方 - 51CTO技术博客...
GRUB4DOS 通用模块之文件选择模块
批处理延时几例
玩的很无耻的电脑知识
WIN10状态栏启动秒BAT
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服