Няма описание https://github.com/Netsukuku/netsukuku
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. Internet connection sharing in Netsukuku HOWTO
  2. This document describes how to configure a Netsukuku node to share its
  3. Internet connection and how to configure another node that will use the shared
  4. connection.
  5. --
  6. * Internet Gateway Search
  7. * Prerequisites
  8. * How to share your Internet connection
  9. * How to connect to the Internet using a shared connection
  10. * Some nice feature you want to know
  11. --
  12. **
  13. *** Internet Gateway Search
  14. **
  15. If the nodes are in restricted mode (compatibility with the Internet), they
  16. can share their Internet connection. This can be easily done, in fact, if a
  17. node X, connected to the Internet, activates the masquerading, it is possible
  18. for the other nodes to connect by setting as the default gateway their rnode
  19. which lead to the node X.
  20. This can be automated by Netsukuku itself.
  21. The node which is sharing its connection will tell to the Netsukuku daemon to
  22. masquerade its connection and to set a specific flag in the QSPN packets.
  23. The other nodes in restricted mode will automatically know their nearest
  24. Netsukuku Internet gateway and set it in their default route.
  25. For more information read http://lab.dyne.org/Ntk_IGS .
  26. **
  27. *** Prerequisites
  28. **
  29. The IGS code of Netsukuku depends on the IPIP tunnel code of the kernel, so if
  30. you are using Linux be sure to have the `CONFIG_NET_IPIP' option set as a
  31. module or built-in.
  32. **
  33. *** How to share your Internet connection
  34. **
  35. First of all modify the /etc/netsukuku/netsukuku.conf file.
  36. Set `internet_connection' to 1.
  37. Set the `internet_gateway' option to the IP of the gateway you use to reach
  38. the Internet and specify the network interface too, for example:
  39. "internet_gateway = 192.168.1.1:eth0". This option is necessary only if you
  40. don't have the default route set when you run NetsukukuD (i.e. you haven't
  41. connected yet), otherwise, leave it commented.
  42. You have also to set your upload and download bandwidth in
  43. `internet_upload_rate' and `internet_download_rate'. It is expressed in Kb/s,
  44. so if you have a line which maximum can do: 640 Kb/s in dwload and 30 Kb/s in
  45. upload, set them to 640 and 30.
  46. `internet_ping_hosts' is a list of Internet hosts which will be pinged to
  47. verify if the connection is alive, you can use the default hosts.
  48. Finally, If you want to share your Internet connection among other Netsukuku
  49. nodes, set `share_internet' to 1.
  50. Ah, and you can set `shape_internet' to 1 if you want to shape your outgoing
  51. Internet traffic.
  52. ---- netsukuku.conf snip ----
  53. internet_connection = 1
  54. internet_gateway = 192.168.1.1:eth0
  55. internet_download_rate = 640
  56. internet_upload_rate = 30
  57. internet_ping_hosts = google.com:cisco.com:sourceforge.net:dyne.org
  58. share_internet = 1
  59. shape_internet = 1
  60. ---- snip end ----
  61. Now you are ready to launch the Netsukuku daemon. You have just to append the -I
  62. option in the command line. For example:
  63. # ntkd -i wlan0 -r -I
  64. **
  65. *** How to connect to the Internet using a shared connection
  66. **
  67. Just start the daemon in restricted mode, f.e:
  68. # ntkd -i wlan0 -r
  69. If you have an Internet connection and you don't want to share it, you have to
  70. set the correct options in netsukuku.conf:
  71. ---- netsukuku.conf snip ----
  72. internet_connection = 1
  73. internet_gateway = 192.168.1.1:eth0
  74. internet_download_rate = 640
  75. internet_upload_rate = 30
  76. internet_ping_hosts = google.com:cisco.com:sourceforge.net:dyne.org
  77. share_internet = 0
  78. ---- snip end ----
  79. If you don't, your Internet connection default route will be overwritten with
  80. that of another node.
  81. **
  82. *** Some nice feature you want to know
  83. **
  84. NetsukukuD supports a routing method called "multi inet gateway", this means
  85. that your node can connect to the Internet using, at the same time, multiple
  86. node which share their connection.
  87. If there are 5 nodes which share their 640Kb/s connections, you can have 5
  88. parallel downloads at 640Kb/s. Isn't it juicy?
  89. There's more: if you decide to share your Internet connection, you will always
  90. use the Internet connections shared by the other nodes, in this way you donate
  91. your bandwidth but, at the same time, you receive donations from other users.
  92. The other nice feature is the traffic shaping of your Internet connection (it
  93. doesn't matter if you're sharing it or not).
  94. If you decide to enable the relative option (shape_internet=1), NetsukukuD
  95. will execute the /etc/netsukuku/tc_shaper.sh script.
  96. This script shapes your Internet connection, this means that the traffic
  97. generated from your private LAN (192.168.x.x) and the low delay traffic (i.e.
  98. DNS, ssh...) are prioritised.
  99. The benefits are:
  100. * Even if you share your Internet connection to other Netsukuku nodes, your
  101. traffic will have the maximum priority, therefore you won't notices any
  102. slowdown
  103. * Even if you are downloading a big file, your lowdelay traffic will have the
  104. priority, therefor your ssh connections won't slow a bit
  105. PS: for more information read: http://lab.dyne.org/Ntk_IGS
  106. That's all,
  107. enjoy ^_^