Ethernet bridge/WiFi repeater-like functionality (for network printer sharing)

  • Hello community!


    while I use a RPi this would apply to any OMV machine, so might end up being an universal guide.


    In my current setup I use an RPi3 as a TimeMachine backup-server and our flats sharing server. Additionally I use it as a AirPlay receiver using shairplay-sync rather than the outdated shairplay plugin. Due to it's location the RPi is connected via WiFi.


    What I'm struggling to achieve now, is bridging it's ethernet-port to a network printer.
    After I first tried to simply rely on USB printing I was not to satisfied with the available driver options and rather wanted to use the printers native OS drivers. Therefor I connected the printer via it's ethernet port to my OMV box and setup an DHCP server. While this setup works okay-ish broadcasting the printer via smb sharing and thus having rather good OS support, the printer website still cannot be accessed even though ion forwarding is enabled in the kernel. While the website is already advertised across the subnets using Avahi (Bonjour) via mDNS-multicast it's not accessible from my local wifi. Also this appears to somehow overkill as I only want to connect one device to my local wifi and running a DHCP server therefor seems excessive.


    The functionality I basically try to achieve is the one of a wifi repeater featuring an ethernet port to connect non wifi devices to the wireless network. (Without the wifi repeating in this case, of course.) This would also circumvent the need to run a CUPS server on my OMV box altogether reducing it's overall load.
    I've experimenting with iptables but never achieved what I wanted. If searched the web and followed some guides and this way I archived the current implementation using DHCP but couldn't find anything working the way I actually want. So any help or maybe even some kind of guide would be welcome. If there are alternative implementation suggestions I'd be delighted to hear them, too.
    While I'm not a "Linux-guy" if feel comfortable in the command line environment and don't mind running whatever command (apart from r*m -rf /) (in this case via SSH from my MacBook).


    Best,
    MacPi

  • bridging it's ethernet-port to a network printer.

    'Bridging' happens on network layer 2 while all your attempts were one layer above (TCP/IP, NAT, routing, iptables).


    Simply create a bridge device, then the printer behind the Ethernet port will appear in your LAN with its own MAC address (getting hopefully an DHCP lease from your router, in case you configure static IP addresses on the printer take care that the printer is not in an own netrange but uses the one you use in your LAN already)


    https://wiki.debian.org/BridgeNetworkConnections

    • Offizieller Beitrag

    I like the small cheap openwrt-devices from gl-inet.com. Like GL-AR150. I've bought 6 of them just this year. And set them up at friends and relatives for different purposes. It has dual wifi radios (only 2.4 GHz) and dual ethernet ports (only 100 Mbps). And it can be configured to do all kinds of wonderful things to wifi and ethernet traffic. Routing, bridging, VPN, gateway, DHCP, sharing, repeating, downloading, uploading and so on. Even work as a very simple NAS. Similar in performance to a RPi, I suspect. Would most likely do what you want with a little bit of configuration.


    I have two as a dedicated wifi access point and repeater for local 2.4 GHz wifi IoT stuff. My normal wifi is a 5 GHz mesh. And I have an AR-300 as a router for my smartphone 4g internet connection over wifi to my home network cable and wifi.

  • Hello community!


    while I use a RPi this would apply to any OMV machine, so might end up being an universal guide.


    In my current setup I use an RPi3 as a TimeMachine backup-server and our flats sharing server. Additionally I use it as a AirPlay receiver using shairplay-sync rather than the outdated shairplay plugin. Due to it's location the RPi is connected via WiFi.


    What I'm struggling to achieve now, is bridging it's ethernet-port to a network printer.
    After I first tried to simply rely on USB printing I was not to satisfied with the available driver options and rather wanted to use the printers native OS drivers. Therefor I connected the printer via it's ethernet port to my OMV box and setup an DHCP server. While this setup works okay-ish broadcasting the printer via smb sharing and thus having rather good OS support, the printer website still cannot be accessed even though ion forwarding is enabled in the kernel. While the website is already advertised across the subnets using Avahi (Bonjour) via mDNS-multicast it's not accessible from my local wifi. Also this appears to somehow overkill as I only want to connect one device to my local wifi and running a DHCP server therefor seems excessive.


    The functionality I basically try to achieve is the one of a wifi repeater featuring an ethernet port to connect non wifi devices to the wireless network. (Without the wifi repeating in this case, of course.) This would also circumvent the need to run a CUPS server on my OMV box altogether reducing it's overall load.
    I've experimenting with iptables but never achieved what I wanted. If searched the web and followed some guides and this way I archived the current implementation using DHCP but couldn't find anything working the way I actually want. So any help or maybe even some kind of guide would be welcome. If there are alternative implementation suggestions I'd be delighted to hear them, too.
    While I'm not a "Linux-guy" if feel comfortable in the command line environment and don't mind running whatever command (apart from r*m -rf /) (in this case via SSH from my MacBook).


    Best,
    MacPi

  • Hello community!


    while I use a RPi this would apply to any OMV machine, so might end up being an universal guide.


    In my current setup I use an RPi3 as a TimeMachine backup-server and our flats sharing server. Additionally I use it as a AirPlay receiver using shairplay-sync rather than the outdated shairplay plugin. Due to it's location the RPi is connected via WiFi.


    What I'm struggling to achieve now, is bridging it's ethernet-port to a network printer.
    After I first tried to simply rely on USB printing I was not to satisfied with the available driver options and rather wanted to use the printers native OS drivers. Therefor I connected the printer via it's ethernet port to my OMV box and setup an DHCP server. While this setup works okay-ish broadcasting the printer via smb sharing and thus having rather good OS support, the printer website still cannot be accessed even though ion forwarding is enabled in the kernel. While the website is already advertised across the subnets using Avahi (Bonjour) via mDNS-multicast it's not accessible from my local wifi. Also this appears to somehow overkill as I only want to connect one device to my local wifi and running a DHCP server therefor seems excessive.


    The functionality I basically try to achieve is the one of a wifi repeater featuring an ethernet port to connect non wifi devices to the wireless network. (Without the wifi repeating in this case, of course.) This would also circumvent the need to run a CUPS server on my OMV box altogether reducing it's overall load.
    I've experimenting with iptables but never achieved what I wanted. If searched the web and followed some guides and this way I archived the current implementation using DHCP but couldn't find anything working the way I actually want. So any help or maybe even some kind of guide would be welcome. If there are alternative implementation suggestions I'd be delighted to hear them, too.
    While I'm not a "Linux-guy" if feel comfortable in the command line environment and don't mind running whatever command (apart from r*m -rf /) (in this case via SSH from my MacBook).


    Best,
    MacPi

  • Thank you for your input!


    @Adoby: While the GL-AR150 sound like the perfect, easy too setup device to do the task, I'd like to keep it being handled by my OMV box, as it totally fit's the purpose without needing an additional device.


    @tkaiser I will read the linked wiki and try this tomorrow! Previously I refrained from using bridge-utils as I read they can only bridge dual ethernet or ethernet to wifi but not the other way around (see last but one post of this thread – Ingo, February 28).

  • Actually the thread does not contain any prove, that the guid does actually work. Only one command saying it's known not to work, like I mentioned previously. Supposedly the author of the guide just assumed it would work like you did. I'm currently researching "wpa_supplicant" as this seems to be a viable option, though only mentioned incidentally on the thread.


    EDIT:
    Apparently only relevant for broadcasting wifi.

    • Offizieller Beitrag

    @MacPi that link explains how to do it by editing the /etc/network/interfaces then restart the network service.


    When I saw this thread and read it twice, my first thought was why just use a network switch, router to the switch, printer to the switch, router running dhcp and wireless connections.

  • @geaves Applying the bridge configuration in /etc/network/interfaces is just the same as the commands I ran - only the "hardwired" way. And just alike the commands it does not work, as wlan interfaces aren't supported by bridge-utils.


    I know it could be easier (I would just have to connect the network printer to the router), but my flat does not allow me to do so due to the routers location and the absence of build-in ethernet cabling.


    However it seems like I found what I have been searching for (Only the other way around). I will test and try later.

  • And just alike the commands it does not work, as wlan interfaces aren't supported by bridge-utils

    Believe what you want to believe and continue on layer 3 while you need to do this on layer 2. :)


    I use various SBC as wireless/Ethernet bridges (even tested on the RPi but there in a different mode for a reason) just usually not those with close to unusable Wi-Fi like the RPi (2x2 MIMO and 5GHz band is nicer)

    • Offizieller Beitrag

    And just alike the commands it does not work, as wlan interfaces aren't supported by bridge-utils.

    Ah sorry didn't realise it's was the same as editing conf file directly....btw what's the make and model of the printer, or did miss that?

  • Believe what you want to believe and continue on layer 3 while you need to do this on layer 2. :)
    I use various SBC as wireless/Ethernet bridges (even tested on the RPi but there in a different mode for a reason) just usually not those with close to unusable Wi-Fi like the RPi (2x2 MIMO and 5GHz band is nicer)

    I just got a little bit further (understanding the issue… rather than solving). I've not meant to be offensive though I obviously reached to far with my previous statement. Of course you are right that bridging wifi to ethernet IS possible as openWRT and similar routers do this. That said, this also appears to be the problem I'm running in: It seems to not be possible to bridge "managed wlans" if I understand this correctly.


    I'm not familiar enough with all of this to be able do differentiate what processes belong to which layer. Is it like hardware, driver, software?
    I do not mind using whatever solution nor do I insist on following a specific route. I'm just trying to enable the desired functionality following the guides I find.


    What I think now, after reading on, is actually describes best as: Using a [computer] as a wired access point to a WiFi network (extending plain internet access).


    If you can guide me through the process or can suggest another way (as "just bridging" appears not to work) I'd be deeply thankful.




    Ah sorry didn't realise it's was the same as editing conf file directly....btw what's the make and model of the printer, or did miss that?

    It's an old but trustworthy HP LaserJet P2015n, which allows me doing some excessive low cost printing, which I need for studying.

    • Offizieller Beitrag

    It's an old but trustworthy HP LaserJet P2015n

    Sh!t what you need is what I just ditched, had 2 hanging around for ages, a wireless/ethernet print server, you plug in the ethernet or usb but it communicates via the wireless network.

    • Offizieller Beitrag

    This is what I'm trying to turn my OMV server into.

    Might have found something on the Pi forum.....you just did brctl addbr br0 after you executed that you should have done brctl addif br0 wlan0 eth0


    Then have a look at this 6th post

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!