0

I have a router in my home, to which there are several devices connected to it (over Wi-Fi and Ethernet) and get the network information through DHCP. I want to configure the protocol, so I can provide an entry in the routing table distributed to every connected device. I look for a general way, because I understand every router is different, but also my model is CBN CH6643E from Vodafone/ONO (Spain).

My question is: how do I do that? are these household routers intended/allowed to do this?. Note that I don't pretend to manually edit the routing table of the devices but alter the table they receive in their DHCP configuration.

Also: I have a Linux distribution and soon I will have a microcomputer (raspberry-like) capable of running Linux too, in case there's a solution that requires it.

EDIT: The most viable solution is to use a DHCP server in a computer, that will be in the middle of the router and connected devices. How would that affect the defaut gateways of the connected devices and the default gateway of the DHCP server? The entry that I want to add to the devices' routing tables is a new default gateway that will redirect their packages to my router, as it's not possible to do that directly in the router.

Someting like this:

to the internet <====|router|====|DHCP server|====devices

2
  • What entry you intend to add to routing table add these details to questions
    – SeanClt
    Commented Apr 17, 2016 at 12:23
  • See my edit, please
    – mrbolichi
    Commented Apr 17, 2016 at 13:38

1 Answer 1

0

This can be done if your router supports configuring DHCP option 121 - The Classless Static Route Option.

Judging by the user guide, your router does not support this, so you're probably looking at getting an enterprise-level router, or flashing your current router with custom firmware that supports setting this DHCP option (such as DD-WRT).

Alternatively, you could look into installing a DHCP server on your Linux distribution and setting it up to distribute this option to clients along with their IP configuration. Remember to disable the DHCP server on the router so that only the DHCP server running on the Linux distribution will receive/reply to DHCP requests. Assign the machine a static IP configuration (IP address, subnet mask, and default gateway), and make sure the chosen IP address is outside of the DHCP scope and you should be good to go.

5
  • I thought my router wouldn't be able to do what I intend. That's why I thought about my machine (or better, my microcomputer) with Linux distribution doing the work. How can I do that?
    – mrbolichi
    Commented Apr 17, 2016 at 13:00
  • As mentioned in my answer you can find and install a DHCP server on your machine and configure it to distribute the IP configuration and the static route(s) to the clients. Remember to disable the DHCP server on your router if you go with this approach. Commented Apr 17, 2016 at 13:03
  • That's what I wanted to know. The devices would connect to the router, which will receive their DHCPREQUESTs. I assume that, as they are in the same network, both (router and machine with DHCP server) will receive the request, but only the machine will answer to it. I intend to put the DHCP server in the middle of the router and the devices (please check my edit).
    – mrbolichi
    Commented Apr 17, 2016 at 13:33
  • Please see my updated answer. Commented Apr 17, 2016 at 13:47
  • Thanks. That should be enough information. As soon as I have time I will try it, but it seems simple enough
    – mrbolichi
    Commented Apr 17, 2016 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .