Why don’t you change the subject and listen to a song before you study? King rank op, this arrangement really strange like
Speaking of doing this article, I found that the courseware used by a network course teacher in station B is exactly the same as that of QMUL. It can’t be all over the world
This chapter focuses on understanding the working principle of the transport layer + learning the Transport layer protocol of the Internet, starting with understanding the transport layer
It’s wonderful. Here are some excerpts before you know it:
The firstConnection layer protocolThere are many kinds (Ethernet, Wifi, ARP, etc.). theThe network layerThere’s only one IP protocol left. At the Transport layer, there are many protocols (such as TCP, UDP, SCTP, etc.). Like the tree below, the roots (connection layer) branch off a lot, then unify into a single trunk (network layer), then branch off again at the crown (transport layer), and more leaves grow on each branch (application layer). We are inThe network layerWe have seen that through the unification of tree trunks, we have achieved a global Internet. However, we may use this “net” for different purposes, and therefore in different ways. The different transport-layer protocols (and more application-layer protocols) are just examples of the different ways we use the web.
Transport Layer Overview
- Provides logical communication between application processes running on different hosts
- The protocol runs in an end system
- Send Side: Breaks application messages into segments and delivers them to the network layer
- Receiver (RCV Side) : Segments are reassembled into messages that are passed to the application layer
- The application is availablemultipleTransfer protocol
- For example, the Internet uses both TCP and UDP
True or false? Should there be no problem
Comparison of transport layer and network layer
- Transport layer: Logical communication between processes
- Rely on and enhance network layer services
- Network layer: Logical communication between hosts
Ann’s twelve children wrote a letter to Bill’s twelve children: Host = house, process = children, application messages = letter in envelope, Transport protocol =Ann and Bill who give letter to correct child, Network layer protocol = postal service
The transport layer uses network protocols
Reliable, sequential transmission: TCP multiplexing, demultiplexing; Congestion control; Flow control; Establish a connection
Unreliable, non-sequential transmission: UDP multiplexing, demultiplexing; No additional services added for the best IP service (no-Frills extension of “best-effort” IP)
Services that are not provided: delay guarantee; Bandwidth to ensure
Multiplexing and demultiplexing
A brief concept
- Multiplexing: multiplexing (Mux)
- Merging multiple streams into one data stream; You’re putting together data that’s been passed to different people
- E.g. : your phone is browsing the web, refreshing email, and connecting to wechat at the same time. All of these connections are sent over the same link
- Multiplex: demultiplexing
- In the reverse process above, the data stream is separated into separate parts, equivalent to decoding
- The stream of data packets received by the phone will be split and sent to the corresponding network, email and wechat programs
Sender: processes data from multiple sockets, adds transport headers (IP and port, etc., for later demultiplexing), and then passes it back together to the receiver: uses header information to pass the received fragment to the correct socket
If you don’t understand, look down!
The working principle of
The solution to reuse
About ports: The IP protocol transfers IP address to IP address, which means a conversation between two computers. But you need to have multiple communication channels on each computer and allocate them to different processes (see Linux Process Basics for processes). A port represents such a communication channel. As we mentioned in the post office and the postman, the idea of a recipient. The imported port numbers can distinguish different processes. The TCP and UDP ports are both 16bits and contain 6w+ port numbers
- The host receives IP datagrams
- Each IP packet has a source IP address and a destination IP address
- Each datagram carries a transport-layer segment
- Each segment has an origin and destination port number
- The host uses the IP address and port number to direct the network segment to the appropriate socket to connect to the application
Concept testing
Connectionless multiplexing (@udp)
Connectionless and connection-oriented are explained in the next section
Recall: the created socket has a host local port, for example
DatagramSocket mySocket1 = new DatagramSocket(12534);Copy the code
- Host to send: Must be specified when creating a datagram to send to a UDP socket
- Destination IP address
- Destination port
- When the host receives UDP segments:
- Check the target port in the segment
- Directs the UDP segment to the socket that has the port
PC having the same destination port, but different source IP addresses or source port numbers. Will also be directed to the same destination socket
The thing on the right must also have a normal 6428 port, so the source is 5775
Connection-oriented demultiplexing (@TCP)
There is not much difference, also by the source destination IP, port determination (called a quad, remember), but
- The server can support multiple TCP sockets simultaneously on a TCP port:
- Each socket is identified by its quad (with different source IP and source PORT)
- Dest port also 80 data has been decomposed into different sockets
- The Web server has a different socket for each connected client
- Non-persistent has a different socket for each request
Incidentally, some commonly used ports
- Port 80: Standard HTTP (Hypertext Transfer Protocol) browsing the Web
- Port 22: Indicates secure shell (SSH) for login from a remote computer
- Port 25: SMTP (Simple Mail Transfer Protocol) sends mail through this host
- Port 143: IMAP (Internet Mail Access Protocol) reads your E-mail
- Port 443: HTTPS (security HTTP) To browse Web security
The title
To judge right and wrong
- Multiplexing is performed when traffic is received.
- False (multiplexing is combining)
- In a connection-oriented demux only one process can receive data set to a given port.
- False (one port can connect to many processes).
- In a connection-oriented demux we need 4 pieces of information to identify the process to receive a packet.
- True (source+dest port plus source + dest IP address)
- Connectionless demux is more efficient.
- False (it depends on circumstances which is efficient)