Computer network Knowledge Point finishing _ Computers

Source: Internet
Author: User
Tags ack switches domain server

A comparison of circuit switching, message exchange and packet switching

1. Circuit Exchange

Public telephone Network (PSTN) and mobile network (including GSM and CDMA network) are used in circuit switching technology, its basic feature is the use of connection-oriented approach, before the two sides to communicate, the need for both sides to allocate a fixed broadband communication circuit, Communication between the two parties in the communication process has been occupied by the allocation of resources until the end of communication, and in the process of building and releasing the circuit need to use the relevant signaling protocol. The advantage of this approach is that in the communication process can be guaranteed to provide users with sufficient bandwidth, and real-time, time delay, low cost of switching equipment, but at the same time the disadvantage is that the channel utilization is low, once the circuit is established regardless of whether the communication between the two sides of the distribution circuit has been occupied

2. Message Exchange

Message exchange is a unit of data exchange, the message carries the information of the target address, the source address and so on, and the transmission mode of storage and forwarding is adopted in the switching node; Because the packet length is very different, the long message can cause a lot of delay; in order to meet the needs of various length messages and achieve efficient purposes, Nodes need to allocate different sizes of buffers, otherwise it is possible to cause data transfer failure, so the buffer allocation for each node is also more difficult. Another disadvantage is that when an error occurs, the entire message is transmitted again.

3. Packet switching

Packet switching is still used for store-and-forward transmission, but a long message is segmented into several shorter groupings, and the packets are sent individually, with the source, destination address, and number information. Using packet switching technology, you do not need to establish a connection before you communicate, each node will first receive the packet from the previous node and save it in a buffer, and then select the appropriate link to send it to the next node according to the address information in the packet header. In this way, the bandwidth can be allocated dynamically according to the requirements of the user and the ability of the network in the communication process. Packet switching is more efficient than circuit-switched channel, but has a large delay. The problem with packet forwarding: queuing delay and increasing the overhead associated with the head.

In short, if the amount of data to be transmitted is large, and the transmission time is much larger than the call time, it is more appropriate to use circuit switching, when the End-to-end path has many segments of the link composition, it is more appropriate to use packet switching data transmission. In view of improving the channel utilization of the whole network, packet switching and packet switching are better than circuit switching, in which packet switching is smaller than packet switching, especially for the abrupt data communication between computers.


II. interfaces, protocols and services

Interfaces: Low-level primitive operations provided to the upper level

Protocol: The rules that must be followed for information exchange between the two sides of the same layer

Services: Rules to be followed for exchanging information between different tiers


Third, the computer network system structure


Four, the role of the network layer

• Physical layer: Sending and receiving binary bit streams through the transmission medium.

A typical specification, such as RJ-45, that belongs to the physical layer definition.

L Data Link layer: Data encapsulation into frame, data transparent transmission, data error detection.

Data Link layer protocol representatives include: PPP, Frame Relay, etc.

L Network layer: Responsible for routing data packets between subnets, providing communication services for different hosts in packet switching network.

Network layer protocol representatives include: IP, ICMP, IGMP and so on.

• Transport layer: Responsible for the communication between processes in two hosts. The transport layer also deals with end-to-end error detection (different from the data link layer), congestion control, flow control, and so on.

Transport layer protocol representatives include: TCP, UDP and so on.

Application layer: An interface that provides access to network services for an operating system or network application.

Application layer protocol representatives include: FTP, HTTP, SNMP and so on.


V. How data is transmitted between layers of the network

The physical layer, the data link layer, the network layer belongs to the OSI model low three layer, is responsible for the creation network communication Connection link, the transport layer, the session layer, the presentation layer and the application layer is the OSI model high four layer, is responsible for the End-to-end data communication. Of course, not all traffic is going through all seven layers of OSI, such as the transfer between physical interfaces, only in the physical layer, and the connection between routers and routers requires only three layers below the network layer.


Six, in the network between each layer, the data is in what unit transmission

The transmission unit of the data in the physical layer is called the bit, the transmission unit of the data link layer is called the frame, the transmission unit of the data in the network layer is called the packet, and the transmission unit of the Transport Layer data is called the message segment.


