dd-wrt.com wiki 有一个页面获取路由器 IP。它说使用 arp 命令。从该页面:
如果您仍然没有收到响应,则 IP 地址可能已更改为默认值。断开所有其他机器与路由器的连接,并在命令窗口中运行 arp 以找出 IP 地址:
arp -a
Run Code Online (Sandbox Code Playgroud)
即使路由器与您的计算机位于不同的子网上,您也应该收到来自路由器的响应。如果您收到了响应,输出将为您提供路由器的 IP 地址。发现路由器的 IP 地址后,更改计算机的 IP 地址以匹配路由器的子网,如上所述。您现在应该能够 ping 路由器并收到响应。
dd-wrt.com wiki 也有一份详尽的指南,似乎适合您的情况。从坏闪存中恢复。
它涵盖的第一个路由器是 WRT54G/GL/GS,但在进入路由器的细节之前,它说:
要确定路由器是否变砖,请仔细按照孔雀线程注释 6 中的步骤进行操作:
孔雀线程常见问题解答: 你需要知道的一切!真的!!
我将从 Peacock Thread-FAQ 粘贴到我的答案中,以防链接在未来停止工作,但整个帖子有很多好的信息。看来您应该从这一部分开始:
具体来说,这里是查看您是否有砖并需要jtag(或使用串行电缆)的步骤:
它会告诉您要 ping 的标准 IP 地址以及如果不成功如何重置。
Peacock Thread-FAQ 的开头是这样的:
我将其称为 peacock 线程,以便可以轻松搜索。它包含大量信息,因此您需要仔细阅读。
....
该线程中的信息是最新的,无论该线程的发布日期如何。本帖不断修改。
如何重置在帖子的注释 1 中,您需要查看论坛中的帖子(我正在检查海报以查看他们是否可以比此处的链接更多)。
祝你好运。
我得到了帖子作者的同意,可以在此处复制信息,因此,如果您使用底部的第 6 步确认路由器已变砖,则需要按照注释 1 中的说明进行硬重置。
硬重置后,您可以继续从不良闪存帖子中恢复WRT54GS 的具体说明。
Peacock Thread-FAQ:您需要知道的一切!真的!!
作者:Murrkf
注 1:在更改 DD-WRT 固件版本之前和之后进行硬重置。
这并不意味着按下重置按钮并说您已完成。这意味着进行 30-30-30 重置。要进行 30-30-30 重置,您必须在路由器通电的情况下按下重置按钮。在路由器通电的情况下保持 30 秒。仍然握住它,拉电源线 30 秒。仍然按住它,将电源重新插入路由器并继续按住重置按钮 30 秒以上。您将按住按钮整整 90 秒而不松开。
硬重置通常不适用于库存固件!
注意:无论如何进行硬重置,WRT54GS v1.1、GS v2 和 GS2.1 型号都可能会变砖。请参阅此线程和 Vulcan 帖子中的解决方案:http ://www.dd-wrt.com/phpBB2/viewtopic.php?t=45024
注意:WRT320N 有一个故障复位按钮。请参阅有关使用 WPS 按钮擦除 nvram 的帖子:http ://www.dd-wrt.com/phpBB2/viewtopic.php?t = 63004
注 2:华硕 RT-N16 重置按钮将其置于固件恢复模式。有关如何重置此路由器,请参阅 RT-N16 wiki。
在安装 DD-WRT 后完成此操作后,如果当您尝试在 192.168.1.1 处登录路由器时,dd-wrt webgui 没有要求您更改密码(假设您正在执行硬重置)在 2008 年 6 月 14 日 9707 之后的 dd-wrt 版本上,当引入了自动重新配置密码时)您没有正确完成硬重置。
未能进行硬重置和未能在闪烁后等待是两个最常见的 NOOB 错误,导致他们陷入不必要的 dd-wrt 痛苦世界!这不是一个次要的可选步骤。固件将信息写入 Nvram。此步骤清除该信息。如果您没有正确清除它,部分旧信息会与新固件一起存在,这可能会使其无法正常运行。不要偷工减料。在升级之前执行此操作非常重要;硬重置不仅适用于升级后。
硬重置不会从您的路由器中删除 dd-wrt!
现在路由器已重置,您可以继续从错误的闪存帖子中恢复WRT54GS 的具体说明。
路由器正面的 LED 显示屏是确定您拥有的砖块类型及其恢复方法的最佳方式。您至少应该检查一下以防止不必要地打开路由器。
当 Web 界面不再可用时,请先关闭路由器(拔下电源插孔)并从设备上拔下所有网线。几秒钟后,您重新启动 WRT54G。现在注意闪烁的 LED。
选项一:使用 JTAG 恢复方法
选项二:如果您通过 TFTP 刷新固件,可能仍然使用以太网电缆进行恢复
选项三可以通过执行硬重置来修复。
选项一:使用 TFTP 恢复
请注意,如果您已经安装并运行了 DD-WRT,并且您在此页面上是因为要恢复路由器固件,则需要先破解 DD-WRT!
telnet 进入路由器,执行:
mtd erase linux(这让我的 Buffalo WHR-HP-GN 变砖了!不要做 mtd erase linux!)重启
(注意:仅在带有 24preSP2 的 WNDR3300 上测试;YMMV)
在启动期间,路由器将暂停以接受通过 tftp 上传的临时固件。在 Linksys WRT54G 路由器上,您需要刷写包含“W54G”标头的映像(Linksys 和 mini_wrt54g 映像)
如果 ping 192.168.1.1 不起作用,请检查您计算机的 IP 地址并确保它在路由器 IP 的子网中分配了一个 IP 地址。为简单起见,您可以假设“192.168.1.x”是好的。如果您没有一个好的 IP,DHCP 服务器可能无法工作。因此,将您的 IP 手动设置为 192.168.1.77,并将 192.168.1.1 作为网关,然后再次尝试 ping 路由器。最后,您可能希望使用网络扫描仪来扫描您的网络(较小的网络),以确保您的路由器没有分配到另一个 IP。
通过在命令窗口中运行的连续 ping 打开路由器电源:
ping -t -w 2 192.168.1.1
Run Code Online (Sandbox Code Playgroud)
-w 2 参数强制 ping 应答的超时时间较短,这使得从砖砌路由器获得应答变得更容易。
您应该至少会看到一些来自 192.168.1.1 的回复。这样做几次以确保。如果是这样,您很有可能会简单恢复。如果您仍然没有收到响应,则 IP 地址可能不是 192.168.1.1。您应该尝试获取路由器的 IP 地址。特别是如果以前的固件将 boot_wait 变量设置为 on,路由器在启动期间暂停的时间甚至比正常情况更长,以接受恢复闪存。您需要做的就是在此时间段内通过 TFTP 为其提供固件。
准备好您的 PC、固件文件和 TFTP 软件,并在接通电源后(或在您开始看到 ping 回复时)调整开机和启动 TFTP 会话的时间。如果您尝试多次(至少 10 次),您可能会毫不费力地拯救路由器!
如果您看到来自路由器的“密码无效”提示,则引导加载程序不接受 TFTP 映像并且固件拒绝 TFTP 上传。您可以通过在启动路由器时按住重置按钮来强制引导加载程序接受 TFTP 上传。您还可以通过确保 PC 和路由器之间有一个交换机或集线器来提高成功率,在路由器重启时保持链接状态。
DrayTek 路由器工具 - OS X/Windows:该程序只需按一下按钮即可运行所有那些烦人的 TFTP 命令。只需从此处下载并安装 DrayTek 路由器工具并按照说明操作:ftp : //ftp.draytek.com/tools/Router_Tools/
Windows:Microsoft Windows 包含一个 TFTP 客户端。Windows Vista 将要求您在“程序和功能”中启用它。使用 TFTP,所有有关传输的信息都在初始设置期间指定;与标准 FTP 相比,几乎没有客户端/服务器交互。
如果路由器在 ping 时没有响应,或者电源指示灯闪烁,请先使用 arp -s 命令。
此命令允许将 IP 地址附加到设备的唯一 MAC(或物理地址)。MAC地址出现在贴在设备底部的标签上,是一个12进制的长数字,看起来像aabbccddeeff。该数字必须按如下方式输入:aa-bb-cc-dd-ee-ff,用破折号分隔数字对。
请注意,首先要安装的固件的大小必须小于 3 MB。之后,可以使用路由器的 WEB 界面安装更大的固件。但是,也有一些例外;WRT54GL 的 Linksys 默认固件为 3.2MB,可与 TFTP 配合使用。
在以下示例中,我们假设您的路由器 IP 地址为 192.168.1.1。
在开始之前,请确认:
使用 Microsoft Windows 刷新路由器:
然后输入以下命令:
arp -s 192.168.1.1 aa-bb-cc-dd-ee-ff ping 192.168.1.1 tftp -i 192.168.1.1 PUT code.bin code.bin
ping 的正确响应意味着路由器仍处于活动状态,但电源指示灯闪烁。
tftp 程序不会在上传时为您提供状态更新,它会在最后返回“传输成功”或失败消息。传输可能需要 15 秒或更长时间,在此期间 LAN 状态 LED 将以与电源 LED 大致相同的速度闪烁。要有耐心,在它完成之前不要打断它。
固件上传后,等待大约三分钟,直到电源指示灯停止闪烁。此时,路由器应该可以运行。
OS X: OS X 包含一个 TFTP 客户端,如下所述,但其成功率会有所不同,尤其是当您收到“无效密码!!!” 错误。然而,MacTechnologies 的 MacTFTP 客户端进行了第一次尝试。只需确保指定密码(通常是“admin”的默认密码)并等待传输完成。
Linux:大多数 Linux 发行版要么包含 tftp 客户端,要么在其软件包中提供。本示例使用 atftp。
atftp --option "mode octet" --verbose -p -l code.bin 192.168.1.1
Run Code Online (Sandbox Code Playgroud)
对于 OS X 和 Linux 用户,我建议打开终端窗口并输入以下命令。
tftp 192.168.1.1
binary
rexmt 1
timeout 60
trace
Run Code Online (Sandbox Code Playgroud)
毕竟是那种类型(但不要按回车键)
put firmwarefile.bin
Run Code Online (Sandbox Code Playgroud)
插入路由器并立即按回车键。
现在为您的路由器通电。tftp 客户端将不断重试上传固件,直到路由器响应。希望路由器会短暂唤醒,允许发送固件升级。大约两分钟后,路由器将重置并使用新固件开始运行。
PUT 完成后路由器会在刷固件的同时停止ping 2 或3 分钟.. 不要惊慌,这是正常的。再次开始接收 ping 后,固件已刷新,您应该能够再次访问路由器。在再次配置路由器之前,您应该重置为默认值。
Linksys WRT54 GL:
Linksys wrt54 GL 用户请注意,如果使用 dd-wrt 固件使用 tftp 刷新没有结果,则来自 www.linksys.com 的原始 Linksys 固件值得尝试。如果可行,请进行硬重置,然后您可以继续使用 dd-wrt 刷机。为了使用标准固件版本,必须首先使用 MINI 版本。
笔记:
已知的 TFTP 问题
发生超时 连接请求失败
尝试 ping 您的路由器。如果您有 ping,请拔下电源线重新启动路由器,并等待至少 10-20 秒再重试。如果您没有 ping,则路由器无法访问。检查您的 IP 和网络配置是否正确。如果重新启动后问题仍未解决,并且总是出现此错误,则需要继续使用 JTAG 方法。
访问被拒绝 连接请求失败
路由器拒绝您的连接;路由器可以在网络上访问。尝试重启路由器,修复网络接口,或者根据一些教程,将 IP 地址更改为 192.168.1.9。
服务器代码模式错误错误
有时,上传迷你 DD-WRT 图像(或其他图像)将不起作用。如果出现此错误,则路由器无法识别您的 .BIN 固件(确保您有 .BIN 固件)。尝试使用 TFTP 传输最新的默认 Linksys 固件。然后您将能够访问 Web GUI 并再次刷新您的路由器。
选项二:通过 JTAG 电缆恢复
请在此处阅读 jtag wiki:http ://www.dd-wrt.com/wiki/index.php/Category:Jtag
如果路由器不再能 ping 通,除了使用 JTAG 电缆之外,您别无他法。有关引脚输出,请参阅 OpenWRT wiki。然后下载 HairyDairyMaid Debrick 实用程序。或者...尝试更新的 TJTAG 程序,其中包括较新的路由器模型。
可以在此处找到部分列表 CFE 收藏项目
通过此实用程序使用 JTAG 刷新 KERNEL 或 WHOLEFLASH 将需要很长时间。你最好刷写 CFE 和 NVRAM 文件,然后使用正常的 TFTP 方法通过以太网刷写内核。
注意:如果您的 JTAG 写入程序在闪存擦除步骤中挂起,请检查您的电源。写入闪存的行为比读取消耗更多的功率,因此边际电源可能支持探测和读取,但在写入时会失败。在一种情况下,我在 14V 直流电源上有 32V 交流纹波。我假设边缘电源称为原始闪存故障。
如果您没有 CFE.BIN 文件,您可以在此处找到它们的存储库。这些都具有与您的硬件不匹配的 MAC 地址。在上传 CFE 之前,使用 Bitsum Wiki 提供的 CFE 编辑工具“IMGTOOL_NVRAM”设置 et0macaddr 和 il0macaddr。et0macaddr是印在外面的地址;il0macaddr 是同一个地址,加一。示例:如果打印机地址为 00:90:4d:83:00:01,则 et0macaddr 为 00:90:4d:83:00:01,il0macaddr 为 00:90:4d:83:00:02。
Peacock Thread-FAQ:您需要知道的一切!真的!!
作者:Murrkf
注6:你的路由器变砖了吗?
A bricked router is a router that you can no longer communicate with through
wireless or wired connections. It will give no response. Just because a router
doesn't seem to be fully working, doesn't mean it is bricked. Most of the time
when we refer to a bricked router, we mean that it is not responding to a
wired connection and needs a jtag or serial cable to fix it.
A brick will normally not respond to pings at all. Often, all the lan lights and the
power light are lit when a router is bricked, even those with no cable in the lan
port. If you can get your router to respond to pings, there is hope.
When pinging the router:
If reply has TTL of 100, the bootloader (CFE) is responding. This is the best time
to start the TFTP transfer. In most cases you should be able to flash dd-wrt
firmware if you are getting any ttl=100 responses, as long as you flash at the
start of these ping responses. See note 11 about how to flash. Timing can be tricky.
If reply has TTL of 64, the operating system firmware
(i.e. Linux, dd-wrt) is responding.
The good news here is that there IS operating system firmware on your router.
Routers with boot wait enabled will give you a few ping responses of ttl=100, while
the operating system is loading, prior to changing to ttl=64. This enables you to
flash firmware at bootup with tftp if you wish to.
If there is no operating system firmware (dd-wrt) on the router (flash of firmware
did not take for some reason), you will only get ttl=100 from the bootloader.
If you get "destination host unreachable", you likely have your computer on a
different sub-network than the one you are trying to ping. Check to make sure
that you have your computer set to the same static IP subnet (eg.192.168.1.10)
as the address you are trying to ping.
If you only get "request timeout" responses, and you are pinging properly to the
correct IP of the router from the same subnet,this is not good
(router might be bricked) but we can still try TFTP just in case. Here's what to do:
Try to ping at ALL the IP addresses that your router has ever had. Make sure that
you set the IP on your computer to the same first three octets of the IP you are
trying to ping. Usually, you will set the IP of the computer to 192.168.1.8.
Then, at your command prompt, ping -t 192.168.1.1. Watch and report the results,
if you have a problem.
Be SURE to check your power supply and make sure it is the correct one for your
router. We often see that people have used the wrong power supply and then find
their router doesn't work. Also, power supplies fail, and if the capacitors are weak
the power supply might seem fine when the router is not under load but often the
supply won't work right at reboot, right when you need it to function properly.
If you have another power supply, try both.
Run Code Online (Sandbox Code Playgroud)
具体来说,这里是查看您是否有砖并需要jtag(或使用串行电缆)的步骤:
a. Make sure your computer hardware, especially your lan cable are working
properly. Make sure your network adapter is working. 检查路由器电源。
b. Disable all virus protection and firewalls on the computer. Also, disable any
wireless cards.
c. Connect one computer to the router with a cable. Have no other connections to
the router except one computer and one cable to that computer.
d. Set your computer IP address to 192.168.1.10 (if that is the same subnet as the
router is supposed to be at).
e. Try to ping the router using the command "ping -t 192.168.1.1" (presuming that
192.168.1.1 is the address your router was set to.) See if there are ANY
responses. (There WILL be A response...you are looking for a ttl= response)
f. If there are no ttl= responses, do a hard reset on your router. Make sure you get
this right. (See note 1.) This should set your router back to dd-wrt defaults. Check
to see what the dd-wrt default is for your router. Usually this is 192.168.1.1. Some
routers are 192.168.10.1 and some are 192.168.1.245. You then need to redo
steps d. and g. using the new ip address. Make sure if the subnet has changed, your
have changed your computer to match the subnet.
h. Start continuous pings to your router again. Note the responses. If they are not
ttl=64, you have a problem. While the pings are continuing, power cycle your
router. (This means unplug it, count to 30, and plug it back in). Watch the lights
and wait until they come back on or for any changes. This could take a minute.
Carefully watch for any ttl= responses during this time.
i. If there are no ttl= responses, do a hard reset on your router, while the pings
continue. Again. watch for any ping responses. If you get none, you likely need to
jtag or use one of the recovery methods listed below in this note. Your router is
bricked.
If you get a few ping responses of ttl=100, or even 1, that is the CFE saying "Send
me a firmware! NOW!" But you have to hit it with a tftp right then, when the ping
responses start. See note 11 (below) and repeat the procedure that got your a
ttl=100 response then try to get the tftp timing right.
Some routers can be bricked even if they do give some ttl=100 responses to pings,
but this is less common. Some routers can be bricked if the lights are not all lit,
but again, this is not common. However, if the lights are all lit, and you cannot
get a ping response, the router is definitely bricked. You can try the alternate
recovery methods below, but if none work and you can't tftp, you must use
serial recovery or jtag to fix it.
(See the Links to the Wiki articles on these, below).
Run Code Online (Sandbox Code Playgroud)
不要将砖块路由器短路。
It can cause harm that cannot be fixed. A bricked router can almost always be
fixed with serial or jtag if there is a jtag terminal in the router. However a router
with hardware damage cannot be recovered. Pin shorting often causes hardware
damage.
If someone has sent you to note 6 of the peacock thread, it is because they are
asking you to post the exact message you get from your initial ping attempt, the
message you get during and after a power cycle, and the message you get when
pinging during and after a hard reset. Be sure to post this information in your
thread. You will ALWAYS get a message/response when you try to ping;(see the
first paragraph for note 6, above) be sure to post exactly what those responses
are. Also post what each light in the front of the router is doing, and whether
something is plugged into any LAN port. We also need to know what you did to
brick your router - wrong build? Failed to wait? What? Finally we will need to know
what operating system you are using on your computer to assess the message
you get. POST ALL THIS INFORMATION IF YOU WANT USEFUL ASSISTANCE
Here is a link on how to put your router in management mode, that has saved
some people who thought that their router is bricked:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=47536
EKO has posted this for the Linksys 610N (Not sure if it works for other Linksys
routers too?)
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=54286
As an alternative to serial or jtag, some recent version routers can be fixed by this
method. It is worth a try before you solder:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=63444&start=15
If you need to jtag, here is a link to the wiki article on jtag:
http://www.dd-wrt.com/wiki/index.php/JTAG
You can do some router recovery with a serial adapter IF you have a working CFE
on the router. This is the preferred method if you flashed the wrong firmware but
have not deleted the cfe with a jtag cable. See this wiki article on serial recovery:
http://www.dd-wrt.com/wiki/index.php/Serial_Recovery
Run Code Online (Sandbox Code Playgroud)