2

I have TP-Link TL-WR841N router and I had install OpenWRT firmware on it.

I want to use it on a experimental project which requires me to set static IPs for LAN ports on router as mentioned in below list.

Physical LAN Port 1 -> 192.168.1.2

Physical LAN Port 2 -> 192.168.1.3

Physical LAN Port 3 -> 192.168.1.4

Physical LAN Port 4 -> 192.168.1.5

So, if any PC/Laptop connected to Physical LAN port 3 of router, will always get IP 192.168.1.4

I had tried to look in to the configuration files of dnsmasq (DHCP and DNS server) on router. but, couldn't figured out how to do it.

Any ideas ?

Thanks in advance.

  • could you provide final config files ? i'm very much interested in this setup as well – y_nk Oct 22 '16 at 14:55
1

In the default configuration of OpenWRT, you have a single bridge that contains all the physical LAN ports. If you create different networks for each LAN port, you can setup dnsmasq separately for each network. You can then assign all the networks into the same firewall zone.

Remember though that nothing prevents you or someone else to plug another switch or hub to that physical port, so the safest choice is still to assign IP addresses based on the MAC addresses.

  • Thanks. Creating different networks for each LAN port really helped ! – Jaydeep Dhrangdhariya Jun 9 '16 at 10:40
  • If you deem it helped you, feel free to upvote and/or accept it as an answer. ;) – wigy Jun 9 '16 at 13:17
  • Seems like this answer did not help you, because you did not upvote and/or acccept it... :) – wigy Jun 27 '16 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.