获取断开局域网的IP地址 [英] To get ip Address of disconnect lan

查看:83
本文介绍了获取断开局域网的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将代码连接到本地机器的IP地址连接到互联网搜索并正常工作。



但是当我断开局域网时,ip地址不来了,并在tcp属性中分配了我的IP地址。



如何解决上述问题???

请帮帮我一个......



这对我来说至关重要。

谢谢..

I have get code the ip address of local machine to connected lan to an internet searching and working fine.

But when i disconnect the lan, the ip address not coming and also assigned my ip address in tcp properties.

How can i solve the above problem???
Please help me any one....

It's vital to me.
Thank you..

推荐答案

HKEY_LOCAL_MACHINE \SYSTEM\ControlSet001 \services\Tcpip \Parameters



添加DWORD值:DisableDHCPMediaSense使其等于1





重启并享受断开的LAN端口上的静态IP地址。
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\Tcpip\Parameters

Add DWORD value: DisableDHCPMediaSense Make it equal to 1


Reboot and enjoy your static IP address on disconnected LAN port.


如果没有连接,它没有地址。

就像你的手机一样:取出SIM卡,再也无法连接到网络了,它没有手机号码......不同手机中的SIM卡:它可以连接并获取电话号码。
If something is not connected, it doesn't have an address.
It's like your phone: take the sim card out and it can't connect to the network anymore, and it doesn't have a mobile number...put the sim in a different phone: it can connect and it gets the phone number.


这篇关于获取断开局域网的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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