Vernacular OSI seven layer protocol

Nature of the Internet is a series of network protocols, this protocol is called OSI protocol (a series of agreements), according to different functions, different division of labor, hierarchical seven man-made. In fact, this seven-story does not exist. This concept is not seven, but artificial division only. Distinguish purpose is to let you know which one is used to do.

Personal understanding of the role: to guide network problems encountered can be used to find the problem by seven agreements

Each layer running different protocols. Protocol is doing, it is the standard protocol.

In fact there are people to draw it into a five-story, four.

It is divided into seven layers: an application layer, layer, session layer, transport layer, network layer, data link layer, physical layer representation.

It is divided into five layers: an application layer, transport layer, network layer, data link layer, physical layer.

It is divided into four layers: the application layer, transport layer, network layer, network interface layer.

A physical layer Dian

Physical layer functions: main transmitting low voltage (electric signal) based on the electrical characteristics, a high voltage corresponding to the number 1, a low voltage corresponding to the digital 0

The physical link may be an intermediate fiber optic cable, cable, twisted pair, radio waves. Intermediate mass is an electrical signal, namely 010101 ... these bits.


Dian two data link layer

The origin of the data link layer: a simple electrical signals 0 and 1 does not make any sense, must provide an electrical signal how many bits a groups of what it means

The data link layer: Defines the electric signal grouping

Early on, the data link layer is to do the electrical signal packet. Before each company has its own grouping, and later formed a unified standard that Ethernet protocol ethernet

ethernet provisions: a set of electrical signals constitute a data packet, called 'frames', each data frame is divided into: a header and a data head data of two parts

 * Head comprising :( a fixed 18 bytes)

  * Sender / source address of 6 bytes

  * Recipient / destination address, six bytes

  * Data type, six bytes

 * Data comprises the shortest :( 46 bytes, maximum 1500 bytes)

 * Specific contents of the datagram: head + data length of the shortest length = 64 bytes, up to 1518 bytes, exceeds the maximum limit on the transmitted fragment

It's like a letter, the sender's address (source address) is your home address, recipient address (destination address) is the other side of the receiver's address, your home router is equivalent to the post office. In fact, the source and destination addresses in the computer communication refers to the Mac address.

2.2 Mac Address

Source and destination addresses contained in the head Origin: ethernet predetermined internet access devices must have the card, the transmission and receiver means address is an address of the card, i.e., the Mac address

 * Mac address: Each network cards are the world's only fired a Mac address, length 48 binary factory, usually represented by 12 hexadecimal digits (the first six digits are the manufacturer number is the last six line number)

Broadcast address

With the Mac address in the future, the computer can communicate with, and assume that a classroom is a local area network (isolated network), this classroom there are several computers.
Computer bottom, as long as in a classroom (LAN), are relying on broadcast way, roar.
After the broadcast went out, everyone could hear, everyone will open the envelope, read who the sender is, who the recipient, as long as the receiver is not himself discarded.

Note: Before talking about the network layer, in fact, this radio-based communication can be achieved worldwide communications, you roar, if the world is a local area network, the computer world can certainly hear, in theory seems to have the line pass, if the computer world are yelling, you think about it, this is not a disaster. Therefore, the whole world can not be a local area network. Then there is the network layer.


Wed and network layer

Network layer function: the introduction of a new address is used to distinguish between different broadcast domain / subnet, this address is the network address

Defines a network layer IP protocol,
to something rumored to head on it, if already mentioned above, internal, by way of broadcasting, broadcasting of foreign things fail. Head of the classroom is the gateway, network gateway that is the meaning.

Mac address is used to identify a location you this classroom, IP address is used to identify where you are in the classroom (which LAN).
How to know each other's Mac address prior to roar? This rely on ARP protocol.

Note: Gateway to help you find Allen, but for users, because the speed is too fast we do not feel the presence of the gateway.

IP protocol
provides for as long as the computer connected to the Internet must have an IP address
ip address Features: dotted decimal
ip address minimum: 0.0.0.0
ip address maximum: 255.255.255.255
ip address is currently available in two versions: IPV4 IPV6 (due IPV4 indicates that the computer has enough existing launch the so IPV6 version)

IP addresses are dynamically assigned


Four transport layer Dian

The origin of the transport layer: IP network layer to help us distinguish between subnets, Mac layer Ethernet to help us find the host, and then we use are applications, may also open qq on your computer, Storm video, and other applications program.

Then we found over IP and Mac with a specific host, how to identify applications on this host, the answer is a port, a port that is associated with the application of the card number.

Transport layer functions: establishing a communication port to port

Added: 0-65535,0-1023 port range for the port occupied by the system

With the Mac address + IP address + port, we can determine the application on the world's only one computer

TCP protocol

 * Reliable transmission, TCP packet length is not limited, and can be theoretically infinite, but in order to ensure the efficiency of the network, typically the length of the TCP packet does not exceed the length of the IP packet, to ensure that a single TCP packet re-segmentation is not necessary.

UDP protocol

 * Unreliable transport, "header" section of only a total of eight bytes, a total length of no more than 65,535 bytes, exactly into an IP packet.


Dian five application layer

The origin of the application layer: the user is using the application, are working at the application layer, is the development of the Internet, everyone can develop their own applications, a variety of data, data must be provided in the form of good organization

Application layer functions: a predetermined data format of the application.

Example: TCP protocol data can be transferred to various programs, such as Email, WWW, FTP and the like. So, there must be agreement provides different e-mail, Web pages, FTP data format, these application protocols constitute the "application level."

Guess you like

Origin www.cnblogs.com/suren-apan/p/11374450.html