Help configuring fog server with two nic cards.



  • I have a computer with Ubuntu Server 14.04 and Fog trunk installed on there. I need one nic to connect to the internet just for maintenance and the other nic will be connected to a switch used solely for capturing and deploying images and no internet access. I’m running into problems where if I have both connected, I get internet but can’t pxe boot any host. If I disconnect the internet cable, i can pxe boot but no internet.

    To my knowledge I’m suppose to set up the internet facing side with DHCP and the local fog network with a static address. This is my set up below. eth0 is my fog side and eth1 is my internet side.

    0_1463515155552_IP.jpg
    0_1463515170587_fog.jpg

    I’ve tried setting the internet side with both dhcp and with a static address but maybe i’m doing it wrong. Any help would be appreciated.



  • @george1421 UPDATE: I followed your instructions and I got my system to work exactly how I wanted it too. I really appreciate the help. Thanks again.

    Unfortunately I ran into a small hiccup during the deployment process. You’ll see the post soon once I get the photo uploaded haha.



  • @george1421 Thanks for the guide. I’ll work through this and get back to you if things go well or if i run into any problems. I should of followed the set up like this when i started because the current fog .32 i’m using is set up like that. The management side has a 192.x.x.x and the fog deployment has something like 10.x.x.x

    Again I really appreciate the help. Thanks!


  • Moderator

    @phil_guy OK, first rule you need two different non-overlapping IP address ranges. One is for you management network. I assume you will make this what every your current business network uses. This interface (eth1) will have a default gateway set since you want it to get to the internet.

    Your deployment subnet needs to be something else with no gateway set. Once this is configured reboot your computer again. Then run the ip and ip route commands. As long as the subnets are different FOG will know to send deployment traffic to the deployment LAN and management traffic to the management lan. Now if you change the IP address for the deployment LAN you will be in for a little work. (but this is the right way to go about it). With the network interfaces right, you will need to update the fogsettings file with the new IP address for the new deployment lan IP and then run thought the fog installer again. And then finally check the fog configration settings in the web gui to to make sure the right IP addresses are there to. Also/ finally look at your storage node settings for the FOG server IP. That should take care of all of the bits where the IP address hides. (this is the specific reason why I gave you the installation instructions in the order I did, to avoid this issue). You can work through this, you will just have to take one step at a time.



  • @george1421 I read around and some people said different subnets and/or same subnets and I couldn’t figure it out (My networking knowledge is pretty eh…).

    So I should keep my fog server as is with the 192.168.224.82 and change my management one to something like 192.168.223.xxx OR vice versa and keep my management one and change my fog server? Do I have that right or am I even further off?


  • Moderator

    @phil_guy I wish I had a great emoji here because I see what you posted but I sure as heck don’t understand it.

    Why does both eth0 and eth1 have the same subnet IP address? No wonder why things are a bit confused. Your eth0 should be on a dedicated/isolated switch / vlan or there is no reason to have two interfaces.



  • @george1421 Alright so I hashed out the gateway option for the fog server interface (eth1) and rebooted the computer.

    I then ran the ip route command and got this…

    0_1463593745599_IMAG0264.jpg

    Again eth0 is my fog deployment which I set statically as 192.168.224.82 and eth1 is my internet I got as 192.168.224.24


  • Moderator

    @phil_guy OK then your isolated network should not have a default gateway since there is no place to get off that subnet. The eth1 will pick up the default gateway from the dhcp server on the management lan. This is how it works. Once you update the interfaces file, reboot the fog server, then from the linux console issue a ip route command. You should see each interface and a default route, which should point towards your ISP router. If this is not the case then we need to dig into why the configuration is not reflected in the network interface configurations.



  • @george1421 No problem. I appreciate the help. and I apologize if i’m confusing you.

    eth0 is suppose to be the fog deployment only while the eth1 is connected straight to the internet.

    The set up you described is exactly how i’m trying to set it up. The deployment lan should be completely separate and isolated, no need for internet access. And the management lan connected to the internet for just regular daily task.


  • Moderator

    @phil_guy Sorry I’m dealing with a number of threads this morning so if I ask the same question, I’m sorry.

    Your eth0 card is for fog deployment. Is this an isolated network or does this network have internet access? I had envisioned that you have 2 lans one for deployment and one for your business/management network. The deployment lan would be totally isolated and the management lan would have internet access just as your business computers have. Is this not how things are setup?



  • @george1421 the 192.168.224.1 is the address of my default gateway. I"ll remove that from the fog interface and reboot. Am I also removing the dns-nameserver from that entry as well?

    As for the management nic, I’ll just try to manually bring down that interface and start over there. I don’t understand it either. I thought if its hashed out in the configuration file, it would automatically be brought down and wouldn’t be pulling an IP address from my local dhcp. But it randomly got an IP address and I can still get internet.


  • Moderator

    @phil_guy Please excuse my confusion but thats crazy, if the interface startup is commented out it should not on its own decide that it should start.

    With that said remove the gateway address from eth0 since I hope the deployment LAN doesn’t have internet access, or could you more closely describe what 192.168.224.1 is? Also remove the dns-nameserver from that record too. Since everything of that nature will be coming through your management lan. Once that is done, please reboot your FOG server.



  • @george1421 eth0 is my deployment interface and eth1 is my internet side interface. That exact configuration you see in my OP is exactly what I have set as currently. Even though my eth1 is hashed out in my configuration file, it still works. If i do a “ip addr” , it shows that its up and running. And I get internet, very slow though.

    I do have a gateway defined for my eth0 which is my deployment LAN. I’m pretty sure i was suppose to leave that out or set it to "gateway 0.0.0.0 " I was unsure.

    And the 192.168.224.82 is the IP address assigned to my deployment LAN. The other one is the management LAN that DHCP gave me that originally I change to a static address.


  • Moderator

    just for clarity you have eth1 disabled in the OP. Is that now the case?

    Also from your OP I see you have a gateway defined for eth0? But isn’t eth0 for your deployment LAN?

    One last bit the 192.168.224.x is the IP address assigned to your deployment LAN? Just confirming that it is NOT your management LAN.



  • @george1421 UPDATE: I honestly can’t explain it myself but I responded to your post and went home. I came back today and by some miracle everything kind of works now. The Fog facing nic can pxe boot, capture images, and deploy them. And the management side nic gets internet, even though there’s a few hiccups with speed, it works.

    Even though it works I know something isn’t set right. The internet goes in and out and when it does work, its super slow. I have both nics connected. One to a switch for imaging and one to the internet. The problem is I can’t ping the router. I also can’t ping websites by name. I can ping websites by IP address but I lose roughly half the packets sent/received. DHCP gave me a random IP for the internet side nic however I haven’t even added or edited the /etc/network/interfaces to include that specific interface. In my first post is the exact configuration settings I set up in my /etc/network/interfaces file.


  • Moderator

    @phil_guy OK maybe I missed something.

    You have FOG capturing and deploying correctly on the deployment LAN nic. And if you inspect the FOG configuration setting they are pointing to the correct interface? If this is setup correctly then you are over the hump. Just make sure your management LAN has the default route to the internet. You just need to make sure the deployment LAN and the management LAN have their own IP address range and then make sure the FOG server has static IP addresses on both interfaces.



  • @george1421 That sounds like a good idea, thanks. I did however just spend the past few hours finally getting fog trunk to correctly capture an image haha. So i’m a little hesitant to remove fog completely and re-install everything. I did also have an issue when I did have fog trunk up, removed fog completely, and when I tried to reinstall fog 1.2 I got some apache2 error that I couldn’t fix.

    But if no other option is feasible i’ll bite the bullet. Thanks again for the tip.


  • Moderator

    What I would do is this.

    1. Connect only one network adapter to this computer. This nic will eventually be the deployment nic. But for this next step connect this deployment nic to your business network.
    2. Download FOG 1.2.0 stable onto this ubuntu server. FOG 1.2.0 stable doesn’t need internet access to install it.
    3. Move that single nic back to your deployment network.
    4. Reconfigure that deployment nic withing the correct subnet for your deployment network. It must have a static IP address before you install FOG.
    5. Once that is all setup install FOG 1.2.0 stable.
    6. After FOG 1.2.0 stable is installed then add the second nic for your management network.
    7. I would recommend setting up the management nic with a static IP address. You could use DHCP but if you want to connect to your FOG server from your management LAN then just give it a static IP address. Set this second nic as the default route to your ISP router or what ever is appropriate for your management LAN.
    8. Now upgrade to FOG 1.2.0 trunk.

    By installing FOG 1.2.0 stable first with only one NIC the install scripts will run correctly and pick the right NIC as the primary imaging nic. After FOG is installed then you can add as many network adapters as you want as long as it doesn’t change the ordinal position of that first nic. That second nic will have the default route to the internet so you can update the FOG server when ever you want. You can also manage the FOG server from the business LAN while deploying only using the deployment LAN.



  • @Wayne-Workman When you say the imaging NIC, to clarify you’re talking about the nic facing the switch to be used for deploying/capturing images as well as the fog server ip address I statically gave it? If that’s what you’re saying then both of those appear to be set correctly.
    I gave my fog server an address of 192.168.224.82 and the interface is eth0.

    And when I re-run the installer am I making any changes or just making sure the interface name and ip address match up.

    It would also help to tell you that originally i didn’t bother with the second nic when installing fog. I used the same nic for getting internet as well as installing the fog server. So now i’m just trying to separate them.


  • Moderator

    Inside of /opt/fog/.fogsettings make sure the imaging NIC’s IP and interface name is correct, and then re-run the installer.


Log in to reply
 

446
Online

39.3k
Users

11.0k
Topics

104.6k
Posts

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