Config Groups
up2thetime
Member Posts: 154
in Juniper
Hey,
Trying to follow the configuration groups example in the JNCIA guide. Having a few issues here...
I define a group as follows:
show groups
INTERFACE {
interfaces {
<em*> {
unit 0 {
family inet {
address 192.168.1.1/24;
}
}
}
}
}
This group should apply 192.168.1.1 to all interfaces beginning with em. I tried applying the group with:
set interfaces apply-groups INTERFACE
However it doesn't apply to any interfaces.
I also tried creating an MTU group with:
show groups
MTU {
interfaces {
<em*> {
mtu 1400;
}
}
}
However this group doesn't apply either.
Also, when trying to delete the group with delete groups INTERFACE and delete groups MTU I get the following error on commit:
commit
[edit interfaces]
'apply-groups INTERFACE'
Configuration group 'INTERFACE' is not defined
error: commit failed: (missing statements)
and
[edit interfaces]
'apply-groups MTU'
Configuration group 'MTU' is not defined
error: commit failed: (missing statements)
Any ideas?
Thank you.
EDIT:
I eventually added an ip address to em3 with set interface em3 unit 0 family inet address 10.1.1.1/24. Once I committed this, I noticed that both the MTU and INTERFACE groups were applied. So the interfaces ended up with the 10. address and the 192. address, and an MTU of 1400. I'm not sure why I needed to manually add an ip address to the interface before the configuration group was applied.
Trying to follow the configuration groups example in the JNCIA guide. Having a few issues here...
I define a group as follows:
show groups
INTERFACE {
interfaces {
<em*> {
unit 0 {
family inet {
address 192.168.1.1/24;
}
}
}
}
}
This group should apply 192.168.1.1 to all interfaces beginning with em. I tried applying the group with:
set interfaces apply-groups INTERFACE
However it doesn't apply to any interfaces.
I also tried creating an MTU group with:
show groups
MTU {
interfaces {
<em*> {
mtu 1400;
}
}
}
However this group doesn't apply either.
Also, when trying to delete the group with delete groups INTERFACE and delete groups MTU I get the following error on commit:
commit
[edit interfaces]
'apply-groups INTERFACE'
Configuration group 'INTERFACE' is not defined
error: commit failed: (missing statements)
and
[edit interfaces]
'apply-groups MTU'
Configuration group 'MTU' is not defined
error: commit failed: (missing statements)
Any ideas?
Thank you.
EDIT:
I eventually added an ip address to em3 with set interface em3 unit 0 family inet address 10.1.1.1/24. Once I committed this, I noticed that both the MTU and INTERFACE groups were applied. So the interfaces ended up with the 10. address and the 192. address, and an MTU of 1400. I'm not sure why I needed to manually add an ip address to the interface before the configuration group was applied.
Comments
-
tomtom1 Member Posts: 375Should be as simple as this:
root@R1# set groups mtu-sizing interfaces <em*> mtu 9000 [edit] root@R1# delete interfaces em1.0 [edit] root@R1# show interfaces em1.0 root@R1# set interfaces em1 apply-groups mtu-sizing [edit] root@R1# show interfaces em1 | display inheritance ## ## '9000' was inherited from group 'mtu-sizing' ## mtu 9000;
-
up2thetime Member Posts: 154Odd, that's what I was trying… Maybe it has to do with the fact that I'm running an Olive?