Vii. What are the main differences between the Nyquist guidelines and the Shannon formula?

Nyquist criterion: In any channel, the rate of the code element transmission is capped, the transmission rate exceeds this limit, there will be a serious problem of crosstalk between the code, so that the receiver of the code-yuan sentence (that is, recognition) becomes impossible.

Shannon formula: The limit of the rate of information transmission is obtained.

Viii. What is the difference between synchronous communication and asynchronous communication

Synchronous communication: The two sides of the communication must first establish synchronization, that is, the clocks of both sides should be adjusted to the same frequency. Both sides send and receive continuous synchronized bit streams.

Asynchronous communication: When a character is sent by an asynchronous communication, the time interval between the characters being sent can be arbitrary. Of course, the receiving end must be ready to receive at all times. The sender can start sending characters at any time, so it must be marked at the beginning and end of each character, plus the start and stop bits so that the receiver can properly receive each character. The advantage of asynchronous communication is that the communication device is simple and inexpensive, but the transmission efficiency is low (because the cost of starting bit and stop bit is a large proportion).

Asynchronous communication can also be a frame as the unit sent, the receiver must be ready to receive frames at any time. At this point, the header of the frame must have some special bit combinations so that the receiver can find the beginning of a frame, which is also called the frame delimitation. The frame bounds also contain the end position of the frame, and there are two methods: one is to have a particular bit combination at the end of the frame to flag the ending of the frame, or a field with a frame length in the frame header. It is to be noted that when frames are sent asynchronously, it is not that the sender must add the start and stop bits to each character in the frame before sending it, but rather that the sender can send a frame at any time, and the time interval between the frames and the frames can be arbitrary. The sender does not need to coordinate with the receiver before sending a frame (no need for bit synchronization first).


Nine, the difference between bit synchronization and frame synchronization

Bit synchronization: makes each bit of information received by the receiving side synchronized with the sender.

Frame synchronization: Identifies the starting and ending positions of a frame.


X. Three basic problems of Data Link layer protocol

1, seal into frame

is to add a header and tail separately before and after a piece of data, thus forming a frame.

2. Transparent transmission

No matter what characters can be placed in the frame to transmit the past, such a transmission is transparent transmission. The solution to the problem of transparent transmission is: The data link layer in the sender has an escape character "ESC" inserted before the control character "SOH" or "Eoh" in the data, while the data link layer at the receiving end deletes the inserted escape character before sending the data to the network layer.

3. Error detection

The use of cyclic redundancy test (crc:cyclic redundancy check) error detection technology, if only the use of CRC, you can only do to the frame error-free reception, that is, received frames in the transmission process has not produced errors, and did not require the data link layer to the network layer to provide "reliable transmission" of services.


Xi. the function of adapter (NIC)

1, an important function of the adapter is to carry out the data serial transmission and parallel transmission conversion.

2, because the data rate on the network and the data rate on the computer bus is not the same, so in the adapter must be equipped with data cache memory chip.

3, the adapter will also implement Ethernet protocol.


12, CSMA/CD (carrier monitoring multi-point access/collision detection) The main points of the Protocol

Multi-point Access: Description This is the Total line network

L Carrier monitoring: is "before sending the first listening," that is, each site before sending data to check whether there are other sites in the bus to send data, if there is, then do not send data, to wait for the channel to become idle and then send.

L Collision Detection: is "side-send-side monitoring", that is, the adapter edge to send data to detect the channel signal voltage changes, in order to determine whether they are sending data in other stations are also sending data.


13, why Ethernet has a minimum frame length and maximum frame length

The minimum frame length is set to distinguish between normal and short frames that are aborted due to collisions.

The maximum frame length is set to ensure that all stations can compete fairly for access to Ethernet. Because if a station sends a special data frame, the other stations will have to wait a long time to send the data.


14, ARP Principle of work

1. First, each host establishes an ARP list in its own ARP buffer to represent the correspondence between the IP address and the MAC address.

2, when the source host to send data, first check the ARP list has the corresponding IP address of the destination host's MAC address, if so, send the data directly, if not, send the ARP packet to all the hosts of "This network segment", which includes: the source host IP address, the source host MAC address, The IP address of the destination host.

