Home > Backend Development > Python Tutorial > Summary review of computer network knowledge points

Summary review of computer network knowledge points

巴扎黑
Release: 2017-06-23 16:26:50
Original
3222 people have browsed it

During the interview, if the interviewer wants to test your computer network skills, he should ask about the TCP three-way handshake process, right?

so, I 4 I started reviewing computer network on the 24th of March, and I reviewed it intermittently for three days.

ISP: Internet Service Provider Internet Service Provider

Eg: China Telecom, China Unicom and China Mobile

Router is a dedicated computer. Router implements the key component of packet switching(packet switching). Its task is to forward received packets.

  • Circuit switching - the bit stream of the entire message is continuously sent from the source to the destination, as if the

  • message is transmitted in a pipe Switching--the entire message is first transmitted to the adjacent node, and then the forwarding table is searched after all the messages are stored and forwarded to the next node

  • Packet switching--a single packet (this is just the entire part of the message) to the adjacent node, store it, search the forwarding table, and forward it to the next node

Network classification

  • WAN(Wide Area Network)

  • MAN(Metropolitan Area Network) Scope: City

  • LAN-LAN(Local Area Network) eg: Campus network or enterprise network

  • Personal Area Network-PAN(Personal Area Network) eg: A network where computers are connected using wireless technology ( wifi)

##OSI, TCP/IP, five-layer protocol architecture, and each layer protocol

OSI layering (7 layers) : Physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer.

TCP/IP layering (4 layers): network interface layer, Internet layer, transport layer, application layer.

Five-layer protocol (5 layers):

Physical layer, data link layer, network layer, transport layer,                             Application layer .

Combining OSI and TCP/IP produces a five-layer structure, which are: physical layer, data link layer, network layer, transport layer and application layer. The Internet uses the TCP/IP protocol

The functions of each layer are as follows:

  • Physical layer: transmits bits through the medium and determines mechanical and electrical specifications ( Bit)

  • Data link layer: Assembling

    bits into frames and point-to-point transmission (Frame Frame)

  • Network layer: Responsible for

    The transmission and interconnection of data packets from source to sink (packet PackeT)

  • Transport layer: Provide end-to-end

    Reliable message delivery and error recovery (Segment)

  • Session layer: establishing, managing and terminating sessions (Session Protocol Data Unit SPDU)

  • Presentation layer: Translates, encrypts and compresses data (Representation Protocol Data Unit PPDU)

  • Application layer: Allows the means to access the OSI environment (Application Protocol Data Unit APDU)

Frequency division multiplexing: All users occupy different frequency bandwidths at the same time.

Time division multiplexing: All users occupy the same frequency bandwidth at different times.

The protocol data unit of the data link layer of the point-to-point channel - frame

Three basic issues of the data link layer:

  1. Encapsulation into a frame: Add a header and a tail before and after a piece of data to form a frame

  2. Transparent transmission

  3. Error detection: Cyclic redundancy check CRC error detection technology

The upper limit of the data part length of the frame--Maximum Transfer Unit MTU(Maximum Transfer Unit)

CRC is an error detection method , FCS is a redundant code added behind the data.

PPP protocol: The data link layer protocol used when the user computer communicates with the ISP.

PPP frame format: Page 75

Adapter (network card): Responsible for sending frames to and receiving frames from the LAN

Adapter

Receiving and sending various frames does not use the computer's CPU, the adapter is equipped with a processor and memory (including RAM and ROM)

Broadcast communicationMethod: When one computer sends data, all computers on the bus can detect this data.

CSMA/CD protocol: It is impossible for a station to send and receive at the same time (but it must

send while listening to the channel)

The sending is not Determinism: Each station has the possibility of encountering a collision within a short period of time after it sends data. This short period of time is uncertain and depends on the distance from the other station sending data to this station.

Content period (collision window): Ethernet end-to-end round trip time 2i

After the contention period, no collision has been detected, only then can we be sure that this transmission will not cause a collision. At this time, you can rest assured that this frame of data will be sent successfully.

The contention period of Ethernet is determined to be 51.2us

Ethernet specifies a minimum frame length of 64 bytes, which is 512bit. If very little data is sent, some padding bytes must be added to make the frame length no less than 64 bytes.

When Ethernet sends data, if no collision occurs during the contention period (a total of 64 bytes are sent), then the subsequent data sent will definitely not conflict.
Any frame whose length is less than 64 bytes is an invalid frame that is abnormally aborted due to conflict.

If a collision is detected during the contention period, the temporarily reserved frame will be delayed for a while and retransmitted.

The adapter has a filtering function: Every time a MAC frame is received from the network, it first uses hardware to check the destination address in the MAC frame. If the frame is sent to this station, it will be accepted, otherwise the frame will be discarded.

