Following are the show commands associated with GPO configuration:
show contracts
Displays all the contracts applied in the switch for all the vrfs.
switch(config)# show contracts
VRF SGT DGT Policy Dir Stats Class Action OperSt
--------------------------------------------------------------------------------------------------------
vrf_blue 1000 2000 policyMap1 bidir 350370 web-class permit,log enabled
vrf_red 1000 2000 policyMap1 bidir 373270 web-class permit,log enabled
show run security-group
Displays all the security-group related configurations in the switch.
switch1(config)# show run security-group
!Command: show running-config security-group
!Running configuration last done at: Fri Dec 8 12:23:52 2023
!Time: Fri Dec 8 12:27:09 2023
version 10.4(2) Bios:version 05.50
feature security-group
security-group 1000 name webserver1
match connected-endpoints vrf vrf_blue ipv4 61.1.1.141/32
match external-subnets vrf vrf_blue ipv4 10.0.0.0/8
match connected-endpoints vrf vrf_blue ipv6 61:1:1:2:1::141/128
match external-subnets vrf vrf_blue ipv6 10:11:12:13::/64
match connected-endpoints vrf vrf_red ipv4 100.5.150.125/32
match connected-endpoints vrf vrf_red ipv6 100:1:1:495::125/128
match external-subnets vrf vrf_red ipv4 11.0.0.0/8
match vlan 10
class-map type security match-any web-class
match ip udp
match ip tcp
policy-map type security policyMap1
class web-class
vrf context vrf_blue
security contract source 1000 destination 2000 policy policyMap1
security enforce tag 100 default deny
vrf context vrf_red
security contract source 1000 destination 2000 policy policyMap1
security enforce tag 101 default deny
show contracts detail
Displays all the contracts details applied in the switch includes class-map and policy-map details.
switch1(config)# show contracts detail
VRF: vrf_blue
Contract source group any dest group 2000
Policy: policyMap1 Direction: bidir
Stats: 350370
Class: web-class
match ip udp
match ip tcp
Action: permit,log
OperSt: enabled
VRF: vrf_red
Contract source group any dest group 2000
Policy: policyMap1 Direction: bidir
Stats: 373270
Class: web-class
match ip udp
match ip tcp
Action: permit,log
OperSt: enabled
show contracts policy policyMap1
Displays contracts based on policy name.
Switch1(config)show contracts policy policyMap1
VRF SGT DGT Policy Dir Stats Class Action OperSt
--------------------------------------------------------------------------------------------------------
vrf_blue 1000 2000 policyMap1 bidir 0 web-class permit enabled
vrf_red 1000 2000 policyMap1 bidir 0 web-class permit enabled
show contracts vrf vrf_blue
Displays contracts based on vrf.
switch1(config)show contracts vrf vrf_blue
VRF SGT DGT Policy Dir Stats Class Action OperSt
--------------------------------------------------------------------------------------------------------
vrf_blue 1000 2000 policyMap1 bidir 0 web-class permit enabled
show contracts sgt 1000
Displays contract based on a given SGT.
switch1(config)# show contracts sgt 1000
VRF SGT DGT Policy Dir Stats Class Action OperSt
--------------------------------------------------------------------------------------------------------
vrf_blue 1000 2000 policyMap1 bidir 0 web-class permit,log enabled
vrf_red 1000 2000 policyMap1 bidir 0 web-class permit,log enabled
show contracts dgt 2000
Displays contract based on a given DGT.
switch1(config)# show contracts dgt 2000
VRF SGT DGT Policy Dir Stats Class Action OperSt
--------------------------------------------------------------------------------------------------------
vrf_blue 1000 2000 policyMap1 bidir 0 web-class permit,log enabled
vrf_red 1000 2000 policyMap1 bidir 0 web-class permit,log enabled
show contracts sgt 1000 dgt 2000
Displays contract based on a given SGT and DGT.
switch1(config)# show contracts sgt 1000 dgt 2000
VRF SGT DGT Policy Dir Stats Class Action OperSt
--------------------------------------------------------------------------------------------------------
vrf_blue 1000 2000 policyMap1 bidir 0 web-class permit,log enabled
vrf_red 1000 2000 policyMap1 bidir 0 web-class permit,log enabled
Use the Following show commands to see the contracts with service-redirection.
switch1(config)# show contracts policy ipv4tcp
VRF SGT DGT Policy Dir Stats Class Action OperSt
--------------------------------------------------------------------------------------------------------
ixia 2004 3004 ipv4tcp bidir 0 ipv4tcp redir enabled
switch1(config)# show contracts policy ipv4tcp detail
VRF: ixia
Contract source group 2004 dest group 3004
Policy: ipv4tcp Direction: bidir
Stats: 0
Class: ipv4tcp
match ipv4 tcp
Action: redir-1node2arm
OperSt: enabled
switch1(config)# show contracts sgt 2004 dgt 3004
VRF SGT DGT Policy Dir Stats Class Action OperSt
--------------------------------------------------------------------------------------------------------
ixia 2004 3004 ipv4tcp bidir 0 ipv4tcp redir enabled
Checking Consistency of GPO
Beginning with Cisco NX-OS Release 10.5(1)F, use the following show command to check the consistency of contracts and polices.
Command or Action
|
Purpose
|
show consistency-checker contract
vrf < all | vrf-name > | rule < rule-id >
switch1(config)# show consistency-checker contract vrf all
Contract CC: Starting for vrf= all
Contract CC: Checking if SGT feature is enabled
Contract CC: Checking DME & Policy-Mgr programming inconsistencies
Contract CC: Processing configuration data...
Contract CC: Starting validation for 15 rules
Contract CC: Fetching PT Tiles, TCAM entries from the Hardware
Contract CC: Retrieved Tile Entries 0 Tcam Entries 130
Contract CC: Examining SG-Agent and HW policy programming inconsistencies
Contract CC: Final Status = SUCCESS
|
Displays the software and hardware programming status of contracts and polices.
<all> - allows users to execute a consistency check for all contracts under all VRFs.
<vrf-name> - allows users to execute a consistency check for all contracts under a specific VRF.
<rule> - allows users to execute a consistency check for a specific rule by its identifier.
|