1. IP地址:
互联网协议地址(IP地址)是我们网络硬件的逻辑地址,其他设备可通过该地址在网络中对其进行标识。 IP地址代表Internet协议地址,它是一个唯一的数字或数字表示形式,可以唯一地标识网络上的特定接口。连接到互联网的每个设备都会为其分配一个IP地址,以进行唯一标识。
IPv4中的地址是32位长的示例,
12.244.233.165
IPv6中的地址是128位示例,
2001:0db8:0000:0000:0000:ff00:0042:7879
2.端口号:
端口号是寻址信息的一部分,用于标识计算机网络中消息的发送者和接收者。使用不同的端口号来确定应将传入流量定向到什么协议。端口号标识Internet或其他网络消息到达服务器时要转发到的特定过程。为每个协议标识端口,并将其视为通信端点。
端口由16位数字表示。 0到1023是受限制的端口号,与众所周知的协议服务使用的端口号相同。 1024至49151是已注册的端口号,意味着可以由软件公司将其注册到特定协议,最后49152至65536被用作私有端口,意味着任何人都可以使用它们。
IP地址和端口号之间的区别:
Serial No | IP address | Port Number |
---|---|---|
01. | Internet Protocol address (IP address) used to identify a host in network. | Port number is used to identify an processes/services on your system |
02. | IPv4 is of 32 bits (4 bytes) size and for IPv6 is 128 bits (16 bytes). | The Port number is 16 bits numbers. |
03. | IP address is the address of the layer-3 IP protocol. | Port number is the address of the layer-4 protocols. |
04. | IP address is provided by admin of system or network administrator. | Port number for application is provided by kernel of Operating System. |
05. | ipconfig command can be used to find IP address . | netstat command can be used to find Network Statistics Including Available TCP Ports. |
06. | IP address identify a host/computer on a computer network. | Port numbers are logical interfaces used by communication protocols. |
07. | 192.168.0.2, 172.16.0.2 are some of IP address examples. | 80 for HTTP, 123 for NTP, 67 and 68 for DHCP traffic, 22 for SSH etc. |