openwrt on fon+ (fon plus) のネットワークコンフィグ

久しぶりにfon plus(中身はopenwert)をいぢったら、bridge構成を壊しもうた
有線、無線どっちもつながらない orz

もー、だめだめじゃん > おれ

しかたがないので、ネジをはずして、ふたあけて
USB+RS232コンバータ+minicomでconsoleからログインして修復。

以下が修復後(動いている場合)のコンフィグ例

まずは/etc/config/network コンフィグの中身は

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 'type' 'bridge'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'ifname' 'eth0.0'
        option 'gateway' '192.168.1.1'
        option 'dns' '192.168.1.41'
        option 'ipaddr' '192.168.1.218'
        option 'defaultroute' '0'
        option 'peerdns' '0'

config 'interface' 'wan'
        option 'ifname' 'eth0.1'
        option 'proto' 'none'

こちらが/etc/config/wireless

root@fonplus-218:/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' 'sta'
	option 'wds' '1'
	option 'encryption' 'psk2'
	option 'key' 'xxxxxxxx'
	option 'ssid' 'xxxxxx'

root@fonplus-218:/etc/config#

brctl showはこんな感じだ。ath0とeth0.0がブリッジに参加している

root@fonplus-218:/etc/config# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		8000.001884a00894	no		ath0
							eth0.0
root@fonplus-218:/etc/config# 

ipconfigはいかのような感じ

root@fonplus-218:/etc/config# ifconfig
ath0      Link encap:Ethernet  HWaddr 00:18:84:A0:08:95  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15068 errors:0 dropped:7534 overruns:0 frame:0
          TX packets:612 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2353992 (2.2 MiB)  TX bytes:61340 (59.9 KiB)

br-lan    Link encap:Ethernet  HWaddr 00:18:84:A0:08:94  
          inet addr:192.168.1.218  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7534 errors:0 dropped:0 overruns:0 frame:0
          TX packets:614 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1124258 (1.0 MiB)  TX bytes:60883 (59.4 KiB)

eth0      Link encap:Ethernet  HWaddr 00:18:84:A0:08:94  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7027 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1205257 (1.1 MiB)
          Interrupt:255 Base address:0x1000 

eth0.0    Link encap:Ethernet  HWaddr 00:18:84:A0:08:94  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7026 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:1179124 (1.1 MiB)

eth0.1    Link encap:Ethernet  HWaddr 00:18:84:A0:08:94  
          UP BROADCAST RUNNING 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:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:55 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:5720 (5.5 KiB)  TX bytes:5720 (5.5 KiB)

wifi0     Link encap:UNSPEC  HWaddr 00-18-84-A0-08-95-00-00-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:71026 errors:0 dropped:1014 overruns:0 frame:8054
          TX packets:872 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:195 
          RX bytes:12702457 (12.1 MiB)  TX bytes:105370 (102.9 KiB)
          Interrupt:3 Memory:b0000000-b00ffffc 

root@fonplus-218:/etc/config#