DHCP - Somewhat advanced

CobaltPhoenix
Posts: 32
Joined: Sat Apr 27, 2013 6:21 am

DHCP - Somewhat advanced

Postby CobaltPhoenix » Thu Oct 02, 2014 2:44 am

I am trying to change a few settings with my HDA's DHCP server. I need to change the subnet mask from 255.255.255.0 to 255.255.0.0. Second, I need to change the DHCP IP address range.

Quick backstory and explanation:

Years ago, before I studied networking, I decided to stop using the default IP address in my router of 192.168.x.x and started using a random one of 185.158.21.x. The third octet changed with every new router. 185.158.21.x, then 185.158.27.x, and so on. Increasing by 2 each time to differentiate the generation of network/router. I am up to 185.158.33.x. I thought I was being clever. Then I started studying for my CCNA and realized I was an idiot.

Back to the present.

I am now working on switching my network over to the 172.16.x.x - 172.31.x.x private IP address ranges, focusing on 172.16.x.x with a subnet mask of 255.255.0.0. I have reassigned all of the IP addresses for my devices, router, and the HDA. I am running Amahi 7 on Fedora 19, and I used the "hda-change-gw" command to change the gateway, rebooted the HDA, and everything looked good. Well, until I got a DHCP assignment on a device. The HDA is passing out 255.255.255.0 as the subnet mask. I need to change this to 255.255.0.0 as not everything is in the same 8 bit block of IP addresses. I am using the third octet to sort out devices. I am running servers now, and my network is poised to continue to grow. I am also going to be opening my network up to VPN connections so my friends can access and store files centrally, like our own private net. I am setting them up in 172.16.C.x, whilst my router sits in 172.16.A.x, connected clients in 172.16.B.x, servers sit in 172.16.D.x and NAS, SAN, and other network storage sits in 172.16.E.x, and so on. Everyone needs to be able to communicate with each other, and statically assigning IP addresses is not an option as there are enough clients coming and going on DHCP. Any DHCP clients will be stuck in the 172.16.B.x network, unable to communicate with anything else. My HDA resides in the 17.16.D.x, so I also need to be able to change the range of the assigned IPs to 172.16.B.x instead.

My question boils down to this: How do I change the range of IP addresses handed out to match the network I want clients in, and how do I change the subnet mask that is handed out so everyone can communicate nicely? Is this possible in Amahi? Or have my needs outgrown Amahi's capabilities?

Note: I am currently taking CCNA-2, and Linux Admin 2 (covering Fedora server administration) at my college. I am not afraid of editing system files, nor I am a complete noob. I am not an expert by any means. If I was, I wouldn't be asking this question. Also, yes, this complex configuration is necessary to accommodate current and projected growth of my network.

I sincerely hope this post makes sense to the right people. Please forgive incorrect terms or incorrect use of terms, and correct me so I can learn.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: DHCP - Somewhat advanced

Postby bigfoot65 » Thu Oct 02, 2014 2:15 pm

I don't think you can easily change the subnet. I believe that is initially set in the HDA profile when you build the HDA.

I would say it is possible, but may require modifying some database values and possibly a few other files.

Are you opposed to creating a new profile and installing Amahi from scratch? There is a nice OS migration guide that would help you back up some settings for a reinstall in the wiki.

HDA OS Migration Guide

Unfortunately, being able to make these changes is not something Amahi is currently capable of as far as I know. I may be wrong. Would be a nice feature suggestion in the bug tracker for future Amahi versions.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

CobaltPhoenix
Posts: 32
Joined: Sat Apr 27, 2013 6:21 am

Re: DHCP - Somewhat advanced

Postby CobaltPhoenix » Thu Oct 02, 2014 6:28 pm

It is not an option in the HDA build. Do you know what files I would need to edit? I tried the normal update of subnet and IP using ifconfig, but it resets on reboot.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: DHCP - Somewhat advanced

Postby bigfoot65 » Thu Oct 02, 2014 6:35 pm

I meant the HDA profile on amahi.org. There is where you set the IP address, subnet (not sure), and gateway.

Not sure what files, but I would anticipate it needs set in the hda_production database. Keep in mind this could cause issues.

There are other files in /etc/network I think that might have values which would need to be set, but not sure.

As you said, these sort of changes may be beyond Amahi.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

CobaltPhoenix
Posts: 32
Joined: Sat Apr 27, 2013 6:21 am

Re: DHCP - Somewhat advanced

Postby CobaltPhoenix » Fri Oct 03, 2014 6:09 pm

I was referring to the profile setup on the site as well. It is not an option when building/creating a new profile. It just asks for IP address and gateway. Unless it auto senses what subnet mask to use, I think I am out of luck. I wish I knew what files to edit. I might just have to poke around.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: DHCP - Somewhat advanced

Postby bigfoot65 » Sun Oct 05, 2014 5:36 pm

Ah, could not remember if net mask was part of it. Only place I know it's identified is in the hda_production database. It might be in some other files in /etc/network.

You make be able to do a grep command to find what files contain the net mask. In future versions, we hope to add this capability.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

CobaltPhoenix
Posts: 32
Joined: Sat Apr 27, 2013 6:21 am

Re: DHCP - Somewhat advanced

Postby CobaltPhoenix » Mon Oct 06, 2014 9:01 am

I am sad to say that I have shutdown my Amahi server, likely for good. I have switched over all DNS and DHCP responsibilities back to the router. Funny enough, my network is now running faster than it has in a long time. Facebook, Tumblr, and other apps would barely load their content while on my network, and now those apps fly. Mobile browsing and normal browsing are noticeably faster. This might be something to look into. I'll need to find a new server to use, though I'm leaving towards a custom CentOS installation.

[ Post made via Android ] Image

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: DHCP - Somewhat advanced

Postby bigfoot65 » Mon Oct 06, 2014 1:09 pm

That is sad to hear. The reason things might be quicker is the DNS you are using. Amahi can be customized to use the same DNS.

If you are looking for something to try, might I suggest OpenMediaVault? I have tested it and works nicely. Very well done web UI and debian based I believe and will run off a 2GB USB as well :) This might be more of what you are looking for in regards to changing network settings.

http://q8q.lg.sl.pt

I would use it if I was not able to work with Amahi. There are pros and cons for both of course, but I am impartial to Amahi. I have been part of the project for the past 6 years.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 53 guests