[j-nsp] Multi Core on JUNOS?

Phil Shafer phil at juniper.net
Fri Oct 23 14:11:45 EDT 2015


Stepan Kucherenko writes:
>But let's say we want to add another address for another client
>
>[edit interfaces ge-0/0/0 unit 0]
>cli# set family inet address 6.7.8.9/10
>
>[edit interfaces ge-0/0/0 unit 0]
>сli# comment "Client Y" [ESC-,]
>
>family inet {
>    /* Client Y */
>    address 1.2.3.4/5;
>    address 6.7.8.9/10;
>}
>
>Correct ?

No, each object in the database can have its own comment attached,
and since the two addresses are distinct objects, each can carry a
comment, like:

[edit]
phil at dent# show interfaces
ge-0/0/0 {
    unit 0 {
        family inet {
            /* one */
            address 10.1.2.3/30;
            /* two */
            address 10.4.5.6/30;
        }
    }
}

>set protocols bgp group ix-v4 type external import [ reject-some-prefixes ///don't like 
>them// set-community //for further filtering// ] peer-as X neighbor 1.2.4.5 //location//
> export customers-only //please don't delete this//

Personally, I dislike this.  It makes command lines less readable and
more likely to cause errors.

But along the same line, I have kicked around the idea of making
"load" be truly interactive, so I could to stuff like:

[edit]
cli# load terminal merge interactive
[Type ^D at a new line to end input]
protocols bgp group foo local?
Possible completions:
  local-address        Address of local end of BGP session
> local-as             Local autonomous system number
  local-interface      Local interface for IPv6 link local EBGP peering
  local-preference     Value of LOCAL_PREF path attribute
protocols bgp group foo local-as ?
Possible completions:
  <as_num>              Autonomous system number in plain number or 'higher 16bits'.'Lower 16 bits' (asdot notation) format
  alias                Treat this AS as an alias to the system AS
  loops                Maximum number of times this AS can be in an AS path (1..10)
  no-prepend-global-as  Do not prepend global autonomous-system number in advertised paths
  private              Hide this local AS in paths learned from this peering
protocols bgp group foo local-as 42;
^D
load complete

This would allow set-ish style (since the UI really doesn't need the
braces on input) as well as allowing the placement of comments:

[edit]
cli# load terminal merge interactive
[Type ^D at a new line to end input]
protocols bgp /* foo is cool */ group foo /* local-as is also */ local-as 42;
/* You can also put braces here */
protocols {
   bgp {
      /* goo is not */
      group goo { local-as 51; }}}
^D
load complete


But I need to work out what (and how) would get redrawn when you
type "?" deep under braces (like at the "51" above).  I can't emit
the [edit] line, but just redrawing the current line doesn't give
the context the way I'd like it to.  Perhaps a distinct key to give
the content-as-edit-line?

Thanks,
 Phil


More information about the juniper-nsp mailing list