Configuring configuration groups on Juniper

In many cases as a network engineer, you may require to make the same task on different places. For example: you want to change the speed on all interfaces of your router to 100 Mbps, or you want to provide a description to all LAN interfaces that they are LAN interfaces.

Normally, you should go to each interface in our example, and change the speed and description. This will take a lot of time and you may do mistakes.

With configuration groups, you can write 1 command and apply it to where you want this to be applied, then everything wil be configured right away. This is a much faster way and you won’t do mistakes because it is done only 1 time.

Bottom line, if you have repetitive tasks to be done, you should consider using configuration groups.

Let’s apply a LAB now so you understand it better.

In this LAB I want to put the same description to interfaces which are connected to my LAN.

Let’s see what interfaces I have on my Juniper router:

root@R1> show interfaces terse

Interface               Admin Link Proto    Local                 Remote

ge-0/0/0                up    up

lc-0/0/0                up    up

lc-0/0/0.32769          up    up   vpls

pfe-0/0/0               up    up

pfe-0/0/0.16383         up    up   inet

inet6

pfh-0/0/0               up    up

pfh-0/0/0.16383         up    up   inet

ge-0/0/1                up    up

ge-0/0/2                up    up

ge-0/0/3                up    up

ge-0/0/4                up    up

ge-0/0/5                up    up

ge-0/0/6                up    up

ge-0/0/7                up    up

ge-0/0/8                up    up

ge-0/0/9                up    up

cbp0                    up    up

demux0                  up    up

dsc                     up    up

em0                     up    up

em1                     up    up

—(more)—

Please focus on the gigabitethernet interfaces. Let’s say that all gigabitethernet interfaces are for LAN interfaces. I want to put on all LAN interfaces a description of “Connected to the LAN”.

Let’s check if any interface has any description set on it:

root@R1> show interfaces descriptions

root@R1>

No any description is set on any interface.

Now, I will need to create the configuration group so all gigabitethernet interfaces receive a description of “Connected to LAN”:

root@R1# set groups DESCRIPTION interfaces <ge-0/0/*> description “Connected to LAN”

[edit]

root@R1#

I have created a group called DESCRIPTION and I said that all interfaces started with ge-0/0/* where * is a an Asterix representing any number from 0 to 9, then put a description on those interface of “Connected to LAN”.

Let’s check how the group looks now:

root@R1# show groups

DESCRIPTION {

interfaces {

<ge-0/0/*> {

description “Connected to LAN”;

}

}

}

[edit]

root@R1# commit

commit complete

[edit]

root@R1#

Everything looks well, and I have committed the configuration at the end.

What I have done is not enough. Creating a group by itself does not make any changes on the interfaces, so we need to apply the group DESCRIPTION to the interfaces:

root@R1# edit interfaces

[edit interfaces]

root@R1# set apply-groups DESCRIPTION

[edit interfaces]

root@R1# commit

commit complete

[edit interfaces]

root@R1

This way, all gigabitethernet interfaces have received a description 😊

This is all what I wanted to show you in this lesson, hope you enjoyed it and see you in the upcoming one.

Course Content

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

About