3, when all the hosts of this network receive this ARP packet, first check whether the destination host IP address in the packet is its own IP address, if not, ignore the packet, and if so, first remove the source host's IP and MAC address from the packet and write to the ARP list, overwriting if it already exists. It then writes its MAC address to the ARP response package and tells the source that it is the MAC address it is looking for.

4, the source host received the ARP response packet, the destination host IP and MAC address to the ARP list, and use this information to send data. If the source host has not received an ARP response packet, the ARP query failed.

The broadcast sends an ARP request and a single advertisement sends an ARP response.


It is assumed that computer A sends ARP requests in a local area network and wants to find out the hardware address of computer B. Then all computers on the local area network can receive the ARP Request packet sent by this broadcast. Which computer uses the ARP response group to tell computer B the hardware address of Computer A

This distinguishes between two situations.

If both computer B and computer A are connected to the same local area network, then Computer B sends the ARP Response group.

If computer B and computer A are not connected to the same local area network, then a router connected to the local area network must be forwarded to the ARP request group. At this point, the router sends an ARP answer group to computer A, giving its own hardware address.


16, the definition of IP protocol, what is the main role. What about TCP and UDP?

IP protocol (internet Protocol): Internet Protocol, which mainly provides the role of Internet interconnection.

TCP (Transmission Control Protocol, Transmission Control Protocol) is a connection-oriented agreement that must be connected to the other before sending and receiving data. UDP (User data Protocol, Subscriber Datagram Protocol) is a protocol that corresponds to TCP, it is a connectionless protocol, does not establish a connection to the other side, but sends the packet to the past directly.


17, Link layer broadcast and IP broadcast what is the difference

The link layer broadcast is to broadcast the MAC frame of all the hosts on the LAN by the Data Link layer Protocol (the second layer) on an Ethernet.

IP broadcasts are IP datagram broadcasts of all hosts on a network (that is, the destination network), implemented over the Internet using IP protocols.


18. ICMP (Internet Control Message Protocol) Internetwork Protocol

There are two kinds of ICMP message: Error report message and inquiry message.


19, when running ping 127.0.0.1, this IP datagram will be sent to WHO

127.0.0.1 is the loopback address. The host sends the tested IP datagram to the host's ICMP (instead of sending it to the Internet) for loopback testing.


20, the characteristics of the RIP protocol. The advantages and disadvantages of RIP. What the RIP uses to transmit.

1, features

L Exchange information only with neighboring routers

L The information that the router exchanges is all the information known to the current router, that is, its own routing table

L Exchange routing information at a fixed time interval

2. Advantages and Disadvantages

Advantages: Simple to implement and less expensive

Disadvantage: Limits the size of the network (because it can use the maximum distance of 15), bad news spreads slowly.

3, rip with UDP to transmit


21, the characteristics of the OSPF protocol. What the OSPF uses to transmit.

1, features

L Send information to all routers in this autonomous system (while RIP is sent to neighbors)

L The information sent is the link state of all routers adjacent to this router (RIP sends the entire routing table)

L The router sends this information to all routers only when the link state changes (and RIP is updated 30 seconds)

2, OSPF directly with IP datagram transmission


22, switches and routers to achieve the respective principle of what. What's the difference.

Implementation principle:

Routers determine the forwarding of data through routing. Forwarding policies are called routing choices.

The switch is based on MAC address recognition, can complete the packet forwarding data packet function of the network equipment. The switch can "learn" the MAC address and store it in an internal address table, by establishing a temporary exchange path between the initiator of the data frame and the target receiver, so that the data frame is reached at the destination directly from the source address.

Difference:

L The working level of the two is different

The switch works at the data link layer, while the router works at the network layer.

L The objects on which they are forwarded are different

The switch uses the MAC address to determine the destination address of the forwarded data, while the router uses the IP address to determine the address of the data forwarding.


23. If a router is to be connected to both an Ethernet and an ATM network, what kind of hardware will be added to the router

An Ethernet Adapter (NIC) and an ATM adapter (NIC).


24, the main characteristics of TCP

L TCP is a connection-oriented Transport layer protocol