"Frames sent to this site" include the following three types of frames :

    ##Unicast (unicast) frames (one-to-one) : The MAC address of the received frame is the same as the hardware address of this station
  • Broadcast frame (one pair of all): Frame sent to all stations on this LAN (all 1 address)
  • Multicast frame (one-to-many): frame sent to some sites on this LAN

Hardware address

(or physical address/MAC address). When the adapter is produced, this 6-byte MAC address has been solidified in the adapter's ROM
. Format of MAC frame: Page 92

Hub: Ethernet using a hub is logically

still a bus network

, shared by all stations The logical bus still uses the CSMA/CD protocol. A hub has many interfaces.

The data link layer extends Ethernet using a bridge

(bridge). The bridge works at the data link layer and forwards and filters received frames based on the destination address of the MAC frame. The bridge relies on forwarding tables to forward frames. The forwarding table is also called the routing directory or forwarding database. Page 95

Transparent bridge (transparent bridge)

: Currently used the most. The bridge can work without manually configuring the forwarding table. It is a plug and play device. The network bridge processes the received frames through

self-learning algorithm

(self-learning) (gradually establishes the forwarding table), and forwards the frames according to the forwarding table . 98-Important

The Ethernet switch is actually a multi-interface bridge.

The biggest advantage of the switch: the bandwidth from each interface to the host is 10Mb/s. For a switch with N pairs of interfaces, the total capacity is N*10Mb/s.

Ethernet frame format: Page 102

Virtual LAN VLAN

is a logical group composed of some LAN segments that have nothing to do with physical location. These segments have common needs. The Virtual LAN protocol allows to insert a 4-byte identifier, called a VLAN tag (tag), into the Ethernet frame format. Used to indicate which LAN the workstation sending the frame belongs to.

Class A address network number: 126, that is, 2^7-2=126;

The reason for subtracting 2: All 0s in the IP address represent "this network" ". The network number 127 (0111 1111) is reserved for local software loopback test (loopback test) communication between processes on this host.

The class A address host number occupies 3 bytes, so the maximum number of hosts in each class A network is 2^24-2;

The reason for subtracting 2: all 0 The host number field indicates that the IP address is a single network address to which "this host" is connected;

(The IP address of a host is 5.6.7.8, then the network address of the host is 5.0.0.0)
And all 1 means "all", so the host number field with all 1 means all hosts on the network.

Routers always have two or more IP addresses. That is,

each interface of the router has an IP address

with a different network number. Page 121

ARP is the Address Resolution Protocol. Let me explain its working principle in simple language.

1. First, each host will

create an ARP list in its own

ARP buffer to show the correspondence between the IP address and the MAC address. 2. When the source host wants to send data, it first checks whether there is the IP address of the destination host in the ARP list. If so,

find the corresponding hardware address in the ARP cache, write the hardware address into the MAC frame, and then send the MAC frame to the hardware address

through the LAN.

If not, send ARP packet to all hosts in this network segment. The contents of the packet include: source host IP address, source host MAC address, and destination host IP address.

3. When all hosts in this network receive the ARP packet, they first check whether the IP address in the packet is their own IP address. If not, ignore the packet. If so, then First, take the IP and MAC address of the source host from the data packet and write it into the ARP list. If it already exists, overwrite it, and then write your own MAC address into the ARP response packet to tell the source host that it is the one it is looking for. MAC address.

4. After the source host receives the ARP response packet. Write the IP and MAC address of the destination host into the ARP list and use this information to send data. If the source host has not received an ARP response packet, it means that the ARP query failed.

Broadcast sends ARP request and unicast sends ARP response.

IP address and subnet maskAnd&Get the host number

Internet Control Message Protocol ICMP ( Internet Control Message Protocol)
There are two types of ICMP messages, namely ICMP error messages and ICMP query messages

ICMP query messages:

  • Echo request and reply: A query sent by a host or router to a specific destination host. The host that receives this message must send an ICMP reply message to the source host or router.

  • #Time stamp request and answer: Ask a host or router to answer the current date and time.

PING: Used to test the connectivity between two hosts.

Ping is an example of the application layer directly using network layer ICMP. It does not go through the transport layer of TCP or UDP

RIP with OSPF

Virtual Private Network

For these computers that are only used within the organization, the organization can allocate its IP address by itself. That is to say, let these computers use IP addresses that are only valid within this organization (called local addresses), and do not need to apply to the Internet's governing body for a globally unique IP address (called global address). This can greatly save valuable global IP address resources.

Private address (private address): can only be used for internal communications of an organization and cannot be used to communicate with hosts on the Internet. That is, a private address can only be used as a local address and not as a global address.

All routers in the Internet will not forward datagrams whose destination address is a private address.

Special address:


The above is the detailed content of Summary review of computer network knowledge points. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template