I have read it is possible to have the Pi to act as a gateway computer in a LAN or mixed WLAN/LAN. 39227/rpi-as-internet-gateway-bridge

It is not clear to me how the info on what is the intended gateway should be configured in the DHCP. In my case the DHCP should be on the wireless router, because I want it to be a hub for all my devices and have the Pi to just provided connection (as a modem would do, if you wish). This seems to be the same as in the link above, but it is not clear to me how a new host, say my mobile phone, should get the info on what to use as a gateway. I would have said I have to put this info in the wireless router config, but I do not see any mention of that in that tutorial (nor I see such a setting in my wireless router!)

This seems particularly important to me when mobile phones or other devices with little space for custom configurations are to be attached to the wireless router. I mean, for a regular computer I can still harness the TCP/IP settings and have it to use the gateway I want, but with mobiles I see no option than the gateway info being passed by the DHCP. What am I missing?

What makes my Pi be recognised as a gateway by the devices attached to the router in the tutorial linked above?

  • I scanned the tutorial you have linked but haven't worked through it. Do you have exactly the same environment than in the tutorial? The RasPi is only used as a converter from eth0 to usb, right? What RasPi do you use? Using an USB port direct as ethernet interface is only possible with a RPi Zero, as far as I know. With DHCP do you mean a DHCP server, isn't it? Have you considered to simply connect the wifi router to the internet router with an usb to ethernet dongle? – Ingo Nov 24 '18 at 19:20
  • Set your router as a DHCP client of RPI. That is, [RPI.ETH0:] <--> [ROUTER.WAN:, GATEWAY:] <--[ROUTER.LAN, ROUTER.WIFI] <--> [devices] – chx101 Nov 24 '18 at 21:46
  • @ingo the router does not offer usb : ( and yes I have the same as in the link. For now I have made progress, and seems to work, using fixed IPs everywhere, so no DHCP whatsoever ... – Rho Phi Nov 25 '18 at 21:05
  • @chx101 my router does not have a "gateway" setting ... so if you were implying to set it that way I do not know how to do that. (it's a very old d-link from 2004) – Rho Phi Nov 25 '18 at 21:07
  • The Router with Internet Access in the picture from the link has only an USB port but you say: "the router does not offer usb". What's wrong here? If you found a solution please make an answer to finish your question and others do not try to help you for nothing. – Ingo Nov 26 '18 at 22:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.