JUNOS Disable vs Deactivate interfaces
Confusing between disabling and deactivating interfaces on JUNOS is a common mistake that leads to all sorts of problems during implementing changes on live network boxes. Let's look and clarify the differences quickly.
Disabling an interface:
Disabling an interface in JUNOS is equivlaent to interface shutdown in Cisco, it is going to take the interface administratevly down completely without impacting the configuration on that interface as you can see below.
--- Interface in UP UP state triton@neptune> show interfaces ge-0/0/0 terse Interface Admin Link Proto Local Remote ge-0/0/0 up up ge-0/0/0.0 up up inet 172.18.0.1/24 -- Disable the interface triton@neptune> configure triton@neptune# set interfaces ge-0/0/0 disable  -- Interface is taken administratevely down, notice the configuration is still there indicated by unit 0.0 triton@neptune# run show interfaces ge-0/0/0 terse Interface Admin Link Proto Local Remote ge-0/0/0 down down ge-0/0/0.0 up down inet 172.18.0.1/24
Deactivating interfaces' configuration:
Deactivation is a JUNOS feature that can be used with any configuration block or snippet and not is specifically tied to interfaces. When you deactivate a configuration you completely remove the impact of that configuration as if it was deleted without actually deleting it.
--- Interface is in UP UP state triton@neptune# run show interfaces ge-0/0/0 terse Interface Admin Link Proto Local Remote ge-0/0/0 up up ge-0/0/0.0 up up inet 172.18.0.1/24 --- Deactivate the configuration triton@neptune# deactivate interfaces ge-0/0/0  triton@neptune# commit --- Note that the configuration is no longer active, but the interface is still UP triton@neptune# run show interfaces ge-0/0/0 terse Interface Admin Link Proto Local Remote ge-0/0/0 up up
[toggle title="Key Takeaways " state="open"]
Deactivation is a JUNOS feature that deactivates configuration snippets and shouldn't be confused with disabling or shutting down interfaces.
Deactivating configuration on an interface will remove the effect of the configuration without removing it but will keep the interface in UP state which can impact routing and other functions for L3 protocols to detect the changes.
Disable statements should be used to take interfaces down and not deactivation.