openwrt on fon (初代)のネットワークコンフィグ
ついでに,fon 初代のやつもメモしておきます。
これらの設定は#uciコマンド経由で(間接的に)設定するのが推奨される。
めんどいのでviでやっちゃうけどねw
まずは、
/etc/config/networkから
root@openwrt-215:/etc/config# cat network # Copyright (C) 2006 OpenWrt.org config interface loopback option ifname lo option proto static option ipaddr 127.0.0.1 option netmask 255.0.0.0 config interface lan option ifname eth0 option type bridge option proto static option ipaddr '192.168.1.215' option netmask 255.255.255.0 option gateway '192.168.1.1' option dns '192.168.1.41' root@openwrt-215:/etc/config#
つづいて wireless
root@openwrt-215:/etc/config# cat wireless config 'wifi-device' 'wifi0' option 'type' 'atheros' option 'channel' 'auto' option 'diversity' '0' option 'disabled' '0' config 'wifi-iface' option 'device' 'wifi0' option 'network' 'lan' option 'mode' 'ap' << clientの場合はここがsta option 'wds' '1' option 'encryption' 'psk2' psk2=WPA2 personal + PSK option 'key' 'xxxxxxxxx' psk=WPA2 personal + TKIP option 'ssid' 'xxxxx' wep=WEP root@openwrt-215:/etc/config#
root@openwrt-215:/etc/config# brctl show bridge name bridge id STP enabled interfaces br-lan 8000.0018841f7a80 no eth0 ath0 root@openwrt-215:/etc/config# root@openwrt-215:/etc/config# ifconfig ath0 Link encap:Ethernet HWaddr 00:18:84:1F:7A:81 UP BROADCAST RUNNING MULTICAST MTU:2290 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:1528 errors:0 dropped:4 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:295761 (288.8 KiB) br-lan Link encap:Ethernet HWaddr 00:18:84:1F:7A:80 inet addr:192.168.1.215 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1831 errors:0 dropped:0 overruns:0 frame:0 TX packets:184 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:296115 (289.1 KiB) TX bytes:21443 (20.9 KiB) eth0 Link encap:Ethernet HWaddr 00:18:84:1F:7A:80 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1832 errors:0 dropped:0 overruns:0 frame:0 TX packets:185 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:321809 (314.2 KiB) TX bytes:22486 (21.9 KiB) Interrupt:4 Base address:0x1000 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:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:172 (172.0 B) TX bytes:172 (172.0 B) wifi0 Link encap:Ethernet HWaddr 00:18:84:1F:7A:81 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5458 errors:0 dropped:0 overruns:0 frame:101512 TX packets:1834 errors:113 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:199 RX bytes:1320614 (1.2 MiB) TX bytes:396369 (387.0 KiB) Interrupt:3 Memory:b0000000-b00ffffc root@openwrt-215:/etc/config#