Pattern matching variables
The VCS makes use of pattern matching in a number of its features, namely
Allow Lists and Deny Lists
,
pre-
search transforms
and when configuring
search rules and zone transforms
.
For each of these pattern matches, the VCS allows you to use a variable that it will replace with the current
configuration values before the pattern is checked.
These variables can be used as either or both of:
n
all or part of the pattern that is being searched for
n
all or part of the string that is replacing the pattern that was found
The variables can be used in all types of patterns (
Prefix
,
Suffix
,
Regex
and
Exact
).
The table below shows the strings that are valid as variables, and the values they represent.
String
Represents value returned by...
When used in a Pattern field
When used in a
Replace field
%ip%
xConfiguration Ethernet 1 IP V4
Address
xConfiguration Ethernet 1 IP V6
Address
xConfiguration Ethernet 2 IP V4
Address
xConfiguration Ethernet 2 IP V6
Address
Matches all IPv4 and IPv6
addresses.
Applies to all peer addresses
if the VCS is part of a cluster.
not applicable
%ipv4%
xConfiguration Ethernet 1 IP V4
Address
xConfiguration Ethernet 2 IP V4
Address
Matches the IPv4 addresses
currently configured for LAN
1 and LAN 2.
Applies to all peer addresses
if the VCS is part of a cluster.
not applicable
%ipv4_1%
xConfiguration Ethernet 1 IP V4
Address
Matches the IPv4 address
currently configured for LAN
1.
Applies to all peer addresses
if the VCS is part of a cluster.
Replaces the
string with the LAN
1 IPv4 address.
If the VCS is part of
a cluster, the
address of the
local peer is
always used.
%ipv4_2%
xConfiguration Ethernet 2 IP V4
Address
Matches the IPv4 address
currently configured for LAN
2.
Applies to all peer addresses
if the VCS is part of a cluster.
Replaces the
string with the LAN
2 IPv4 address.
If the VCS is part of
a cluster, the
address of the
local peer is
always used.
Cisco VCS Administrator Guide (X8.1.1)
Page 389 of 507
Reference material
Pattern matching variables