重新启动时IP配置丢失 [英] IP configuration lost on reboot

查看:110
本文介绍了重新启动时IP配置丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试在公司网络上设置带有Windows 10 IoT核心的Raspberry Pi 3。这个网络不支持DHCP,所以我需要设置一个静态IP地址(例如192.168.9.x)。



最初,我运行了这个命令:" ; netsh interface ipv4 set address" Ethernet" static(我的静态ip)(网络掩码)(网关)"直接连接到计算机
通过以太网(将所有IPv4配置设置为自动)。之后,我能够将我的Raspberry插入公司网络,并通过另一台计算机(配置为以b $ b b的形式运行公司网络)成功打开Power Shell RM。



在我重新启动设备之前,这一切都很好用。使用物联网仪表板我看到我的设备有一个随机IP(例如169.254.200.x),甚至不可见(因为它不在我的子网掩码范围内)。我使用第一台计算机
访问设备,发现我的一些设置(网关和DNS),但我的IP地址和子网掩码已经改变。我现在正在使用网络配置的计算机,因此复制来自Power Shell的结果将非常麻烦。因此,我将描述命令"netsh interface ipv4 show config"。重新启动后返回:



                        CFG 4接口"以太网"

                             已启用DHCP:                               不是
                              IP地址:                                     (随机
IP)

                             子网前缀:                                 / 16(随机IP范围)
                          


                             默认网关:                            (我的公司网络网关)

                             网关指标:                              1

                              InterfaceMetric:                              25

                             静态配置的DNS服务器:   (我的公司网络DNS)

                             注册后缀:              仅限小学$
                             静态配置的WINS服务器: 无$

I'm trying to set a Raspberry Pi 3 with Windows 10 IoT Core on a corporative network. This network doesn't support DHCP, so I need to set a static IP address (e.g. 192.168.9.x).

Initially, I ran this command: "netsh interface ipv4 set address "Ethernet" static (my static ip) (netmask) (gateway)" while connected directly to a computer via ethernet (which had all IPv4 configurations set to automatic). After that, I was able to plug my Raspberry to the corporative network and successfully open the Power Shell RM through another computer (which was configured to run in the corporative network).

It was all nice and dandy until I rebooted my device. Using the IoT Dashboard I saw that my device had a random IP (e.g. 169.254.200.x), which shouldn't even be visible (since it wasn't inside my subnet mask range to begin with). I used that first computer to access the device and found out that some of my settings were there (gateway and DNS), but my IP address and subnet mask had changed. I'm using the network configured computer right now, so copying\pasting the results from the Power Shell would be quite troublesome. Therefore, I will sketch what the command "netsh interface ipv4 show config" returns after the reboot:

                        CFG 4 interface "Ethernet"
                              DHCP enabled:                                 No
                              IP Address:                                      (random IP)
                              Subnet Prefix:                                  /16 (random IP range)                           
                              Default Gateway:                             (my corporative network gateway)
                              Gateway Metric:                               1
                              InterfaceMetric:                               25
                              Statically Configured DNS Servers:    (my corporative network DNS)
                              Register with which suffix:                Primary Only
                              Statically Configured WINS Servers:  None

"ipconfig / all"的草图命令如下:



                     以太网适配器以太网

                            特定于连接的DNS后缀:  

                            说明:                                (LAN适配器名称)

                            实际地址:                        (MAC地址)

                            已启用DHCP:                           不是
                            已启用自动配置:         是

                            链接本地IPv6地址:              (IPv6地址)

                             IPv4地址:                             (随机IP)(首选)

                            子网掩码:                              255.255.0.0

                            默认网关:                        (我的公司网络网关)

                             DHCPv6 IAID:                             (一个数字)

                             DHCPv6客户端DUID:                   (一系列14个十六进制对)

                             DNS服务器:                              (我的公司网络DNS)

                             NetBIOS over Tcpip:                   已经禁用了。


我认为问题可能就是这个'自动配置'属性,所以我试图找出如何禁用它而没有成功。我使用上面提到的步骤重新配置了以太网设置,然后运行:"netsh interface ipv4 set interface 6 dadtrasmits = 0
store = persistent"。返回OK('set interface'后面的数字指的是以太网接口)。后来,我试图通过"net stop DHCP / y"来停止我的客户端DHCP。失败,声称"访问被拒绝"。再次,重新启动
后,我的设备获得了相同的随机IP地址...



我已经花了很长时间试图解决这个问题。我当时认为这可能是SD问题,但重启后我的网关和DNS设置仍然存在。有什么我想念的吗? (除了经验......)



另外,在旁注中,有没有办法自动设置我的代理凭证?

谢谢,

A sketch of the "ipconfig /all" command follows:

                      Ethernet adapter Ethernet
                             Connection specific DNS Suffix:   
                             Description:                                 (LAN adapter name)
                             Physical Address:                         (MAC address)
                             DHCP Enabled:                             No
                             Autoconfiguration Enabled:           Yes
                             Link-Local IPv6 Address:               (IPv6 Address)
                             IPv4 Address:                              (random IP)(Preferred)
                             Subnet Mask:                               255.255.0.0
                             Default Gateway:                         (my corporative network gateway)
                             DHCPv6 IAID:                              (a number)
                             DHCPv6 Client DUID:                    (a series of 14 hexadecimal pairs)
                             DNS Servers:                               (my corporative network DNS)
                             NetBIOS over Tcpip:                     Disabled

I thought the issue might've been this 'Autoconfiguration' property, so I tried to find out how to disable it without success. I reconfigured my ethernet settings using the steps mentioned above, then ran: "netsh interface ipv4 set interface 6 dadtrasmits=0 store=persistent". This returned OK (the number after 'set interface' refers to the Ethernet interface). Later, I tried to stop my client DHCP via "net stop DHCP /y" which failed, claiming "Access Denied". Once again, after restarting my device got the same random IP address...

I have been for quite some time trying to solve this issue. I was thinking this might be a SD problem, but my gateway and DNS settings remained after restart. Is there something I'm missing? (Other than experience...)

Also, on a side note, is there a way to automatically set my proxy credentials?
Thanks,

Thiago。

推荐答案

我遇到了这个问题,发现运气更好PowerShell出于某种原因。

I had this problem and found better luck setting everything using PowerShell for some reason.

用于设置IP地址,DNS服务器和默认网关的单行PowerShell


这篇关于重新启动时IP配置丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