This question may arise due to a fundamental misunderstanding of IP multicast, so please correct me if I'm not in the database.
I am trying to write C code to find the IP address of all DHCP servers on the network. The use case is as follows:
- The client sends a DHCP message.
- My relay agent receives the packet, adds some important information, and redirects it UNICAST to the DHCP server at a known IP address.
The problem I am facing tells the relay agent where the DHCP server (is). I found that the 224.0.0.12 multicast address is reserved by IANA for DHCP servers, so I decided that I just configured the servers to listen for this multicast traffic. But whenever I set the linux socket option for IP_ADD_MEMBERSHIP to 224.0.0.12, it uses IGMP, which is a completely separate protocol that I don't want to execute.
I just don't understand how multicast works? Can't I send ping from the relay agent to 224.0.0.12 and return a ping response from all DHCP servers?
Additional Information:
- the interfaces in all cells have MULTICAST listed when I do
ifconfig - I added a multicast route using
ip route add 224.0.0.0/4 dev eth0for all the boxes