halmartin / meraki-builder

Scripts and tools to assemble firmware images for various Meraki MS switches and MX routers
GNU General Public License v3.0
76 stars 16 forks source link

initialize poe before network #30

Closed hall closed 1 year ago

hall commented 1 year ago

The DHCP server on my network is powered by postmerkOS. As it stands, during boot, the switch waits for an address prior to initializing PoE. Thus it will always fail and fallback to the hardcoded address.

As someone with very little knowledge here, is there any reason you're aware of that the order cannot be flipped? I'm happy to test suggested approaches -- just didn't want to break things (on my only device) if it was a lost cause.

halmartin commented 1 year ago

is there any reason you're aware of that the order cannot be flipped

Providing PoE power before completing data plane configuration would completely break the security boundary provided by VLANs. PoE initialisation must happen after we configure the data plane in click (which also starts DHCP). As far as I know, this is also the order of operations from the Meraki firmware.

Therefore, it is not advised to have your DHCP server powered directly from the switch, as you will encounter this issue.

If you need PoE to start earlier in your network, /etc is on a writable overlay, rename S11poe to run before S10clickconfig and you'll have PoE before DHCP.

hall commented 1 year ago

break the security boundary provided by VLANs

Ah, it would have taken me quite a bit of time to come to that conclusion!

Thanks for the explanation and a workaround. I'll probably move that device off PoE again now that I know it's done this way intentionally.