怎样查看外网ip?

monkeyhjl 2007-01-26 01:20:17
电脑是通过公司局域网连接到外网,有什么命令可以直接查看到本台机器的外网ip地址?通过访问那些网页得到的就不用说了。
...全文
25057 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
sunny__sja 2011-06-29
  • 打赏
  • 举报
回复
妈逼的 不会就说不会呗。瞎他妈说
a383063671 2008-11-27
  • 打赏
  • 举报
回复
打开这个网页
http://ip168.com/
首页就显示的是你的外网IP
yuanqiyuanmie 2008-07-19
  • 打赏
  • 举报
回复
adsfadsfsd
yuanqiyuanmie 2008-07-19
  • 打赏
  • 举报
回复
adsfadsfsd
chenjianbo2007 2008-04-11
  • 打赏
  • 举报
回复
错了 这个才是,失误失误

ping -n 1 -r 9 www.csdn.net:
chenjianbo2007 2008-04-11
  • 打赏
  • 举报
回复
非常的简单在
进入DOS 控制台 输入命令 Nslookup 就这么简单 windows自带的
cghhhh 2007-02-01
  • 打赏
  • 举报
回复
在运行中输入cmd->回车
输入ipconfig->回车
会全部列举出来的
gernal_dn 2007-01-31
  • 打赏
  • 举报
回复
这时Firefox插件My IP Viewer的代码,将外网ip显示在状态条上,参考一下:
setTimeout("myipviewer_update()", 1500); //1.5 secs timeout

function myipviewer_update() {

if(window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}

xmlhttp.open("GET","http://www.cmyip.com/",true);
xmlhttp.onreadystatechange = statusListener;
xmlhttp.send(null);

function statusListener() {
if (xmlhttp.readyState == 1) {
document.getElementById('myipviewer_spanel').label = "loading...";
}

if (xmlhttp.readyState == 4) {
var data = xmlhttp.responseText;

//Get IP
var pos = data.indexOf( "<h1", 0 );
var pos2 = data.indexOf( "</h1>", 0 );

if (pos > 1){
var IPAddress = data.substring( pos + 46, pos2 ).replace(/^\s*|\s*$/g,"");
}
if (IPAddress != ''){
document.getElementById('myipviewer_spanel').label = IPAddress.replace(/^\s*|\s*$/g,"");
}else{
document.getElementById('myipviewer_spanel').label = "Undefined";
}

//Get Location
var pos = data.indexOf( "My country is", 0 );
var pos2 = data.indexOf( "</h2>", 0 );

if (pos > 1){
var Country = data.substring( pos + 13, pos2 ).replace(/^\s*|\s*$/g,"");
}
if (Country != ''){
document.getElementById('myipviewer_popup_country').label = "Country: "+Country.replace(/^\s*|\s*$/g,"");
}else{
document.getElementById('myipviewer_popup_country').label = "Undefined";
}

//Get Date
now = new Date();
hour = now.getHours();
min = now.getMinutes();
sec = now.getSeconds();

if (sec < 10){
sec = "0"+sec;
}
if (min < 10){
min = "0"+min;
}
if (hour > 12){
hour = hour-12;
}

//Output Update Time
document.getElementById('myipviewer_spanel').setAttribute("tooltiptext", "Last updated: " + hour + ":" + min + ":" + sec);

//Set Auto-update Time
setTimeout("myipviewer_update()", 600000); //10 Mins
}
}
}

function myipviewer_copyip2clip() {
const gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.getService(Components.interfaces.nsIClipboardHelper);
gClipboardHelper.copyString(document.getElementById('myipviewer_spanel').label);
}

function moreInfo() {
gBrowser.selectedTab = gBrowser.addTab("http://ip-address.domaintools.com/");
}

function pasteIP() {
var IPAddress = document.getElementById('myipviewer_spanel').label;
insertString(document.commandDispatcher.focusedElement, IPAddress);
}

function insertString(theBox, theAddress) {
var curPos = theBox.selectionEnd;
theBox.value = theBox.value.substring(0, curPos) + theAddress + theBox.value.substring(curPos, theBox.value.length);
theBox.selectionStart = curPos + theAddress.length;
theBox.selectionEnd = curPos + theAddress.length;
}
网络服务 2007-01-31
  • 打赏
  • 举报
回复
我觉得楼上的说得比较详细!
monkeyhjl 2007-01-31
  • 打赏
  • 举报
回复
如果你的网络允许tracert的话,可以用这条命令
C:\>ping -r 1 -n 1 www.163.com

Pinging www.cache.split.netease.com [202.108.9.31] with 32 bytes of data:

Reply from 202.108.9.31: bytes=32 time=917ms TTL=52
Route: 218.24.97.250

Ping statistics for 202.108.9.31:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 917ms, Maximum = 917ms, Average = 917ms

ip Route: 218.24.97.250 这个就是我的外网IP
可以试试
-------------------------------------------------------------------
试了这种方法,得到的Route是一个内网的ip地址。
acura 2007-01-27
  • 打赏
  • 举报
回复
如果你的网络允许tracert的话,可以用这条命令
C:\>ping -r 1 -n 1 www.163.com

Pinging www.cache.split.netease.com [202.108.9.31] with 32 bytes of data:

Reply from 202.108.9.31: bytes=32 time=917ms TTL=52
Route: 218.24.97.250

Ping statistics for 202.108.9.31:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 917ms, Maximum = 917ms, Average = 917ms

ip Route: 218.24.97.250 这个就是我的外网IP
可以试试
hlw 2007-01-27
  • 打赏
  • 举报
回复
tracert 你公司的域名,看看.
mylovelypig 2007-01-26
  • 打赏
  • 举报
回复
我也想知道,帮顶
lukejiang 2007-01-26
  • 打赏
  • 举报
回复
以前有了

好像也没什么好办法

6,849

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