The physical property of the Ethernet data frame is that the length must be between 46-1500. TCP/IP supports a variety of different link layer protocols, such as Ethernet, Token Ring, FDDI (Fiber Distributed Data Interface), and RS-232 serial line. The book mainly discusses Ethernet and two serial interfaces (SLIP,PPP)
Ethernet link Layer (the main local area network count, using CSMA/CD media intervention method, that is, with collision detection of carrier monitoring multi-channel intervention), there are two main types of encapsulation:
RFC894: The encapsulation format of Ethernet IP packets, most commonly used
The IP packet Encapsulation format of the rfc1042:ieee802 network.
The image below is a two-pack format (people are lazy, it is directly screenshots, and clear ...) ):
Both have a minimum length requirement, 802.3 specifies that the data portion is at least 38 bytes, and Ethernet is 46 bytes
Maximum Transmission Unit MTU: Ethernet 1500, 802.3 is 1492
Path MTU: The minimum value of the Maximum Transmission Unit MTU of a network over a two-host communication link
Two types of string lines:
Slip:serial Line IP, a simple format for encapsulating IP datagrams on serial lines, is described in RFC1055. Features, simple
PPP: Point-to-point protocol that modifies all defects in the SLIP protocol, including 3 parts
1 Methods for encapsulating IP packets on a serial link
2 establishing, configuring and testing the Link Control Protocol (LCP) of the data link
3 Network Control Protocol (NCP) for different network protocols
The following are packaged in two formats:
IP header and TCP headers and their data are always inspected and. The UDP header and its data are checked and optional. IP is unreliable, non-connected packet delivery service.
Unreliable means that IP datagrams cannot be guaranteed to reach their destination successfully, and IP guarantees only the best possible transfer service. Reliability needs to be provided by TCP. No connection: The IP service does not maintain any status information about subsequent datagrams, and the processing of each packet is independent of each other, so IP packets can not be received in the order in which they are sent.
When routing is selected, both the host and the router use the routing table, which has three types of routes: a specific main model, a specific network type, and a default routing type. When routing is selected, the host route takes precedence over network routing, and the menu chooses the default route when no other alternative routes exist at the end.
IP routing is achieved by jumping, and the destination IP address of the datagram is always the same during each transmission, but the package and destination link layer addresses change at each station. Most hosts and many routers use the default next-station route for packets that are not local to the network.
The following are the IP packet formats:
UDP Protocol Header Length field refers to the UDP header plus UDP data byte length, the minimum is 8 bytes, that can send 0 bytes of UDP datagram.
The length of the IP packet refers to all packets, so the length of the UDP datagram is the whole field minus the length of the IP header (specified in the IP packet)
UDP check and overwrite UDP header and UDP data, IP header check and only overwrite IP header, do not include any data in IP packet. TCP inspection and also full coverage, TCP validation and is required, UDP is optional, but is open by default, so this field is generally required. The following UDP packet format is relatively straightforward:
TCP is a connection-oriented, reliable byte-stream service. TCP,UDP are encapsulated in IP packets for transmission, TCP header fixed length is 20 bytes, UDP is 8 bytes, IP header is also 20 bytes. (This is not included in the case of optional options). The following is the TCP packet format:
TCP packages the user data into a message segment, sends the data, initiates a timer, confirms the data on the other end, re-sorts the unordered data, discards duplicate data, TCP provides end-to-end traffic control, and calculates and verifies a mandatory end-to-end inspection and. The TELNET,RLOGIN,FTP,SMTP are transmitted using TCP.
TCP connection is established is three handshake, the connection is closed is four handshake, the general server side is passive shutdown, that is, after the client issued a shutdown notification, the server sends a shutdown notification to the client, the following is the connection and shutdown of the corresponding flag field changes:
The TCP half-office closes the connection state, can write one end closed, the read end continues to open, until completed:
Both UDP and TCP are propagated in IP packets, and IP packets are encapsulated in Ethernet or point-to-point link frames for propagation.
DNS Fixed header length is 12 bytes, 4 lengths of optional fields, DNS supports UDP and TCP, most of the time UDP is used, in some cases TCP, such as when the secondary name server queries to the primary name server to understand whether the data changes, if there is a change, The primary server uses TCP to send data to the secondary domain name server.
The application converts a host name to an IP address through the name resolver, or converts an IP address to its corresponding hostname. The name resolver makes a query request to a local name server that may be completed by a root name server or other name server.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.