Thursday, July 19, 2007

NAT Classification Test Results


2. Descriptions of Tests



2.1. UDP Mapping



This test sends STUN[1] packets from the same port on three different
internal IP addresses to the same destination. The source port on
the outside of the NAT is observed. The test records whether the
port is preserved or not and whether all the mapping get different
ports.

A second set of tests checks out how the NAT maps ports above and
below 1024.

Tests are run with a group of several consecutive ports to see if the
NAT preserves port parity.

2.2. UDP Filtering



This test sends STUN packets from the same port on three different
internal IP addresses to the same destination. It then tests whether
places on the outside with 1) a different port but the same IP
address and then 2) a different port and a different IP address can
successfully send a packet back to the sender. The test is based on
technique described in [2].

2.3. UDP Hairpin

This test sends a STUN packet from the inside to the outside to
create a mapping and discover the external source address called A.
It does the same thing from a different internal IP address to get a
second external mapping called B. It then sends a packet from A to B
and B to A and notes if these packets are successfully delivered from
one internal IP address to the other.

2.4. ICMP



A device on the inside sends a packet to an external address that
causes an ICMP Destination Unreachable packet to be returned. The
test records whether this packet makes it back through the NAT
correctly.

2.5. Fragmentation



The MTU on the outside of the NAT is set to under 1000; on the inside
it is set to 1500 or over. Then a 1200 byte packet is sent to the
NAT. The test records whether the NAT correctly fragments this when
sending it. Another test is done with DF=1. An additional test is
done with DF=1 in which the adjacent MTU on the NAT is large enough
the NAT does not need to fragment the packet but further on, a link
has an MTU small enough that an ICMP packet gets generated. The test
records whether the NAT correctly forwards the ICMP packet.

In the next test a fragmented packet with the packets in order is
sent to the outside of the NAT, and the test records whether the
packets are dropped, reassembled and forwarded, or forwarded
individually. A similar test is done with the fragments out of
order.

2.6. UDP Refresh



A test is done that involves sending out a STUN packet and then
waiting a variable number of minutes before the server sends the
response. The client sends different requests with different times
on several different ports at the start of the test and then watches
the responses to find out how long the NAT keeps the binding alive.

A second test is done with a request that is delayed more than the
binding time but every minute an outbound packet is sent to keep the
binding alive. This test checks that outbound traffic will update
the timer.

A third test is done in which several requests are sent with the
delay less than the binding time and one request with the delay
greater. The early test responses will result in inbound traffic
that may or may not update the binding timer. This test detects
whether the packet with the time greater than the binding time will
traverse the NAT which provide the information about whether the
inbound packets have updated the binding timers.

An additional test is done to multiple different external IP
addresses from the same source, to see if outbound traffic to one
destination updates the timers on each session in that mapping.

2.7. Multicast and IGMP



Multicast traffic is sent to the outside of the NAT, and the test
records whether the NAT forwards it to the inside. Next an IGMP
Membership Report is sent from inside. The test records whether the
NAT correctly forwards it to the outside and whether it allows
incoming multicast traffic. More detail on NATs and IGMP is provided
in [3].

2.8. Multicast Timers



The test records how long the NAT will forward multicast traffic
without receiving any IGMP Membership Reports and whether receiving
Reports refreshes this timer.

2.9. TCP Timers



TBD: Measure time before ACK, after ACK, and after FIN and RST.

2.10. TCP Port Mapping



Multiple SYN packets are sent from the same inside address to
different outside IP addresses, and the source port used on the
outside of the NAT is recorded.

2.11. SYN Filtering



Test that a SYN packet received on the outside interfaces that does
not match anything gets discarded with no reply being sent. Test
whether an outbound SYN packet will create a binding that allows an
incoming SYN packet.

2.12. DNS



Does the DNS proxy in them successfully pass through SRV requests.

2.13. DHCP



Do any DHCP options received on the WAN side get put into DHCP
answers sent on LAN side?



2.14. Ping



Do ping request sent from LAN side work?



To help organize the NATs by what types of applications they can
support, the following groups are defined. The application of using
a SIP phone with a TLS connection for signaling and using STUN for
media ports is considered. It is assumed the RTP/RTCP media is on
random port pairs as recommended for RTP.

Group A: NATs that are deterministic, not symmetric, and support
hairpin media. These NATs would work with many phones behind
them.
Group B: NATs that are not symmetric on the primary mapping. This
group would work with many IP phones as long as the media ports
did not conflict. This is unlikely to happen often but will
occasionally. Because they may not support hairpin media, a call
from one phone behind a NAT to another phone behind the same NAT
may not work.
Group D: NATs of the type Bad. These have the same limitations of
group B but when the ports conflict, media gets delivered to a
random phone behind the NAT.


Group F: These NATs are symmetric and phones will not work.


No comments: