简体   繁体   English

树莓派得到192.168.xx地址,但是我家网络的rest是10.21.179.x

[英]Raspberry Pi gets a 192.168.x.x address, but rest of my home network is 10.21.179.x

There is a lot of history here, so please bear with me.这里有很多历史,所以请多多包涵。

Our home network used to be fine when we were with Comcast, but we wanted better speed and reliability, so we switched to FIOS.当我们使用 Comcast 时,我们的家庭网络曾经很好,但我们想要更好的速度和可靠性,所以我们切换到 FIOS。 At that point, the Wifi connections from my Raspberry Pis stopped working.那时,我的 Raspberry Pi 的 Wifi 连接停止工作。 I got frustrated after a couple of weeks of trying to discover the cause of the problem and eventually put it aside.在试图找出问题的原因并最终将其搁置了几周后,我感到沮丧。

The other day, I started to configure a new Raspberry Pi 4 that I plan to use on my new Sphero RVR.前几天,我开始配置一个新的 Raspberry Pi 4,我打算在我的新 Sphero RVR 上使用它。 I set it up following the usual directions and the Pi connects to the Internet without problem over WiFi, but I can't ping it from my Windows 10 desktop.我按照通常的指示进行了设置,Pi 通过 WiFi 毫无问题地连接到互联网,但我无法从我的 Windows 10 桌面 ping 它。

So I started digging.于是我开始挖掘。 I downloaded the Fing app onto my Pixel 3 Android phone and looked at the network.我将 Fing 应用程序下载到我的 Pixel 3 Android 手机上并查看网络。 I immediately noticed that all the devices now have a 10.29.179.xxx addresses.我立即注意到所有设备现在都有一个 10.29.179.xxx 地址。 That easily explains why I can't ping from my PC to the Raspberry Pi.这很容易解释为什么我不能从我的 PC ping 到 Raspberry Pi。 They aren't in the same address space.它们不在同一个地址空间中。

I did discover that I can ping the Raspberry Pi if I use the IPV6 address.我确实发现如果我使用 IPV6 地址,我可以 ping Raspberry Pi。 I can even get PuTTY to connect using the IPv6 address, although I was unable to successfully login.我什至可以让 PuTTY 使用 IPv6 地址进行连接,尽管我无法成功登录。 I don't know what is causing the login problem, but it's probably something mundane.我不知道是什么导致了登录问题,但这可能是一些平凡的事情。

I suspect that I can make my Rpi conform to the rest of the network using a static IP address, but that might cause problems if I take the robot somewhere else to demonstrate what it can do.我怀疑我可以使用 static IP 地址使我的 Rpi 符合网络的 rest,但是如果我将机器人带到其他地方可能会导致问题。 What I would like to understand is why most of my network, using DHCP, is on the 10.xxx network and the Raspberry Pis seem to wind up with 192.168.1.xxx addresses.我想了解的是为什么我的大部分网络使用 DHCP,都在 10.xxx 网络上,而 Raspberry Pi 似乎以 192.168.1.xxx 地址结束。

One further wrinkle.又多了一道皱纹。 We have two routers, the FIOS router, and a LinkSys WRT1900AC, which is the router on which WiFi is enabled.我们有两个路由器,FIOS 路由器和一个 LinkSys WRT1900AC,这是启用 WiFi 的路由器。

I suspect this problem is caused by having the two routers or by something inherent in the way the Raspberry Pi interacts with DHCP.我怀疑这个问题是由两个路由器引起的,或者是由 Raspberry Pi 与 DHCP 交互方式固有的东西引起的。

I would like for my Raspberry Pi to configure with an IPv4 address I can use, no matter what network I am connecting it to, and I'd like to understand why this problem is happening in the first place.我希望我的 Raspberry Pi 配置一个我可以使用的 IPv4 地址,无论我将它连接到哪个网络,我想首先了解为什么会出现这个问题。

Let me know what additional information you'd like to see.让我知道您想查看哪些其他信息。

* Additional Notes * * 补充说明 *

As to the comment that I have not done research.至于我没有研究过的评论。 I spent a week reading through stackoverflow problems and reading up on documentation of DHCP without finding the answers to my question.我花了一周时间阅读 stackoverflow 问题并阅读 DHCP 文档,但没有找到问题的答案。 I do not ask questions idley.我不会无所事事地问问题。 I ask questions when I cannot find answers and need the help of people more expert than myself in the areas in which I am having trouble.当我找不到答案并且在我遇到问题的领域需要比我更专业的人的帮助时,我会提出问题。

I have solved the login problem.我已经解决了登录问题。 It was a stupid password mistake.这是一个愚蠢的密码错误。

So now I can login, over wifi, using the IPv6 address, but not with the IPv4 address.所以现在我可以通过 wifi 登录,使用 IPv6 地址,但不能使用 IPv4 地址。

On the FIOS router, both the 2.4 and 5GHz wifi channels are turned off.在 FIOS 路由器上,2.4 和 5GHz wifi 通道均已关闭。

As suggested by Ljm Dullaart, the problem was that there were two DHCP servers on the network.正如 Ljm Dullaart 所建议的,问题在于网络上有两个 DHCP 服务器。 After I turned off the FIOS DHCP, my problems went away.在我关闭 FIOS DHCP 后,我的问题就消失了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM