I will give an example of disabling/enabling a port on Juniper devices.
Let’s go to configuration mode:
configure
Let’s look at the current configuration of the desired port (I took the QFX5100 device as an example):
run show configuration interfaces et-0/0/6
show interfaces et-0/0/6
Let’s see the port status:
run show interfaces et-0/0/6 terse
Interface Admin Link Proto Local Remote
et-0/0/6 up down
et-0/0/6.0 up down eth-switch
et-0/0/6.32767 up down
Disable the port:
set interfaces et-0/0/6 disable
Let’s apply the changes:
commit comment "et-0/0/6 disable"
Let’s make sure it is disabled:
run show interfaces et-0/0/6 terse
Interface Admin Link Proto Local Remote
et-0/0/6 down down
et-0/0/6.0 up down eth-switch
et-0/0/6.32767 up down
show interfaces et-0/0/6
description ixnfo.com;
disable;
vlan-tagging;
unit 0 {
family ethernet-switching {
interface-mode trunk;
vlan {
members core;
}
}
}
If you disable et-0/0/6.0, and not et-0/0/6, the link will still go up.
To enable a port, remove disable from its configuration and apply the changes:
delete interfaces et-0/0/6 disable
commit comment "delete et-0/0/6 disable"
See my other articles about Juniper