Disable and Deactivate interfaces on Junos are common misunderstandings that can lead to various problems while implementing changes on the network. This article explains the difference between these two functionalities.
Disabling an interface:
User@router> 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
Notice interface is in UP UP state.
Disable interface configuration:
User@router> configure User@router# set interfaces ge-0/0/0 disable [edit]
The interface is taken down administratively. Notice the configuration (IP address) is still there indicated by unit 0.0:
User@router> 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
Deactivate interface configuration:
The Deactivate command in Junos can be used with any configuration block or snippet and not explicitly tied to interfaces. When you deactivate a configuration, you remove that configuration's impact as if it is deleted without deleting it.
Deactivate the configuration:
User@router# deactivate interfaces ge-0/0/0 [edit]
User@router# commit
The configuration is no longer active, but the interface is still UP. Interface is in UP UP state:
User@router> show interfaces ge-0/0/0 terse Interface Admin Link Proto Local Remote ge-0/0/0 up up
2021-06-09: Minor, non-technical edit.