TCP/IP Fundamentals
AD |
I have compiled my previous articles into Github. Welcome everyone, starhttps://github
I have compiled my previous articles into Github. Welcome everyone, star
https://github.com/crisxuan/bestJavaer
This article has been submitted
If we have the most exposure to computer networks, it is inevitable that we cannot do without the TCP/IP protocol. TCP/IP protocol is also the most famous protocol in the Internet. Let's talk about the TCP/IP protocol together.
The Historical Background of TCP/IP
When there was no TCP/IP protocol in the early 1960s, many countries and regions recognized the importance of communication technology. The US Department of Defense hopes to study a technology that can communicate through other routes even if communication lines are disrupted. In order to implement this technology, agroupingNetwork.
Even if several nodes are damaged during the communication process between two nodes, communication between the two nodes can still be achieved by changing the circuit or other means.
grouping ARPANET(AdvancedResearchProjectsAgencyNetwork)The birth of. ARPANET was the first wide area packet divided t group switching network with distributed control, and also the precursor to the earliest implementation of TCP/IP protocol.
ARPANET is actually planned and established by the Advanced Research Projects Agency of the US Department of Defense.
So, the emergence of computer networks was initially for military research purposes.
In the 1990s, IOS launched the international standardization process of OSI, but did not make substantial progress, but it made the TCP/IP protocol widely used.
The reason for the rapid development of TCP/IP protocol may be due to the standardization of TCP/IP. That is to say, the TCP/IP protocol will involve standards that OSI does not have, and this standard will be the main content we will explore next.
Here, let's first understand the TCP/IP protocol. TCP/IP protocol not only refers to TCP and IP, but also refers to the protocol cluster. What is the protocol cluster? Simply put, it is a synthesis of a series of protocols. If you ask you about the TCP/IP protocols next time, you can share the following image with him
Taken together, the above protocols form the TCP/IP protocol cluster.
TCP/IP standard
Compared to other protocol standards, TCP/IP places more emphasis on two points:OpennessandpracticabilityWhether standardization can be used in practice.
Openness TCP/IP IETFThe IETF itself is an organization that allows anyone to participate in discussions.
practicability
The standard protocol of TCP/IP is well-known to usRFC DocumentOf course, you can see it online. RFC not only standardizes protocol standards, but also includes information on protocol implementation and usage.
For more RFC protocols, you can take a look at the official documentation https://www.rfc-editor.org/rfc-index.html
We won't go into detail here, the focus of our article will be on the study of TCP/IP.
TCP/IP protocol cluster
TCP/IP protocol cluster
TCP/IP protocol is the protocol that our programmers contact most. The OSI model has seven layers, from bottom to top, namely the physical layer, the data link layer, the network layer, the transport layer, the session layer, the presentation layer, and the application layer. But this is obviously a bit complex, so in the TCP/IP protocol, they are simplified into four levels
Let's start with the communication link layer and introduce these layers and the protocols between them.
Communication link layer
Communication link layer physical layerandData link layer
physical layer
physical layer TCP/IP physical layer
Data link layer
Data link layerData link layerphysical layernetwork layerData link layer
network layer
network layer IPProtocol, IP protocol forwards packet data based on IP address.
IP grouping
The functionality of the Internet layer and transport layer in TCP/IP layering is typically provided by the operating system.
IP Data link layer IP
IP grouping IP IP
network layer ICMPBecause IP may encounter exceptions during the sending process of packets, when IP packets cannot reach the destination address due to exceptions, an exception notification needs to be sent to the sending end. The main function of ICMP lies in this. Given this situation, ICMP can also be used to diagnose network conditions.
Transport layer
TCP/IP IP Transport layerTCP Transport layer
Transport layer
Transport layerapplication layer
Transport layer TCP UDP
TCP
TCP is a reliable protocol that ensures the reliable delivery of data packets. TCP can correctly handle abnormal situations such as packet loss and disordered transmission sequence during the transmission process. In addition, TCP also provides congestion control to alleviate network congestion.
UDP
UDP is an unreliable protocol that cannot guarantee the reliable delivery of data. Compared to TCP, UDP does not check for packet arrival or network congestion, but its efficiency is relatively high.
UDP grouping
application layer
TCP/IP protocol cluster OSI application layerapplication layer/
The sending history of data packets
application layernetwork layerCommunication link layer
Packet structure
Let's first understand the structure of data packets. Here, we will only give you a brief introduction, and the following articles will provide a more detailed introduction.
In each layer above, an additional one will be added to the sent dataFirst partFirst part
Packet sending history
Assuming that Host A and Host B communicate, what unique operations will Host A undergo if they want to send a data packet to Host B?
application layer
Host A means that the user clicks on an application or opens a chat window to inputcxuan cxuan application layer OSI TCP/IP application layer
At the moment the packet is sent, a TCP connection is established, which acts as a channel, and after that, other packets will also use the channel to transmit data.
Transport layer
In order to accurately describe the information that can reach the other party, we use the TCP protocol for description. TCP is responsible for establishing connections, sending data, and disconnecting connections according to the application's instructions.
TCP TCP First partTCP First partSource Port NumberandDestination Port NumberTCP First partSerial numberTCP First part Checksum TCP First part IP
network layer
network layer IP IP TCP TCP First part TCP First part IP First partIP TCP IP First part IP First part TCP UDP
After the IP packet is generated, the routing control table will determine which host should be sent to, and the IP modified data packet will continue to be sent down to the router or network interface driver to achieve true data transmission.
If you do not know the IP address of the target host, you can useARP(AddressResolutionProtocol)Address Resolution Protocol for lookup.
Communication link layer
IP First partFirst part MAC MAC
The following is the complete processing and parsing process.
application layer
The receiving process of data packets is the reverse order process of the sending process, and the parsing of data packets also goes through the following steps.
Analysis of communication links
First part MAC
If the received packet is sent to oneself, it will look up the Ethernet type to determine which protocol it is. If it is an IP protocol, it will be thrown to the IP protocol for processing. If it isARPThe protocol will be thrown to the ARP protocol for processing. If the protocol type is an unrecognized protocol, the data packet will be directly discarded.
network layer
network layer IP IP IP First part IP First part IP IP TCP UDP
Note: In the process of routing forwarding, sometimes the IP address is not your own, and in this case, you need to use a routing table to assist in processing.
Transport layer
Transport layer TCP TCP ChecksumSerial number
After the data is fully recognized, it will be passed to the application identified by the port number for processing.
Application processing
The designated application program on the receiving end will process the data passed by the sender, identify the content of the data through decoding and other operations, and then store the corresponding data on disk, returning a successful save message to the sender. If the save fails, an error message will be returned.
The above is a complete packet sending and receiving process, which involves addresses, port numbers, protocol types, etc. between different layers. Let's analyze it now.
First partFirst part
First partFirst part MAC IP IP TCP/UDP
First part
summary
cxuan Data link layer
Hello, I am cxuan, a technician. I have written a total of six PDFs
Java summary
HTTP summary
Basic Knowledge that Programmers Must Know
summary
Java Core Fundamentals 2.0
Java summary
Now I have released the Baidu link to everyone, and you can click on the link below to claim it
Link: https://pan.baidu.com/s/1mYAeS9hIhdMFh2rF3FDk0A Password: p9rs
Disclaimer: The content of this article is sourced from the internet. The copyright of the text, images, and other materials belongs to the original author. The platform reprints the materials for the purpose of conveying more information. The content of the article is for reference and learning only, and should not be used for commercial purposes. If it infringes on your legitimate rights and interests, please contact us promptly and we will handle it as soon as possible! We respect copyright and are committed to protecting it. Thank you for sharing.(Email:[email protected])
Mobile advertising space rental |
Tag: TCP IP Fundamentals
No matter how busy you are, maintaining health is always the most long-term issue!
NextThe speed of high-tech development is much faster than we imagine, robots becoming wives
Guess you like
-
"Macau Story," a mini-series celebrating the 25th anniversary of Macau's return to China, achieves a billion viewsDetail
2024-12-24 16:38:43 1
-
Youku Sports and VICTOR Partner to Deliver an Upgraded and Innovative Live Streaming Experience for the 2024 BWF World Tour FinalsDetail
2024-12-24 14:31:57 1
-
Foxconn's Parent Company, Hon Hai Precision Industry, Invests an Additional RMB 600 Million in its Zhengzhou-based EV Battery UnitDetail
2024-12-24 10:01:13 1
-
2024 Spring Festival Travel Rush New Train Schedule: 321 Additional Trains Nationwide Starting January 5th, Further Enhancing Service Quality and EfficiencyDetail
2024-12-23 12:05:44 1
-
Changan Automobile and EHang Intelligent Sign Strategic Cooperation Agreement to Build Future Flying Car EcosystemDetail
2024-12-22 15:08:38 1
-
Liaoning Province and Baidu Sign Strategic Cooperation Framework Agreement to Jointly Promote AI Industry DevelopmentDetail
2024-12-20 19:36:38 1
-
Wanxun Technology Secures Nearly RMB 200 Million in Funding to Lead Global Soft Robotics Innovation, Set to Showcase Breakthroughs at CES 2025Detail
2024-12-20 15:54:19 1
-
Huolala's 2025 Spring Festival Freight Festival: Supporting Spring Festival Travel, Offering New Year Benefits to Users and DriversDetail
2024-12-20 13:38:20 1
-
The Third Meeting of the Third Council of the International New Energy Solutions Platform (INES): Charting a Blueprint for a "Dual Carbon" FutureDetail
2024-12-19 17:03:07 1
-
WeChat's Official Account Launches "Author Read Aloud Voice" Feature for Personalized Article ListeningDetail
2024-12-18 17:19:57 1
-
The 12th China University Students' Polymer Materials Innovation and Entrepreneurship Competition Finals Grand Opening in Guangrao CountyDetail
2024-12-18 16:04:28 1
-
Tracing the Ancient Shu Road, Winds of the Three Kingdoms: Global Influencer Shu Road Journey LaunchesDetail
2024-12-18 15:23:35 1
-
Seres: A Pioneer in ESG Practices, Driving Sustainable Development of China's New Energy Vehicle IndustryDetail
2024-12-17 16:20:26 1
- Detail
-
My Health, My Guard: Huawei WATCH D2 Aids Precise Blood Pressure Management in the Winter Health BattleDetail
2024-12-17 09:36:15 1
-
Investigation into the Chaos of Airline Seat Selection: Paid Seat Selection, Seat Locking Mechanisms, and Consumer Rights ProtectionDetail
2024-12-15 16:45:48 1
-
Japanese Scientists Grow Human Organs in Pigs: A Balancing Act of Breakthrough and EthicsDetail
2024-12-14 19:48:50 1
-
Pang Donglai and Sam's Club: Two Paths to Transformation in China's Retail IndustryDetail
2024-12-14 17:57:03 1
-
In-Depth Analysis of China's Precision Reducer Industry: Technological Innovation and Market CompetitionDetail
2024-12-14 16:04:26 1
-
Alibaba's "TAO" App Launches in Japan, Targeting High-Quality Service and Convenient LogisticsDetail
2024-12-13 13:22:23 1