hi all,
this is my net:
A B C
INTERNET <--- 192.168.1.1 <--- 192.168.1.254 <----------- 192.168.1.158 <------- Me
Router DSL AP client mode->A AP in 'ap' mode
WhiteRussian Kamikaze
Well, everything goes fine from my pc, but i wanna try ebtables on C box, so
i logged in to issue an "ipkg update" command, but i got a connection error, my C box
does not resolve names, while B box can.
default gw on B box is 192.168.1.1 just like on C box...so what's my error?
After some minutes, i realized this on C box:
root@OpenWrt:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0.1
the GW interface is wrong -.-
so, by adding:
route add default gw 192.168.1.1 dev br-lan
i can correctly resolve names and install my packages.
But i wanna understand.
ifconfig:
root@OpenWrt:~# ifconfig
br-lan Link encap:Ethernet HWaddr xx...
inet addr:192.168.1.158 Bcast:192.168.1.255 Mask:255.255.255.0
eth0 Link encap:Ethernet HWaddr xx..
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0.0 Link encap:Ethernet HWaddr xx...
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0.1 Link encap:Ethernet HWaddr xx...
inet addr:192.168.1.159 Bcast:192.168.1.255 Mask:255.255.255.0
wl0 Link encap:Ethernet HWaddr xx..
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
/etc/config/network:
root@OpenWrt:~# cat /etc/config/network
#### VLAN configuration
config switch eth0
option vlan0 "0 1 2 3 4 5*"
#### LAN configuration
config interface lan
option type "bridge"
option ifname "eth0.0"
option proto static
option ipaddr 192.168.1.158
option netmask 255.255.255.0
option gateway 192.168.1.1
#### Wireless LAN configuration
config interface myap
# option type "bridge"
option ifname "eth0.1"
option proto static
option ipaddr 192.168.1.159
option netmask 255.255.255.0
and /etc/config/wireless:
config wifi-device wl0
option type broadcom
config wifi-iface
option device wl0
option network lan
option mode 'ap'
option ssid 'WF'
Maybe i'm still a bit confused with bridging on this device, excuse for my question but,
Why default GW interface is wrong and i have to manually enter right GW with br-lan interface?
thanks