1、怎樣獲得域名解析出的IP如題 謝謝了
C:\>nslookup 這里使用nslookup命令Default Server: ns2.cache.yntelAddress: 61.166.150.123> www.baidu.com Server: ns2.cache.yntelAddress: 61.166.***.*** 這里影去了 這里是當地dns伺服器的IPNon-authoritative answer:Name: www.a.shifen.com Addresses: 220.181.6.18, 220.181.6.19Aliases: www.baidu.com >
麻煩採納,謝謝!
2、如何根據域名查詢ip地址
1.域名查詢IP方法,點擊開始選擇「運行」輸入cmd點擊確定,打開cmd窗口
2.輸入ping baidu.com(輸入所要查詢的域名),查詢域名ip地址
3.輸入nslookup 域名,同樣可以查詢域名ip地址。
4.查本機區域網IP方法,輸入ipconfig,查詢本機ip
3、如何獲取目標主機的域名或IP?
知道了域名的前提下 你可以進入dos界面ping一下就知道ip了比如想要知道 wenwen.soso.com 的ip 結果如下Pinging wenwen- cdn.soso.com [58.251.60.62] with 32 bytes of data:Reply from 58.251.60.62: bytes=32 time=55ms TTL=54Reply from 58.251.60.62: bytes=32 time=57ms TTL=54Reply from 58.251.60.62: bytes=32 time=60ms TTL=54Reply from 58.251.60.62: bytes=32 time=66ms TTL=54Ping statistics for 58.251.60.62: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 55ms, Maximum = 66ms, Average = 59ms
4、如何查看一個域名所對應的IP地址?
查看一個域名所對應的IP地址步驟如下:
1、點擊電腦左下角開始菜單,打開「運行」選項。
2、然後輸入「cmd」並打開。
3、在彈出的頁面輸入ping+你想要查看的域名,比如新浪網,ping www.sina.com.cn。
4、然後按鍵盤的回車鍵,此時出現的IP就是你要查看的IP,如圖所示。
(4)取域名ip擴展資料
網域名稱系統(DNS,Domain Name System,有時也簡稱為域名)是網際網路的一項核心服務,它作為可以將域名和IP地址相互映射的一個分布式資料庫,能夠使人更方便的訪問互聯網,而不用去記住能夠被機器直接讀取的IP地址數串。
例如,www.wikipedia.org是一個域名,和IP地址208.80.152.2相對應。DNS就像是一個自動的電話號碼簿,我們可以直接撥打wikipedia的名字來代替電話號碼(IP地址)。我們直接調用網站的名字以後,DNS就會將便於人類使用的名字(如www.wikipedia.org)轉化成便於機器識別的IP地址(如208.80.152.2)。
參考資料網路--域名
5、linux 獲取域名ip的方法
^1、用ping/nslookup/dig都能解析ip
2、實例getip.sh
#!/bin/sh
name=$1
if [ -z $1 ];then
echo Usage:$0 dns
exit 1
fi
dig $name|grep ^$name|awk '{print $5}'
3、./getip.sh 一個域名
6、如何通過域名得到IP
最簡單的是通過:運行 > cmd > ping 域名 > 回車執行就可以得到該域名現在解析到什麼IP了;
第二種可以上http://www.ip138.com 這里查詢
7、如何獲取域名對應的IP地址
最簡單,容易的方法
使用ping命令
例如 ping baidu.com
然後ping 回復的地址就是該網站的
8、java怎麼通過域名獲取ip地址
import java.net.InetAddress;
import java.net.UnknownHostException;
public class TestInetAddress {
InetAddress myIpAddress = null;
InetAddress[] myServer = null;
public static void main(String args[]) {
TestInetAddress address = new TestInetAddress();
System.out.println("Your host IP is: " + address.getLocalhostIP());
String domain = www.jb51.net;
System.out.println("The server domain name is: " + domain);
InetAddress[] array = address.getServerIP(domain);
int count=0;
for(int i=1; i<array.length; i++){
System.out.println("ip "+ i +" "+ address.getServerIP(domain)[i-1]);
count++;
}
System.out.println("IP address total: "+count);
}
/**
* 獲得 localhost 的IP地址
* @return
*/
public InetAddress getLocalhostIP() {
try {
myIpAddress = InetAddress.getLocalHost();
} catch (UnknownHostException e) {
e.printStackTrace();
}
return (myIpAddress);
}
/**
* 獲得某域名的IP地址
* @param domain 域名
* @return
*/
public InetAddress[] getServerIP(String domain) {
try {
myServer = InetAddress.getAllByName(domain);
} catch (UnknownHostException e) {
e.printStackTrace();
}
return (myServer);
}
}
9、如何獲取一個域名的IP
ping這個域名即可得到IP。
例如 ping www.baidu.com,就能看到它的IP是14.什麼什麼了。
在「運行」那裡執行該命令即可。