Pages

4/07/2012

Interface-range - IOS Vs Junos

To edit multiple interfaces at once. In config mode - IOS "(config)#", Junos "#"
Purpose IOS Junos
 go to multiple interfaces configuration (define range) interface range fastethernet0/1 – 9 set interfaces interface-range myshutdown-ed member ge-0/0/0
set interfaces interface-range myshutdown-ed member ge-0/0/1
... or
set interfaces interface-range myshutdown-ed member-range ge-0/0/0 to ge-0/0/9
... or
set interfaces interface-range myshutdown-ed member ge-0/0/[0-9]
apply some (e.g . shutdown) command to interface range shutdown set interfaces interface-range myshutdown-ed disable

showing configuration
use show or show interfaces interface-range myshutdown-ed

interfaces {
    interface-range myshutdown-ed {
        member "ge-0/0/0";
        member "ge-0/0/1";
        ...
        disable;
    }

... or

interfaces {
    interface-range myshutdown-ed {
        member-range ge-0/0/0 to ge-0/0/9;
        disable;
    }

... or 

interfaces {
    interface-range myshutdown-ed {
        member "ge-0/0/[0-9]";
        disable;
    }

How the configuration is actually applied
show interfaces | display inheritance | except #

ge-0/0/0 {
    disable;
}
ge-0/0/1 {
    disable;
}
...
ge-0/0/9 {
    disable;
}

or you can see from what is configuration applied (e.g. from interface-range or even from apply-groups

show interfaces | display inheritance

ge-0/0/0 {
    ##
    ## 'disable' was expanded from interface-range 'shutdown-ed'
    ##
    disable;
}
...

Junos: Don't forget to commit.

This contribution is also listed in forums.juniper.net - IOS to Junos (I2J) Tips Contest
Interface range - IOS Vs Junos

No comments:

Post a Comment