Deployment of NAT Vs. Ipv6 in Bittorrent
Total Page:16
File Type:pdf, Size:1020Kb
Deployment of NAT vs. IPv6 in BitTorrent Simon Müller Elgg, Switzerland Student ID: 12-715-389 – Communication Systems Group, Prof. Dr. Burkhard Stiller HESIS T Supervisor: Andri Lareida, Thomas Bocek ACHELOR B Date of Submission: December 5, 2016 University of Zurich Department of Informatics (IFI) Binzmühlestrasse 14, CH-8050 Zürich, Switzerland ifi Bachelor Thesis Communication Systems Group (CSG) Department of Informatics (IFI) University of Zurich Binzmühlestrasse 14, CH-8050 Zürich, Switzerland URL: http://www.csg.uzh.ch/ Abstract Der globale IPv4 Adressraum ist fast komplett ersch¨opft. Dies stellt fur¨ Internet Service Provider (ISPs) eine grosse Herausforderung dar. Der Nachfolger, IPv6, wurde als L¨osung fur¨ dieses Problem entwickelt. Trotzdem bieten viele ISPs noch immer nur IPv4 Verbin- dungen mit Ubergangsl¨ ¨osungen wie Netzwerkadressubersetzung¨ (NAT) an, um das Pro- blem der Adressraumersch¨opfung zu umgehen. In dieser Arbeit wurde VIOLA, ein Messsy- stem fur¨ das BitTorrent-Netzwerk, mit IPv6 Unterstutzung¨ erweitert, um eine einw¨ochige Messung des BitTorrent-IPv6-Netzwerks durchzufuhren.¨ Selbst wenn das Streaming von Video- und Audiodaten mittlerweile den Hauptteil des weltweiten Internetverkehrs aus- machen, so macht der Peer-to-peer Verkehr doch noch einen deutlichen Anteil davon aus. Mit den Messdaten wurde die Frage beantwortet, ob es einen Zusammenhang zwischen dem Anteil an NAT der in einer Region gemessen wird und der Anzahl an verfugbaren¨ IPv6 Adressen gibt. Die Resultate machen deutlich, dass dem nicht so ist. Mit den ge- sammelten Daten wird zudem ein umfassender Uberblick¨ uber¨ das aktuelle Stadium und die Evolution von IPv6 im BitTorrent-Netzwerk gegeben. The global IPv4 address space is almost completely exhausted. This has proven to be a challenge for Internet Service Providers (ISPs). Its successor, IPv6, has been designed as the definitive solution for this problem. Despite that, many ISPs still only offer IPv4 connections using transitional solutions such as Network Address Translation (NAT) to circumvent the problem of a depleting address pool. In this thesis, VIOLA, a measurement tool for overlay networks such as BitTorrent, was extended with IPv6 support, in order to conduct a one week measurement of the BitTorrent IPv6 network. Even if media streaming is causing the main part of Internet traffic today, Peer-to-peer traffic still accounts for a sizeable portion of the total Internet traffic. The gathered data was used to answer the question, if there is a correlation between the amount of NAT used in an area and the number of IPv6 addresses deployed. The results suggest that there is no such correlation. Additionally, the gathered data is visualized and a comprehensive overview of the state of IPv6 and its evolution in BitTorrent is given. i ii Acknowledgments Firstly I want to thank Prof. Dr. Burkhard Stiller and my supervisors Andri Lareida and Thomas Bocek for the opportunity to write a bachelor thesis in the very interesting field of peer-to-peer networks. I am very thankful for Andri Lareida's continued support while writing this thesis. I also would like to thank my family that helped proofread this thesis despite its technical character. iii iv Contents Abstract i Acknowledgments iii 1 Introduction 1 1.1 Motivation....................................1 1.2 Description of Work . .2 1.3 ThesisOutline..................................2 2 Background & Related Work 3 2.1 Background ...................................3 2.1.1 IPv4 Address Exhaustion . .3 2.1.2 IPv6...................................4 2.1.3 Transitional Technologies . .5 2.1.4 BitTorrent................................8 2.1.5 Ttorrent . 10 2.2 Related Work . 10 2.2.1 VIOLA ................................. 10 2.2.2 Other Measurement Studies . 11 v vi CONTENTS 3 VIOLA Extension 13 3.1 Adding IPv6 Support to the Ttorrent Client . 13 3.1.1 HTTP Tracker Support . 13 3.1.2 UDP Tracker Support . 15 3.2 VIOLA...................................... 16 3.2.1 General Extensions . 16 3.2.2 Slave Extensions . 18 3.2.3 Master Extensions . 19 4 Measurement 21 4.1 Preparation ................................... 21 4.1.1 Master Server . 21 4.1.2 SlaveServers .............................. 22 4.2 Measurement Process . 22 4.3 DataExtraction................................. 23 4.3.1 NAT Approximation . 23 4.3.2 Scatterplot Data Preparation . 24 4.3.3 Choropleth Map Data Preparation . 25 5 Analysis Results 27 5.1 General Measurement Data . 27 5.2 Global IPv6 Distribution . 28 5.2.1 Evolution of IPv6 . 30 5.3 Global NAT Distribution . 31 5.4 Correlation of NAT and IPv6 . 32 5.5 DataLimitations ................................ 34 6 Conclusion & Future Work 35 6.1 FutureWork................................... 35 CONTENTS vii Bibliography 37 Abbreviations 41 List of Figures 43 List of Tables 45 A VIOLA Configuration Example 47 B Contents of the CD 49 viii CONTENTS Chapter 1 Introduction 1.1 Motivation Video streaming services such as Netflix are causing the main part of internet traffic today and the Peer-To-Peer (P2P) traffic caused by file sharing applications gets proportionally smaller and smaller. But P2P traffic still accounts for a sizeable portion of the total In- ternet traffic and will do so for the next few years [10]. Internet Service Providers (ISPs) have to face multiple challenges including network congestion during peak traffic hours or an exhaustion of the Internet Protocol Version 4 (IPv4) address pool. Overlay net- works used by file sharing applications, such as BitTorrent (BT) [4], add to the network congestion, because they are typically not aware of the underlying physical network. The VIOLA project [36] is extracting new data to help develop and evaluate already proposed solutions. The rapidly approaching depletion of the IPv4 address space has caused ISPs to deploy transitional solutions such as Carrier Grade NAT (CGN) in their networks. The introduc- tion of CGNs causes problems for a multitude of applications, including P2P applications such as BT. Therefore, users affected by NAT have an incentive to use Internet Protocol Version 6 (IPv6), which has been introduced as the definitive solution to the problem of IPv4 address exhaustion. Still, today, IPv6 has not been rolled out on a global scale. ISPs have just started offering native IPv6 connections coupled with CGN for legacy con- nectivity to the IPv4 Internet as those two protocols are not compatible with each other. Because CGN is a technology used by ISPs that are in danger of running out of their assigned address space, these ISPs have an incentive to change their network to IPv6 as fast as possible. This thesis tries to establish if there is a correlation between the number of NATed addresses and the number of IPv6 addresses in the BT network. Additionally, the data resulting from such a measurement gives a comprehensive overview of the global state of IPv6 in the BT network. 1 2 CHAPTER 1. INTRODUCTION 1.2 Description of Work In this thesis, VIOLA is extended to support IPv6 connections to trackers in order to be able to gather data. While doing this, an efficient storage format for IPv6 addresses is defined and an IPv6 geolocation database is implemented. A measurement of IPv4 and IPv6 peers in the BT network is conducted for a week to cover fluctuations effects of different days of the week. Based on this new data and on older VIOLA data, it is investigated how IPv4 NAT presence and IPv6 usage correlate. Additionally, the status and evolution of IPv6 in the BT network is illustrated and the measurement results visualized on a world map. 1.3 Thesis Outline The thesis is structured as follows. Chapter 2 gives a comprehensive background of the technologies and the protocols used in this thesis in order to understand the following extensions and the measurement. Additionally an overview of the related work is given. Chapter 3 presents the extensions that have been made to VIOLA in order to support IPv6 and describes the challenges that arose during the implementation and the subsequent decisions that have been made. Chapter 4 shows how the VIOLA IPv6 measurement was conducted. Additionally, it describes how the data was stored and extracted to prepare for the analysis. Chapter 5 presents the results of the analysis, from the global IPv6 and NAT distribu- tion to the answer to the question of a correlation between NAT and IPv6. Addi- tionally, the limitations of the data are discussed. Appendix A describes how the additionally implemented VIOLA configuration option to add custom trackers should be used. Chapter 2 Background & Related Work The necessary background needed to understand this work and an overview over the related work is presented in this chapter. In the Background section, IPv4 and IPv6 are explained along with transitional technologies that arose through the IPv4 address exhaustion. Then, an overview over BitTorrent is given. The related work section covers VIOLA, the basis for this thesis, and introduces various measurements related to this work. 2.1 Background The technical background that helps understanding specific terms used in this thesis and in the resulting measurements is covered in this section. 2.1.1 IPv4 Address Exhaustion IPv4 is the basis and one of the core protocols used for accessing the Internet. IPv4 was first standardized in 1981 [50] and was the first Internet Protocol (IP) version that was widely used. Today, it is still the most widely used protocol to route Internet traffic [26] despite the existence of IPv6, the successor to IPv4. The global distribution of IP addresses is overseen by the Internet Assigned Numbers Authority (IANA). The IANA assigns address spaces to the five Regional Internet Reg- istries (RIRs), i.e. AFRINIC in Africa, APNIC in the Asia-Pacific region, ARIN in North America, RIPE NCC in Europe, Russia, the Middle East and Central Asia and LAC- NIC in Latin America. These RIRs in turn distribute their address blocks to Internet service providers in their respective region [47].