I am going to be staying in a hotel in the future, and I need to be able to use Ethernet devices there. The hotel provides free WiFi, however it has no way of providing Ethernet.

I have the idea of connecting to the free WiFi using a Raspberry Pi, and then pushing the internet connection out of the Ethernet port on the Pi.

This website seems to explain what I need to do, as does this post.

Everything seems fine here, apart from the bind addresses for the WiFi adapter. I don't know what IP addresses will be available on the WiFi network, and although I could put in a random ip address like, I don't know what range the network runs on either. It could be X.X.X.X, for example:

  • 192.168.0.X
  • 192.168.42.X
  • 10.0.2.X
  • 10.0.0.X

How can I make this set-up work without knowing any of the DHCP information beforehand?

Thank you for any responses.

  • 1
    I have this exact setup in my dorm room. You don't need to worry about DHCP. Follow this link.
    – Aloha
    Mar 22, 2017 at 8:29
  • @pandalion98 This still seems to require the exact IP address of the router with the internet connection, which I cannot get. Mar 25, 2017 at 8:39
  • You can get the IP address of a router fairly easily. In Windows, you can use CMD and type in 'ipconfig'. I'm positive there's ways to do this on pretty much every platform, just don't know which one(s) you have access to.
    – user61421
    Apr 1, 2017 at 2:52
  • @CMalasadas I guess this would work, yes. I have access to the Pi, and a windows laptop. Apr 1, 2017 at 4:56
  • You could probably do it on the RPi, I'll do some research and post an answer soon.
    – user61421
    Apr 1, 2017 at 11:52

3 Answers 3


Although it can be done with a Raspberry Pi I'd like to offer the D-Link N300 as an alternative solution. It is a range extender with in-built ethernet. I have this device and it works well for the low cost.


To find your IP address on RPi, do the following:

In the command line, type:

ping google.com

Then press CTRL-C to stop. This is making sure you have a successful connection.

Now, type:

ip addr

And you should see something like this:

pi@raspberrypi ~ $ ip addr
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet scope host lo
  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
  link/ether b8:27:eb:8e:b7:42 brd ff:ff:ff:ff:ff:ff
  inet brd scope global eth0  
pi@raspberrypi ~ $

Your IP address is directly after the second inet (which is below link/ether). In this case, your IP would be


If you want to know the raspberry ip ,all you need to do is: On the Pi

ip a

Or from another device you need an app based on nmap or nmap itself and scan the network,for instance,if the subnet is 192.168.1.xxx , you can type

nmap -F

and finally,to setup an access point this page may help you.

  • The link describes setting up a wireless access point on a wired network. The question is about going the other way round.
    – nekomatic
    May 14, 2019 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.