Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Computer network transport layer

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

1. TCP and UDP:

Tcp is suitable for: the transmission content needs to be transmitted in segments, the session is established during the transmission process, reliable transmission, and flow control is available.

Udp is suitable for: a packet can complete data communication, no segmentation, no need to establish a session, no flow control, unreliable transmission.

For example:

DNS service, obtain the ip corresponding to the domain name, and use udp protocol (if it fails, resend it after a period of time)

QQ chat content, via udp protocol (reliable transmission is achieved by application layer protocol, http://www.2cto.com/net/201212/174773.html), and tcp protocol when sending files

Udp for multicasting and broadcasting.

2 、 netstat:

View session: netstat-n

View the session process: netstat-nb

Check the port of the service: netstat-an

3. Application layer protocol = Transport layer protocol (tcp/udp) + port. Common application layer protocols use ports as follows:

Http:tcp + 80

Https:tcp + 443

Rdp:tcp + 3389

Ftp:tcp + 21

Telnet:tcp + 23

Dns:tcp + 23

Sql server:tcp + 1433

Smtp:tcp + 25

Pop3:tcp + 110,

Shared folder: tcp + 445

Only the necessary ports can be set on the network server network card to achieve network security.

4. Transport layer functions:

Provides logical communication for applications that communicate with each other.

5. Transport layer port:

Familiar with port: 0mm 1023

Registration port: 1024049151

Client port: 49152 / 65535

View client port: netstat-n | find "ESTABLSHED"

6. UDP protocol:

1) main features:

Connectionless, that is, no resume connection is required before sending data

Best effort delivery, that is, reliable delivery is not guaranteed and congestion control is not used.

Message-oriented, no congestion control, suitable for multimedia communication

Support one-to-one, one-to-many, many-to-many interactive communication

Whether the cost is small or not, it is only 8 bytes.

2) udp format:

Among them, the pseudo header is the ip information of the network layer, which is used to calculate the check sum, and the first part has only 8 bytes.

7. TCP protocol:

1) main features:

Connection oriented

Connections can only be two endpoints, and each connection can only be 1 to 1

Provide reliable delivery services

Provide full-duplex communication (feedback when receiving messages)

Oriented to byte stream.

2) how to achieve reliable transmission by tcp:

ARQ protocol (automatic retransmission request):

Stop waiting (after sending packet M1, wait for the receipt acknowledgement sent by the receiver (the time is the round-trip time of the packet), if the acknowledgement is received, send M2, otherwise resend M1)

Loss acknowledgement (receive duplicate packets, discard, and acknowledge receipt at the same time)

Confirm to be late (the sender receives the confirmation of being late and does nothing)

Stop waiting protocol: a bit simple, disadvantages: low channel utilization

Continuous ARQ protocol (pipelined transmission): the sender continuously relaxes multiple packets and does not have to pause and wait for confirmation after each packet is sent (requires the sender to have a sending window in which packets can be continuously sent, clear packets, move windows and send new packets after receiving acknowledgements)

Protocol improvement: sliding window confirmation-> cumulative confirmation (the last one in a row)

3) tcp format:

7. Congestion control:

Congestion control is a global process, involving all hosts and routers, so as not to reduce all factors related to network transmission performance.

Algorithm: slow start and congestion avoidance algorithm + fast retransmission

Congestion control function:

Congestion window

8. TCP transport connection management:

Establish connection-> data transfer-> connection release

3 handshakes to establish a connection:

Disconnect with a 3-way handshake:

TCP connection status:

Http://www.2cto.com/net/201209/157585.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report