Reuse of same PBR Service Graph Template In Cisco ACI
Reference: Cisco.com
Multiple consumer and provider EPGs
Service graphs are applied to contracts, and contracts can be placed between multiple pairs of EPGs. When you use service graphs with L4-L7 devices in routed (Go-To) mode or bridge (Go-Through) mode, the reuse of a graph must take into account the bridge domain to which the L4-L7 device is attached. When you use a service graph with PBR, you have more flexibility in attaching the contract between any two pairs of EPGs across multiple bridge domains, as long as this approach is compatible with the VRF instance to which the L4- L7 device belongs.
If traffic is between one of the consumer EPGs and one of the provider EPGs, it is redirected to the PBR node:
Reuse the same Service Graph Template with multiple contracts
You can use the same service graph instance with multiple contract, you just need to apply the service graph on contract subject and make sure that under device selection policies, contract name is set to any (which means you need to apply Service graph template manually by creating device selection policies and applying contract to consumer and provider with subject associated to the service graph template)
1- Make sure Logical device context under device selection policies is using “any” under contract Name:
Note: if you apply service graph template by right-clicking “Apply L4/L7 Service Graph Template”, it will automatically add device context with specific contract name, associate service graph template to the contract subject and apply it to EPGs.
Instead, you need to apply it manually and chose contract name “Any“.
2- Associate the service graph template to the new Contract subject:
Every time you reuse the service graph template in a new contract, a new service instance will be deployed:
Newly deployed service graph instance: