TCP-IP detailed Volume 1: Agreement notes

Source: Internet
Author: User

====================================

Chapter 2

====================================

Encapsulation formats of IEEE 802.2/802.3 (RFC 1042) and Ethernet (RFC 894)

--------------------------------------------------------

Class A network number 1 2 7 is reserved for the loopback interface. According to the Convention, most systems allocate the I P address 1 2 7. 0. 0. 1 to this interface and name it l o c a l h o s t.

As we imagine, when the transport layer detects that the destination address is a loop address, some logical operations on the transport layer and all network layers can be omitted.

However, most products still complete all the processes at the transport layer and network layer, but when I P datagram leaves the network layer, it returns it to its own loopback interface without going through the link layer, that is, it does not pass through the ENI and Its device drivers.

-----------------------------------------------------

MTU:

Ethernet: 1500 bytes (IP group package range: 46 ~ 1500 bytes)

Ieee 802.3: 1500-8 = 1492 bytes (IP packet range: 38 ~ 1492 (46-8 ~ 1500-8) bytes)

The path MTU between two hosts is not necessarily a constant. It depends on the route selected at that time.

----------------------------------------------------

Ethernet link layer frame: [6 byte destination physical address]-[6 byte source physical address]-[2 byte type]-[ip packet]-[4 byte crc]

====================================

Chapter 2

====================================

IP datagram format and fields in the header

Header Length: the number of 32-bit characters in the header, including any options;

Service type: only 4-bit is useful. 4-bit TOS represents the minimum latency, maximum throughput, maximum reliability, and minimum cost respectively. Only 1 bit can be set in 4-bit. If all 4 bits are 0, it means a General Service;

Total length field: the number of bytes of IP datagram content, excluding useless bytes that are filled to ensure the minimum frame length is 46 bytes;

The identification field, flag field, and offset field are related to the partition and reorganization;

T l (t I m e-t o-l I v e) survival time field: sets the maximum number of routers that a datagram can pass through. Once a router processes it, the value is equal to 1. When the value of this field is 0, the datagram is discarded and the I C M P message is sent to the source host;

8-bit Protocol: identifies which Protocol transmits data to I P. IP address unpacket is used to split the datagram;

Header verification field: The Verification Code calculated based on the I P header. Because the router often only modifies the T L field (minus 1 ), therefore, when a vro forwards a packet, it can be used for verification without re-calculating the entire I P header;

Option: whether the header length field exists or not. Option fields are always based on 32 bit and rarely used.

------------------------------------------------------

Chapter 4 & 5

Before ARP sends a data packet to an ip address, it needs to broadcast an arp request to ask which physical address on the network corresponds to the destination ip address.

RARP is applied to a diskless system. When the system is started, you need to use RARP requests to obtain your own IP address from the network. The request package provides its own physical address. The RARP server must respond to the request on the network.

--------------------------------------------------------------

Tcpdump packet capture command

The ICMP Internet Control Packet protocol is mainly used for error processing. The IP addresses of ICMP packets are the IP addresses of the output interface. The Ping program implements traceroute Based on ICMP echo requests and echo response packets: traceroute sends UDP datagram data to the destination address sequentially. The UDP port number in the datagram is an impossible number (for example, a number beyond the range of the port number, the ip ttl value increases progressively from 1. In this way, the I-th Route will receive an IP packet whose TTL is 1. This route will reduce the TTL by 1 and return an ICMP timeout packet, the IP header of the timeout packet carries the IP address of the I route, so that traceroute obtains the IP address of the I route in the sending path.
When the initial value of TTL is increased, an invalid UDP datagram of the port will arrive at the destination address, and an ICMP packet of "port inaccessibility" will be returned for the destination address, and traceroute will end. Rip (Routing Information Protocol) Routing Information Protocol BGP (Border Gateway Protocol) Border Gateway Protocol OSPF (Open Shortest Path First) Open Shortest Path First (CIDR) (classless Inter-Domain Routing, classless Inter-Domain Routing)
Rip packets are encapsulated in UDP datagram. BGP adopts the tcpcidr "no type", which means that the current routing decision is based on the mask operation of the entire 32-bit IP address, no matter whether the I p address is a class, B class, or C class, there is no difference.

--------------------------------------------------------------

Class D networks are used for multicasting.

Multicast MAC addresses start with a hexadecimal value of 01-00-5E, and the remaining six hexadecimal digits are the highest digits of 0, the last 23 digits of the IP multicast group address are obtained.

IGMP (Internet Group Management Protocol) is used to solve multicast problems in multiple networks.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.