Buffalo BHR-4RVにOpenWrtをインストールする
Buffalo BHR-4RVにOpenWrtをインストールします。
有線ブロードバンドルータ BroadStation リモートアクセスモデル|BHR-4RV
http://buffalo.jp/products/catalog/item/b/bhr-4rv/
BHR-4RVの初期化
BHR-4RVを初期化します。
電源を入れた状態で、INITスイッチ(設定初期化スイッチ)をDAIGランプが点灯するまで(約5秒間)押し続けます。
初期化後、ルータのIP アドレスが192.168.12.1になっていることを確認します。
Debian 3.1の準備
インストールに使用するDebian 3.1 Sargeを準備します。
Debian GNU/Linux 3.1 sargeをインストールする
Debian 3.1へのTFTPクライアントのインストール
Debian 3.1にTFTPクライアントをインストールします。
# apt-get install tftp
ファームウェアのダウンロード
ファームウェア openwrt-brcm47xx-2.6-squashfs.trx をダウンロードします。
$ cd ~
$ wget http://downloads.openwrt.org/kamikaze/7.07/brcm47xx-2.6/openwrt-brcm47xx-2.6-squashfs.trx
Debian 3.1のIPアドレス設定
Debian 3.1のIPアドレスを 192.168.12.10 に設定します。
# nano /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.12.10
netmask 255.255.255.0
network 192.168.12.0
broadcast 192.168.12.255
gateway 192.168.12.1
設定内容を反映させます。
# /etc/init.d/networking restart
ファームウェアの書き込み
ファームウェアを書き込みます。
$ cd ~
$ tftp 192.168.12.1
tftp> binary
tftp> trace
tftp> rexmt 1
tftp> put openwrt-brcm47xx-2.6-squashfs.trx
putコマンドの入力後、速やかにルータの電源を入れます。
ono@debian:~$ cd ~
ono@debian:~$ tftp 192.168.12.1
tftp> binary
tftp> trace
Packet tracing on.
tftp> rexmt 1
tftp> put openwrt-brcm47xx-2.6-squashfs.trx
sent WRQ <file=openwrt-brcm47xx-2.6-squashfs.trx, mode=octet>
sent WRQ <file=openwrt-brcm47xx-2.6-squashfs.trx, mode=octet>
sent WRQ <file=openwrt-brcm47xx-2.6-squashfs.trx, mode=octet>
sent WRQ <file=openwrt-brcm47xx-2.6-squashfs.trx, mode=octet>
sent WRQ <file=openwrt-brcm47xx-2.6-squashfs.trx, mode=octet>
received ACK <block=0>
sent DATA <block=1, 512 bytes>
received ACK <block=1>
sent DATA <block=2, 512 bytes>
received ACK <block=2>
sent DATA <block=3, 512 bytes>
received ACK <block=3>
sent DATA <block=4, 512 bytes>
received ACK <block=4>
sent DATA <block=5, 512 bytes>
received ACK <block=5>
sent DATA <block=6, 512 bytes>
received ACK <block=6>
sent DATA <block=7, 512 bytes>
received ACK <block=7>
sent DATA <block=8, 512 bytes>
received ACK <block=8>
sent DATA <block=9, 512 bytes>
(途中 省略)
received ACK <block=3715>
sent DATA <block=3716, 512 bytes>
received ACK <block=3716>
sent DATA <block=3717, 512 bytes>
received ACK <block=3717>
sent DATA <block=3718, 512 bytes>
received ACK <block=3718>
sent DATA <block=3719, 512 bytes>
received ACK <block=3719>
sent DATA <block=3720, 512 bytes>
received ACK <block=3720>
sent DATA <block=3721, 0 bytes>
received ACK <block=3721>
Sent 1904640 bytes in 21.1 seconds
tftp>
(注)
タイムアウトになった場合は、電源を切って、putコマンドを入力し直し、電源を入れます。
BHR-4RVの再起動
ファームウェアの書き込みに成功したら、再起動します。
OpenWrtの起動確認
OpenWrtの起動確認を行います。
OpenWrtのIPアドレス 192.168.1.1 に telnet で接続します。
=== IMPORTANT ============================ Use 'passwd' to set your login password this will disable telnet and enable SSH ------------------------------------------ BusyBox v1.4.2 (2007-07-23 07:48:28 CEST) Built-in shell (ash) Enter 'help' for a list of built-in commands. _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M KAMIKAZE (7.07) ----------------------------------- * 10 oz Vodka Shake well with ice and strain * 10 oz Triple sec mixture into 10 shot glasses. * 10 oz lime juice Salute! --------------------------------------------------- root@OpenWrt:/#
rootのパスワード設定
rootのパスワードを設定します。
# passwd root
(注)
rootのパスワードを設定すると、telnetが使えなくなりSSHが使えるようになります。
SSHでのログイン
BusyBox v1.4.2 (2007-07-23 07:48:28 CEST) Built-in shell (ash) Enter 'help' for a list of built-in commands. _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M KAMIKAZE (7.07) ----------------------------------- * 10 oz Vodka Shake well with ice and strain * 10 oz Triple sec mixture into 10 shot glasses. * 10 oz lime juice Salute! --------------------------------------------------- oot@OpenWrt:~# ifconfig br-lan Link encap:Ethernet HWaddr 00:0D:0B:E3:10:86 inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:463 errors:0 dropped:0 overruns:0 frame:0 TX packets:136 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:31742 (30.9 KiB) TX bytes:12196 (11.9 KiB) eth0 Link encap:Ethernet HWaddr 00:0D:0B:E3:10:86 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:462 errors:0 dropped:0 overruns:0 frame:0 TX packets:135 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:39966 (39.0 KiB) TX bytes:13383 (13.0 KiB) Interrupt:4 eth1 Link encap:Ethernet HWaddr 00:0D:0B:E3:10:87 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:5 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@OpenWrt:~#
2011.11.05