TCP / IP protocol first chapter of Volume I

1, the link layer

Link layer sometimes referred to as data link layer or the network interface layer, typically includes an operating system, device drivers and a corresponding computer network interface card. They are processed together with the cable physical details of the interface (or any other transmission medium) is. The link-layer address and network layer addresses to link the agreement ARP (Address Resolution Protocol, Address Resolution Protocol ) and RARP (Reverse Address Resolution Protocol, Reverse Address Resolution Protocol ).

2, the network layer

The network layer processes the packet in the network, for example, routing of the packet. In the TCP / IP protocol suite, the network layer protocol IP protocol (Internet Protocol, Internet Protocol ), the ICMP protocol (Internet Control Message Protocol, Internet Control Message Protocol ) and IGMP protocol (Internet Group Management Protocol, Internet Group Management Protocol) .

3, the transport layer

Transporting layer mainly provides end to end communication application on both hosts. In the TCP / IP protocol suite, there are two different transmission protocols: TCP (Transmission Control Protocol, Transmission Control Protocol ) and UDP (User Datagram Protocol, User Datagram Protocol ).

4, the application layer

The application layer is responsible for handling specific application details. Almost a variety of TCP / IP implementation The following are some common applications: Telnet remote login, SMTP (Simple Mail Transfer Protocol, Simple Mail Transfer Protocol ), FTP (File Transfer Protocol, File Transfer Protocol ), HTTP (Hyper Text transfer protocol, hypertext transfer protocol ) and so on ..

1.TCP unreliable IP services, and provide a reliable transport layer services.

2.UDP send and receive datagrams for applications, unlike TCP, UDP is not reliable.

3.IP the network layer is the main protocol is also used by TCP and UDP.

4 sub ICMP protocol when the IP protocol.

image

Assembly

Physical properties of the Ethernet data frame is that it must be between 46 to 1500 bytes.

Ethernet frame header also has a frame type field of the 16bit (IP, ARP, RARP)

Stored in the IP header length in a 8bit value, called protocol domain (ICMP, IGMP, TCP, UDP, ESP, GRE)

TCP and UDP port numbers are used to represent a 16bit different applications (TFP, TELNET, HTTP)

image

Demultiplexing

image

The port number

Server are generally used to identify the port number (ftp21, telnet23).

Client port number, also known as temporary port number (ie, there is a short time).

Most TCP / IP implementations to temporarily assign port number between 1024 to 5000 ports.

When the port number greater than 5000 reserved (not commonly used services on the Internet) to other servers.

Why do most of the well-known port default is odd?

Because these port numbers are derived from the NCP port number out (NCP, namely network control protocols are ARPANET transport layer protocol is TCP's predecessor). NCP simplex, not full duplex and therefore requires two connections each application, and the need to reserve one pair Masterpieces even port number. When the TCP and UDP transport layer protocol known as the standard, each application requires only one port, therefore the use of NCP odd.

Key:

1. The random source port number, destination port is fixed.

2.0806 is the ARP protocol type, ARP request response length 28 does not satisfy the minimum packet length 46, the spacer 46 plus 18 meet.

After 3.0800 type is an IP datagram

Guess you like

Origin www.cnblogs.com/lqinghua/p/11256398.html