NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
TerryJColes
Jun 29, 2020Luminary
Using a Static IP Address on a Raspberry Pi Connected to my Nighthawk Router
Hi, I have a couple of Raspberry Pis connected to my Home Network which is provided by my Netgear Router. Ideally I want to set up a static IP Address for each of these Pis, but I cannot make th...
- Jun 30, 2020
schumaku wrote:So t the end of the day, what went wrong and broke the Pi <-> D7800 connection and the Internet connection finally?
The router was unaware of the presence of the Webserver, so didn't route Google traffic when I was trying to use the Static IP.
schumaku
Jun 30, 2020Guru - Experienced User
Breaking this discussion down into two issues I think I have read about on this D7800 (firmware version unknown, ISP/WAN encapsulation unknown [because we know this can make a differences on Netgear's famous routers]):
- The D7800 does not accept a wirless client with a client side static configured IP (address from the subnet, correct default gateway/router IP, mask matching) to reach the Internet.
At that stage, the wireless client dos also not show up in the attached devices. [Why should it? There was no DHCP nor any Internet traffic, and the ARP request can be answered from any other IP stack on the wireless or on the wired LAN].
Unanswered is the most simple test: Ping the router LAN IP from the Pi. Ideally, capture the wlan0 interface traffic while doing this so we can see if there is anything from the other side coming back, like ARP replies, ping, ... Ideally, try the ping test from the router while capturing the Pi wlan0 interface, too. If this does success, while capturing the Pi wlan0 traffic, try e.g an ssh or ftp access ot, and from the Pi. Potentially there is a problem on the Pi firewall (iptables etc.) config, or the traffic does flow into the concurrently installed and configured VPN default gateway.
Can't see that is should matter if the static Pi IP is in the router DHCP pool (IP address range) or not - organisationally I would add a reservation for that MAC-LAN IP pair at least.
Does the Pi connect to the D7800 primary or the guest network? Wireless isolation on the guest network or whatever other oddities might lead to issues. - The D7800 LAN config does not (or more specifically no longer) allow to change an already assigned IP address in the MAC-IP reservation table to be changed for a further BOOTP/DHCP assignment.
Does the D7800 allow manually entering a MAC-IP pair in the LAN DHCP reservation table (Pi deassociated, worst case following a router reboot to forget about the PI wlan0 BSSID (MAC)) instead of picking and editing the dynamic entry from the DHCP table?
PS. Does anybody want to hear why I try to avoid Netgear's consumer routers where ever possible?
TerryJColes
Jun 30, 2020Luminary
I think that I should clear up a few things. The WiFi generated by the Netgear Router doesn't come into this and neither does the WiFi on the Pi, because it has been disabled. The only WiFI that is relevant to this discussion (and then only peripherally) is that provided by two Outdoor WiFi Antennas which allow the Visitors (or staff if they so wish) to open the splash page of the Captive Portal and thence open the content hosted on the Model Town's private Website which provides Audio Guides, etc. These Outdoor Antennas are connected to the 192.168.0.* subnet and are primarly provided for Visitors. Staff and volunteers can plug into a switch on the 192.168.0.* subnet or log into the network on the Outdoor WiFI Antennas and then SSH into the Pis.
All this is not particularly useful (other than for interest :-) ). The IP Addresses that I want to be static are on the Main Office Router side (the Netgear for my Test Rig). Since my posting earlier this morning, I have kind of accepted that the main Router doesn't show the devices added with a static IP. It isn't really a problem, I now feel that as long as I understand why this is occuring I can live with it. My initial problem was caused by the lack of visibility of what was connected to the Router; I had got used to seeing this.
As far as pinging the Netgear Router from the 192.168.0.* subnet is concerned; no that doesn't work. I never expected it to (it didn't stop me trying :-) ). Both of these devices purposely prevent it. The Webserver (which includes the Captive Portal software) uses iptables to turn the Webserver Pi into router and block practically everything going out on that Ethernet port; that's what it's for. Similarly the VPN Server also uses iptables to create a router that uses MASQUERADE (eg NAT) to prevent traffic going out, except in response to valid packets from an external device using the VPN service.
Anyway. Thanks for the insights that everyone has provided in this thread. Even the ones that were off beam have helped me work though this problem and come to an understanding of what is going on.
- schumakuJun 30, 2020Guru - Experienced User
Ok, so you have a wired connection on one of the Ethernet ports for the link to the router - not much of a difference: A static config on that interface should to the job with a few potential deal breakers like WiFI isolation. The ping and traffic capturing was clearly intended for testing the link from the Pi to the router of course. Anything beyond is your Pi project business 8-). Everything I wrote above does still apply - as all that has to work and that's the only part where the router is affected.
So t the end of the day, what went wrong and broke the Pi <-> D7800 connection and the Internet connection finally?
- TerryJColesJun 30, 2020Luminary
schumaku wrote:So t the end of the day, what went wrong and broke the Pi <-> D7800 connection and the Internet connection finally?
The router was unaware of the presence of the Webserver, so didn't route Google traffic when I was trying to use the Static IP.