on a Juniper switch we define apply-groups that have common sets of settings;
then we apply the groups to the interfaces
this means that we consistently set things on interfaces across all switches.
e.g. when we moved all trunk interfaces to support JUMBO frames so we added that apply group to the trunk interface apply group and then all trunk interfaces everywhere got configured the same..
so, Our apply-groups setting is very large, because it's supposed to be the same across all switches.
Staff here simply like to be able to paste this into the 'string' compare box and have it do the right thing.
below is part of it.
groups {
IFCS-ALL-lo0 {
interfaces {
lo0 {
unit <*> {
family inet {
filter {
input INET-CONTROLPLANE-IN;
}
}
}
}
}
}
10HDX {
/* This hardsets ifc to 10 half-duplex */
interfaces {
<ge*> {
ether-options {
no-flow-control;
link-mode half-duplex;
speed {
10m;
}
}
}
}
}
100FDX {
/* This hardsets ifc to 100 full-duplex */
interfaces {
<ge*> {
ether-options {
no-auto-negotiation;
link-mode full-duplex;
speed {
100m;
}
}
}
}
}
1000FDX {
/* This hardsets ifc to 1000 full-duplex */
interfaces {
<ge*> {
ether-options {
no-auto-negotiation;
link-mode full-duplex;
speed {
1g;
}
}
}
}
}
JUMBO_FRAMES {
/* This applies the MTU setting to an ifc */
interfaces {
<*> {
mtu 9216;
}
}
}
INTERFACE_SHUTDOWN {
/* This shuts down the ifc; does not disable poe */
interfaces {
<*> {
description Unused;
disable;
unit 0 {
disable;
family ethernet-switching;
}
}
}
}
LACP {
/* This adds the lacp protocol to an AE ifc */
interfaces {
<ae*> {
apply-groups JUMBO_FRAMES;
aggregated-ether-options {
lacp {
active;
periodic fast;
}
}
}
}
}
LAG_CONFIG {
/* Turns any AE ifc to a trunked ifc that carries ALL vlans for a given L2 topology */
interfaces {
<ae*> {
apply-groups VLAN_TRUNKS;
aggregated-ether-options {
lacp {
active;
periodic fast;
}
}
}
}
}
TRUNK {
/* Turns any ifc to trunk-mode to carry more than 1 vlan but not ALL vlans */
interfaces {
<*> {
apply-groups JUMBO_FRAMES;
unit 0 {
family ethernet-switching {
port-mode trunk;
}
}
}
}
}
VLAN_TRUNKS {
/* Turns any ifc to a trunked ifc that carries ALL vlans for a given L2 topology */
interfaces {
<*> {
apply-groups JUMBO_FRAMES;
unit 0 {
family ethernet-switching {
port-mode trunk;
}
}
}
}
}