Ticker

6/recent/ticker-posts

How to use interface-range command on Juniper Switch | vQFX | EVE-NG

In this article, lets understand how to configure Interface range on Juniper switch. Interface range can be very useful in a scenario where same configurations have to be applied to a range of ports. Here instead of going into each and every port to make the changes, we can make use of this feature to save time.

so how do we do it ?

Lets configure interface range with the name vlan10 and assign the port range xe-0/0/5 to xe-0/0/10.
root@vqfx-re# set interfaces interface-range vlan10 member-range xe-0/0/5 to xe-0/0/10
root@vqfx-re# commit

Lets configure vlan 10.
root@vqfx-re# set vlans vlan10 vlan-id 10
root@vqfx-re# commit

Now Let's assign the configured vlan to the interface range.
root@vqfx-re# set interfaces interface-range vlan10 unit 0 family ethernet-switching vlan members vlan10
root@vqfx-re# commit

Let's do 'show vlans' and confirm whether the ports in the interface range vlan10 are assigned to the configured vlan.
root@vqfx-re> show vlans 
Routing instance   VLAN name   Tag    Interfaces
default-switch     vlan10      10     xe-0/0/10.0*
                                      xe-0/0/5.0*
                                      xe-0/0/6.0*
                                      xe-0/0/7.0*
                                      xe-0/0/8.0*
                                      xe-0/0/9.0*    
                      
To add description to the ports.
root@vqfx-re# set interfaces interface-range vlan10 description  membersofvlan10

root@vqfx-re> show interfaces descriptions 
Interface       Admin Link Description
xe-0/0/5        up    up   membersofvlan10
xe-0/0/6        up    up   membersofvlan10
xe-0/0/7        up    up   membersofvlan10
xe-0/0/8        up    up   membersofvlan10
xe-0/0/9        up    up   membersofvlan10
xe-0/0/10       up    up   membersofvlan10

To disable the ports.
root@vqfx-re# set interfaces interface-range vlan10 disable

To enable the ports.
root@vqfx-re# delete interfaces interface-range vlan10 disable

Note:
at the [edit interfaces interface-rang vlan10] hierarchy level the command 'show' will display all the configuration changes added at this particular hierarchy.  
{master:0}[edit interfaces interface-range vlan10]
root@vqfx-re# show 
member-range xe-0/0/5 to xe-0/0/10;
description membersofvlan10;
unit 0 {
    family ethernet-switching {
        vlan {
            members vlan10;
        }
    }
}

Post a Comment

0 Comments