MTL 8724-CA-PS
ARP:地址解析协议,即ARP ( Address Resolution Protocol),是根据IP地址获取物理地址的一个TCP/IP协议
DHCP:( 动态主机配置协议)是一个局域网的网络协议,指的是由服务器控制一段IP地址范围,客户机登录服务器时就可以自动获得服务器分配的IP地址和子网掩码
应用层数据怎么发到以太网网络中去 ?
每个分层中,都会对所发送的数据附加一个首部,在这个首部中包含了该层必要的信息,如发送的目标地址以及协议相关信息,通常,为协议提供的信息为包首部,所要发送的内容为数据。在下一层的角度看,从上一层收到的包全部都被认为是本层的数据
IP首部:
1)4位版本:目前的协议版本号是4.(2)4位首部长度:首部占32bit字的数目,包括任何选项,由于它是一个4比特字段,因此首部最长为60个字节.(3) 8位服务类型(TOS):包括一个3bit的优先权子字段,4bt的TOS子字段,1bt未用位但必须置04bit的TOS分别代表: 最小时延、最大吞量、最高可靠性和最小费用,4bit中同时只能置其中1bit为1.。如果所有4bit均为0,那就意味着是一般服务。(4)16位总长度:指整个P数据报的长度,以字节为单位,利用首部长度字段和总长度字段,就可以知道1P数据报中数据内容的起始位置和长度,由于该字段长16比特,所以IP数据包最长可达65535字节,当数据报被分片时,该字段的值也随着变化。( 5)16位标识: 唯一标识主机发送的每一份数据报,通常每发送一份报文它的值就会加1。
ARP: Address Resolution Protocol, also known as ARP (Address Resolution Protocol), is a TCP/IP protocol that obtains physical addresses based on IP addresses
DHCP: (Dynamic Host Configuration Protocol) is a network protocol for a local area network, which refers to a range of IP addresses controlled by the server. When a client logs in to the server, they can automatically obtain the IP address and subnet mask assigned by the server
How can application layer data be sent to the Ethernet network?
In each layer, a header is attached to the sent data, which contains necessary information for the layer, such as the destination address and protocol related information. Typically, the information provided for the protocol is the packet header, and the content to be sent is data. From the perspective of the next layer, all packets received from the previous layer are considered as data from the current layer
IP header:
1) 4-bit version: The current protocol version number is 4. (2) 4-bit header length: The number of 32-bit words occupied by the header, including any options. As it is a 4-bit field, the maximum length of the header is 60 bytes (3) 8-bit Service Type (TOS): includes a priority subfield of 3 bits, a TOS subfield of 4 bits, and a TOS of 1 bit that is unused but must be set to 04 bits, representing minimum latency, maximum throughput, highest reliability, and minimum cost. Only 1 bit can be set to 1 in 4 bits at the same time. If all 4bits are 0, it means it is a general service. (4) 16 bit total length: Refers to the length of the entire P datagram, in bytes. By using the first length field and the total length field, the starting position and length of the data content in the 1P datagram can be determined. Due to the 16 bit length of this field, the maximum length of an IP datagram can be 65535 bytes. When the datagram is fragmented, the value of this field also changes. (5) 16 bit identifier: It uniquely identifies each datagram sent by the host, and usually adds 1 to its value for each message sent.
(6) 3-digit flag
(7) 13 bit chip offset
(8) 8-bit lifetime: TL sets the maximum number of routers that a datagram can pass through, which specifies the lifetime of the datagram. The initial value of TL is set by the source host (usually 32 or 64), and once it passes through a router that processes it, its value is subtracted by 1. When the value of this field is 0, the datagram is discarded and an ICMP message is sent to notify the source host. (9) 8-bit protocol: Identify which protocol is transmitting data to IP
(10) 16 bit header checksum: The checksum calculated based on the IP header. Do not calculate the data after the header. ICMP, IGMP, and UDP OTCP all contain both the header and data verification codes in their respective headers. If the checksum error is 1P, the received datagram will be discarded, but no error message will be generated. The upper layer will discover the discarded datagram and retransmit it