Introduction to TCP/IP protocol architecture

Source: Internet
Author: User

1, TCP/IP protocol stack

Four-layer model

TCP/IP This protocol adheres to a four-tier model concept: Application layer, Transport layer, interconnect layer and network

Interface layer.

Network interface Layer

The base of the model is the network interface layer. Responsible for data frame sending and receiving, frame is independent network information transmission

Transmission unit. The network interface layer places frames on the Web or takes them off the web.

Interconnect Layer

The interconnect protocol encapsulates packets into an Internet datagram and runs the necessary routing algorithms.

Here are four interconnection protocols:

Internet Protocol IP: Responsible for addressing and routing packets between the host and the network.

Address Resolution Protocol ARP: Gets the hardware host address in the same physical network.

Internet Control Message Protocol ICMP: sends a message and reports a delivery error about the packet.

Interconnect Group Management Protocol IGMP: is being taken by an IP host to report host group members to a local multicast router.

Transport Layer

Transport protocols provide a communication session between computers. The choice of transport protocol depends on the mode of data transmission.

Two transport protocols:

Transmission Control Protocol TCP: Provides reliable communication connections for applications. Suitable for transferring large numbers at once

According to the situation. and applies to applications that require a response.

User Datagram Protocol UDP: Provides connectionless communication and does not reliably guarantee delivery packets. Adequate

For a small amount of data transmission at a time, the reliability of the application layer to be responsible.

Application Layer

The application accesses the network through this layer.

Network Interface Technology

IP uses the network device Interface specification NDIS to submit frames to the network interface layer. IP support WAN and local network

Interface technology.

Serial Line Protocol

TCP/IPG generally through the Internet Serial Line protocol slip or Point-to-Point Protocol PPP in the serial line of the progressive

Row data transfer. (is not what we call it asynchronous communication, for Linux to provide the establishment

Should friends who are connected remotely should study this knowledge more?

TCP/IP Basics----Prepare for Linux (2)

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

2, ARP

To communicate on the network, the host must know the other host's hardware address (we do not always encounter the NIC

Physical address). Address resolution is the process of mapping a host IP address to a hardware address. Address Solution

The protocol ARP is used to obtain the hardware address of a host in the same physical network.

Explain the local IP address (friends who want to understand the address resolution process)

host IP address resolves to hardware address:

(1) Initializing ARP requests when a host communicates with another host. When the IP determines that the IP address is

Locally, the source host looks for the hardware address of the target host in the ARP cache.

(2) If the mapping is not found, ARP establishes a request, the source host IP address and hardware address will be

Included in the request, the request is broadcast so that all local hosts can receive and process it.

(3) Each host on the local network receives a broadcast and looks for a matching IP address.

(4) Send an ARP reply directly when the target host determines that the IP address in the request matches its own

Pass your hardware address to the source host. Updates its ARP with the source host's IP address and hardware address

Cache. The source host receives the reply and establishes the communication.

Resolving Remote IP addresses

Hosts on different networks communicate with each other, and ARP broadcasts the default gateway of the source host.

If the destination IP address is a remote network host, ARP broadcasts the address of a router.

(1) When the communication request is initialized, the destination IP address is known as the remote address. The source host is in the local routing table

Lookup, if none, the source host is considered to be the IP address of the default gateway. Find compliant gateway in ARP cache

The IP address (hardware address) of the record.

(2) If no record of the gateway is found, ARP broadcasts the request gateway address instead of the address of the destination host.

The router responds to ARP requests from the source host with its own hardware address. The source host sends the packet to the route

To the target host's network, eventually reaching the target host.

(3) On the router, IP determines whether the destination IP address is local or remote. If it is local, the router

Obtain the hardware address with ARP (cache or broadcast). If it is remote, the router looks in its routing table for the

Gateway, and then use ARP to obtain the hardware address of this gateway. Packets are sent directly to the next target

Host.

(4) The target host receives the request and forms an ICMP response. Due to the source host on the remote network, will be on the local road

The gateway to the source host network from the table. After the gateway is found, ARP obtains its hardware address.

(5) If the hardware address of this gateway is not in the ARP cache, it is obtained via ARP broadcast. Once it gets

Hardware address, the ICMP response is sent to the router, which is then uploaded to the source host.

ARP cache

To reduce the amount of broadcast, ARP saves the address map in the cache to spare. The ARP cache holds dynamic entries [next]

and static items. Dynamic items are automatically added and deleted, and static items remain in the cache until the calculation

Machine reboot.

The ARP cache always retains the hardware broadcast address (0XFFFFFFFFFFFFH) as a permanent entry for the local subnet.

This entry enables the host to accept ARP broadcasts. When you view the cache, the item is not displayed.

The life cycle of each ARP cache record is 10 minutes and is removed within 2 minutes. When the cache capacity is full,

Deletes the oldest record.

Add static (permanent) records

By adding static ARP entries, you can reduce the number of ARP requests to access the host.

The structure of the ARP packet

The fields of the ARP structure are as follows:

Hardware type-the type of hardware (Network access layer) used.

Protocol type--the protocol in the parsing process uses the value of the ether type.

Hardware address Length-The byte length of the hardware address, which is 6 bytes long for Ethernet and Token ring.

Protocol address length-the length of the protocol address byte, and the IP length is 4 bytes.

Action Number--Specifies the field in which the action is currently performed.

The sender's hardware address-the sender's hardware address.

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.