IOS configure replace add dhcp snooping vlan issue
Hi!
Have any of you managed to use configure replace to add or remove dhcp snooping vlans without it removing active snooping entries?
The switch does a 'no ip dhcp snooping vlan <vlan list>' before setting up the new config line resulting in a loss of snooping entries for the vlans contained in the no line when doing a configure replace with a new config.
I am managing full switch configs using jinja2 templating and running configure replace via napalm.
Just want to know if anyone else have seen similar issues and fixes without using configure merge tactics?
4
Upvotes
1
u/First-Masterpiece753 15d ago
Did u try with 26.2 latest ?
2
u/p1kk05 16d ago
Maybe try the dhcp snooping database feature
1
u/mohammad_abusaa 15d ago
Yeah, that’s just how configure replace works. It compares the two configs line by line, and IOS collapses all the snooping VLANs into one
ip dhcp snooping vlan x,y,zline. So any change to the list turns into “remove the whole line, add the new one.” Removing it turns snooping off on those VLANs, and their bindings go with it. As far as I know, there’s no setting in configure replace that changes this.A few ways around it:
ip dhcp snooping vlan 1-4094or whatever range you’ll ever use) and keep it the same in every template. Adding or removing VLANs then doesn’t touch that line. Before you do this, check trust on your uplinks and server ports, and check option 82. Snooping inserts option 82 by default, and some upstream relays and servers drop those requests, so you may needno ip dhcp snooping information option.ip dhcp snooping vlan 30/no ip dhcp snooping vlan 30. Those only touch that one VLAN. I know you said no merge, but it’s only for this one line, and everything else stays full replace.renew ip dhcp snooping database. The catch is that it writes on a delay, so timing matters. I’d test it in a lab before relying on it.Also, before pushing, run
configure replace flash:<file> list(orshow archive config differences) so you can see exactly which commands it’s going to apply. That makes these surprises easier to catch.0
u/Crazyachmed 16d ago
Meh, I never liked the clusterfuck of the IOS (XE) config. So much guesswork... I would try to resolve the deltas with my own script and only execute ne needed commands. But, yeah, that is a lot of work.
We have gone the route of generating full configs and "copy to startup + reload"