Junos OS

last person joined: yesterday 

Ask questions and share experiences about Junos OS.
  • 1.  Changing system Prompt

    Posted 03-22-2011 07:47

    Is there a way to change the system prompt to somethign different then the hostame?



  • 2.  RE: Changing system Prompt
    Best Answer

    Posted 03-22-2011 08:47

     

    dhanks@MX80> set cli prompt ?
    Possible completions:
      <cli-prompt>         CLI command prompt string
    dhanks@MX80> set cli prompt

     

     



  • 3.  RE: Changing system Prompt

     
    Posted 03-22-2011 08:49

    Hi,

     

    You can try "set cli prompt" command.

     

    http://www.juniper.net/techpubs/en_US/junos10.3/topics/reference/command-summary/set-cli-prompt.html

     

    Hope this helps Smiley Happy

     

    Regards

    Surya Prakash



  • 4.  RE: Changing system Prompt

    Posted 03-22-2011 08:53
    Thanks guys. This does work but as soon as I log out it goes back to what it was. Anyway to make it permanent?


  • 5.  RE: Changing system Prompt

    Posted 03-22-2011 09:18

    Junos only supports temporary prompt changes.

     

    There's no permanent way to change the prompt.  We intentionally limit the customization so that Junos is able to maintain its look and feel.



  • 6.  RE: Changing system Prompt

    Posted 03-22-2011 09:21

    Makes sense.  I basicly have this problem:

     

    I have a router in many different cities.  The router perform the same function in each city so we give it the same hostname in each city.  The domain the router is part of is different.

     

    ex) Router in Vancouver is WanRouter  but its FQDN is WanRouter.VAN.company.com

          Router in LA is WanRouter but tis FQDN is WanRouter.LA.company.com

     

    my issue is when I SSH the prompt alwasy just says  root@WanRouter>

     

    I could just change the hostname to be WanRouter-LA but then my FQDN is WanRouter-LA.LA.company.com which looks silly.

     

    Any suggestion?



  • 7.  RE: Changing system Prompt

    Posted 03-22-2011 10:46

    Don't use sub-domains 😉

     

    I also suggest the following hostname scheme:

     

    AIRPORT-FUNCTION-DEVICE-NODE-PROCESSOR.domain.com

     

    LAX-WAN-MX80-01-RE0.domain.com

     

    Also apply DNS to each interface as well so that your traceroute is pretty.

     

    AIRPORT-FUNCTION-DEVICE-NODE-PROCESSOR-PORT.domain.com

     

    LAX-WAN-MX80-01-RE0-xe-0/0/0.domain.com

     

    Use the apply-groups if you have a router with two routing engines.



  • 8.  RE: Changing system Prompt

    Posted 03-22-2011 10:48

    Thanks for the great Tip. 

     

    Can you show me an example of applying DNS on each interface.  I thought it would just always take the system's DNS.



  • 9.  RE: Changing system Prompt

    Posted 03-22-2011 13:16

    There's no Junos configuration for that.

     

    For example if your IP on xe-0/0/0.0 was 10.0.0.1/30, you would simply add an entry into DNS for 10.0.0.1 with the extended hostname.