Table Of Contents
Implementing SBC Firewall Traversal and NAT
Contents
Prerequisites for Implementing Firewall Traversal and NAT
Information About Firewall Traversal and NAT
Implementing Firewall Traversal and NAT
Changing NAT Status
SIP PING Message Support
Configuring Ping Message Support
Configuration Examples
Implementing SBC Firewall Traversal and NAT
The Session Border Controller (SBC) enables voice over IP (VoIP) signaling and media to be received from and directed to a device behind a firewall and NAT (Network Address Translator) at the border of an adjacent network, without requiring the device or firewall to be upgraded. In brief, the SBC achieves this by rewriting the IP addresses and ports in the call signaling headers and the Session Description Protocol (SDP) blocks attached to these messages. The SBC does not support options for keeping pinholes open. Instead, SBC registers messages for signaling pinhole maintenance and Real-Time Protocol (RTP) packets for media.
The SBC supports the Session Initiation Protocol (SIP) extension for Symmetric Response Routing (RFC 3581). (There is currently no support for H.323.)
Note
For ACE SBC Release 3.0.0 and later, this feature is supported in both the unified model and the distributed model.
For a complete description of commands used in this chapter, refer to Chapter 39, "Cisco Session Border Controller Commands." To locate documentation for other commands that appear in this chapter, use the command reference master index, or search online.
Feature History for Implementing SBC Firewall Traversal and NAT
Release
|
Modification
|
ACE SBC Release 3.1.00
|
Support was added for SIP PING messages.
|
ACE SBC Release 3.0.00
|
This feature was introduced on the Cisco 7600 series routers along with support for the SBC unified model.
|
Contents
This chapter contains the following sections:
•
Prerequisites for Implementing Firewall Traversal and NAT
•
Information About Firewall Traversal and NAT
•
Implementing Firewall Traversal and NAT
•
SIP PING Message Support
Prerequisites for Implementing Firewall Traversal and NAT
The following prerequisites are required to implement SBC firewall traversal and NAT:
•
On the Application Control Engine Module (ACE), you must be an Admin user to enter SBC commands. For more information, see the Application Control Engine Module Administration Guide at http://www.cisco.com/en/US/products/hw/modules/ps2706/products_configuration_guide_book09186a00806838f4.html.
•
Before implementing firewall traversal and NAT, the SBC must already be created. See the procedures described in Chapter 2, "ACE Configuration Prerequisites for the SBC".
•
Adjacencies must be configured before implementing firewall traversal and NAT. See the procedures described in the Implementing SBC Adjacencies module.
Information About Firewall Traversal and NAT
The SBC enables VoIP signaling and media to be received from and directed to a device behind a firewall and NAT at the border of an adjacent network, without requiring the device or firewall to be upgraded. In brief, the SBC achieves this by rewriting the IP addresses and ports in the call signaling headers and the SDP blocks attached to these messages.
Firewalls prevent unwanted traffic from entering, or leaving, a network by performing basic packet filtering. Firewalls filter packets purely by examining packet headers, and do not parse or understand the payload of the packets. Therefore, they do not filter out all types of unwanted traffic. For example, firewalls do not perform Call Admission Control—the SBC application does.
Firewalls, however, are valuable because they efficiently filter out large categories of unwanted traffic, leaving application-aware devices such as SBCs with much less work to do. An external firewall filters packets from the external network, but allows all packets from an internal network to pass through unfiltered. An internal firewall filters packets from the internal network, but allows all packets from the external network to pass through unfiltered (since they have already passed the external firewall).
Firewalls by default do not accept packets from the network, but are configured with rules that allow them to select and accept certain packets. Therefore, packets are admitted to (or from) the network based on explicit configuration, and not on default configuration.
The SBC application also incorporates the NAT function. NATs separate a network into distinct address spaces. The NAT component of the SBC separates the internal network address space from the external network address space. The NAT maintains a table of mappings from {external address, port} to {internal address, port} and vice versa. The table is a dual-index table, so a particular mapping can be looked up given either the internal or external addressing information. The NAT uses this table to rewrite the headers of the IP packets that it forwards.
On receiving an IP packet from the external network, the NAT looks in its table for the destination address and port of the packet (which will be an address from the external address space). If a mapping is found, then the destination address header in the IP packet is changed to contain the corresponding internal address and port from the table, and the packet is forwarded towards the internal network. If no mapping is found, the packet is discarded.
On receiving an IP packet from the internal network, the NAT looks in its table for the source address and port of the packet (which will be an address from the internal address space). If a mapping is found, then the source address header in the IP packet is changed to contain the corresponding external address and port from the table, and the packet is forwarded towards the external network. If no mapping is found, then a new mapping is created: the NAT dynamically allocates a new external address and port from the external address space for the packet (and all future packets from this source address and port tuple).
SBC does not support options for keeping pinholes open. Instead, SBC registers messages for signaling pinhole maintenance and RTP packets for media. The key to solving this problem is the fact that the customer's NAT has to open pinholes to allow the IP phone to send signaling packets and media packets to the public network, and the customer's firewall has to allow these packets through.
Inbound signaling and media from the public network can therefore be made to traverse the customer's firewall and NAT by directing them at the pinhole's address and port on the public network side of the customer's NAT. The pinholes for signaling and media have different lifetimes.
•
The signaling pinhole, once created, is reused for all call signaling.
•
The media pinhole is created anew for each media stream, because the source and destination ports of the media stream are dynamically allocated per call.
The signaling pinhole is ideally created when the IP phone first comes online, and then kept open until the phone goes offline again. Media pinholes are created created when the SIP invite arrives at the SBC.
Figure 15-1 illustrates the data path for support of firewall traversal and NAT with the SBC.
Figure 15-1 Firewall Traversal and NAT
Implementing Firewall Traversal and NAT
This task implements firewall traversal and NAT.
SUMMARY STEPS
Note
If the adjacency was previously attached, the no attach command must be issued before nat-enable.
1.
configure
2.
sbc service-name
3.
sbe
4.
adjacency sip adjacency-name
5.
nat force-on
6.
signaling-address ipv4 ipv4_IP_address
7.
signaling-port port_num
8.
remote-address ipv4 ipv4_IP_address/prefix
9.
signaling-peer [gk] peer_name
10.
signaling-peer-port port_num
11.
attach
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
host1/Admin# configure
|
Enables global configuration mode.
|
Step 2
|
sbc service-name
Example:
host1/Admin(config)# sbc mysbc
|
Enters the mode of an SBC service.
Use the service-name argument to define the name of the service.
|
Step 3
|
sbe
Example:
host1/Admin(config-sbc)# sbe
|
Enters the mode of an SBE entity within an SBC service.
|
Step 4
|
adjacency sip adjacency-name
Example:
host1/Admin(config-sbc-sbe)# adjacency sip
SIP_7301_1
|
Enters the mode of an SBE SIP adjacency.
• Use the adjacency-name argument to define the name of the service.
|
Step 5
|
nat force-on
Example:
host1/Admin(config-sbc-sbe-adj-sip)# nat
force-on
|
Sets the SIP adjacency to assume that all endpoints are behind a NAT device
|
Step 6
|
signaling-address ipv4 ipv4_IP_address
Example:
host1/Admin(config-sbc-sbe-adj-sip)#
signaling-address ipv4 10.1.0.2
|
Specifies the local IPv4 signaling address of the SIP adjacency.
|
Step 7
|
signaling-port port_num
Example:
host1/Admin(config-sbc-sbe-adj-sip)#
signaling-port 5000
|
Specifies the local signaling port of the SIP adjacency.
|
Step 8
|
remote-address ipv4 ipv4_IP_address/prefix
Example:
host1/Admin(config-sbc-sbe--adj-sip)#
remote-address ipv4 1.2.3.0/24
|
Restricts the set of remote signaling peers contacted over the adjacency to those with the given IP address prefix.
|
Step 9
|
signaling-peer [gk] peer_name
Example:
host1/Admin(config-sbc-sbe-adj-sip)#
signaling-peer athene
|
Specifies the remote signaling peer for the SIP adjacency to use.
|
Step 10
|
signaling-peer-port port_num
Example:
host1/Admin(config-sbc-sbe--adj-sip)#
signaling-peer-port 123
|
Specifies the remote signaling-peer port for the adjacency to use.
|
Step 11
|
attach
Example:
host1/Admin(config-sbc-sbe-adj-sip)# attach
|
Attaches the adjacency.
|
Changing NAT Status
When you change NAT status, the change does not become effective immediately. You must cycle the adjacency as shown in this task.
SUMMARY STEPS
1.
configure
2.
sbc service-name
3.
sbe
4.
adjacency sip adjacency-name
5.
no attach
6.
nat force-off
7.
attach
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
host1/Admin# configure
|
Enables global configuration mode.
|
Step 2
|
sbc service-name
Example:
host1/Admin(config)# sbc mysbc
|
Enters the mode of an SBC service.
Use the service-name argument to define the name of the service.
|
Step 3
|
sbe
Example:
host1/Admin(config-sbc)# sbe
|
Enters the mode of an SBE entity within an SBC service.
|
Step 4
|
adjacency sip adjacency-name
Example:
host1/Admin(config-sbc-sbe)# adjacency sip
SIP_7301_1
|
Enters the mode of an SBE SIP adjacency.
• Use the adjacency-name argument to define the name of the service.
|
Step 5
|
no attach
Example:
host1/Admin(config-sbc-sbe-adj-sip)# no attach
|
Detaches the adjacency from an account on an SBE.
|
Step 6
|
nat force-off
Example:
host1/Admin(config-sbc-sbe-adj-sip)# nat
force-on
|
Sets the SIP adjacency to assume that the endpoints are not behind a NAT device.
|
Step 7
|
attach
Example:
host1/Admin(config-sbc-sbe-adj-sip)# attach
|
Attaches the adjacency.
|
SIP PING Message Support
Release 3.1.0 adds support for SIP PING messages defined in the IETF draft Midcom-unaware NAT/Firewall Traversal.
If SIP PING message support is enabled with the sip ping-support command, then on receipt of a SIP PING message, the SBC returns a 200 OK response that contains two headers used for detecting NAT configurations for the sending side: the Via header and the Contact header.
Both headers provide the IP address and the port that received the PING message. Below is an example of a PING message and its corresponding 200 OK response.
PING sip:7075160418@lgdacom.net SIP/2.0
From: <sip:7075160418@lgdacom.net>;tag=db2000-647ba8c0-13c4-386d43b7-42d6ea8a-386d43b7
To: <sip:7075160418@lgdacom.net>
Call-ID: db2000-647ba8c0-13c4-386d43b7-6769ff65-386d43b7@lgdacom.net
Via: SIP/2.0/UDP 192.168.123.100:5060;branch=z9hG4bK-386d43b7-6ad08603-2972814
Supported: replaces, 100rel
Proxy-Require: com.nortelnetworks.firewall
Contact: <sip:7075160418@192.168.123.100>
Via: SIP/2.0/UDP
192.168.123.100:5060;branch=z9hG4bK-386d43b7-6ad08603-2972814;received=10.0.200.111;rport=
5060
From: <sip:7075160418@lgdacom.net>;tag=db2000-647ba8c0-13c4-386d43b7-42d6ea8a-386d43b7
To: <sip:7075160418@lgdacom.net>;tag=sbc-zfgjyuts-4935681
Call-ID: db2000-647ba8c0-13c4-386d43b7-6769ff65-386d43b7@lgdacom.net
Contact: <sip:pong@10.0.200.111:5060;transport=UDP>
Configuring Ping Message Support
When you change NAT status, the change becomes effective immediately. Configure Ping Message Support as shown below.
SUMMARY STEPS
1.
configure
2.
sbc service-name
3.
sbe
4.
sip ping-support
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
host1/Admin# configure
|
Enables global configuration mode.
|
Step 2
|
sbc service-name
Example:
host1/Admin(config)# sbc mysbc
|
Enters the mode of an SBC service.
Use the service-name argument to define the name of the service.
|
Step 3
|
sbe
Example:
host1/Admin(config-sbc)# sbe
|
Enters the mode of an SBE entity within an SBC service.
|
Step 4
|
sip ping-support
Example:
host1/Admin(config-sbc-sbe)# sip ping-support
|
Configures SIP ping support.
|
Configuration Examples
The following example implements firewall traversal and NAT:
host1/Admin(config)# sbc mySbc
host1/Admin(config-sbc)# sbe
Router/Admin(config-sbc-sbe)# adjacency sip SIP_7301_1
Router/Admin(config-sbc-sbe-adj-sip)# nat force-on
Router/Admin(config-sbc-sbe-adj-sip)# signaling-address ipv4 88.88.121.102
Router/Admin(config-sbc-sbe-adj-sip)# signaling-port 5060
Router/Admin(config-sbc-sbe-adj-sip)# remote-address ipv4 10.10.111.0/24
Router/Admin(config-sbc-sbe-adj-sip)# signaling-peer 10.10.111.41
Router/Admin(config-sbc-sbe-adj-sip)# signaling-peer-port 5060
Router/Admin(config-sbc-sbe-adj-sip)# attach
The following example changes NAT status.
host1/Admin(config)# sbc mySbc
host1/Admin(config-sbc)# sbe
Router/Admin(config-sbc-sbe)# adjacency sip SIP_7301_1
Router/Admin(config-sbc-sbe-adj-sip)# no attach
Router/Admin(config-sbc-sbe-adj-sip)# nat force-off
Router/Admin(config-sbc-sbe-adj-sip)# attach
The following example shows how to configure SIP ping support:
host1/Admin(config)# sbc mySbc
host1/Admin(config-sbc)# sbe
host1/Admin(config-sbc-sbe)# sip ping-support