network-configuration.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. [[network-configuration]]
  4. Network configuration
  5. ~~~~~~~~~~~~~~~~~~~~~
  6. loopback devices
  7. ^^^^^^^^^^^^^^^^
  8. Example for loopback device configuration:
  9. ---------------------
  10. auto lo
  11. iface lo inet loopback
  12. ---------------------
  13. static network configuration
  14. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  15. Example for an ethernet network card:
  16. ---------------------
  17. auto eth0
  18. iface eth0 inet static
  19. address 192.168.1.1
  20. netmask 255.255.255.0
  21. broadcast +
  22. gateway 192.168.1.254
  23. ---------------------
  24. The DNS resolver must be manually configured in /etc/resolv.conf.
  25. The plus for the broadcast value, will calculate the correct broadcast address for the network.
  26. dynamic network configuration
  27. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  28. Example for an ethernet network card:
  29. ---------------------
  30. auto eth0
  31. iface eth0 inet dhcp
  32. ---------------------
  33. bridge configuration
  34. ^^^^^^^^^^^^^^^^^^^^
  35. Example for a network bridge with two ethernet network interfaces and an ip address:
  36. ---------------------
  37. auto br0
  38. iface br0 inet static
  39. address 192.168.99.1
  40. netmask 255.255.255.0
  41. broadcast +
  42. bridge-ports eth0 eth1
  43. ---------------------
  44. Just a bridge without an ip address:
  45. ---------------------
  46. auto br0
  47. iface br0 inet manual
  48. bridge-ports eth0 eth1
  49. ---------------------
  50. You need to install either Busybox brctl applet or the bridge-utils package. The required kernel modules will be automatically selected.
  51. VLAN network interfaces
  52. ^^^^^^^^^^^^^^^^^^^^^^^
  53. Example configuration of a network interface with VLAN ID 8 without any ip configuration:
  54. ---------------------
  55. auto eth0.8
  56. iface eth0.8 inet manual
  57. ---------------------
  58. You need to install Busybox vconfig applet. The required kernel modules will be automatically selected.
  59. PPP over Ethernet
  60. ^^^^^^^^^^^^^^^^^
  61. Typical DSL configuration:
  62. ---------------------
  63. auto ppp0
  64. iface ppp0 inet ppp
  65. use-template pppoe
  66. provider isp
  67. ppp-mtu 1412
  68. ppp-username foo
  69. ppp-password bar
  70. ppp-device eth1
  71. ---------------------
  72. The provider can be used as argument for "pon" and "poff" commands.
  73. You need to install the ppp and ppp-mod-pppoe package. The required kernel modules will be automatically selected.
  74. wireless client configuration
  75. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  76. Example wireless client configuration, secured with WPA2:
  77. ---------------------
  78. auto wlan0
  79. iface wlan0 inet dhcp
  80. wireless-ssid myap
  81. wireless-channel 11
  82. wireless-mode sta
  83. wireless-security wpa2
  84. wireless-passphrase xxxxxx
  85. ---------------------
  86. You need to install iw and wpa_supplicant packages. For older wireless drivers you
  87. need to install wireless-tools instead of iw and use the following variable to choose the right tools:
  88. ---------------------
  89. wireless-extension 1
  90. ---------------------
  91. wireless accesspoint configuration
  92. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  93. To configure an access point use following example:
  94. ---------------------
  95. auto wlan0
  96. iface wlan0 inet static
  97. address 192.168.40.10
  98. netmask 255.255.255.0
  99. broadcast +
  100. wireless-ssid myap
  101. wireless-channel 8
  102. wireless-mode ap
  103. wireless-security wpa2
  104. wireless-passphrase xxxxxx
  105. ---------------------
  106. You need to install hostapd and iw/wireless-tools packages.
  107. hso umts modem
  108. ^^^^^^^^^^^^^^
  109. If you have a HSO UMTS modem, you can use following to configure internet access:
  110. ---------------------
  111. auto hso0
  112. iface hso0 inet manual
  113. pin 1234
  114. apn your.apn
  115. ---------------------
  116. ATM configuration
  117. ^^^^^^^^^^^^^^^^^
  118. For example a configuration on a Linksys AG241 router with integrated DSL modem,
  119. you can configure two ATM devices to distinguish between Internet and IPTV traffic:
  120. ---------------------
  121. auto eth0.1
  122. iface eth0.1 inet manual
  123. auto eth0.8
  124. iface eth0.8 inet manual
  125. auto nas0
  126. iface nas0 inet manual
  127. auto nas1
  128. iface nas1 inet manual
  129. atm-vpi 1
  130. atm-vci 34
  131. auto br0
  132. iface br0 inet manual
  133. bridge-ports eth0.1 nas0
  134. auto br1
  135. iface br1 inet manual
  136. bridge-ports eth0.8 nas1
  137. ---------------------
  138. More network setups can be implemented on request.