Junos OS

last person joined: 2 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  exclude some interfaces from a range

    Posted 07-14-2014 02:01

    Hi; I want to exclude some interfaces from a previously configured range with command "delete interfaces interface-range ALL_INTERFACES member-range ge-0/0/13 to ge-0/0/15" and put them inside another range, but I get "warning: statement not found" error. so how can I do this?



  • 2.  RE: exclude some interfaces from a range
    Best Answer

    Posted 07-14-2014 02:13

    Hi,

     

    This error is seen because this statement (set interfaces interface-range ALL_INTERFACES member-range ge-0/0/13 to ge-0/0/15) not exist in the configuration file you can do as below

     

    1- show interfaces interface-range ALL_INTERFACES | display set

    2- delete the full line for the range contain ge-0/0/13 to ge-0/0/15

     for example

    delete interfaces interface-range ALL_INTERFACES  member-range ge-0/0/0 to ge-0/0/23

     

    3- configure to separate ranges exclude ge-0/0/13 to ge-0/0/15

    set interfaces interface-range ALL_INTERFACES  member-range ge-0/0/0 to ge-0/0/12

    set interfaces interface-range ALL_INTERFACES  member-range ge-0/0/16 to ge-0/0/23

     

    4- configure ge-0/0/13 to ge-0/0/15 in the new range

    set interfaces interface-range NEW_RANGE  member-range ge-0/0/13 to ge-0/0/15

     

    5- commit your config.

     

    Regards,
    Mohamed Elhariry
    2* JNCIE (SEC # 159, SP # 1059),JNCIP-ENT

    [Click the "Star" for Kudos if you think I earned it!
    If this solution worked for you please flag my post as an "Accepted Solution" so others can benefit..]

     

     

     



  • 3.  RE: exclude some interfaces from a range

     
    Posted 07-14-2014 02:15

    You would have to remove the interface range and build it again:

     

    {master:0}[edit]
    lab@EX4200# show interfaces interface-range ALL | display set
    set interfaces interface-range ALL member-range ge-0/0/1 to ge-0/0/10

    {master:0}[edit]
    lab@EX4200# delete interfaces interface-range ALL member-range ge-0/0/1 to ge-0/0/10

    {master:0}[edit]
    lab@EX4200# set interfaces interface-range ALL member-range ge-0/0/1 to ge-0/0/3

    {master:0}[edit]
    lab@EX4200# set interfaces interface-range ALL member-range ge-0/0/6 to ge-0/0/10

    {master:0}[edit]
    lab@EX4200# show interfaces interface-range ALL | display set
    set interfaces interface-range ALL member-range ge-0/0/1 to ge-0/0/3
    set interfaces interface-range ALL member-range ge-0/0/6 to ge-0/0/10

    {master:0}[edit]
    lab@EX4200#

     

    I don't know your exact use case, but you can use the apply-groups-except feature in some cases to achieve some things.

     

     

     

    =====

    If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.

     



  • 4.  RE: exclude some interfaces from a range

    Posted 07-14-2014 02:31

    so if I have to remove the interface range and build it again, the configuration that is already applied to interfaces is removed too and this curropts the working network, even for some short period of time. am I right?



  • 5.  RE: exclude some interfaces from a range

     
    Posted 07-14-2014 02:44

    No, there will not be packet loss. Check out the following test:

     

     

    {master:0}[edit]
    lab@EX4200# show interfaces ge-0/0/0 | display inheritance
    ##
    ## '1600' was expanded from interface-range 'ALL'
    ##
    mtu 1600;
    unit 0 {
    family inet {
    address 192.168.0.100/24;
    }
    }

    {master:0}[edit]
    lab@EX4200#

    {master:0}[edit]
    lab@EX4200# show interfaces interface-range ALL | display set
    set interfaces interface-range ALL member-range ge-0/0/0 to ge-0/0/10
    set interfaces interface-range ALL mtu 1600

    {master:0}[edit]
    lab@EX4200# delete interfaces interface-range ALL

    {master:0}[edit]
    lab@EX4200# set interfaces interface-range ALL member-range ge-0/0/1 to ge-0/0/10

    {master:0}[edit]
    lab@EX4200# set interfaces interface-range ALL mtu 1600

    {master:0}[edit]
    lab@EX4200# show interfaces interface-range ALL | display set
    set interfaces interface-range ALL member-range ge-0/0/1 to ge-0/0/10
    set interfaces interface-range ALL mtu 1600

    {master:0}[edit]
    lab@EX4200# commit
    configuration check succeeds
    commit complete

    {master:0}[edit]
    lab@EX4200# show interfaces ge-0/0/0 | display inheritance
    unit 0 {
    family inet {
    address 192.168.0.100/24;
    }
    }

    {master:0}[edit]
    lab@EX4200#


    During all this time, I was doing a rapid ping sourced from 192.168.0.100 with no packet loss.

     

     

     

    =====

    If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.