User avatar
Doctorwho8
Posts: 56
Joined: Mon Dec 31, 2012 11:00 pm
Location: Astoria NY
Contact: Website

Can the Pi Zero W present a static IP address on Ethernet

Sun Mar 31, 2019 8:09 pm

Hello!
I am busy setting up a new project. I have a Raspberry Pi Zero W mounted on a DIN plate from an accessory company. What I'd like to do is have the device pick up an IP address via its WiFi connection, and then do that step "Can the Pi Zero W present a static IP address on Ethernet?" (Subject from topic is in the quotes)

it would then be connected to a Router who at that end has a static IP address which is in the same group, such as Pi Zero would be say 192.168.0.1 and the router would be 192.168.0.2 both with matching netmasks. Ideally I had thought of using and setting up a DHCP server for Ethernet but the instructions for it on Intel Linux are too confusing.

Incidentally connected to the router on one of its three Ethernet ports would be another Pi Zero with a USB attached Ethernet device. The router is actually one of these "Linksys-Cisco Linksys Broadband Router RT31P2 - Router (RT31P2-NA)" from Amazon. Incidentally it is locked for Vonage, but for further work I'm trying to get a CIsco PAP2-NA device. In which case a SIP server plus required things would be installed onto the Pi Zero.

I had thought of using the instructions that the group at Adafruit wrote for turning the Pi into an access point, in which the WiFi connection would pick up an address, and then its DHCP service would be used to talk to that router, but the instructions were never updated to accommodate a Pi Zero W. This is in response to a group of individuals who asked me to prove that a Pi could be used for managing and delivering VOIP sessions.

I left out using Asterisk figuring that would be too complicated for this group.

For now I shall let all of you consider my problems. :!:
-------------------
Gregg
Doctor Who8

PhatFil
Posts: 1371
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Can the Pi Zero W present a static IP address on Ethernet

Sun Mar 31, 2019 8:55 pm

assuming you can ssh into the pi-0-w over wifi you should just need to edit a (edited out a badly recalled wrong filename) file and uncomment the eth0 block and populate with addresses following the example..
https://www.modmypi.com/blog/how-to-giv ... ess-update

I think a more elegant solution would be to reserve an ip address based on mac address with the router and if your router firmware has limitations look at alternative firmware perhaps that provides better features?

User avatar
Doctorwho8
Posts: 56
Joined: Mon Dec 31, 2012 11:00 pm
Location: Astoria NY
Contact: Website

Re: Can the Pi Zero W present a static IP address on Ethernet

Sun Mar 31, 2019 9:11 pm

by PhatFil » Sun Mar 31, 2019 3:55 pm

assuming you can ssh into the pi-0-w over wifi you should just need to edit a (edited out a badly recalled wrong filename) file and uncomment the eth0 block and populate with addresses following the example..
https://www.modmypi.com/blog/how-to-giv ... ess-update

I think a more elegant solution would be to reserve an ip address based on mac address with the router and if your router firmware has limitations look at alternative firmware perhaps that provides better features?
Hello!
Good thought. However these devices are locked down. And unless I do find a mythical unlocked version of the device in question... But enough of that, that's a good site. Indeed a it is a good start.
-------------------
Gregg
Doctor Who8

User avatar
Doctorwho8
Posts: 56
Joined: Mon Dec 31, 2012 11:00 pm
Location: Astoria NY
Contact: Website

Re: Can the Pi Zero W present a static IP address on Ethernet

Tue Apr 02, 2019 4:20 pm

by PhatFil » Sun Mar 31, 2019 3:55 pm

assuming you can ssh into the pi-0-w over wifi you should just need to edit a (edited out a badly recalled wrong filename) file and uncomment the eth0 block and populate with addresses following the example..
https://www.modmypi.com/blog/how-to-giv ... ess-update

