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.
","body@stripHtml({\"removeProcessingText\":true,\"removeSpoilerMarkup\":true,\"removeTocMarkup\":true,\"truncateLength\":200})@stringLength":"219","postTime":"2020-06-30T05:02:32.381-07:00","lastPublishTime":"2020-06-30T05:02:32.381-07:00","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"attachments":{"__typename":"AttachmentConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"solution":true,"metrics":{"__typename":"MessageMetrics","views":10320},"placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"videos":{"__typename":"VideoConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"isEscalated":null,"customFields":[]},"QueryVariables:ReplyList:message:1938125:1":{"__typename":"QueryVariables","id":"ReplyList:message:1938125:1","value":{"id":"message:1938125","first":10,"sorts":{"postTime":{"direction":"ASC"}},"repliesFirst":3,"repliesFirstDepthThree":1,"repliesSorts":{"postTime":{"direction":"ASC"}},"useAvatar":true,"useAuthorLogin":true,"useAuthorRank":true,"useBody":true,"useKudosCount":true,"useTimeToRead":false,"useMedia":false,"useReadOnlyIcon":false,"useRepliesCount":true,"useSearchSnippet":false,"useAcceptedSolutionButton":true,"useSolvedBadge":false,"useAttachments":false,"attachmentsFirst":5,"useTags":false,"useNodeAncestors":false,"useUserHoverCard":false,"useNodeHoverCard":false,"useModerationStatus":true,"usePreviewSubjectModal":false,"useMessageStatus":true}},"CachedAsset:text:en_US-components/customComponent/CustomComponent-1755165470600":{"__typename":"CachedAsset","id":"text:en_US-components/customComponent/CustomComponent-1755165470600","value":{"errorMessage":"Error rendering component id: {customComponentId}","bannerTitle":"Video provider requires cookies to play the video. Accept to continue or {url} it directly on the provider's site.","buttonTitle":"Accept","urlText":"watch"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/users/UserAvatar-1755165470600":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserAvatar-1755165470600","value":{"altText":"{login}'s avatar","altTextGeneric":"User's avatar"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/ranks/UserRankLabel-1755165470600":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/ranks/UserRankLabel-1755165470600","value":{"altTitle":"Icon for {rankName} rank"},"localOverride":false},"CachedAsset:text:en_US-components/common/ExternalLinkWarningModal-1755165470600":{"__typename":"CachedAsset","id":"text:en_US-components/common/ExternalLinkWarningModal-1755165470600","value":{"title":"Leaving the Community","description":"You're about to leave this site and navigate to an external domain. Are you sure you want to continue?","action.submit":"Continue","action.cancel":"Go Back"},"localOverride":false},"CachedAsset:text:en_US-components/messages/AcceptedSolutionButton-1755165470600":{"__typename":"CachedAsset","id":"text:en_US-components/messages/AcceptedSolutionButton-1755165470600","value":{"accept":"Mark as Solution","accepted":"Marked as Solution","errorHeader":"Error!","errorAdd":"There was an error marking as solution.","errorRemove":"There was an error unmarking as solution.","solved":"Solved","topicAlreadySolvedErrorTitle":"Solution Already Exists","topicAlreadySolvedErrorDesc":"Refresh the browser to view the existing solution"},"localOverride":false},"CachedAsset:text:en_US-components/messages/ThreadedReplyList-1755165470600":{"__typename":"CachedAsset","id":"text:en_US-components/messages/ThreadedReplyList-1755165470600","value":{"title":"{count, plural, one{# Reply} other{# Replies}}","title@board:BLOG":"{count, plural, one{# Comment} other{# Comments}}","title@board:TKB":"{count, plural, one{# Comment} other{# Comments}}","title@board:IDEA":"{count, plural, one{# Comment} other{# Comments}}","title@board:OCCASION":"{count, plural, one{# Comment} other{# Comments}}","noRepliesTitle":"No Replies","noRepliesTitle@board:BLOG":"No Comments","noRepliesTitle@board:TKB":"No Comments","noRepliesTitle@board:IDEA":"No Comments","noRepliesTitle@board:OCCASION":"No Comments","noRepliesDescription":"Be the first to reply","noRepliesDescription@board:BLOG":"Be the first to comment","noRepliesDescription@board:TKB":"Be the first to comment","noRepliesDescription@board:IDEA":"Be the first to comment","noRepliesDescription@board:OCCASION":"Be the first to comment","messageReadOnlyAlert:BLOG":"Comments have been turned off for this post","messageReadOnlyAlert:TKB":"Comments have been turned off for this article","messageReadOnlyAlert:IDEA":"Comments have been turned off for this idea","messageReadOnlyAlert:FORUM":"Replies have been turned off for this discussion","messageReadOnlyAlert:OCCASION":"Comments have been turned off for this event"},"localOverride":false},"ModerationData:moderation_data:1938165":{"__typename":"ModerationData","id":"moderation_data:1938165","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"Rank:rank:28":{"__typename":"Rank","id":"rank:28","position":10,"name":"Guru","color":"333333","icon":null,"rankStyle":"TEXT"},"User:user:432166":{"__typename":"User","id":"user:432166","uid":432166,"login":"antinode","biography":null,"registrationData":{"__typename":"RegistrationData","status":null,"registrationTime":"2017-06-28T15:12:21.327-07:00"},"deleted":false,"email":"","avatar":{"__typename":"UserAvatar","url":null},"rank":{"__ref":"Rank:rank:28"},"entityType":"USER","eventPath":"community:ejquo23388/user:432166"},"ForumReplyMessage:message:1938165":{"__typename":"ForumReplyMessage","uid":1938165,"id":"message:1938165","entityType":"FORUM_REPLY","eventPath":"category:home-wifi-routers/category:home-networking/category:English/community:ejquo23388board:home-wifi-routers-nighthawk/message:1938084/message:1938165","revisionNum":2,"author":{"__ref":"User:user:766039"},"readOnly":false,"repliesCount":10,"depth":3,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:home-wifi-routers-nighthawk"},"parent":{"__ref":"ForumReplyMessage:message:1938125"},"conversation":{"__ref":"Conversation:conversation:1938084"},"subject":"Re: Using a Static IP Address on a Raspberry Pi Connected to my Nighthawk Router","moderationData":{"__ref":"ModerationData:moderation_data:1938165"},"body":"
TerryJColes wrote:'Configure the Raspberry Pi staticly. That means going into the Pi and assigning an IP address, mask and gateway. '
I have been configuring the IP address statically, eg:
# Static IP configuration:\ninterface eth1\nstatic ip_address=192.168.1.98/24\nstatic routers=192.168.1.1\nstatic domain_name_servers=8.8.8.8\nmetric 200What do you mean by 'mask and gateway' in this context?
I suspect when you did the actual configuration on the Pi you were asked mask. That does not show when doing the command you gave.
Normally when doing the actual assignment there is a mask question. Is the .98 address within your DHCP scope? If so that can cause issues.
Can you ping the Pi? If not then that would be where to start assuming the .98 is outside of the DHCP scope.
If you do a ifconfig eth1 you should see the mask. Here is output on my Pi.
ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.220 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::1683:1051:7637:eeeb prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:57:7d:03 txqueuelen 1000 (Ethernet)
RX packets 1561476 bytes 193229943 (184.2 MiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 961779 bytes 114655160 (109.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
> I have a couple of Raspberry Pis [...]
Model? Network interfaces? Raspbian?
> [...] I want to set up a static IP Address for each of these Pis,
> [...]
Why?
Terminology: A \"static\" address is configured on the device itself.
What you configure on a (DHCP server on a) router is a reserved dynamic
address, not a static address. Which do you mean?
Do you really care which way you get a fixed address? Using static
addresses requires more care in the configuration of the DHCP server.
(See below.)
> [...] This works, but it means that I can only have the IP Address
> that the Router gave me through DHCP before I reserved it. [...]
It _does_? How did you arrive at that conclusion?
> [...] What I really want is to specify static IP Addresses in the
> 'dhcpcd.conf' file on the Pis and have the Router accept these as the
> addresses to use.
Is that what you \"really want\", or is it what you believe is the only
way to get what you _really_ \"really want\", namely free choice of fixed
IP configuration for these gizmos? Don't choose the solution before you
define the problem.
> Also. If I reserve the DHCP Server on the Router gave me, I'm sure I
> used to be able to edit this to the IP Address that I want but this also
> causes the system to fail. [...]
Huh? \"reserve the DHCP Server\"? Does that mess make sense to you
when you read it?
If you do enough playing with address reservations, then you might
need to shut down the router (DHCP server) and all the client devices,
and then restart everyone to get everyone into a consistent condition.
> Configure the Raspberry Pi staticly. [...]
I typically wouldn't. I usually don't. I usually use address
reservation for mine (Zero W, 3 B+), and it works just fine (on a
D7000[v1], V1.0.1.78_1.0.1).
But, if you want to specify odd-ball parameters, like, say, a DNS
server other than the router, then DHCP from the router would not do
what you want.
> What do you mean by 'mask and gateway' in this context?
The \"subnet mask\" is specified by your \"/24\". \"/24\" is equivalent to
\"255.255.255.0\" (that is, 24 binary ones). (And it's more compact.)
\"ifconfig\" uses the old (bulky) notation in its reports.
\"[default] gateway\" and \"default router\" are equivalent.
If you decide to use static addresses, then you should shrink the
DHCP pool on your router (DHCP server) from its default range,
\".2\" - \".254\", to something smaller, like, say, \".100\" - \".254\". Then
use the available non-pool addresses (\".2\" - \".99\") as your static
addreses. That way, you don't need to worry about the DHCP server
granting your static addresses to some DHCP clients.
Around here, on an R-Pi Zero W (so the network interface is \"wlan0\"),
I set the following in \"/etc/dhcpcd.conf\":
interface wlan0
static ip_address=10.0.0.150/24
static routers=10.0.0.1
static domain_name_servers=10.0.0.140
(I wouldn't bet that setting \"static domain_name_servers\" there has any
effect on name resolution. \"/etc/resolvconf.conf\" might have more
influence over that than anything in \"/etc/dhcpcd.conf\".)
My subnet is different (\"10.0.0.*\" rather than \"192.168.1.*\"), but
otherwise we seem to be doing similar things. Mine works:
pi@rpizw:~$ ping -c 1 dns.google
PING dns.google (8.8.8.8) 56(84) bytes of data.
64 bytes from dns.google (8.8.8.8): icmp_seq=1 ttl=118 time=67.7 ms
--- dns.google ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 67.708/67.708/67.708/0.000 ms
> Model: D7800|Nighthawk X4S - AC2600 WiFi VDSL/ADSL Modem Router
Is that accurate? Wouldn't a D7800 default to \"192.168.0.*\", not
\"192.168.1.*\"? Are you just configuring the R-Pi on a wrong subnet?
The reason I am doing all this is because I am stuck at home in shielding and we have an extensive private network at our local Model Town which is used to control around 20 Pi based devices which measure water levels, operate pumps and open valves in the model river system. Owing to lockdown we are unable to get to the site to monitor this or take readings.
The two Raspberry Pis in question are both Pi3s but the remaining Pis are all Zeros. One of the Pi3s has been in place for three years and is running a Captive Portal and Webserver. This needs two Ethernet ports; eth0 connected to the Pis network on 192.168.0.* and eth1 connected to the Model Town's Office Router on 192.168.1.*, (Yes that is the IP Range of my Nighthawk. I set it that way because that is the IP Range of the Office Router and the Pis subnet was the same as the Nighthawk subnet.)
To get round the problems of lockdown (Most of us are in shielding) we are installing a VPN Server which I am testing at home using a subset of the Model Town's hardware. I want static IP Addresses for the Webserver and VPN Server because the VPN Server needs both ports to be static and the Webserver is easier to test while I am developing the system here at home.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"203","kudosSumWeight":0,"repliesCount":7,"postTime":"2020-06-29T22:52:05.342-07:00","lastPublishTime":"2020-06-29T22:54:05.479-07:00","metrics":{"__typename":"MessageMetrics","views":10365},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"ModerationData:moderation_data:1938463":{"__typename":"ModerationData","id":"moderation_data:1938463","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"ForumReplyMessage:message:1938463":{"__typename":"ForumReplyMessage","author":{"__ref":"User:user:137201"},"id":"message:1938463","entityType":"FORUM_REPLY","eventPath":"category:home-wifi-routers/category:home-networking/category:English/community:ejquo23388board:home-wifi-routers-nighthawk/message:1938084/message:1938463","revisionNum":3,"uid":1938463,"depth":4,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:home-wifi-routers-nighthawk"},"parent":{"__ref":"ForumReplyMessage:message:1938165"},"conversation":{"__ref":"Conversation:conversation:1938084"},"subject":"Re: Using a Static IP Address on a Raspberry Pi Connected to my Nighthawk Router","moderationData":{"__ref":"ModerationData:moderation_data:1938463"},"body":"
labatt wrote:> I suspect when you did the actual configuration on the Pi you were asked mask. That does not show when doing the command you gave.
I don't understand what you mean by 'asked mask'? This is not done by some kind of wizard. It is done by editing the file dhcpcd.conf. AFAIK the subnet mask is defined by the /24 in the declaration.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"221","kudosSumWeight":0,"repliesCount":0,"postTime":"2020-06-29T22:34:59.118-07:00","lastPublishTime":"2020-06-29T22:36:30.235-07:00","metrics":{"__typename":"MessageMetrics","views":10368},"visibilityScope":"PUBLIC","placeholder":false,"showMoveIndicator":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"CachedAsset:text:en_US-shared/client/components/common/Pager/PagerLoadMore-1755165470600":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/common/Pager/PagerLoadMore-1755165470600","value":{"loadMore":"Show More"},"localOverride":false}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"home-wifi-routers-nighthawk","messageSubject":"using-a-static-ip-address-on-a-raspberry-pi-connected-to-my-nighthawk-router","messageId":"1938084","replyId":"1938125"},"buildId":"8CqYPsxb5UG4aoIp8lqTz","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","appLogLevelOverrides":"TenancyMiddleware=TRACE,OriginHelper=TRACE","logLevelMetrics":"info","surveysEnabled":true,"openTelemetry":{"clientEnabled":false,"configName":"netgear","serviceVersion":"25.4.0","universe":"prod","collector":"http://localhost:4318","logLevel":"error","routeChangeAllowedTime":"5000","headers":"","enableDiagnostic":"false","maxAttributeValueLength":"4095"},"apolloDevToolsEnabled":false,"quiltLazyLoadThreshold":"3"},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["components_seo_QAPageSchema","components_community_Navbar_NavbarWidget","components_community_Breadcrumb_BreadcrumbWidget","components_customComponent_CustomComponent","components_messages_TopicWithThreadedReplyListWidget","components_languages_LanguagePicker","components_messages_MessageView_MessageViewStandard","components_external_components_ExternalComponent","components_messages_EscalatedMessageBanner","components_customComponent_CustomComponentContent_HtmlContent","shared_client_components_common_List_UnstyledList","components_messages_MessageView","components_customComponent_CustomComponentContent_CustomComponentScripts","shared_client_components_common_Pager_PagerLoadMore"],"appGip":true,"scriptLoader":[]}