1

Not exactly sure what type of configuration this is called (wifi ap, wifi gateway, wifi bridge?)

Basically, I want to use RPi3's wlan0 which is connected to home wifi network (10.0.0.x) to connect a PC that has no wifi capability to the same home wifi network.

Currently, I am able to setup DHCPCD and DNSMASQ in the RPI3 to bridge between wlan0 and eth0, and the PC is able to connect to the internet via RPI3.

The eth0 port is DHCP enabled, and sits on network 192.168.1.x, the PC gets its IP from the RPI3 eth0 w/ ipv4 of 192.168.1.x

All other devices on the home wifi network has ipv4 of 10.0.0.x, they can ping the RPI3's wlan0 Ipv4, but not the PC's.

What else should I do to make the PC visible to other devices?

  • Do NOT run 2 DHCP servers. Use the server in your router. – Milliways Jan 25 '18 at 23:26
  • ok, the wifi router does provide a dynamic IP to the RPI3's wlan0 interface, but what to do to the eth0 interface? – user97662 Jan 26 '18 at 10:36
0

As I understand there are two interfaces, the wifi connected to the network 10.0.0.0/24 and the ethernet port connected to the network 192.168.1.0/24. Assuming this we have a typical router. It's a little bit difficult to evaluate your configuration in detail from here. But essential for a router is ip-forwarding that sends ip-packets from one interface to the other and backwards. So lets have a look on this.

Check if ip-forwarding is enabled on your raspi with:

rpi ~$ cat /proc/sys/net/ipv4/ip_forward
0

Here it shows me 0, means disabled. You can enable it temporary until next boot with:

rpi ~$ echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
1
rpi ~$ cat /proc/sys/net/ipv4/ip_forward
1

To enable it permanent there is flag in /etc/sysctl.conf

rpi ~$ grep -B 1 'net.ipv4.ip_forward' /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

Do it and reboot.

Maybe you have also to configure some static routes. This is managed with e.g.:

rpi ~$ ip route
default via 192.168.10.1 dev wlan0 src 192.168.10.72 metric 303 
192.168.10.0/24 dev wlan0 proto kernel scope link src 192.168.10.72 metric 303

This is the simple route on my raspi music renderer but not working as router. As I said it is difficult to give here special advices to you without detailed information from your network setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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