I think a more elegant solution would be to reserve an ip address based on mac address with the router and if your router firmware has limitations look at alternative firmware perhaps that provides better features?
Hello!
Good thought. However these devices are locked down. And unless I do find a mythical unlocked version of the device in question... But enough of that, that's a good site. Indeed a it is a good start.
Hello!
Based on that idea I decided to try and temporarily set a static address for the Pi Zero W's plugged in Ethernet gizmo. However while I did get to the point where the thing plugged into that worked for the other Pi Zero, it, ah, just didn't work as expected. So I am off to explore a completely different approach. And in fact the next big problem will involve using that other Pi Zero in the USB Gadget mode. More on that in a different thread.
-------------------
Gregg
Doctor Who8

User avatar
default_user8
Posts: 666
Joined: Mon Nov 18, 2013 3:11 am

Re: Can the Pi Zero W present a static IP address on Ethernet

Tue Apr 02, 2019 4:43 pm

Two heads are better than one, unless one's a goat head.

PhatFil
Posts: 1371
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Can the Pi Zero W present a static IP address on Ethernet

Tue Apr 02, 2019 4:53 pm

Doctorwho8 wrote:
Tue Apr 02, 2019 4:20 pm
by PhatFil » Sun Mar 31, 2019 3:55 pm

assuming you can ssh into the pi-0-w over wifi you should just need to edit a (edited out a badly recalled wrong filename) file and uncomment the eth0 block and populate with addresses following the example..
https://www.modmypi.com/blog/how-to-giv ... ess-update

I think a more elegant solution would be to reserve an ip address based on mac address with the router and if your router firmware has limitations look at alternative firmware perhaps that provides better features?
Hello!
Good thought. However these devices are locked down. And unless I do find a mythical unlocked version of the device in question... But enough of that, that's a good site. Indeed a it is a good start.
Hello!
Based on that idea I decided to try and temporarily set a static address for the Pi Zero W's plugged in Ethernet gizmo. However while I did get to the point where the thing plugged into that worked for the other Pi Zero, it, ah, just didn't work as expected. So I am off to explore a completely different approach. And in fact the next big problem will involve using that other Pi Zero in the USB Gadget mode. More on that in a different thread.
what went wrong?? multiple usb gizmos??

User avatar
Doctorwho8
Posts: 56
Joined: Mon Dec 31, 2012 11:00 pm
Location: Astoria NY
Contact: Website

Re: Can the Pi Zero W present a static IP address on Ethernet

Wed Apr 10, 2019 4:23 am

by PhatFil » Sun Mar 31, 2019 3:55 pm

assuming you can ssh into the pi-0-w over wifi you should just need to edit a (edited out a badly recalled wrong filename) file and uncomment the eth0 block and populate with addresses following the example..
https://www.modmypi.com/blog/how-to-giv ... ess-update

I think a more elegant solution would be to reserve an ip address based on mac address with the router and if your router firmware has limitations look at alternative firmware perhaps that provides better features?
Hello!
Good thought. However these devices are locked down. And unless I do find a mythical unlocked version of the device in question... But enough of that, that's a good site. Indeed a it is a good start.
Hello!
Based on that idea I decided to try and temporarily set a static address for the Pi Zero W's plugged in Ethernet gizmo. However while I did get to the point where the thing plugged into that worked for the other Pi Zero, it, ah, just didn't work as expected. So I am off to explore a completely different approach. And in fact the next big problem will involve using that other Pi Zero in the USB Gadget mode. More on that in a different thread.
what went wrong?? multiple usb gizmos??
Hello!
I wish. Worse then that. It just refused to work as expected. I eventually abandoned the idea.
-------------------
Gregg
Doctor Who8

PhatFil
Posts: 1371
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Can the Pi Zero W present a static IP address on Ethernet

Wed Apr 10, 2019 5:41 am

as long as your using a compatible usb/nic device (some of the cheapest options wont work) there isnt anything to go wrong beyond a typo in the conf file..

Return to “Networking and servers”