Each record represents a NAT rule.
Summary:
type
string, one of dnat
, dnat_and_snat
,
or snat
external_ip
string
external_mac
optional string
logical_ip
string
logical_port
optional string
Common Columns:
external_ids
map of string-string pairs
Details:
type
: string, one of dnat
, dnat_and_snat
, or snat
Type of the NAT rule.
• When type
is dnat
, the externally visible IP
address external_ip
is DNATted to the IP address
logical_ip
in the logical space.
• When type
is snat
, IP packets with their source IP
address that either matches the IP address in
logical_ip
or is in the network provided by
logical_ip
is SNATed into the IP address in
external_ip
.
• When type
is dnat_and_snat
, the externally visible
IP address external_ip
is DNATted to the IP address
logical_ip
in the logical space. In addition, IP
packets with the source IP address that matches
logical_ip
is SNATed into the IP address in
external_ip
.
external_ip
: string
An IPv4 address.
external_mac
: optional string
A MAC address.
This is only used on the gateway port on distributed
routers. This must be specified in order for the NAT rule
to be processed in a distributed manner on all chassis. If
this is not specified for a NAT rule on a distributed
router, then this NAT rule will be processed in a
centralized manner on the gateway port instance on the
redirect-chassis
.
This MAC address must be unique on the logical switch that
the gateway port is attached to. If the MAC address used
on the logical_port
is globally unique, then that MAC
address can be specified as this external_mac
.
logical_ip
: string
An IPv4 network (e.g 192.168.1.0/24) or an IPv4 address.
logical_port
: optional string
The name of the logical port where the logical_ip
resides.
This is only used on distributed routers. This must be
specified in order for the NAT rule to be processed in a
distributed manner on all chassis. If this is not
specified for a NAT rule on a distributed router, then
this NAT rule will be processed in a centralized manner on
the gateway port instance on the redirect-chassis
.
Common Columns:
external_ids
: map of string-string pairs
See External IDs
at the beginning of this document.