Need help with subinterfaces
Posted: Tue Jun 11, 2019 7:38 am
Good morning,
I've been trying to get my Amahi server to hand out multiple DHCP ranges, for normal LAN traffic, and for IOT traffic. I know this is possible, however, some of Amahi's self-correcting mechanisms seem to be wreaking havoc on my system. Here's the situation.
Through the Amahi control panel, my private IP address for my serveri s 192.168.1.72. Amahi hands out IP address from 192.168.1.100-192.168.1.254. I know I can adjust that range though the HDA GUI, but that's the way it currently stands.
The other day, I thought I got it to work. I added a subinterface in /etc/sysconfig/network-scripts.
[XXXXXXXXXXX@XXXXXXXX network-scripts]$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d8:cb:8a:53:ca:2e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.72/24 brd 192.168.1.255 scope global enp2s0
valid_lft forever preferred_lft forever
inet6 fe80::13fc:be51:63e7:3acb/64 scope link
valid_lft forever preferred_lft forever
3: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 68:05:ca:14:b3:4a brd ff:ff:ff:ff:ff:ff
I added a subinterface to enp2s0, which made it enp2s0.20 (20 to match VLAN 20 on my UniFi USG and Ubiquti Managed Switch). It had the covered the network scope of 192.168.2.0/25. Restarting the network.service, enp2s0.20 showed up, showed the proper range and all. A few checks, and I was able to ping both gateways (192.168.1.1 and 192.168.2.1) on my UniFi USG, and ping both server IPs (192.168.1.72 and 192.168.2.72) from my UniFI USG.
Back in /etc/dnsmasq.d/, I created a new .conf file for that DHCP range. I did not change the amahi-dhcp.conf file.
Back on my UniFi USG, I set the DHCP relay to 192.168.2.72 for VLAN 20.
So, after I did this, Amahi started handing out IP addresses for the 192.168.2.0/25 range. Great. I thought I was up and running.
Shortly after that, Amahi stopped handing out IPs for 192.168.1.0/24. I rebooted the server, and I couldn't get back in. Ther server IP was not responding, and I couldn't get a prompt when I hooked it up to a monitor and keyboard.
I booted into safe mode, and discovered that Amahi had changed enp2s0, as well as all the other standard IP addressing, to the 192.168.2.0/25 range. It was in the unalterable amahi-dhcp.conf, amahi-dns.conf....pretty much all over the place. I tired manually changing them, but Amahi kept changing it back. To top it all off, the Amahi.org control panel showed my server as non-responsive.
I was able to get restore everything back to it's previous state by untarring a backup I made of the /etc folder. This stopped the overwriting behavior I was experiencing, but left me back where I began.
So, my question is, any idea why the 192.168.2.x addresses took over my previous 192.168.1.x ranges? I was under the impression that Amahi referred to the addresses via the installer code, and the only way to alter the main address space was a reinstall. This address space was a subinterface only. It should not have affected the main interface.
Am I missing something that would all DHCP addresses to be handed out to both ranges?
I've been trying to get my Amahi server to hand out multiple DHCP ranges, for normal LAN traffic, and for IOT traffic. I know this is possible, however, some of Amahi's self-correcting mechanisms seem to be wreaking havoc on my system. Here's the situation.
Through the Amahi control panel, my private IP address for my serveri s 192.168.1.72. Amahi hands out IP address from 192.168.1.100-192.168.1.254. I know I can adjust that range though the HDA GUI, but that's the way it currently stands.
The other day, I thought I got it to work. I added a subinterface in /etc/sysconfig/network-scripts.
[XXXXXXXXXXX@XXXXXXXX network-scripts]$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d8:cb:8a:53:ca:2e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.72/24 brd 192.168.1.255 scope global enp2s0
valid_lft forever preferred_lft forever
inet6 fe80::13fc:be51:63e7:3acb/64 scope link
valid_lft forever preferred_lft forever
3: enp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 68:05:ca:14:b3:4a brd ff:ff:ff:ff:ff:ff
I added a subinterface to enp2s0, which made it enp2s0.20 (20 to match VLAN 20 on my UniFi USG and Ubiquti Managed Switch). It had the covered the network scope of 192.168.2.0/25. Restarting the network.service, enp2s0.20 showed up, showed the proper range and all. A few checks, and I was able to ping both gateways (192.168.1.1 and 192.168.2.1) on my UniFi USG, and ping both server IPs (192.168.1.72 and 192.168.2.72) from my UniFI USG.
Back in /etc/dnsmasq.d/, I created a new .conf file for that DHCP range. I did not change the amahi-dhcp.conf file.
Back on my UniFi USG, I set the DHCP relay to 192.168.2.72 for VLAN 20.
So, after I did this, Amahi started handing out IP addresses for the 192.168.2.0/25 range. Great. I thought I was up and running.
Shortly after that, Amahi stopped handing out IPs for 192.168.1.0/24. I rebooted the server, and I couldn't get back in. Ther server IP was not responding, and I couldn't get a prompt when I hooked it up to a monitor and keyboard.
I booted into safe mode, and discovered that Amahi had changed enp2s0, as well as all the other standard IP addressing, to the 192.168.2.0/25 range. It was in the unalterable amahi-dhcp.conf, amahi-dns.conf....pretty much all over the place. I tired manually changing them, but Amahi kept changing it back. To top it all off, the Amahi.org control panel showed my server as non-responsive.
I was able to get restore everything back to it's previous state by untarring a backup I made of the /etc folder. This stopped the overwriting behavior I was experiencing, but left me back where I began.
So, my question is, any idea why the 192.168.2.x addresses took over my previous 192.168.1.x ranges? I was under the impression that Amahi referred to the addresses via the installer code, and the only way to alter the main address space was a reinstall. This address space was a subinterface only. It should not have affected the main interface.
Am I missing something that would all DHCP addresses to be handed out to both ranges?