1 Fog server on multiple subnets (a nic on each)



  • Hi Guys,

    I’ve been using fog for the past year in our head office and everything has been working great, just 1 server.

    I’m now looking to deploy this to our remote colleges and would like to (but don’t know if it’s possible) to use 1 server to service 2 subnets (subnet for staff, subnet for students). It appears you can only configure fog to service 1 subnet.

    My question is, with 2 network cards, 1 on each subnet, can fog be configured with 2 ip addresses or to service both subnets?

    From the wiki it kind off appears you can but says it’s advanced and won’t be discussed, would appreciate any feedback I can get on this.

    (note, I understand I can create a fog server for each network and have them mount the images directory from an nfs mount but it seems like overkill just to be able to handle another nic)



  • Yusuf,

    We have the master server on our main site which has a single IP address, which we only use for mysql,web,pxe,tftp,wol(no images stored here). We have 5 FOG storage nodes 1 at each remote site and 1 at the main site, each storage node host images for that site to keep imaging traffic local. Each site has mutiple VLANS staff, students etc.

    We have 2 Windows DHCP servers with split scopes at our main site serving over 50 VLANS for all sites.



  • Hi Raff,

    There is routing between the subnets, clients on either can talk to each other.

    It’s just that I can’t image from the subnet that is different from Fog’s main subnet, even though it has two nics and is on both subnets.

    Clients can get to the menu on either subnet, but can only be imaged on one, this is the confusing part.

    Raff, could you possibly describe your network layout and how the single fog server is able to service 40 subnets?



  • Why haven’t you got routing between the subnets? All our fog servers are on 1 subnet but are accessed from more than 40 other subnets.



  • I’ve been doing some research into virtual IPs / interfaces, static routes etc and I think I may of found using iptables maybe the best way of getting this to work and was just wondering if a networking guru can confirm I’m going about this the right way.

    So I build a fog server with two nics, 1 nic on each subnet (student / staff).
    When initially installing fog I set it’s default IP to one on the student network.
    Student pc’s image as normal.

    Staff pc’s on the other hand see the fog menu but no commands work.
    (respective dhcp servers on each subnet have the boot options pointing to the relevant nics on the fog server)

    [B]A Possible solution:[/B]

    #Enable IP Forwarding

    [COLOR=#333333][SIZE=4][FONT=Tahoma][COLOR=#000000][SIZE=13px]echo 1 > /proc/sys/net/ipv4/ip_forward[/SIZE][/COLOR][/FONT][/SIZE][/COLOR]

    [FONT=Helvetica Neue][COLOR=#333333][SIZE=4][FONT=Tahoma][COLOR=#000000]Then configure iptables to forward the packets from staff subnet on /dev/eth1, to student network on /dev/eth0. with the following commands:[/COLOR][/FONT][/SIZE][/COLOR][/FONT]

    [FONT=Helvetica Neue][COLOR=#333333][FONT=Tahoma][COLOR=#000000] /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE [/COLOR][/FONT][/COLOR][/FONT]
    [FONT=Helvetica Neue][COLOR=#333333][FONT=Tahoma][COLOR=#000000] /sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT [/COLOR][/FONT][/COLOR][/FONT]
    [FONT=Helvetica Neue][COLOR=#333333][FONT=Tahoma][COLOR=#000000] /sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT[/COLOR][/FONT][/COLOR][/FONT]



  • No option to delete unfortunately, can only delete comments from #2 onwards.

    [IMG]http://i.imgur.com/nIsX6.png[/IMG]

    Regarding the DHCP, I can take care of that on each subnet, the problem comes with how fog is normally setup (on one IP address).
    I can make clients on each subnet boot to fog, but when it comes to imaging it fails as alot of the commands have the original setup IP address (and therefore subnet) coded into the commands, so actions always fail.

    I just want to know more of these so called advanced networking options that can be applied but are not mentioned anywhere on the wiki.

    I’m happy to hack some scripts if need be, any advice / direction would be welcome.


  • Moderator

    I think the challenge is setting up DHCP to service multiple subnets on different LAN interfaces. I have no experience with this though.


  • Moderator

    You can open each post and it has a delete option near the bottom of your post.



  • Moderators, apologies for the multiple posts, was having a real hard time submitting a post as it kept erroring out, had no idea post was actually submitted.

    Please delete the other posts I’ve made prior to this.


Log in to reply
 

400
Online

38953
Users

10706
Topics

101571
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.