SIP NAT Behavior

CUBE provides SIP NAT behavior settings to control how it treats remote subscribers that may be behind a NAT device. These settings are separate from media keepalive: they do not configure periodic RTP or RTCP packets. For media keepalive configuration, see NAT Traversal using RTP Keepalive.

For NAT behavior in CUBE SP Edition, including SIP adjacencies, its configuration procedure and recommendations, see Implementing Firewall traversal and NAT.

NAT behavior options

  • Auto — CUBE automatically detects whether a remote subscriber is behind NAT.

  • Force-on — CUBE assumes that all remote subscribers are behind NAT.

  • Disabled — SIP NAT behavior is disabled by default unless Auto or Force-on is configured.

By default, SIP NAT behavior is disabled globally on CUBE. Configure nat auto to enable automatic NAT detection, or nat force-on to apply NAT handling unconditionally. You can configure the NAT behavior at the scope appropriate for the calls: globally, under a tenant, or on a dial peer. A dial-peer setting takes precedence over the tenant setting, and a tenant setting takes precedence over the global setting. The system option under a tenant or dial peer selects the inherited setting. Use the Cisco IOS Voice Command Reference for release-specific command syntax and supported configuration modes.

Auto-detecting NAT

SIP NAT behavior is disabled by default. When CUBE is configured to auto-detect NAT, then for each request that it receives, the SBC determines whether a NAT is in use for that endpoint. If the SBC determines that NAT is in use, then the SBC stores the bindings for that request and uses them when sending a response. Additionally, the SBC stores and reuses bindings for REGISTER requests for subsequent Out-of-dialog and Dialog-forming requests. Automatically detecting NAT (Auto NAT) is recommended for UNI side adjacencies. Turning off Auto NAT is recommended for NNI side adjacencies.

The nat command syntax is:

nat { auto | force-on }

The no form of either of the two options will set the default which is Auto NAT.

force-on —Configures the SIP adjacency to assume that all endpoints are behind a NAT device. By default, SBC auto-detects whether the endpoints are behind a NAT device.

The default Auto NAT autodetects subscriber in a remote subnet when located behind a NAT. It is recommended for UNI side adjacencies.

Configure the NAT behavior at the scope appropriate for the calls: globally, under a tenant, or on a dial peer. See Cisco IOS Voice Command Reference.

Restrictions for Auto-detecting NAT

  • The SBC can auto-detect NAT only by comparing the top-most Via header with the remote address and port of the message.

  • If the top-most Via header contains a domain name, instead of an IP address, the SBC cannot auto-detect whether NAT is in use. In this case, the SBC assumes that NAT is in use.

  • Auto-detecting NAT is applied only to Out-of-dialog requests or Dialog-forming requests, such as incoming INVITE or REGISTER messages.

Configure SIP NAT

To configure SIP Network Address Translation (NAT) global configuration in voice class tenant configuration mode.

SUMMARY STEPS

  1. configure
  2. voice class tenant tag
  3. nat force-on

DETAILED STEPS

  Command or Action Purpose

Step 1

configure

Example:


Device# configure

Enables global configuration mode.

Step 2

voice class tenant tag

Example:


Device(config)#voice class tenant 1
Device(config-class)#

Enters voice class tenant configuration mode and allows tenants to configure their own global configurations for a specific voice class.

Step 3

nat force-on

Example:


Device(config-class)# nat force-on

Sets the SIP adjacency to assume that all endpoints are behind a NAT device.