Routing

last person joined: 4 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  unable to set an interface description using the edit command

     
    Posted 04-15-2017 02:59

    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-description.html

     

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

     

    Many thanks



  • 2.  RE: unable to set an interface description using the edit command

    Posted 04-15-2017 03:08

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

    regards

     

    alexander



  • 3.  RE: unable to set an interface description using the edit command

     
    Posted 04-15-2017 04:01

    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 ?



  • 4.  RE: unable to set an interface description using the edit command

     
    Posted 04-15-2017 07:24

     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



  • 5.  RE: unable to set an interface description using the edit command
    Best Answer

    Posted 04-16-2017 07:00

    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.