[En-Nut-Discussion] DHCP on multiple interfaces?

Ulrich Prinz uprinz2 at netscape.net
Sat Dec 12 00:48:22 CET 2009


Hi!

Harald Kipp schrieb:
> 
> You are not able to broadcast to xxx.yyy.zzz.255, because you don't know
> xxx.yyy.zzz. You do not even know the netmask.
> 
That's why often DHCP is not switched on by having no IP address 
configured but by a separate switch. So you can add the configured 
braodcast address or calculate it from Network/Netmask combination to 
the request to get a DHCP for a special network. This makes sense for 
networks where several nets are available over one cable.

Simple background: You have a VOIP network and a PC network available 
over one cable. Now you need to configure DHCP on the Phone to broadcast 
its DHCP/BOOTP on the right one, while your PC attaches to the other.
As nowadays it is more easy to configure MAC address ranges in your DHCP 
server to sort out phones from PCs, this option has lost it's meaning.

And yes, like said above, DHCP has to be handled separately for each MAC 
interface. Sending a broadcast to 255.255.255.255 is not the same on IP 
or MAC layer. DHCP has no IP on top, but can deliver a wished IP 
(fetched out of config or last-IP buffer in flash / EEPROM), through MAC 
directly and only on the interface with that MAC. In this state the 
interface is not up, so not reachable by IP layer.

On DHCP success ( requested IP was accepted or request returned with a 
new leased IP) it configures the IP layer. Then the interface is up for IP.

... And then we may have a 255.255.255.255 problem. I would not write a 
software that sends broadcasts to all available networks, but if, then a 
255.255.255.255 target could be handled in two ways:
Hard way: Broadcast that address on all interfaces available.
Safer way: Translate that broadcast to each interfaces subnet.
Both ways may have leaks, but anyway broadcasts are handled more or less 
rigid by routers.

If you have a service that needs to find its partner, lets say a 
SQL-Server for data-logging, then put together a subnet related 
broadcast packet per each interface and send it out. As IP is up and 
running a correct response will come back and no guessing is needed to 
connect to the partner.

Best regards,
Ulrich




More information about the En-Nut-Discussion mailing list