[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:network_services:wifi_to_eth_bridge_routing [2017/08/02 13:06 (UTC)] – [Sources] slackerhowtos:network_services:wifi_to_eth_bridge_routing [2017/08/02 20:56 (UTC)] (current) – Spelling, syntax, layout alienbob
Line 1: Line 1:
-<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> +====== Wi-Fi to eth (bridge) routing ======
-====== Wifi to eth (bridge) routing ======+
  
-This Howto describes, how to interconnect wireless and wired network interfaces on the same Linux computer, to enable unmodified TCP/IP packets to transpassOn other places this is mentioned as network bridge or WiFi line extender or WiFi Internet share.+This Howto describes, how to interconnect wireless and wired network interfaces on the same Linux computer, to enable unmodified TCP/IP packets to pass from one interface to the otherIn other places this is mentioned as network bridge or Wi-Fi line extender or Wi-Fi Internet share.
  
-**The reason for this HOWTO: word __bridge__ is misleading**+**The reason for this HOWTO: the word __bridge__ is misleading**
  
-For a network bridge we assume a device that transfer unmodified network packets from one network connection to the other. +For a network bridge we assume a device that transfers unmodified network packets from one network connection to the other. 
-One can create a bridge device (virtual) and add members to it. This works only for members of type wired - eth network cards. Network Bridge "connects" members on level 3  of OSI model. That means communication on TCP/IP level.\\  +One can create a bridge device (virtual) and add members to it. This works only for bridge members of type wired - //eth// network cards. A network Bridge "connects" members on [[wp>OSI_model|level 3 of the OSI model]]. That means communication on TCP/IP level.\\  
-When you want to add a WiFi device to the bridge, you hit to a barrier: WiFi devices communicate on level 2 of OSI model. +When you want to add a Wi-Fi device to the bridge, you hit a barrier: Wi-Fi devices communicate on [[wp>OSI_model|level 2 of the OSI model]]
-So you can find many manuals on the Internethow to circumvent this (in form of putting WiFi card to 4addr mode). This simply DO NOT WORK!\\ +You can find many manuals on the Internet that document how to circumvent this (in the form of putting the Wi-Fi card in [[https://wiki.openwrt.org/doc/howto/clientmode|4addr mode]]). This simply DOES NOT WORK!\\ 
-WiFi network card (member of bridge) authenticate and connects to AP, but TCP/IP packets do not travel over connection.\\  +The Wi-Fi network card (member of the bridge) authenticates and connects to the Wireless Access Point (AP), but TCP/IP packets do not travel over the connection.\\  
-So searching for "wifi eth bridge" do not return any useful solution. The culprit is word "bridge".+So searching for "wifi eth bridge" does not return any useful solution. The culprit is the word "bridge".
  
 ====== General solution ====== ====== General solution ======
  
-A working solution is "Proxy ARP Routing" +A working solution is "Proxy ARP Routing".\\  
-You simply enable IP forwarding and then for every device connected to eth side of a "bridge" you have to add a routing line to the routing table. This can be automated by program parprouted - Proxy ARP routing daemon.\\ +You simply enable IP forwarding and then for every device connected to the wired (ethside of a "bridge" you have to add a routing line to the routing table. This can be automated by program like [[http://freecode.com/projects/parprouted|parprouted]] the Proxy ARP routing daemon. 
-<note> Reading of parprouted man page is highly recommended to be aware of limitations</note> +<note> Reading of the [[https://linux.die.net/man/8/parprouted|parprouted man page]] is highly recommended to be aware of its limitations</note> 
  
 ====== Solution for Slackware, step-by-step ====== ====== Solution for Slackware, step-by-step ======
  
-Tested and working on Slackware64-14.2, kernel-4.11.6, CPU i5-7200\\+Tested and working on Slackware64-14.2, kernel-4.11.6, CPU i5-7200
  
-This solution is for static IP addresses. See below link of original source for a use of DHCP.\\+This solution is for static IP addresses. See below link of original source for a scenario that uses DHCP.
  
 **Assumptions**:\\ **Assumptions**:\\
-We want to interconnect one WiFi and one eth network card - devices wlan0 and eth0.\\ +We want to interconnect one Wi-Fi and one wired (ethnetwork card - the network devices ''wlan0'' and ''eth0''.\\ 
-Prepare Slackware box so, to be able to communicate over WiFi adapter (Networkmanager, rc.inet1 ...), eth adapter is idle.\\ +Prepare Slackware box so that you are able to communicate over the Wi-Fi adapter (using NetworkManager, rc.inet1 or other means...), making sure that the wired (ethadapter is not being used.\\ 
-I had set up WPA2 AES verification with Networkmanager to get usable wpa_supplicant.conf later used with rc.inet1.\\ +I had set up WPA2 AES verification with NetworkManager to get usable ''wpa_supplicant.conf'' configuration file which I used later with rc.inet1.\\ 
-Disable all bootable network configurations (rc.networkmanager or other files for network setup are not executable) and set rc.inet1 executable.\\+Disable all on-boot network configurations (i.e. make sure that ''rc.networkmanager'' or other files for network setup are not executable) and set ''rc.inet1'' executable.
  
-1. IP forwarding must be enabled at Linux kernel compilation\\ +  - IP forwarding must be enabled in the kernel (since the 2.1 release the Linux kernel does not require an explicit compilation option for this) 
-2. download & compile & install [[http://www.hazard.maks.net/parprouted/parprouted-0.7.tar.gz]] :!:\\ +  download & compile & install [[http://www.hazard.maks.net/parprouted/parprouted-0.7.tar.gz]] :!: 
-3. edit /etc/rc.d/rc.inet1.conf so to enable wlan0 and eth0, set them static IP numbers and set wlan0 to lowest index and connect to AP\\ +  edit ''/etc/rc.d/rc.inet1.conf'' so to enable ''wlan0'' and ''eth0''. Assign them static IP addresses and set ''wlan0'' to the lowest index and connect to the AP\\ Below are example lines from ''/etc/rc.d/rc.inet1.conf''the only ones without comment sign "#" at the beginning and for WPA2 Wi-Fi authentication <code>
-Below lines from **/etc/rc.d/rc.inet1.conf** are the only without comment sign "#" at the beginning and for WPA2 WiFi authentication\\ +
-<code>+
 IFNAME[1]="eth0" IFNAME[1]="eth0"
 IPADDR[1]="10.200.200.223" IPADDR[1]="10.200.200.223"
Line 55: Line 52:
 WLAN_WPADRIVER[0]="wext" WLAN_WPADRIVER[0]="wext"
 </code> </code>
 +  - set ''/etc/rc.d/rc.ip_forward'' executable:<code>
 +# chmod +x /etc/rc.d/rc.ip_forward
 +</code>
 +  - add a line <code>
 +/usr/local/sbin/parprouted wlan0 eth0
 +</code> to ''/etc/rc.d/rc.local'' and make sure that this file is executable
  
-4set /etc/rc.d/rc.ip_forward executable:\\ +That's allReboot and you have working Wi-Fi - eth bridge, also called Wi-Fi extender or Wi-Fi Internet share.
-       <code>chmod +x /etc/rc.d/rc.ip_forward</code> +
-5. add line:\\ +
-      <code>/usr/local/sbin/parprouted wlan0 eth0</code>  +
-        into **/etc/rc.d/rc.local** and make this file executable+
  
-That's all. Reboot and you have a working WiFi - eth bridge, also called WiFi extender or WiFi Internet share.\\ +:!: Note on parprouted compilation:\\  
- +The ''parprouted'' man page section "Requirements" says: //"parprouted requires the "ip" program from iproute2 tools to be installed in /sbin. If it is installed in another location, please replace "/sbin/ip" occurrences in the source with the correct path"//.\\ 
-:!: parprouted compilation:\\ +Slackware installs the ''ip'' program as ''/sbin/ip'' so you should be OK.
-parprouted man page  section "Requirements" says: +
-parprouted requires "ip" program from iproute2 tools to be installed in /sbin. If it is installed in another location, please replace "/sbin/ip" occurrences in the source with the correct path.+
  
 ====== DHCP enabled variant ====== ====== DHCP enabled variant ======
Line 77: Line 74:
  
 * Original source:[[https://wiki.debian.org/BridgeNetworkConnectionsProxyArp]] * Original source:[[https://wiki.debian.org/BridgeNetworkConnectionsProxyArp]]
- 
- 
-<!-- If you are copying information from another source, then specify that source --> 
-<!-- * Original source: [[http://some.website.org/some/page.html]] --> 
-<!-- Authors are allowed to give credit to themselves! --> 
-<!-- * Originally written by [[wiki:user:xxx | User X]] --> 
-<!-- * Contributions by [[wiki:user:yyy | User Y]] --> 
  
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 <!-- You must remove the tag-word "template" below before saving your new page --> <!-- You must remove the tag-word "template" below before saving your new page -->
-{{tag>howtos network WiFi bridge}}+{{tag>howtos network WiFi bridge author_slacker}}
 howtos:network_services:wifi_to_eth_bridge_routing ()