Routing
Showing results for 
Search instead for 
Do you mean 
Reply
jpc
Visitor
Posts: 4
Registered: ‎02-16-2016
0 Kudos

unable to set an interface description using the edit command

Hello guys,

 

I'm moving away from cisco and I'm in the stage of learning the JUNOS CLI. I know how to set an interface description using a set command, it works fine. But I was asking my self how to do the same without unsing the set command but only relying on the edit command. I found one Juniper document explaining how to do it. but when doing it on my Vmx router, the description command is not accepted despite I'm located under the ge-0/0/ interface.

 

https://www.juniper.net/documentation/en_US/junos/topics/task/configuration/configuring-interface-de...

 

[edit interfaces ge-0/0/0]
jp# description
    ^
unknown command.
jp# description

 

Many thanks

Highlighted
Super Contributor
Posts: 119
Registered: ‎12-10-2013
0 Kudos

Re: unable to set an interface description using the edit command

on JUnos you add a configuration by using the SET command thts also the case for the description

regards

 

alexander

jpc
Visitor
Posts: 4
Registered: ‎02-16-2016
0 Kudos

Re: unable to set an interface description using the edit command

thanks alexander,

 

But why is the Juniper document does not put any mention to the set command, especially when this document is supposed to teach people how to set an interface description ?

Recognized Expert
Posts: 308
Registered: ‎10-04-2012
0 Kudos

Re: unable to set an interface description using the edit command

[ Edited ]

 Error in the online documentation most likely. 

 

Of course, it is possible to avoid using the set command, but that would involve using "load" instead.  e.g.

 

> configure
Entering configuration mode

[edit]
# load merge terminal
[Type ^D at a new line to end input]
interfaces {
    ge-0/0/0 {
        description "new description";
    }
}
load complete

[edit]
# show | compare
[edit interfaces ge-0/0/0]
-   description "old description";
+   description "new description";

[edit]
# commit and-quit

Or use a combination of edit and load e.g.

 

> configure
Entering configuration mode

[edit]
# edit interfaces ge-0/0/0

[edit interfaces ge-0/0/0]
# load merge relative terminal
[Type ^D at a new line to end input]
description "relative description";
load complete

[edit interfaces ge-0/0/0]
# show | compare
[edit interfaces ge-0/0/0]
- description "old description";
+ description "relative description";

[edit interfaces ge-0/0/0]
# commit and-quit

Regards,

Andy

Distinguished Expert
Posts: 4,698
Registered: ‎03-30-2009
0 Kudos

Re: unable to set an interface description using the edit command

Agree that this document linked above is poorly written.  I've submitted feedback on the page requesting an update.

 

Edit is the command used in Junos to navigate the configuration hierarchy to place yourself at a specific level in the configuration.

 

Only the set command will actually create new entries in the device hierarchy for values like the description of the interface.

 

As mentioned above, you can also use the load command to bulk adde entries from a text file in in either the set or  hierarchcical format.  Or pasted in from the terminal.

Steve Puluka BSEET
Juniper Ambassador
Senior IP Engineer - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
JNCIA-Junos JNCIS-SEC JNCIP-SEC JNCSP-SEC
JNCIS-FWV
JNCDA JNCDS-DC JNCDS-SEC
JNCIS-SP
ACE PanOS 6 ACE PanOS 7
http://puluka.com/home