I've tried alot harder than that. I believe I have made the issue of router vs AP mode irelevent by doing having by hand for testing.
It seems udhcpc is failing to get an IP from the cable modem.
To simplify things for testing I have killed all processes on the router I can to make sure the web interface stuff doesn't interfere with your testing.
Bridges are set manually using brctl and setting IPs manually with ifconfig and udhcp.
By doing this I can be sure that the web interface is not causing a problem.
The end result is a very basic system:
Code:
[admin@router root]$ ps
PID Uid VmSize Stat Command
1 admin 712 S /sbin/init
2 admin SW [keventd]
3 admin RWN [ksoftirqd_CPU0]
4 admin SW [kswapd]
5 admin SW [bdflush]
6 admin SW [kupdated]
7 admin SW [mtdblockd]
41 admin 312 S telnetd
60 admin SW [khubd]
401 admin 524 S -sh
421 admin 368 R ps
[admin@router root]$
Then bridge all interfaces together so everything can talk to everything for testing. Result:
Code:
[admin@router root]$ brctl showbr br0
br0
bridge id 8000.000ea6cee237
designated root 8000.000ea6cee237
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 0.00 bridge forward delay 0.00
ageing time 42.30 gc interval 4.00
hello timer 1.07 tcn timer 0.00
topology change timer 2.19 gc timer 3.07
flags TOPOLOGY_CHANGE TOPOLOGY_CHANGE_DETECTED
eth0 (1)
port id 8001 state forwarding
designated root 8000.000ea6cee237 path cost 100
designated bridge 8000.000ea6cee237 message age timer 0.00
designated port 8001 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
eth2 (2)
port id 8002 state forwarding
designated root 8000.000ea6cee237 path cost 100
designated bridge 8000.000ea6cee237 message age timer 0.00
designated port 8002 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
eth1 (3)
port id 8003 state forwarding
designated root 8000.000ea6cee237 path cost 100
designated bridge 8000.000ea6cee237 message age timer 0.00
designated port 8003 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
[admin@router root]$
Then give eth1 an IP:
Code:
[admin@router root]$ ifconfig eth1 192.168.100.3
(you'll notice I'm using 192.168.100.x because this is the same subnet as the cable modem so we're working on the same network)
and test that it can ping the cable modem, making there is a crossover cable between the WAN port on the router and the ethernet port on the cable modem:
Code:
[admin@router root]$ ping 192.168.100.1
64 bytes from 192.168.100.1: icmp_seq=1 ttl=255 time=1.90 ms
64 bytes from 192.168.100.1: icmp_seq=2 ttl=255 time=1.91 ms
We are then free to try getting an IP from the cable modem using udhcpc:
Code:
[admin@router root]$ udhcpc -i eth1 -s /bin/true
udhcpc (v0.9.9-pre) started
Sending discover...
Sending discover...
-> but this is unsuccessful. This is unexpected because when the cable modem is connected to the cable modem directly it gets an IP. I've even tried running my own dhcpd server on my computer. It was successful once with this setup but I've been unable to duplicate that success.
In terms of the whole network topology looks like this:
Code:
Computer = 192.168.100.20
Cable modem ethernet interface = 192.168.100.1
Cable modem internet interface = 82.32.x.x
WL500G Router br0 (eth0, switch) = 192.168.100.2
WL500G Router eth1 (WAN) = 192.168.100.3
(because we're only bridging and not using iptables we don't need to mess with subnets)