OpenWrt Forum Archive

Topic: IP address via DHCP to LAN port

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello All,
I have the following setup:
- WRT54GL Router in Client mode (sta)
- Kamikaze 7.06
- Another router (AP mode) connected to the Internet

And I want to achieve this:
I want to connect a latptop to one of the LAN ports of the WRT54GL router, and
I want the laptop to get an IP address via the DHCP server running from the
Router that is connected to the Internet.

Right now, I am getting an IP address but I could not ping the Router running
in AP mode nor any internet site. And, this IP address is assigned by the WRT54GL
router not by the router connected to the internet. I tried putting the WRT54GL
router in "wet" mode, no luck.

What am I missing here ?
Please post your configuration along with your solution.

Thanks in advance,
nathan.

You didn't mention if you had the dhcp server turned off on the WRT54GL that is in Client Mode.  Check to make sure dnsmasq is not running on the WRT54GL router...

sh# ps aux

and look for something similar to the following line:
2112 nobody      464 S   dnsmasq -C /etc/dnsmasq.conf

If it is, you can try, "/etc/init.d/dnsmasq stop" and get the laptop to release its current ip and get a new one. 

Hope that helps a bit.

Thanks for your response.
I tried that, and the laptop could not receive a valid IP address now.
Am I missing anything else ?

Thanks,

Ok.. sorry about that previous post... not an expert with setting up a router as a wireless client.  However, a few things come to my mind.  If i remember correctly, the router that is connected to the ap as a wireless client, can only send its own mac address to the ap.  Thus, if you have a laptop connected to the lan port of the (client) router, the (ap) router wont see the laptop's mac address, but instead see the mac address of the (client) router.  This means that the laptop can't get an ip address from the (ap) router, instead the (client) router will get an ip address from the (ap) router, and the dhcp server on the (client) router will give an ip addres to the laptop.  The laptop should have an ip address on a different subnet than the (ap) router, like 192.168.2.x.  If you really want the laptop to get an ip address from the (ap) router, I think you would have to setup a wireless bridge instead.

Again, not an expert in setting up a router to be a wireless client, but I hope it can help.

Thanks.

The discussion might have continued from here.