[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]

Inserting an Identifier

To insert an identifier into a specific location within the configuration, use the insert command:

insert <statement-path> identifier1 (before | after) identifier2

Generally, you can add most identifiers into the configuration in any order. However, when you are inserting identifiers that must be analyzed in order—such as terms in a routing policy or firewall filter—you must specify before or after. If you do not specify where to insert an identifier with the insert command, the identifier is placed at the end of the list of similar identifiers.

In the following example, the firewall filter terms were added to the configuration in the following order: term1, term3, term2. The insert command is used to insert term2 before term3.

[edit]
user@host# show firewall
family inet {
filter filter1 {
term term1 {
from {
address {
192.168.0.0/16;
}
}
then {
reject;
}
}
term term3 {
then {
reject;
}
}
term term2 {
from {
destination-port ssh;
}
then accept;
}
}
}
[edit]
user@host# insert firewall family inet filter filter1 term term2 before term term3
[edit]
user@host# show firewall
family inet {
filter filter1 {
term term1 {
from {
address {
192.168.0.0/16;
}
}
then {
reject;
}
}
term term2 {
from {
destination-port ssh;
}
then accept;
}
term term3 {
then {
reject;
}
}
}
}

[ Contents] [ Prev] [ Next] [ Index] [ Report an Error]