2025年ip地址讲解啊

ip地址讲解啊ip 地址 ip 地址 inetaddress 唯一定位一台网络上计算机 127 0 0 1 本机 localhost C Users admin gt ping 127 0 0 1 正在 Ping 127 0 0 1 具有 32 字节的数据 来自 127 0 0 1 的回复 字节 32 时间 lt 1ms TTL 128 来自 127 0

大家好,我是讯享网,很高兴认识大家。

ip地址
ip地址:inetaddress
唯一定位一台网络上计算机
127.0.0.1:本机localhost

C:\Users\admin>ping 127.0.0.1

正在 Ping 127.0.0.1 具有 32 字节的数据:
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=128

127.0.0.1 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 0ms,最长 = 0ms,平均 = 0ms

ip地址的分类

ipv4、ipv6


讯享网

ipv4 127.0.0.1,4个字节组成,0~255,42亿;30亿都在北美,亚洲4亿,2011年就用尽;

公网(互联网)-私网(局域网)

ABCD类地址

192.168.xx.xx专门给组织内部使用的

域名:记忆ip问题!

package com.wuming.lesson01; import java.net.InetAddress; import java.net.UnknownHostException; //测试IP public class TestInetAddress { public static void main(String[] args) { try { //查询本机地址 InetAddress inetAddress1 = InetAddress.getByName("127.0.0.1"); System.out.println(inetAddress1); InetAddress inetAddress2 = InetAddress.getByName("www.baidu.com"); System.out.println(inetAddress2); InetAddress inetAddress4 = InetAddress.getLocalHost(); System.out.println(inetAddress4); InetAddress inetAddress5 = InetAddress.getByName("localhost"); System.out.println(inetAddress5); //常用方法 System.out.println(inetAddress2.getAddress()); System.out.println(inetAddress2.getCanonicalHostName());//规范的名字 System.out.println(inetAddress2.getHostAddress());//ip System.out.println(inetAddress2.getHostName());//域名,或者自己电脑的 } catch (UnknownHostException e) { e.printStackTrace(); } } } 

讯享网

/127.0.0.1
www.baidu.com/163.177.151.109
wanggang/192.168.128.1
localhost/127.0.0.1
[B@1540e19d
163.177.151.109
163.177.151.109
www.baidu.com
 

小讯
上一篇 2025-03-24 07:41
下一篇 2025-03-03 11:44

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/70716.html