Configure fog to answer on two IP addresses
-
Good,
I am trying to do a configuration with fog but I have not been able to do it or find exact information about the process or how to do it. I apologize if this issue has already been resolved, but I did not find it. I tell you what I want to do with invented IP addresses.
network1 = 10.0.0.0 / 24
network2 = 10.0.1.0 / 24
I have an infrastructure set up with 2 different networks each with its own DHCP server. My idea is to configure a fog server on a machine with two physical network cards, one connected to each network. In this way, it would have a machine to centralize the images of all the computers on the network.
Currently I have configured a centOS server with fog, together with a configuration of “dnsmasq” to act as a DHCP proxy to each network with the option of “dhcp-range, interface: ens33,10.0.1.3, proxy”, so far everything works correctly and if I turn on a machine on each network, it receives the reply and the pxe file to start the boot. The problem is that one of the two machines cannot continue the network boot because the machine receives an IP address “10.0.0.3/24” and the fog server is configured at the address “10.0.1.3/24”. I cannot find a solution for this problem and the main DHCP servers cannot be modified, it is necessary to do it in proxy mode.My English is not too good, sorry for the gramar and I have read several posts here that helped me advance something but did not solve the problem.
-
Hi, I have solved the problem. I have followed an article which has helped me to solve the problem I had, right now FOG is able to answer both networks without any problem.
I leave the article here: https://jensd.be/468/linux/two-network-cards-rp_filter
Thanks for everything!
-
@shyvvana Is it possible to enable routing from your 10.0.1.0 subnet to the fog server located in your 10.0.0.0 network? Assuming seperate VLANs, you could use a centralized DHCP server to provide addresses for both networks (ip-helper on the first hop of your 10.0.1.0 network) and then point them to the address of your fog server, you wouldnt need to allow the entire /24 to be routable either, just grant it access to the IP of your server/storage nodes and you should be all set.
-
@shyvvana You can not do this with FOG. The fog server can only have one imaging interface (network). The FOG programming code has static text entries in its configuration to point to its imaging network adapter.
You can technically add more network interfaces to the FOG server, but it will ALWAYS respond with the IP address of the defined imaging interface.
The only way a single fog server can service/image two subnets is to make the subnets fully routable by using a router between the 10.0.0.0 and 10.0.1.0 networks. If you have a router between these subnets then you can use FOG to image computers on either subnet.
-
Many thanks to both of you for your quick reply, I am going to test the option of configuring routing tables to see if it is possible to make it work like this. I tell you how it went when I did it.
-
@shyvvana Are these two isolated network where you have no router today between the subnets and you have no default router installed on at least one of them?
-
@george1421 Yes, currently both networks are physically interconnected but are isolated from the other and it is not possible to ping any machine on the other network. I am going to test the option of routing it as you have told me so that they can communicate with each other.
-
Hi, I have solved the problem. I have followed an article which has helped me to solve the problem I had, right now FOG is able to answer both networks without any problem.
I leave the article here: https://jensd.be/468/linux/two-network-cards-rp_filter
Thanks for everything!