Use Case: Intra-tenant Firewall with Policy-based Routing
Refer the figure given below for topology details.
In this topology, Leaf1 and Leaf3 are a vPC pair and they are connected to Source (10.1.10.15) with the Source Network (10.1.10.1/24). The service leaf is connected to the virtual Firewall ASA and Leaf-15 is connected to Destination (10.1.11.100). In this use case, the source network refers to ‘client’ and the destination refers to ‘server’.
Any traffic that is traversing from Source to Destination must go to the outside service network, and the firewall performs its function by allowing or denying traffic. This traffic is then routed to the inside service network and on to the Destination network. Since the topology is stateful, the traffic coming back from the destination to the source follows the same path.
Now, let us see how to perform service redirection in DCNM.
Note |
|
Select Control > Fabrics > Services.
This use-case consists of the following steps:
1. Create Service Node
Procedure
Step 1 |
From the Scope drop-down list, select Site_A. |
Step 2 |
Click the Add icon in the Service Nodes window. |
Step 3 |
Enter the node name and specify Firewall in the Type dropdown box. The Service Node Name has to be unique. |
Step 4 |
From the Form Factor drop-down list, select Virtual. |
Step 5 |
In the Switch Attachment section, from the External Fabric drop-down list, select the external fabric in which the service node (for example, ASA firewall) is located. Note that the service nodes need to belong to the external fabric. This is a prerequisite before creating a service node. |
Step 6 |
Enter the interface name of the service node that will be connected to the service leaf. |
Step 7 |
Select the attached switch that is the service leaf, and the respective interface on the service leaf. |
Step 8 |
Select the service_link_trunk template. DCNM supports trunk, port channel, and vPC link templates. The available link templates in the Link Template drop-down list are filtered based on the selected Attached Switch Interface type. |
Step 9 |
Specify the General Parameters and Advanced parameters, if required. Some parameters are pre-filled with the default values. |
Step 10 |
Click Next to save the created service node. |
2. Create Route Peering
Let us now configure the peering between a service leaf and a service node.
Procedure
Step 1 |
Enter the peering name and select Intra-Tenant Firewall from the Deployment drop-down list. |
Step 2 |
Under Inside Network, from the VRF drop-down list, select a VRF that already exists and select Inside Network under Network Type. Enter the name of the Service Network and specify the Vlan ID. You can also click Propose to allow DCNM to fetch the next available VLAN ID from the specified service network VLAN ID range in the fabric settings. The default Service Network Template is Service_Network_Universal. Under the General Parameters tab, specify the gateway address for the service network. Specify the Next Hop IP Address. This next hop address has to be within the ‘inside service network’ subnet. Under the Advanced tab, the default Routing Tag value is 12345. |
Step 3 |
Specify the required parameters under Outside Network and specify the Next Hop IP Address for Reverse Traffic. This next hop address for reverse traffic needs to be within the ‘outside service network’ subnet. |
Step 4 |
Click Next to save the created route peering. |
3. Create Service Policy
Procedure
Step 1 |
Specify a name for the policy and select the route peering from the Peering Name drop-down list. |
||
Step 2 |
Select the source and destination VRFs from the Source VRF Name and Destination VRF Name drop-down lists. The source and destination VRFs for an intra-tenant firewall deployment have to be the same. |
||
Step 3 |
Select the source and destination networks from the Source Network and Destination Network drop-down lists, or specify the source or destination network that is within the network subnets defined in the Control > Fabrics > Networks window. |
||
Step 4 |
The next hop and reverse next hop fields are populated based on the values entered while creating the route peering. Select the check box next to the Reverse Next Hop IP Address field to enable policy enforcement on reverse traffic. |
||
Step 5 |
Under the General Parameters tab in the policy template, select ip from the Protocol dropdown list, and specify any in the Source Port and the Destination Port fields.
|
||
Step 6 |
Under the Advanced tab, by default, permit is selected for Route Map Action and none is selected for the Next Hop Option. You can change these values, and customize the ACL name and route map match sequence number, if required. For more information, refer Templates in the Layer 4-Layer 7 Service configuration guide. |
||
Step 7 |
Click Create to save the created service policy. This completes the procedures that have to be performed to specify the flows for redirection. |
4. Deploy Route Peering
Procedure
Step 1 |
In the Service Nodes window, select the required peering under the Route Peering tab. |
Step 2 |
Click the toggle button under Action to attach service networks to the service leafs. |
Step 3 |
Click Preview to view the configurations that will be pushed to the service leaf. Previously, we had created inside and outside service networks. You can view these network configurations that will be pushed to the service leaf. |
Step 4 |
Click Close to close the Preview Route Peering window. |
Step 5 |
Click Deploy in the Service Nodes window to deploy the configuration to the attached switches (service leaf(s)) for route peering. Click the Deploy button in the pop-up window to confirm deployment. |
Step 6 |
Click the Refresh icon for the latest peering configuration attachment and deployment status. |
5. Deploy Service Policy
Perform the following procedure to deploy the service policy. This policy’s corresponding configuration will be deployed to the switches that the source and destination network are attached to, and to the service leaf(s).
Procedure
Step 1 |
Select the checkbox next to the required policy under the Service Policy tab. |
Step 2 |
Click the toggle button under Action to enable this policy. |
Step 3 |
Click Preview to view the configuration of the selected network. |
Step 4 |
Select a switch and a source, destination, or service network, from the drop-down lists to view the intended configuration of a specific source, destination, or service network, on the selected switch. In this window, you can see that there is an access list that will be created with a route map. This configuration will be pushed to the SVI. Click Close to close the Preview Service Policy window. |
Step 5 |
Click Deploy in the Service Nodes window to deploy the configuration to the attached switches (service leaf(s)). Click the Deploy button in the pop-up window to confirm deployment. |
Step 6 |
Click the Refresh icon for the latest policy attachment and deployment status. This policy will be pushed to the switches that the source and destination networks are attached to, as well as the service leaf(s). After pushing the policy, the status column shows In-Sync. |
6. View Stats
Now that the respective redirection policies are deployed, ping traffic will be redirected to the firewall.
To visualize this scenario in DCNM, click the icon under the Stats column.
You can view the cumulative statistics for a policy in a specified time range.
Statistics are displayed for forwarding traffic on the source switch, for reversed traffic on the destination switch, and for traffic in both directions on the service switch.
7. View Traffic Flow in Fabric Builder
The service node in the external fabric is attached to the service leaf, and this external fabric is shown as a cloud icon in the DCNM topology in the fabric builder.
Procedure
Step 1 |
Click the service leaf and click Show more flows. You can see the flows that have been redirected. |
Step 2 |
Click Details in the Service Flows window to display attachment details. |
8. Visualize Redirected Flows to Destination in the Topology window
Procedure
Step 1 |
Click Topology and click on leafs to visualize the redirected flows to destination. |
Step 2 |
Select Redirected Flows from the drop-down list. |
Step 3 |
Select a policy from the drop-down list or initiate a search by entering a policy name, source network and destination network in the search field. The search field is autopopulated based on your input. The switches, on which the source and destination network have been attached and the flows have been redirected, are highlighted. |
Step 4 |
The service node is shown as connected by a dotted line to the leaf switch on the topology window. Hover over the dotted line to get more information about the interface. The traffic from Source traverses to the service leaf where the firewall is configured. Based on firewall rules, traffic is allowed to reach the destination, Leaf 15. |