Changing access switch from DHCP to static IP

Solved
NetEngJH
Getting noticed

Changing access switch from DHCP to static IP

I'm setting up some Meraki access switches and would appreciate any advice from those experienced with them.

 

During the setup, the switches are connected to a core switch access port and start up using DHCP. This works fine, they get an IP address and communicate with the dashboard. I then assign a static IP address on the same VLAN (for example, VLAN 5). The switch receives this new configuration, but immediately switches back to using the DHCP IP instead of the static one.

This happens because the access switch starts sending tagged frames on VLAN 5, but is still connected to the core switch port set as an access port. When I change that port to a trunk port, I expect the access switch to start using the static IP automatically. However, this doesn't always happen.

 

I'm wondering if there's a timeout, like after 5 or 10 minutes where the switch tries to use the static IP but then gives up and just decides to keep using to DHCP.  If I reboot the access switch then of course it uses the static IP address.  It's just not always easy for these switches to be rebooted.

 

If anyone knows how these switches handle this process, including any timers or timeouts, I’d be grateful for your insights.

 

1 Accepted Solution
alemabrahao
Kind of a big deal
Kind of a big deal

If you define it as a native VLAN on the trunk and tag it at the same time, your problem will be solved. 🙂

 

Something like this.

 

alemabrahao_0-1761246672900.png

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

View solution in original post

7 Replies 7
alemabrahao
Kind of a big deal
Kind of a big deal

If you configure a static IP address in VLAN 5 through the Meraki Dashboard, the switch will begin tagging frames with VLAN 5 as the primary switch port. While still in access mode, it will begin discarding these tagged frames.
Meraki switches have a fallback mechanism if the static IP configuration fails to establish connectivity, so they revert to DHCP to maintain dashboard connectivity. This fallback can occur within minutes.

 

Before assigning the static IP, switch the primary switch port to trunk mode and enable VLAN 5 on the trunk. You can also set the native VLAN to match the initial DHCP VLAN if necessary.

 

https://documentation.meraki.com/MS/Operate_and_Maintain/How-Tos/Assigning_a_Static_IP_Address

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
NetEngJH
Getting noticed

If I change the core switch port to a trunk port first, then the access switch will go offline. As the access switch carries on sending untagged frames on VLAN5. 

 

If I set the native VLAN on the trunk to VLAN 5 then yes, that would bring the switch back online as the core switch trunk would accept the untagged frames.  However, when I then set the access switch static IP on VLAN 5 it would then go back offline again as would start to send tagged frames.  I'm back to the same fallback type condition until removing VLAN 5 as the native VLAN from the trunk.

 

It's all rather messy. Perhaps there isn't a good way around it without using one VLAN for DHCP and another for the static IP.

alemabrahao
Kind of a big deal
Kind of a big deal

If you define it as a native VLAN on the trunk and tag it at the same time, your problem will be solved. 🙂

 

Something like this.

 

alemabrahao_0-1761246672900.png

 

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
NetEngJH
Getting noticed

The switch will accept tagged frames and untagged frames on the native VLAN?  What sort of magic is that.

alemabrahao
Kind of a big deal
Kind of a big deal

Yes, I configure it this way mainly when I want to test SSIDs on Wifi. So I think it's worth testing it this way.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
PhilipDAth
Kind of a big deal
Kind of a big deal

I *think* there is a retry after 2 hours.

 

But let's try a whole new approach.  Configure the core switch to be a trunk port as you would like it to be.

When you power on the Meraki access switch for the first time it will try DHCP on the untagged VLAN (and presumably fail), and then hunt around for other VLANs that have working DHCP.  If you wait just a bit longer, your access switch will come online anyway using the DHCP on VLAN5 (or potentially any VLAN with working DHCP).

 

PhilipDAth
Kind of a big deal
Kind of a big deal

I have a bigger question for you - why do you need to give the access switch a static IP address?

 

I can't remember when I last did this.

Get notified when there are additional replies to this discussion.