Book Image

VMware NSX Cookbook

By : Bayu Wibowo, Tony Sangha
Book Image

VMware NSX Cookbook

By: Bayu Wibowo, Tony Sangha

Overview of this book

This book begins with a brief introduction to VMware's NSX for vSphere Network Virtualization solutions and how to deploy and configure NSX components and features such as Logical Switching, Logical Routing, layer 2 bridging and the Edge Services Gateway. Moving on to security, the book shows you how to enable micro-segmentation through NSX Distributed Firewall and Identity Firewall and how to do service insertion via network and guest introspection. After covering all the feature configurations for single-site deployment, the focus then shifts to multi-site setups using Cross-vCenter NSX. Next, the book covers management, backing up and restoring, upgrading, and monitoring using built-in NSX features such as Flow Monitoring, Traceflow, Application Rule Manager, and Endpoint Monitoring. Towards the end, you will explore how to leverage VMware NSX REST API using various tools from Python to VMware vRealize Orchestrator.
Table of Contents (19 chapters)
Title Page
Packt Upsell
Foreword
Contributors
Preface
Index

Configuring Network Address Translation


An NSX ESG also provides Network Address Translation (NAT) capability to allow mapping of a public IP address to devices that are on private IP addresses space or have overlapping IP addresses.

The ESG provides the ability to configure two types of NAT, which are as follows:

  • Source NAT (SNAT): This is the most common type of NAT and is used to change the source address of the packet passing through
  • Destination NAT (DNAT): Used to change the destination IP address of the packet passing through; it is generally used to change from a public IP address to private RFC 1918 address on the internal network

In this recipe, we will configure both SNAT and DNAT for our Windows VM. The configuration of each is depicted in the following figure:

As you can see in the preceding figure, for the SNAT example we will be changing the source address from 192.168.200.201 to 10.0.0.170, and for the DNAT example we will be changing the destination address from 10.0.0.171 to...