1

I am planning on installing Fedora and using Amahi as a Media Server/NAS in my house.

I currently have a network with 2 wireless routers, one acts as the DHCP server and the other is just an AP. The one that is a DHCP server is directly connected to a modem. I will be installing Amahi on a machined connected to the AP. I read that Amahi prefers to be the DHCP server for the network. Now I do not want to change the existing DHCP server but I am plan to give each DHCP server a different range of addresses to serve.

  1. I would like to access my shares on Amahi from the devices who were assigned their IP from the second DHCP server. Will this be possible?

  2. Also does it matter if the Amahi DHCP server is not directly connected to the modem (modem -> router -> AP -> Amahi)? Will I have problems with QOS?

3 Answers3

3

Edit:
Two DHCP in the same physical network can't be used to serve IP addresses for different ranges.

Why?
A network card, configured to lease addresses from a DHCP, sends a packet (DHCP broadcast) to all computers. The computer running a DHCP server will answer with the next free IP address (and other settings configured for the client). When there are multiple DHCP servers, all will answer and send the IP informations. But the client will accept only the first he gets.

On the most DHCP servers it is possible to configure serveral ranges.

It may be wanted that serveral ranges serve different setting (like a different gateway). This must be configured on one DHCP in the respective range configuration.

If one client (precisely its network card) must only get the IP adrress from one range, this can be solved using reservations for the client. This connects the mac address of the network card with a static setting at the DHCP (including a quasi static IP for the client).

(DHCPs may be configured for failover purposes. Then there are more DHCPs, but this is a very special configuration and the client will get the same informations regardless to the DHCP which answers).

Post before edit, suggsting the use of the Amahi DHCP
Don't run multiple DHCP servers in one network. It will cause trouble. (Look here)

Servers an routers should always have a static IP. (e.q. 192.168.0.1 and 192.168.0.2). This IPs have to be excluded from the IP range the DHCP is using.

I guess that Amahi is sharing more informations through DHCP to the clients than a normal router does. So it makes sense to use Amahi's DHCP.

Probably it will be sufficient to do that:

  • disable DHCP on the router
  • make sure that the static IPs (of router(s) and Amahi itself) are excluded on the dhcp range of Amahi
  • add the address of the router to the dhcp settings of Amahi
marsh-wiggle
  • 3,134
1

1) As far as multiple DHCP servers sure....

You mention the DHCP server is directly connected to the Modem....would it be too hard for you in your case to allow Static IP to the AP, which would give its own DHCP entries?

linuxdev2013
  • 1,395
1

It is entirely possible to have multiple DHCP servers running on the same network segment, if the limitations of this architecture are understood and planned-for.

The Microsoft TechNet article DHCP Best Practices says :

When started, each DHCP client broadcasts a DHCP discover message (DHCPDISCOVER) to its local subnet to attempt to find a DHCP server. Because DHCP clients use broadcasts during their initial startup, you cannot predict which server will respond to the DHCP discover request of a client if more than one DHCP server is active on the same subnet.

For example, if two DHCP servers service the same subnet and its clients, clients can be leased at either server. Actual leases distributed to clients can depend on which server responds first to any given client. Later, the server first selected by the client to obtain its lease might be unavailable when the client attempts to renew.

If renewal fails, the client then delays trying to renew its lease until it enters the rebinding state. In this state, the client broadcasts to the subnet to locate a valid IP configuration and continue without interruption on the network. At this point, a different DHCP server might respond to the client request. If this occurs, the responding server might send a DHCP negative acknowledgement message (DHCPNAK) in reply. This can occur even if the original server that first leased the client is available on the network.

Therefore the problems in such an architecture that I can see and their solutions :

  1. Conflicts between IP addresses
    These can simply be solved by splitting the allocation ranges between the two DHCP servers. Further fail-safe measure can be the permanent binding of MAC addresses to IP addresses in the DHCP server (if it has this option).

  2. Renewal of DHCP leases might be very slow
    This will happen if the renewing client always happens upon the wrong DHCP server, until the client gives up and requests a new lease. But this is not a problem if the leases have a sufficient period of validity. For example, 24 hours is more than enough if all the computers are turned off at night. 24 hours is the default used by most DHCP servers, but is also normally a configuration option in these servers.
    Computers in such a network should not be set to hibernate, because when waking up the DHCP lease might need renewal.

harrymc
  • 498,455