Jump to content

Recommended Posts

Posted

As a newbie struggling for a month trying to find resources to set a static IP for Wifi DHCP and to get my PC to directly communicate to my OPZ via ethernet so I can be mobile... I am ecstatic to stumble across this solution, and had to share.

 

Basically all you need to do is add a few bits of info to the /etc/network/interfaces file that is first made to setup wifi on the OPZ (https://www.youtube.com/watch?v=8zGRAPguaSQ).

 

Here is the modified /etc/network/interfaces file contents that worked for me, in blue:

 

 

auto lo

iface lo inet loopback

 

auto eth0

allow-hotplug eth0

iface eth0 inet static     #last word changed from dhcp in original

address 192.168.137.2   #manually set static IP: in range of default gateway found below.

netmask 255.255.255.0   #default from below line location on pc

gateway 192.168.137.1   #default pc ethernet router IP, found in "network connections>ethernet>properties>TCP IPv4" or cmd "ipconfig>ethernet autoconfig IPv4"

 

allow-hotplug wlan0

iface wlan0 inet manual

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet static    #last word changed from dhcp in original

address 10.0.1.99    #manually set statis IP; in range of defualt OPi gateway from below

netmask 255.255.255.0    #default from above on PC

gateway 10.0.1.1    #default OPi ethernet gateway address, from "route -ne" command, on Eth0 line

 

 

--> Descriptions for finding the relevant IP addresses directly from your PC and OPi are embedded above, but can also be found via this tutorial video which I first used  (https://www.youtube.com/watch?v=5DCPDQnRXm8)

 

NOTE: You have to remove the #inline description comments from the code above for it to work. 

 

And that's it; no additional installations or configuration required on your PC or OPi... hope it helps.

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines