220 likes | 601 Views
NAT & RTP Proxy. Date: 2009/7/2 Speaker: Ni-Ya Li Advisor: Quincy Wu. Outline. NAT – Network Address Translator RTP Proxy Reference. NAT. What is NAT? Network Address Translator, maps a private IP address to a public one Why use NAT? Public IP addresses are almost exhausted
E N D
NAT & RTP Proxy Date: 2009/7/2 Speaker: Ni-Ya Li Advisor: Quincy Wu
Outline • NAT – Network Address Translator • RTP Proxy • Reference
NAT • What is NAT? • Network Address Translator, maps a private IP address to a public one • Why use NAT? • Public IP addresses are almost exhausted • Four types • Full cone • Restricted cone • Restricted port cone • Symmetric
NAT – Schematic Private NIC NAT Public NIC Client Server Mapping Table
NAT – Simple architecture Private NIC AT NAT Public NIC Client Server Mapping Table 192.168.0.191 : 1668 10.10.59.11 : 60255
Four type NAT • Full cone • Restricted cone • Restricted port cone • Symmetric
Full cone NAT IP: 123.123.123.123 Computer A IP: 222.111.99.1 Port: 20202 NAT Port: 12345 Client IP: 192.168.0.1 Port: 21 Computer B IP: 222.111.88.2 Port: 10101 MappingTable 192.168.0.1:21 <-> 12345
Restricted cone NAT IP: 123.123.123.123 Computer A IP: 222.111.99.1 Port: 20202 NAT Port: 12345 Client IP: 192.168.0.1 Port: 21 Computer B IP: 222.111.88.2 Port: 10101 Mapping Table 192.168.0.1:21 <-> 12345 (for A) Computer A IP: 222.111.99.1 Port: 20202 NAT IP: 123.123.123.123 Port: 12345 Client IP: 192.168.0.1 Port: 21 Computer B IP: 222.111.88.2 Port: 10101 Mapping Table 192.168.0.1:21 <-> 12345 (for A) 192.168.0.1:21 <-> 12345 (for B)
Restricted port cone NAT NAT Computer A IP: 222.111.99.1 Port: 20202 Port: 30303 IP: 123.123.123.123 Port: 12345 Client IP: 192.168.0.1 Port: 21 Mapping Table 192.168.0.1:21 <-> 12345 (for A : 20202) 192.168.0.1:21 <-> 12345 (for A : 30303)
Symmetric NAT IP: 123.123.123.123 Port: 12345 Computer A IP: 222.111.99.1 Port: 20202 NAT Client IP: 192.168.0.1 Port: 21 Computer B IP: 222.111.88.2 Port: 10101 IP: 123.123.123.123 Port: 45678 Mapping Table 192.168.0.1:21 <-> 12345 (for A : 20202) 192.168.0.1:21 <-> 45678 (for B : 10101)
NAT–drawback & solution • The drawback of using NAT? • Unfriendliness for end-to-end applications, such as transmission of RTP streams. • How to overcome the disadvantage? • RTP Proxy
RTP Proxy RTP The real-time transport protocol to carry data that has real-time properties. RTP Proxy A software proxy for RTP streams, works with SIP server Why use RTP Proxy? Originally created for handling NAT scenarios 14
RTP Proxy – Simple architecture SIP Proxy RTP Proxy NAT UA1 UA2
RTP Proxy - Operation • When SIP server receives INVITE request Yes, returns UDP port number extracts call-id INVITE request, Session of call-id exist? No, Creates a new session, return UDP port number Rewrite media ip:port
RTP Proxy - Operation • When SIP server receives SIP response from UA2 with SDP Yes, return UDP port number extracts call-id Rewrite media ip:port Session of call-id exist? No, return error code
RTP Proxy - Operation • After session is created, RTP proxy listens on the port for filling in the ip:port structure of two side parties. RTP streams 10.10.59.62 : 32768 10.10.21.17 : 7080
Reference • RTP Proxy http://www.voip-info.org/wiki/view/RTPProxy • NAT http://www.wisegeek.com/what-is-nat.htm • STUN http://ms11.voip.edu.tw/~webmaster/meeting/961/ppt/Wenping/20071122_wenping_STUN_v1.ppt