当前位置:网站首页>Network connection verification

Network connection verification

2022-06-26 00:06:00 Just put a flower in heaven and earth

Network connection verification method

This article mainly summarizes the methods of centralized troubleshooting when the address of the access partner is not available during normal development . The following are in linux Command operation in environment .

IP Address classification

  • A class :1.0.0.0-127.255.255.255
  • B class :128.0.0.0-191.255.255.255
  • C class :192.0.0.0-223.255.255.255
  • D Class address is used in IP Network Multicast ( multicasting , Also known as Multichannel broadcasting ).D Before class address 4 The position is constant 1110 , Before presetting 3 Position as 1 signify D Class address starts at 128+64+32 be equal to 224. The first 4 Position as 0 signify D The maximum value of the class address is 128+64+32+8+4+2+1 by 239, therefore D class The address space ranges from 224.0.0.0 To 239. 255. 255.254.
  • E Class address reserved for research . therefore Internet There is nothing available on E Class address .E Before class address 4 The position is constant 1, So the valid address range is 240.0.0.0 to 255.255.255.255.
    D Classes and E Class is reserved , Out of commission .

Intranet ip, Public network ip And export ip The difference between

This machine IP( Intranet ip) It's you ( Intranet ) Medium IP, Can only be used in a LAN , In the Internet and Internet cafes, you need to access your local computer IP, Generally, it cannot be opened , This is through your exit IP To visit , And you must map the port on the router to your computer to access , exit IP It is usually called the public network IP.

View the exit ip The way

  • curl cip.cc
    return ip And operator information
  • curl ifconfig.me or curl ident.me
    Returns a single ip
  • curl ipinfo.io

Test whether the network is smooth

telnet There are only two ways to test whether the network is smooth , But either way, you must add ports , Otherwise, it will fail , When using domain name , The corresponding port is generally 80 perhaps 443.

  • telnet ip port
  • telnet domain name port
    for example :telnet www.baidu.com 443
原网站

版权声明
本文为[Just put a flower in heaven and earth]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206252118151005.html