L only two endpoints per TCP connection (one-to-one)

• TCP provides reliable delivery of services

L TCP provides Full-duplex communication

L-oriented Word throttling


25, TCP reliable transmission, flow control and the realization of congestion control

Reliable transmission:

L Give a confirmation response for the request received

L Timeout retransmission

Flow control:

The so-called flow control is to let the sender's sending rate not too fast, so that the receiver in time to receive. The flow control is realized by sliding window.

Congestion Control:

Congestion control is the prevention of excessive data injection into the network, so that routers or links in the network can not overload.

L Slow start

Slow start "Slow" does not mean a slow growth rate, but rather a congestion window that is set to 1 when TCP begins to send a message segment.

• Congestion avoidance

Causes the congestion window to grow according to the linear rule.

L Fast Retransmission

As long as the sender receives three duplicate confirmations in a row, it should immediately retransmit the message segment that the other party has not yet received, without having to wait for the retransmission timer set for it to expire.

L Fast Recovery (used with fast retransmission)

When the sender receives three consecutive acknowledgements, the "multiplication reduction" algorithm is executed and the slow start threshold is halved. This is to prevent network congestion. Note that the slow start algorithm is not performed next.

Since the sender now believes that the network is likely to not be congested (if there is serious congestion on the internet, there will not be a number of consecutive packets to reach the receiver, it will not cause the receiver to send repeated confirmation continuously, so the difference from the slow start is now do not perform the slow start algorithm (that is, the congestion window is now not set to 1), Instead, it is set to a value that is halved by the slow start threshold, and then the congestion avoidance algorithm ("additive increase") is started, causing the congestion window to grow linearly.



26. TCP Transport Connection Management

1, TCP connection established (with three handshake to establish a TCP connection)

Why does a have to send a confirmation again?

This is mainly to prevent the failure of the connection request message segment suddenly sent to B, resulting in errors. It is assumed that an exception occurs when the first connection request message segment issued by A is not lost, but at some network nodes for a long time, so that it is delayed until a certain time after the connection release to reach B. Originally this is a long defunct message segment. However, B receives a contiguous request message segment of this failure and mistakenly considers a new connection request to be issued. A confirmation message is sent to a and a connection is agreed. Assuming that no three handshake is used, the new connection is established as long as B confirms.

Since a does not issue a request to establish a connection, it does not ignore B's confirmation or send data to B. But B thinks the new transport connection has been established and has been waiting for a to send the data. A lot of the resources of B are wasted in vain.

The use of three times to shake hands can prevent the above phenomenon from happening. For example, in just the case, a will not confirm the confirmation to B. B As a result of not receiving confirmation, it is known that a does not require a connection to be established.

2, TCP connection release (four waves)

The application process of L-a releases the message segments to its TCP connection, and stops the TCP connection voluntarily by stopping the data from being sent. A the fin in which the connection releases the header of the segment is set to 1, and its serial number is seq=u, which equals the ordinal of the last byte of the previously transmitted data plus 1. At this point a enters the fin-wait-1 (Terminate wait 1) state, waits for the confirmation of B.

L B receives the connection Release message section to issue the confirmation, the confirmation number is ack=u+1, and this segment's own serial number is V, equal to b the last byte of the transmitted data before the serial number plus 1. Then B enters the close-wait (shutdown wait) state. Thus the connection from A to B is released, at which point the TCP connection is in a semi shutdown state, that is, a has no data to send, but if B sends the data, a still receives it.

L A receives confirmation from B, enters the fin-wait-2 (terminates wait 2) state, waits for the connection which the B sends to release the message segment.

L if B has no data to send to a, the application notifies TCP to release the connection. At this point the B-issue connection releases the message segment must be fin=1. It is assumed that the ordinal number of B is w (some data may be sent back in half off State B). b You must also repeat the confirmation number ack=u+1 that was last sent. b then enters the Last_ack (final confirmation) state, waits for a confirmation.

L A confirmation must be issued after the message segment is released from a connection to B. In the confirmation message section, the ACK is set to 1, the confirmation number is ack=w+1, and its serial number is seq=u+1. Then enter the time-wait (time waiting) state. Note that the TCP connection is now not released. A has to enter the closed state after a time waiting for the timer (time-wait timer) to set the 2MSL.

Why is a in the time-wait state must wait for the 2MSL time.

L to ensure that the last ACK segment sent by a is able to reach B

L Prevents invalid connection request message segments from appearing in this connection.


27, DNS (Domain Name System) domain name systems

1, the working principle of DNS

DNS provides services that are used to convert domain names to IP addresses. Its basic working principle is shown in the following illustration:


2, the work process of DNS

L in the browser input www.qq.com domain name, the operating system will first check their local hosts file whether there is this URL mapping relationship, if there is, first call this IP address mapping, complete the domain name resolution.

If the hosts do not have this domain name mapping, then look for the local DNS parser cache, whether there is this URL mapping relationship, if any, direct return, complete the domain name resolution.

If the hosts do not have the corresponding URL mapping relationship with the local DNS resolver cache, we will first find the preferred DNS server set in the TCP/IP parameters, where we call it the local DNS server, when the server receives the query, if the domain name to query is included in the local Configuration zone resource, Then return the result to the client, complete the domain name resolution, this resolution is authoritative.

L If you want to query the domain name, not by the local DNS server zone resolution, but the server has cached this URL mapping relationship, call this IP address mapping, complete domain name resolution, this resolution is not authoritative.

L If the local DNS server local zone file and cache resolution are invalidated, queries are based on the local DNS server's settings (whether to set up forwarders), and if the forwarding mode is not used, local DNS sends the request to 13 root DNS, and the root DNS server determines the domain name (. com) when it receives the request. Who is authorized to administer and will return an IP that is responsible for the top-level domain server. When the local DNS server receives IP information, it will contact this server responsible for the. com domain. When the server that is responsible for the. com domain receives the request, if it cannot resolve it, it will find a next-level DNS server address (qq.com) to the local DNS server that manages the. com domain. When the local DNS server receives this address, it finds the qq.com domain server, repeats the above action, and queries until the www.qq.com host is found.

L If the forwarding mode is used, this DNS server forwards the request to the first level DNS server, which is parsed by the server above, and the server in the upper level can not resolve it, or find a root DNS or turn the request to the upper superior to cycle. Whether the local DNS server uses forwarding or root hints, the result is returned to the local DNS server, which is then returned to the client.

From the client to the local DNS server is a recursive query, and between DNS servers is an iterative query.


Other knowledge points of computer network

1, the data transmission in the network, transmission layer and above layer of information is unchanged, the change is only two frames, in the LAN with Ethernet frame head package, in the WAN with PPP,ATM,FR, such as the format of the frame head package,

These are implemented by the switches on the network transmission line and have no effect on the upper level data.

2, the hub work in the physical layer, do not carry out collision detection. Ethernet with hubs is logically still a bus network, and a larger LAN is made up of hubs in a collision domain.

3, in the Data Link layer expansion of Ethernet to use the Network Bridge, the network bridge work in the data link layer. When a network bridge receives a frame, it does not forward this frame to all interfaces, but first checks the MAC address of the frame.

Then determine which interface to forward the frame to, or discard it.

4, the Network bridge in the forward frame, do not change the frame of the source address and destination address, the router will change, but in the point-to-point and so on the format is not a MAC address.

5. Ethernet switches work in a full duplex mode at the data link layer.

6, all routers in the Internet, the destination address is a dedicated address of the datagram are not forwarded. The private address is:

10.0.0.0 to 10.255.255.255

172.16.0.0 to 172.31.255.255

192.168.0.0 to 192.168.255.255

7, the MAC layer of FCS inspection scope is the entire Mac frame, IP datagram test and only check the first IP datagram, UDP (TCP) and is the first and the data part of the test together.

8, UDP sent message length is given by the application, TCP needs to be given by the other side of the window value and the current network congestion to determine how many bytes a message segment should contain.

9, whether in the slow start stage or in the congestion avoidance phase, as long as the sender to judge the network congestion (its basis is not received on time to receive confirmation), we should set the slow threshold to the congestion when the sender window value half (but not less than 2). The congestion window is then reset to 1 to perform the slow start algorithm.

Related Article

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.