Five computer network model - Review

Today's task is not to recall the amount of computer network

  This computer world is thousands and thousands of computers to find each other in precise means by which to do?

  You should have heard five models but may not be very clear look at the following five models with network communications.

  

  Application Layer - "transport layer -" Network Layer - "Data Link Layer -" Physical Layer

  

  1. Physical Layer 

  A computer to keep other computers to communicate the first thing to do is to take the two computers are connected together so that we can pass data in the past, such as fiber optic cable that is what the physical layer 01 such electrical signals through the physical layer by way of the high and low frequencies to transmit information

  2, the data link layer

  The physical layer just passed such electrical signals 01 but this electrical signal and I can lose a 010101010101010101100101010101010101011010 you look at the machine does not necessarily understand it can read a chapter so we need to specify how to pass standardized data format Han

  1. Ethernet protocol

  Ethernet protocol a predetermined set of electrical signals constitute a data packet, we can put the packet of each frame is called frame header and data of two parts

  Frame size is generally 64-- larger data requires 1518 bytes into a plurality of frames

  Generally divided into data frames and head

  The header should contain at least transmission frames transmitted by whom and to whom the information so that standard system header information description data are mainly some receiver sender like e.g. 

  Data frames in this section should be sent to the recipient wants content

  The length of the frames is not fixed so the length of the header will be fixed if you do not think it should be a fixed computer know how header a few bytes of data so it is a few bytes byte header section is fixed fixed 18 bytes and

  The data is sent to a computer to another computer through the physical layer and the data link layer who is sent to how to distinguish between who's computers and computer? The only address Mac address appeared

  2.Mac address

  Each computer into the network will each have a network interface card will have a unique address is called the address of the data transfer between the Mac address of the computer is through the Mac address uniquely find the Mac address transmitted is constituted by 48 bytes when the network port production was uniquely identifies

  Broadcast and ARP protocol

  

 

   Figure A computer know if mac address of the computer B and then computer A wants to transfer data to computer B though computer A knows B's MAC address of the computer, but how he wants to transfer his data it? A computer

Not only attached to computer B and computer A computer is also connected to the C and D computer While the computer A knows B's Mac address of the computer but do not know which of the B is on the wing

   To solve this problem there has been broadcasting

  mac address on the same subnet as the computer A wants to computer B sends a packet this packet will contain the recipient's computer when the CD this time sending the same subnet A computer is sent by way of broadcasting will also receive

The packet received mac address of the computer data packets will take itself out of the comparative mac address both the same if the packet is accepted or the packet will be dropped. This transmission scheme is called a broadcast

You and your friends about it and he can not find you in the square to hear people shouting match will automatically be myself will not bother you when you hear the words

  ARP protocol

  A computer how to know the MAC address of the computer B this time it would have solved this guy ERP agreement we shelved after watching ip

  3. Network Layer

  In fact we live by the broadcast network is composed of numerous sub-network when the only computer in the same subnet can receive 

  If there is no such thing as a subnet A computer sends a data packet to the computer by way of broadcasting B all the other computers can receive this packet and then compare again abandon the whole world on so many computers each computer can receive other computer

  Thus creating a subnet

  So the question is if we distinguish between Mac address belong to the same subnet as it is if we use the same subnet broadcast in the form of the data transmitted to the other party, if not the same subnet we will send data to the gateway so that the gateway forwards

  To solve this problem so there is ip protocol

  1. IP protocol

  ip protocol address he defines what we call ip address ip protocol has two versions one is ipv6 ipv4 one is currently the most used or ipv4

  I This address consists of 32-bit binary number consisting we generally divide it into four sections of the decimal representation of the range of 0.0.0.0 ~ 255.255.255.255 address

  Each station will want to have a networked computer ip address ip address is divided into two parts behind the front portion represents the network portion and host portion represents a portion made of two-digit network and host portions occupied is not fixed

  If the network part of the two computers is exactly the same we say two computers belong to the same subnet. For example, 192.168.43.1 and 192.168.43.2, if these two portions of the network IP address is 24, 8-bit host part. They are part of the network 192.168.43, so they are in the same subnet.

  But the question is how we know that part of the network accounts for several of the host portion has accounted for several of it that is only two computers from ip address we are unable to determine whether they are in the same subnet

  This is one of the words come out of another ip address and subnet mask is the same as 32-bit binary number, but his network all the provisions of section 1 0 host part of all the provisions of the above means that if two ip address the network part is 24-bit host part, then it is their subnet mask 8

  11111111.11111111.11111111.00000000, namely 255.255.255.0.

  With the subnet mask ip address how to determine whether it is in the same subnet obviously know we know the subnet mask is equivalent to several network part is the host part is we only need a few ip address with his son subnet mask and do (and) their operation and then compare the results will be the same if the result of the comparison represents the same subnet or not on the same subnet

  2.ARP agreement

  With the ip address and subnet mask of the two computers we can determine whether they are in the same subnet among the

  Assuming they are in the Mac address of the computer sending data on the same subnet A and computer B to be among us to get the computer through the ARP protocol

  ARP protocol also transmits a packet to the same subnet as broadcast by each of the computer (of course, this packet contains the address of the recipient ip) received by the other data will be removed after the ip address Comparative itself if same Mac address will own reply to each other. otherwise it discards the packet so that the computer a to computer B know the Mac address of the

  Some may ask to know send data is sent to ask each other's mac address broadcast in the form of the Mac address is to send it to other computers know how you are going to transfer data or ask Mac address it in fact asking Mac address in the form of broadcast internal data packet address each other's mAC this column is filled after a special mac address of the other computer to see this special broadcast mac address that you know like doing a '

  Ip If two computers are not in the same subnet as the gateway into this time we will send packets to the gateway and then let us be forwarded transfer

  3.DNS server

  DNS servers will be returned to us after the corresponding input ip domain name

  4. Transport Layer '

  Data link layer and the network layer through physical layer helping each other we have successfully transmit the data to computer B from computer A computer inside a B, but on how a wide variety of computer applications is aware of this data is sent to the application this time it will port this guy when playing a computer a to computer B have to transfer a designated port for a specific application to accept the deal that is the function of the transport layer is to establish a communications port to port compared to the network the functional layer is to establish a host-to-host communication

  That we can have an accurate ip and port ip communication we entered and did not specify the port actually have some transport protocols already set some default port 80 is the default http example, these ports will be included in the information packet inside

  The two most common transport layer protocol is TCP and UDP TCO while providing reliable transmission of unreliable UDP

  The application layer

  The application layer is the layer in contact with the user's back, although we have received the data received from the transport layer, but these sorts of data we need to specify the format of these rules in order to render interpretation of the data received, for example, our most common Http data package will specify a package is what format files

  

Guess you like

Origin www.cnblogs.com/frankzone/p/11793314.html