last person joined: 3 hours ago 

Basics: AOS-CX Range contexts

This thread has been viewed 5 times
  • 1.  Basics: AOS-CX Range contexts

    Posted 14 days ago

    AOS-CX Range contexts

    Some switch features enable you to use a single command to apply configuration settings to multiple items. You specify the multiple items by creating a type of command context called a range context. Then you can execute commands that are applied to every item in the range


    switch(config)# interface 1/1/1-1/1/5

    switch(config-if-<1/1/1-1/1/5>)# no shutdown

    You can use a range context to specify multiple items for the following:

    Physical interfaces

    • Command example: interface 1/1/1-1/1/8,1/1/10,1/1/12
    • Switch prompt example: switch(config-if-<1/1/1-1/1/8,1/1/10,1/1/12>)#

    LAG interfaces

    • Command example: interface lag 1-10
    • Switch prompt example: switch(config-if-lag-<1-10>)#


    Loopback interfaces

    • Command example: interface loopback 1-10
    • Switch prompt example: switch(config-if-loopback-<1-10>)#


    VLAN interfaces

    • Command example: interface vlan 1,2,3-6
    • Switch prompt example: switch(config-vlan-if-<1,2,3-6>)#



    • Command example: vlan 1-10,15,20-25
    • Switch prompt example: switch(config-vlan-<1-10,15,20-25>)#

    Rules for range contexts

    • For interfaces that use the member/slot/port notation, items in the range must be specified in ascending
    • Contiguous items in the range are represented by the smallest and largest values separated by a For example:
    • Command: interface 1/1/1-1/1/8

    Switch prompt: switch(config-if-<1/1/1-1/1/8>)#

    • Command: vlan 1-10
    • Switch prompt: switch(config-vlan-<1-10>)#


    • Non-contiguous items in the range must be separated by For example:
    • Command: interface 1/1/1-1/1/8,1/1/10,1/1/12

    Switch prompt: switch(config-if-<1/1/1-1/1/8,1/1/10,1/1/12>)#

    • Command: vlan 1-10,15,20-25

    Switch prompt: switch(config-vlan-<1-10,15,20-25>)#

    The switch prompt is truncated to 50

    More information refer to AOS-CX CLI documentation!

    Good day!

    Yash NN