of 59 /59
Jan 8, 2011 COMSNETS 2011 ANT : A System for Audio Signaling Based NAT Traversal Ashish Patro Yadi Ma Fatemah Panahi Jordan Walker Suman Banerjee Department of Computer Sciences Department of Computer Sciences University of Wisconsin- University of Wisconsin- Madison Madison

ANT : A System for Audio Signaling Based NAT Traversal

  • Author
    damali

  • View
    25

  • Download
    0

Embed Size (px)

DESCRIPTION

ANT : A System for Audio Signaling Based NAT Traversal. Ashish Patro Yadi Ma Fatemah Panahi Jordan Walker Suman Banerjee Department of Computer Sciences University of Wisconsin-Madison. Outline. Problem Overview of ANT Component Details Evaluation Summary. - PowerPoint PPT Presentation

Text of ANT : A System for Audio Signaling Based NAT Traversal

  • Jan 8, 2011COMSNETS 2011ANT : A System for Audio Signaling Based NAT TraversalAshish Patro Yadi Ma Fatemah Panahi Jordan Walker Suman Banerjee Department of Computer Sciences University of Wisconsin-Madison

    COMSNETS 2011

  • OutlineProblemOverview of ANTComponent DetailsEvaluationSummaryJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Typical NAT scenarioJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Typical NAT scenarioJan 8, 2011COMSNETS 2011Problem : Setting up a direct connection between NATed clients across different LANs.

    COMSNETS 2011

  • ScenarioJan 8, 2011COMSNETS 2011Client AClient BLaptopCellular Phones

    COMSNETS 2011

  • GoalCreate a direct end to end connection between any 2 NATed clients.Use no third party intermediate node.Can be used as a building block by applications.e.g. : Direct Transfer of Large Files, Chat etc.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • IssuesIdentify internal and external IP/port information.Common Solutions : Modify router configuration (Port Mapping), use external relay servers etc.Cumbersome for lay users to deal with NAT traversalJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Solution??ANT.A system for Audio signaling based NAT Traversal.Uses an ordinary phone connection as an out of band mechanism for NAT traversal.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • OutlineProblemOverview of ANTComponent DetailsEvaluationSummaryJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 1 : Setup a phone connection.Client AClient B

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 1 : Setup a phone connection.Client AClient B

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 1 : Setup a phone connection.Client AClient B

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 2 : A obtains configuration information for NAT traversal from its UPnP enabled router.Client AClient BNAT RouterInternal IP:Port : 10.0.0.3:6000

    Configuration Info :-External IP:Mapped port : 128.32.12.3:54678

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 3 : A encodes configuration data into audio signals.Client AClient BNAT Router10101001

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 4 : Sound is transferred from As laptop to As phone,then from Bs phone to Bs laptop.Client AClient BNAT Router

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 4 : Sound is transferred from As laptop to As phone,then from Bs phone to Bs laptop.Client AClient BNAT Router

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 4 : Sound is transferred from As laptop to As phone,then from Bs phone to Bs laptop.Client AClient BNAT Router

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 5 : B decodes audio, corrects errors and gets the data back.Client AClient BNAT Router10101001

    COMSNETS 2011

  • ANT in actionJan 8, 2011COMSNETS 2011Step 6 : Setup a direct Peer to Peer (P2P) connection.Client AClient BNAT RouterNAT Router

    COMSNETS 2011

  • OutlineProblemOverview of ANTComponent DetailsEvaluationSummaryJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • ANT ComponentsPort Mapping at Client A.Encoding/decoding audio signals.Synchronizing encoder/decoder.Noise filtering.Error Correction.

    Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • NAT TraversalNATed machines can only make outgoing connections directly. NAT traversal requires internal-external IP/Port Mapping.UPnP helps here.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • UPnP for NAT traversalStandard interface and widely available in Internet Gateway Devices (IGD) for the purpose of mapping ports to clients.Retrieves the external IP address device.Can add/remove port mappings.We use Java Library for UPnP to create a port mapping for ANT.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Data to Audio ConversionModulate binary data to audio signals.Keying techniquesASK : Amplitude Shift KeyingPSK : Pulse Shift KeyingFSK : Frequency Shift KeyingWe use a technique analogous to FSK.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Audio FrequenciesHuman audible frequency range : 20Hz to 20,000Hz.Laptop soundcards work well between 800Hz to 9000Hz.Phone soundcards work well between 1000Hz to 4000Hz.We used the range 1200Hz 3100Hz.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Encoding SchemeWe group consecutive bits into symbols.Use 1 unique frequency per symbol.Symbol Size = N bits.Unique frequencies required = 2N.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Encoding SchemeJan 8, 2011COMSNETS 2011Symbol Size : 8 bits

    e.g. : 1001011------- 1200Hz------- 1230Hz...------- 8820Hz------- 8850Hz

    256 frequencies

    COMSNETS 2011

  • Encoding SchemeJan 8, 2011COMSNETS 2011Symbol Size : 8 bits

    e.g. : 1001011------- 1200Hz------- 1230Hz...------- 8820Hz------- 8850Hz

    256 frequenciesRequires a band of 7650 Hz for 256 unique frequencies separated by 30 Hz.

    COMSNETS 2011

  • Encoding SchemeJan 8, 2011COMSNETS 2011Symbol Size : 4 bits

    e.g. : 1001------- 1200Hz------- 1250Hz...------- 1900Hz------- 1950Hz

    16 frequenciesEasily fits within the frequency band available.

    COMSNETS 2011

  • SynchronizationJan 8, 2011COMSNETS 2011Problem :Detect start and end of the audio transmission.

    COMSNETS 2011

  • SynchronizationJan 8, 2011COMSNETS 2011Problem :Detect start and end of the audio transmission.Solution :Use a preamble/postamble for each transmission.

    COMSNETS 2011

  • SynchronizationDetect start of transmission.Similar to preamble in wireless networks.Also used to infer timing information.2 synchronization frequencies for start.1 synchronization frequency for end.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • SynchronizationJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • SynchronizationJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • SynchronizationJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • SynchronizationJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Distinguish Consecutive SymbolsConsecutive symbols can be same.Need to distinguish between them.One solution : Use a separation beep.Problem : Halves the data rate.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Distinguish Consecutive SymbolsOur Solution : Use two non-overlapping frequency bands.Transmit consecutive symbols in alternating bands.Much easier to decode symbols.ANT uses two separate bands of 16 frequencies (< 2000 Hz).Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Decoding Audio SymbolsSynchronization to detect start of transmission.Fast Fourier Transform (FFT) on captured audio samples.Noise Filtering : Discard noise away from relevant frequencies (F 15Hz to F + 15Hz) and below certain amplitude.

    Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Error CorrectionHandle errors/erasures during transmission/reception.ANT uses Forward Error Correction (FEC).FEC avoids a back-channel.ANT uses Reed-Solomon codes in GF(16).

    Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Putting the pieces togetherUse UPnP to setup a port mapping at Client A.Client A transmits mapping via the out-of-band audio channel to Client B.Client B decodes audio signals to obtain mapping.Client B connects to Client A.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Putting the pieces togetherJan 8, 2011COMSNETS 2011Client AClient BNAT RouterNAT Router

    COMSNETS 2011

  • Other applications of ANTPassword Transfer.Product Key exchange.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • OutlineProblemOverview of ANTComponent DetailsEvaluationSummaryJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • EvaluationTested ANT with a variety of devices (laptops, phones).Environments No or Light Noise : Quiet Conference Room.

    Medium Noise : Offices, homes.

    Heavy Noise : Compute Lab (Background noise).

    Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Experiment 1Clients A and B are in quiet environments.Used different combinations of phones.Tested ANT 4-6 times for each combination.Reported the overall success rate.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Results : Experiment 1Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Results : Experiment 1Jan 8, 2011COMSNETS 2011ANT performed really well in the presence of little or no noise. Failures occurred due to a bad speaker in the Sony phone.

    COMSNETS 2011

  • Experiment 2First client is a heavy noise environment.Second client in a light/medium noise environment.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Results : Experiment 2Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Results : Experiment 2Jan 8, 2011COMSNETS 2011Errors/erasures caused by noise cause a few failures.Success rate still above 66% in all cases.

    COMSNETS 2011

  • Experiment 3 (Speak Test)Human speakers present near laptop with 4 scenarios :Jan 8, 2011COMSNETS 2011

    ScenarioClient AClient BScenario 1 (S1)Speaking with soft voiceQuiet, no/light background noiseScenario 2 (S2)Speaking with loud voiceQuiet, no/light background noiseScenario 3 (S3)Speaking with soft voiceQuiet, heavy background noiseScenario 4 (S4)Speaking with loud voiceQuiet, heavy background noise

    COMSNETS 2011

  • Results : Experiment 3Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Results : Experiment 3Jan 8, 2011COMSNETS 2011Human voice causes some problems for ANT.2-3 attempts enough to establish a connection in most cases.

    COMSNETS 2011

  • Playing Background MusicCause major problems to ANT.Music generates a vast range of frequencies. Interferes with ANT by inserting spurious symbols into audio transmissions.Causes problems for the decoder.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • OutlineProblemOverview of ANTComponent DetailsEvaluationSummaryJan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • SummaryUPnP is easily available and provides a standard interface for port mapping.Short Audio transmission (few seconds).Out-of-band audio mechanism for NAT traversal works well is most scenarios.Can also use audio mechanism for short, robust and secure data transmissions.

    Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • ANT Demo.A demo video demonstrating ANT is available at :-

    http://www.cs.wisc.edu/wings/projects/antLink also available in the paper.Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

  • Thank you. Questions ?Jan 8, 2011COMSNETS 2011

    COMSNETS 2011

    *This is a typical scenario on the internets topology. Some hosts are directly connected to the connected to the internet using a public IP while a few hosts are indirectly connected to the internet through a NAT.*Assume two friends want to set up a connection for a peer to peer application (file sharing, instant messaging, etc.). These friends are both using their wireless laptops, and are located behind different NATs. The specific application is not able to setup an appropriate connection because it does not know that the NAT blocks any unknown incoming connections.*We will now present an overview of ANTs design. The following sequence of steps is used by ANT for NAT traversal. The only work done by the user during this process is to establish an telephone connection with the person at the other end. (The step performed currently is marked in red).*In this slide well discuss the issues involved in setting up such a connection.

    The individuals may not be immediately aware of their own public IP and port number to be used on the external side of the NAT to set up a connection. Currently, to set up a connection they need to either manipulate their routers' configuration, go through a relay server which will transfer the application's data back and forth between the peers, or perform a handshake through an external server in order to get each other's IP and port pair. In fact, except for very savvy users, few others can quickly figure out this information, and may find this process all too complicated. *The availability of cellphones is very widespread these days. We use an ordinary telephone connection as an out of band mechanism to transmit the configuration information required to establish a direct P2P connection. This is only action required to be performed by the users. Its is a really easy way to bypass the NATs at both ends.

    The goal of this paper is to make this process quite simple for lay persons using tools and technology that we are all familiar with --- phones that always within our reach at any given time. More specifically, we propose a system for Audio signaling based NAT traversal, or ANT. We propose ANT as we believe that this is all too complicated just for setting up a connection. Today, majority of people have cell phones that they carry around with them. These friends who want to share data very likely know each other's cell phone numbers and can call each other. ANT proposes leveraging this existing opportunity for setting up a connection when both peers are behind NATs. With ANT, all this is very easy. One friend calls the other. Subsequently a lightweight application installed on their laptops extracts their public IP and port number of the local NAT. This and some other associated information is encoded using an audio form and communicated over the audio connection between the two phones(local laptop speaker to local cell phone, to remote cell phone over the phone network, and to remote laptop audio receiver). Once the configuration data is successfully communicated in both directions, the appropriate configurations are made by each laptop on their local NATs enabling the application to establish a direct connection. The process completes without the intervention of any server or the need for special configuration.*We will now present an overview of ANTs design. The following sequence of steps is used by ANT for NAT traversal. The only work done by the user during this process is to establish an telephone connection with the person at the other end. (The step performed currently is marked in red).*We will now present an overview of ANTs design. The following sequence of steps is used by ANT for NAT traversal. The only work done by the user during this process is to establish an telephone connection with the person at the other end. (The step performed currently is marked in red).*We will now present an overview of ANTs design. The following sequence of steps is used by ANT for NAT traversal. The only work done by the user during this process is to establish an telephone connection with the person at the other end. (The step performed currently is marked in red).*Obtain the IP (both internal and external) and port information for Client A. Installs a mapping using UP&P after obtaining this information. Prepares to transmit this information to B.*This mapping information is encoded into audio signals to be transmitted over the telephone connection.*The audio signals are generated by As laptop and sent to Client B over the telephone connection. The transmitted signals contain some redundancy to be robust to errors and failures.*The audio signals are generated by As laptop and sent to Client B over the telephone connection. The transmitted signals contain some redundancy to be robust to errors and failures.*The audio signals are generated by As laptop and sent to Client B over the telephone connection. The transmitted signals contain some redundancy to be robust to errors and failures.*The audio signals are generated by Bs telephone and captured by Bs laptop. The audio signals contain some redundancy in form of Error correction codes (ECC). The signals are decoded at B to obtain the mapping information transmitted by A. If the errors/erasures are within the limits that can be handled by the ECC, the decoding is successful. Otherwise, a retransmission is required to transmit the data. The audio transmissions very short (few seconds).*B uses the decoded configuration information (IP/port) to establish a P2P connection with A.*In this slides, we present the different components that constitute the ANT system.*Need to find the external IP of the machine.

    The NAT device must be aware of the port on which to accept the connection, and of the local address to forward the request to. We need a mechanism to automatically open a port on a NAT router so that it becomes accessible from the Internet without the need to change the router configuration manually.This is essential because many users do not have the technical knowledge to modify the routers configuration. One option that we considered for this purpose was SNMP [11]. Unfortunately, SNMP has some pitfalls which makes it unsuitable for this approach. SNMP is not always implemented on entrylevel routers. Furthermore, SNMPs interface for opening ports on a router is not standardized. Therefore, one would need to develop specific SNMP routines for each vendors SNMP aware routers.*Universal Plug and Play (UPnP) [4] is an alternative that has a significant advantage over SNMP. There is a defined interface in Internet Gateway Devices (IGD) [4] for the purpose of mapping ports to clients. Therefore, all IGDs can work with the same piece of code. The IGD Protocol is implemented via UPnP. Many routers and firewalls expose themselves as Internet Gateway Devices. This allows any local UPnP controller to perform a variety of actions, including retrieving the external IP address of the device, enumerating existing port mappings, and adding or removing port mappings. By adding a port mapping, an internal client allows an external client to connect to it.*For transmitting the data over the audio channel, we have to convert the binary data (1s and 0s) to audio signals. Keying is a traditional modulation technique. Keying techniques, such as Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK) and Phase Shift Keying (PSK), modify the amplitude,frequency and phase of audio signals, respectively. In ANT, we explore a modulation technique analogous to Frequency Shift Keying, in which different audio frequencies are used to represent different binary bit sequences. While this scheme may not be particularly bandwidth efficient, it is adequate for our needs of communicating a small amount of data.*We tested a variety a sound cards and phones to determine the frequency range that works well with all of them. Our experiments showed that 1000-4000 Hz is a good range that works well for all the sound cards we tested, while newer sound cards may have broader frequency range. Attenuation is especially prevalent at the higher frequency end of the spectrum. For most sound cards in normal laptops, the upper frequency limit for which the sound card generated audio without high attenuation was between 7000 Hz and 10000 Hz. The lower bound for the generated frequency was observed to be between 800 Hz and 1000 Hz. When testing on phones to determine their operating frequency range, we observed that it is narrower compared with sound cards of laptops and desktop machines. The phones performed especially poorly at high frequencies (greater than 4000 Hz). This is due to the fact that phones are designed to exchange human voices, whose maximum is below 4000 Hz for most people. To accommodate both phones and sound cards, we used frequencies in the range of 1200-3100 Hz, which worked adequately on all the devices we tested.*We use a very simple encoding scheme because we have to transmit a small amount of data and this scheme serve our purpose well. As seen here, the number of frequencies required for the audio transmission is exponential to the number of bits encoded in each symbol (audio signal). To reduce errors at the receiver, we would like the frequencies to be far away from each other. So, we would like to encode as much bits as possible per symbol while keeping sufficient gap between the consecutive frequencies. We found that a gap of at least 30 50Hz was required.*If each frequency represents 8 bits, 256 different frequencies are needed. As such, using 256 frequencies requires a large frequency band (with a30 Hz gap, a frequency band of 7650 Hz is required) which does not work properly for many devices. Phones especially can not handle this broad range.*If each frequency represents 8 bits, 256 different frequencies are needed. As such, using 256 frequencies requires a large frequency band (with a30 Hz gap, a frequency band of 7650 Hz is required) which does not work properly for many devices. Phones especially can not handle this broad range.*Finally we decided to use 16 different frequencies, with each frequency representing 4 binary bits. Thus, each byte of data required two symbols fortransmission. With 16 frequencies we can spread them out over our spectrum better, and it leaves room for more frequencies.

    We also considered other algorithms for encoding the binary data into audio signals. One such scheme transmits N frequencies simultaneously, where N different frequencies are used to encode N bits in each symbol. Thus, by using N different frequencies, each symbol could encode 2N bits. Thus,this scheme could send 2N bits within each audio signal. This method is more efficient but it complicates the decoding process by being more prone to errors caused by noise or when the receiver looses one.*In ANT, we use two distinct frequencies as synchronization frequencies to start a transmission. These synchronization frequencies are used by the sender to inform the receiver that an audio transmission has started. The receiver checks for a known pattern of synchronization frequencies to determine when the actual data begins. This method is similar to the preamble used in wireless transmissions.*Each transmitted audio signal consists of multiple sinusoids of the same frequency so that the receiver can receive correctly. Due to this fact, it is difficult for the receiver to distinguish two or more consecutive audio signals from one if they are of the same frequency. The timing information obtained from the preamble is not enough as the audio signals are usually not evenly spaced out. The timing information is only used as a lower bound to detect missing audio signals.*We decided to use two non-overlapping bands of frequencies, a higher frequency band and a lower frequency band, with each band containing 16 different frequencies. Instead of transmitting a separation beep, we transmit consecutive audio signals using frequencies in alternating frequency bands. For example, to transmit 0110, the first 1 is transmitted using a frequency in the lower frequency band while the second 1 is transmitted using a frequency in the higher frequency band. This makes it much easier for the decoder to recognize and differentiate between consecutive audio signals. Even after using the two bands of 16 frequencies, ANT requires an overall frequency range of less than 2000 Hz. This approach provides the same throughput compared to the method where each frequency represents 8 bits and separation beeps are used between consecutive symbols, while using a narrower frequency range. ANTs current design uses a total of 35 frequencies, two non-overlapping bands, each consisting of 16 frequencies (separated by 50 Hz each), plus two synchronization frequencies for the preamble and one end-tone frequency.*An error correction mechanism is needed to correct errors observed at the receiver. We decided to use Forward Error Correction (FEC) because FEC avoids using a back-channel. One advantage of FEC is that retransmission of data can often be avoided (at the cost of higher bandwidth requirements during each transmission). FEC is applied in ANT because retransmissions are relatively costly and difficult to do (the users need to tell the application to send/receive the tones again).*B uses the decoded configuration information (IP/port) to establish a P2P connection with A.*- Password Transfer : ANT can provide an alternative that involves minimal user involvement. Once a user requests a password, the online banking system calls the user and sends the encoded password through voice, which is received by the users phone and decoded by a light-weight software running on the users computer. The only thing the user needs to do is picking up his phone.

    - Product Key Exchange : ANT could be extremely useful for those applications such as product key exchange where complicated keys are exchanged between the product company and authorized users.

    *