How sure are you know about these? :)
TCP/IP defines a large collection of protocols that allow computers to communicate.
TCP/IP defines the details of each of these protocols inside documents called Requests for
Comments (RFC).
TCP/IP architecture layer:
1. Application layer:
Provide services to the application software running on a computer. The application layer does not define the application itself, but rather it defines services that applications need.
Example protocols: HTTP, POP3, SMTP
2. Transport layer
TCP/IP needs a mechanism to guarantee delivery of data across a network. Because many application layer protocols probably want a way to guarantee delivery of data across a network, TCP provides an error-recovery feature to the application protocols by using acknowledgments.
Example protocols: TCP, UDP
3. Internet layer
IP defines addresses so that each host computer can have a different IP address. Similarly, IP defines the process of routing so that devices called routers can choose where to send packets of data so that they are delivered to the correct destination.
Example protocols: IP
4. Network access layer
Defines how to physically connect a host computer to the physical media over which data can be transmitted. IP relies on the network access layer to deliver IP packets across a physical network.
Example protocols: Ethernet, Frame Relay
Same-layer interaction on different computers
The two computers use a protocol to communicate with the same layer on another computer.
Adjacent-layer interaction on the same computer
On a single computer, one layer provides a service to a higher layer.
Data Encapsulation Terminology
Encapsulation refers to the process of putting headers and trailers around some data. The process by which a TCP/IP host sends data can be viewed as a five-step process.
Step 1 Create and encapsulate the application data with any required application layer headers. For example, the HTTP OK message can be returned in an HTTP header, followed by part of the contents of a web page.
Step 2 Encapsulate the data supplied by the application layer inside a transport layer header. For end-user applications, a TCP or UDP header is typically used.
Step 3 Encapsulate the data supplied by the transport layer inside an internet layer (IP) header. IP is the only protocol available in the TCP/IP network model.
Step 4 Encapsulate the data supplied by the internet layer inside a network access layer header and trailer. This is the only layer that uses both a header and a trailer.
Step 5 Transmit the bits. The physical layer encodes a signal onto the medium to transmit the frame.
Finally, take particular care to remember the terms segment, packet, and frame, and the meaning of each. segment for the transport layer, packet for the internet layer, and frame for the network access layer.
The OSI Reference Model
OSI is the Open System Interconnection reference model for communications. OSI model can be used as a standard of comparison to other networking models.
Application Layer: Interfaces between network and application software. Also includes authentication services.
Presentation Layer: Defines the format and organization of data. Includes encryption, such as ASCII text, EBCDIC text, binary, BCD, and JPEG.
Session Layer: The session layer defines how to start, control, and end conversations (called sessions).
Transport Layer: including connection establishment and termination, flow control, error recovery, and segmentation of large data blocks into smaller parts for transmission.
Network Layer: Logical addressing, routing, and path determination.
Data Link Layer: Formats data into frames appropriate for transmission onto some physical medium. Defines rules for when the medium can be used. Defines means by which to recognize transmission errors. Typically defines a Frame Check Sequence (FCS) field, which allows the receiving device to detect transmission errors.
Physical Layer: Defines the electrical, optical, cabling, connectors, and procedural details required for transmitting bits, represented as some form of energy passing over a physical medium.
TCP/IP Layer 4 Protocols: TCP and UDP
The key difference between TCP and UDP is that TCP provides a wide variety of services
to applications, whereas UDP does not.
TCP provides for retransmission (error recovery) and help to avoid congestion (flow control), whereas UDP does not.
TCP provides error recovery, but to do so, it consumes more bandwidth and uses more processing cycles. UDP does not perform error recovery, but it takes less bandwidth and uses fewer processing cycles.
TCP and UDP both use a concept called multiplexing. Multiplexing by TCP and UDP involves the process of how a computer thinks when receiving data. The computer might be running many applications, such as a web browser, an e-mail package, or an Internet VoIP application (for example, Skype). TCP and UDP multiplexing enables the receiving computer to know which application to give the data to.
Multiplexing relies on a concept called a socket. A socket consists of three things:
■ An IP address
■ A transport protocol
■ A port number
Because a socket on a single computer should be unique, a connection between two sockets should identify a unique connection between two computers. This uniqueness means that you can use multiple applications at the same time, talking to applications running on the same or different computers.
Error Recovery (Reliability)
TCP provides for reliable data transfer, which is also called reliability or error recovery, To accomplish reliability, TCP numbers data bytes using the Sequence and Acknowledgment fields in the TCP header. TCP achieves reliability in both directions, using the Sequence Number field of one direction combined with the Acknowledgment field in the opposite direction. Implies the next byte to be received; this is called forward acknowledgment.
Flow Control Using Windowing
TCP implements flow control by taking advantage of the Sequence and Acknowledgment
fields in the TCP header, along with another field called the Window field. This Window
field implies the maximum number of unacknowledged bytes that are allowed to be
outstanding at any instant in time. The window starts small and then grows until errors
occur. The size of the window changes over time, so it is sometimes called a dynamic
window, sometimes called a sliding window。
3-Way TCP Connection Establishment
TCP signals connection establishment using 2 bits inside the flag fields of the TCP header.
Called the SYN and ACK flags.
TCP initializes the Sequence Number and Acknowledgment Number fields to any number
that fits into the 4-byte fields.
4-Way Establishment Termination
This four-way termination sequence is straightforward and uses an additional flag, called the FIN bit. (FIN is short for “finished").
Before the device on the right sends the third TCP segment in the sequence, it notifies the application that the connection is coming down. It then waits on an acknowledgment from the application before sending the third segment in the figure.
■ Connection-oriented protocol: A protocol that requires an exchange of messages
before data transfer begins or that has a required preestablished correlation between
two endpoints
■ Connectionless protocol: A protocol that does not require an exchange of messages
and that does not require a preestablished correlation between two endpoints
Each different type of data-link protocol typically has a limit on the maximum transmission
unit (MTU) that can be sent inside a data link layer frame. In other words, the MTU is the
size of the largest Layer 3 packet that can sit inside a frame’s data field. For many data-link
protocols, Ethernet included, the MTU is 1500 bytes.
UDP
UDP is connectionless and provides no reliability, no windowing, no reordering of the received
data, and no segmentation of large chunks of data into the right size for transmission. UDP does not require waiting on acknowledgments or holding the data in memory until it is acknowledged.
Popular TCP/IP Applications
World Wide Web (WWW) application exists through web browsers accessing the
content available on web servers.
Domain Name System (DNS) allows users to use names to refer to computers, with
DNS being used to find the corresponding IP addresses.
Simple Network Management Protocol (SNMP) is an application layer protocol used
specifically for network device management.
Trivial File Transfer Protocol (TFTP). TFTP defines a protocol for basic file transfer—hence the word “trivial.”
Simple Mail Transport Protocol (SMTP) and Post Office Protocol version 3 (POP3), both used for transferring mail, require guaranteed delivery, so they use TCP.
VoIP traffic has several other QoS demands on the network before the VoIP traffic will sound good:
■ Low delay: VoIP requires a very low delay between the sending phone and the
receiving phone—typically less than 200 milliseconds (.2 seconds). This is a much
lower delay than what is required by typical data applications.
■ Low jitter: Jitter is the variation in delay. VoIP requires very low jitter as well, whereas
data applications can tolerate much higher jitter. For example, the jitter for consecutive
VoIP packets should not exceed 30 milliseconds (.03 seconds), or the quality degrades.
■ Loss: If a VoIP packet is lost in transit because of errors or because a router doesn’t
have room to store the packet while waiting to send it, the VoIP packet is not delivered
across the network. Because of the delay and jitter issues, there is no need to try to
recover the lost packet. It would be useless by the time it was recovered. Lost packets
can sound like a break in the sound of the VoIP call.
Exness交易商开户流程
1 year ago
No comments:
Post a Comment