为什么在 DHCP 中配置手动 IP 对我来说不起作用?

为什么在 DHCP 中配置手动 IP 对我来说不起作用?

我的笔记本电脑有宽带连接。它通过协议获取 IP。配置如下:

ip : 192.168.1.2
subnet : 255.255.255.0
gateway : 192.168.1.1

现在我很好奇,在 IPV4 属性中,我没有选择“自动获取 IP 地址”,而是选择“使用以下 IP 地址”,并配置所有相同的内容,为什么它不起作用?当我们手动配置 IP 时,DHCP 不起作用吗?(操作系统:windows-7)

编辑:手动配置 ip 后,当我使用 ipconfig/all 时,它显示 dhcp 已启用:否。我没有这样做。为什么它会自动禁用?以及如何启用它?

 DHCP Enabled. . . . . . . . . . . : No
  Autoconfiguration Enabled . . . . : Yes
  IPv4 Address. . . . . . . . . . . : 192.168.1.2(Preferred)
  Subnet Mask . . . . . . . . . . . : 255.255.255.0
  Default Gateway . . . . . . . . . : 192.168.1.1
  NetBIOS over Tcpip. . . . . . . . : Enabled

答案1

很有可能,如果您只更改了 IP,就忘记了 DNS 设置。切换回使用 DHCP,当您有 IP 并且可以访问互联网时,单击“开始”、“运行”,键入 cmd,然后单击“确定”。当出现框时,键入:

ipconfig /all

您应该看到如下输出:

Ethernet adapter Local Area Connection:

Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Controller
Physical Address. . . . . . . . . : 00-00-00-00-00-01
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::dc07:7edd:a65d:df5%11(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.2(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Friday, January 14, 2011 8:01:10 AM
Lease Expires . . . . . . . . . . : Saturday, January 15, 2011 8:01:09 AM
Default Gateway . . . . . . . . . : 192.168.1.1

DNS Servers . . . . . . . . . . . : 192.168.1.1

最后一行是你感兴趣的。返回到你的网络设置,在你指定 IP 地址的地方,同一窗口底部有两个框,上面写着 DNS 服务器。输入上面“DNS 服务器”行中列出的地址。如果你有多个地址,请同时输入。保存你的设置,这样就好了。

不过我很好奇,如果您的 ISP 提供的调制解调器上有一个正常工作的 DHCP 服务器,为什么您还要为自己分配一个 IP 地址?

相关内容