How to understand ip port protocol

WBOY
Release: 2023-05-29 11:22:12
forward
1688 people have browsed it

Every computer on the Internet will have a unique 32-bit address, ip address

When we access the server, we must use this ip address

The local area network also has a reserved ip address Beginning 192/10/172. The IP address of the LAN is also the only

NAT mode. The IP of the computer host is unique in the LAN. The selected NAT mode creates a virtual machine, and the virtual machine is a new LAN (private network).

The teacher’s machine IP is 192.168.33.128

The simple concept of port,

192.168.33.128 represents a host, but there may be many services on the host,

Different service functions on a host are distinguished by ports and then accessible by outsiders.

SSH remote connection service 22

The simple concept of the protocol,

Chinese, English, French, different services provide different ports, corresponding to different functions, communication The methods may also be different, and we can understand this communication method as a protocol.

On a host, different service functions are distinguished through different ports, and communication between the client and the server may require different protocols.

ip,port,protocol (protocol)

Remote connection service.

Troubleshooting:

1. Whether there is smooth communication between the two machines, check the physical network (wireless network card, ip is correct)

ping ip -t to detect the physical network Is it smooth?

No communication:

a. There is a problem with the physical link from the client to the server

Network card, IP, network cable, firewall

2, Is the service good?

Is the ssh service good?

Detection method: Operate on which machine you connect from

telnet 192.168.33.128 22 (server’s ip and port)

telnet can also connect remotely, but because it is not encrypted, few people use it.

Possible reasons for failure:

a. The server port is blocked by the firewall

[root@oldboy ~]# /etc/init.d/iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
Copy after login

b. The port is not open, and the server does not monitor the port you are connecting to

[root@oldboy ~]# netstat -tunlp | grep 22    (以ssh服务22端口为例)
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1559/sshd           
tcp        0      0 :::22                       :::*                        LISTEN      1559/sshd
/etc/init.d/sshd restart (重启ssh服务)
Copy after login

Client tools: SecureCRT, Xshell, putty

Server-side ssh service, process name sshd, openssh (for connection), openssl (for encryption)

The above is the detailed content of How to understand ip port protocol. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
ip
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template