[Computer Network] Computer Network interview questions Series 1

Source: Internet
Author: User
Tags file transfer protocol

[Computer Network] Computer Network interview series 1. OSI (Open System Interconnect): Open System Interconnection, which is a layer-7 Computer Network Model: physical Layer, data link layer, network layer, transmission layer, Session Layer, presentation layer, and application layer. TCP/IP (Transmission Control Protocol/Internet Protocol): Transmission Control Protocol/Internet Protocol, which is a four-layer computer network model: network Interface Layer, network layer, transmission layer, and application layer. The combination of OSI and TCP/IP generates a layer-5 structure: physical layer, data link layer, network layer, transmission layer, and application layer. Internet is the TCP/IP protocol 2. The hub works on the OSI model's physical layer Nic works on the OSI model's physical layer ??? Nic MAC Sub-layer bridges and switches work at the physical layer and data link layer routers work at the data link layer Most gateways work at the OSI Model Application Layer 3. Machine A's IP address is 202.96.128.130, if the subnet mask is 255.255.255.128, the IP address's network number is 202.96.128 (using the IP address and subnet mask), and the host number is 130. 4. ARP is an Address Resolution Protocol. A simple language explains how ARP works. Conversion from an IP address to a MAC address 1) First, each host creates an ARP list in its ARP buffer to indicate the correspondence between the IP address and the MAC address. 2) When the source host needs to send data, first check whether there is a MAC address of the target host with the corresponding IP address in the ARP list. If yes, the data is sent directly. If no, sends an ARP packet to all hosts in this section. The packet includes the IP address of the source host, MAC address of the source host, and IP address of the target host. 3) When all hosts in the network receive the ARP packet, first check whether the IP address in the packet is its own IP address. If not, ignore the packet. If yes, the IP address and MAC address of the source host are first retrieved from the data packet and written to the ARP list. If yes, the IP address is overwritten, then, write your MAC address into the ARP response packet and tell the source host that it is the MAC address it wants. 4) after the host receives the ARP response packet. Write the IP address and MAC address of the target host to the ARP list and use this information to send data. If the source host has not received the ARP response packet, ARP query fails. Broadcast sends ARP requests and unicast sends ARP responses. 5. the DNS (Domain Name System) Domain Name System briefly describes its working principle. When a DNS client needs to use a name in a program, it queries the DNS server to resolve the name. Each query message sent by the client includes three items: the specified DNS domain name, the specified Query type, and the specified category of the DNS domain name. Based on the UDP Service, port 53. This application is generally not used directly for users, but for other applications, such as HTTP and SMTP, in which the conversion from host name to IP address is required. 6. What is the difference between TCP and UDP? TCP provides connection-oriented and reliable data stream transmission, while UDP provides non-connection-oriented and unreliable data stream transmission. The unit of TCP transmission is called the TCP packet segment, and the unit of UDP transmission is called the user datagram. TCP focuses on data security and UDP data transmission is fast, because there is no need to wait for a connection and many operations are missing, but its security is average. The UDP program structure is simpler than the stream mode and the datagram mode based on the requirements for system resources (more TCP, less UDP) for connection and no connection. TCP ensures data correctness, and UDP may cause packet loss, TCP ensures data order, But UDP does not. 7. What is the role of the Gateway? A gateway is a computer system or device that acts as a conversion task. The gateway is a translator between two systems that use different communication protocols, data formats, languages, and even completely different architectures. Unlike the Net Bridge, the gateway repacks the received information to meet the needs of the target system. At the same time, the gateway can also provide filtering and security. the IP address of the gateway is the IP address of the device with the routing function, the devices with routing functions include routers, servers with routing protocols enabled (essentially equivalent to a vro), and proxy servers (also equivalent to a vro ). 8. What is the role of ipconfig? Displays the current TCP/IP configuration. 9. What is the result returned by running net share? Lists information about shared resources. 10. What does net use and net user mean?. Net user is used to manage users, such as adding or deleting network users. Net use is used to manage network devices. 11. How can I view the services opened by the current system? Run the net services Command at the command prompt. In Windows, is the net start12 command used to list some other commands except the above? Taskkill: Used to end at least one process tasklist: used to display all processes running on a local or remote computer. net view: displays the computer list. netstat: displays connections, route tables, and network interface information. telnet: remote Login 13. What will happen when the following services are disabled? Disable Automatic Updates: Plug and Play: cannot be automatically updated. This will cause USB to be unable to use Remote Registry Service: Remote users cannot modify the Registry settings on the Computer Browser: the latest list of computers on the network and the programs that provide this list to the request are not maintained. 14. Port and corresponding service? A: Service port number service port number FTP21SSH22telnet23SMTP25Domain (Domain Name Server) 53HTTP80POP3110NTP (Network Time Protocol) 123 MySQL Database Service 3306 Shell or cmd514POP-2109SQL Server1433SNMP15, ICMP protocol? ICMP is an Internet Control Message Protocol that controls packets over the Internet. It is a sub-Protocol of the TCP/IP protocol family. It is used to transmit control messages between IP hosts and routers. A Control Message refers to a message of the network itself, such as network connectivity, host accessibility, and vro availability. Although these control messages do not transmit user data, they play an important role in transferring user data. There are two types of ICMP packets: Error Report and inquiry message. 16. TFTP protocol? Trivial File Transfer Protocol is a Protocol used in the TCP/IP Protocol family to transmit simple files between the client and the server. It provides File Transfer services that are not complex and costly. 17. HTTP? HTTP Hypertext Transfer Protocol (Hypertext Transfer Protocol) is an object-oriented protocol at the application layer. It is suitable for Distributed hypermedia information systems due to its simple and fast method. 18. DHCP protocol? The Dynamic Host Configuration Protocol allows the system to connect to the network and obtain the required configuration parameters. 19. What is the main role of IP Protocol definition on which layer? What about TCP and UDP? The IP protocol is a network-layer protocol designed for communication between connected computers. It implements the automatic routing function, that is, the automatic routing function. TCP is a transport layer protocol that shields the unreliable transmission of the IP protocol and provides a connection-oriented and reliable point-to-point data transmission. TCP is more reliable and secure. UDP is also a transport layer protocol that provides non-connection-oriented and unreliable data transmission. This is mainly because some applications require faster data transmission, for example, most files in a LAN are transmitted over UDP. UDP has a higher transmission rate and lower overhead. 20. What are the implementation principles of vswitches and vrouters? At which level is the implementation implemented? A vswitch is used in a LAN to transmit data using the MAC address of the host. It does not need to care about the IP address in the IP data packet. It works on the data link layer. The router identifies the network through the network number of the IP address in the IP packet. To ensure the correctness of the packet routing, each network must have a unique network number. The router uses the IP address of the IP packet to route the route (the next hop router to which the packet is submitted ). The router works at the network layer. Due to the current development of devices, many devices now have both switching and routing functions, and their boundaries are becoming increasingly blurred. 21. What IP addresses are reserved on the Internet for internal use? 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.25522 and ipconfig/all are used to view the applied local IP address ipconfig/release. ipconfig/renew is used to release IP addresses and apply for IP addresses from DHCP servers. 23. ADSL uses the multiplexing technology for frequency division. 24. The function of a bridge. A bridge is a bridge between a LAN and another LAN. 25. What is firewall port protection? Firewall port switch is used to disable some non-essential ports to achieve certain security protection. 26. IP packet format? What is the format of TCP and UDP datagram? And common header fields? 1) An IP datagram consists of the header and data. The header consists of a fixed part and an optional part. The fixed part of the header is 20 bytes. The length of the optional part ranges from 1 to 40 bytes. Fixed fields: number of characters in the field name (bit) number of digits in the field name version 4 Ipv4 header length 4 (representing a maximum of 15 units, one unit representing 4 bytes) service type 8 previously seldom used a total length of 16 (the total length of the first part and the data part, so the maximum length of a datagram is 65535 bytes, that is, 64 KB, however, since MAC on the link layer has a certain maximum transmission unit, the length of IP datagram is generally not as large as that in theory. If it exceeds the maximum unit of MAC, it will be split) id 16 (the same ID enables the part-based datagram to be correctly reloaded into the original datagram) mark 3 (the forward-bit MF = 1 indicates that there are parts later, MF = 0 indicates that this is the last intermediate bit DF = 0 of several datagram slices.) The part offset specifies that a long group is located after the part, the relative position of a piece in the original group is an 8-byte offset. The survival time of the datagram in the network, the maximum number of hops transmitted through the vro 8 protocol (indicating the protocol of the data carried by the datagram, so that the IP layer of the target host knows the data For example, ICMP = 1 IGMP = 2 TCP = 6 EGP = 8 IGP = 9 UDP = 17 Ipv6 = 41 OSPF = 89 first checksum this part only verifies first, excluding the data part, the calculation method is as follows: divide the first part into multiple 16-bit parts, then obtain the inverse of each 16-bit part, calculate the sum, and then put the inverse and put the sum into the first checksum. After receiving the message, the receiver divides the information according to the same method, such as inverse, sum, and inverse. If the result is zero, the receiver discards the source address 32 Destination Address 32 2) a tcp packet segment consists of the header and data. The header consists of a fixed part and an option part, and the fixed part is 20 bytes. The maximum length of the TCP header is 60. Header fixed part field: field name Byte Source Port 2 Destination Port 2 serial number 4 Confirmation 4, is the first byte of the data expected to receive the next packet segment of the other party's serial number data offset 4 bit indicates the starting point of the TCP packet segment data is far from the starting point of the TCP packet segment to retain 6 bit emergency bit check that bitack is only valid when ACK is set to 1, the validation number field effectively pushes the bit reset Bit Synchronization bit termination bit window 2 test and 2 (including the first part and the data part, and also adds the 12-byte pseudo header for verification and calculation) variable Option Length (range: 1 -- 40) 12-byte pseudo header of TCP: source IP address (4) Destination IP address (4) 0 (1) 6 (1) indicates this is TCP, IP protocol mentioned TCP length (2) 3) User Datagram UDP consists of the header and data part. The header contains 8 bytes and consists of 4 fields. Each field is two bytes. Field name byte field name byte Source Port 2 Destination Port 2 length 2 test and 2 (check header and data, add 12-byte pseudo header) UDP 12-byte pseudo header: source IP address (4) the destination IP address (4) 0 (1) 17 (1) represents UDP, And the UDP length (2) is mentioned in the IP protocol) 27. What are the characteristics of connection-oriented and non-connection-oriented services? Connection-oriented services. Before communication, both parties must establish a complete channel for communication. During the communication process, the entire connection can be monitored and managed in real time. For non-connection-oriented services, you do not need to establish a connection with two communication nodes in advance. When communication is required, the sending node can send information to the network, information is automatically transmitted over the network, which is generally not monitored during transmission. 28. What is the three-way handshake process of Destination Address Source Address type data FCS29 and TCP in the format of Ethernet frames? Why do I use a three-way handshake? Can I use a two-way handshake? The client server mode is used to establish A connection. Assume that host A is the client and host B is the server. 1) TCP three-way handshake process: host A sends A connection request to host B, host B confirms the received packet segment of host A, and host A confirms host B again. 2) The three-way handshake is used to prevent the invalid Connection Request Message segment from being suddenly transmitted to host B, thus generating an error. Invalid Connection Request Message segment means that the connection request sent by host A has not been confirmed by host B, so after A period of time, host A re-sends A connection request to host B, data transmission is completed in sequence. In this special case, the connection request sent by host A for the first time is not lost, but is delayed to reach host B Due to network nodes. Host B considers it A new connection initiated by host, therefore, host B agrees to the connection and sends the confirmation to host A. However, host A does not care at this time, and host B has been waiting for host A to send data, resulting in A waste of resources on host B. 3) The two handshakes fail because of the special circumstances of the actual connection request described above. 30. What is the comparison between circuit switching and packet switching? Circuit Switching: both the Public Telephone Network (PSTN) and the mobile network (including GSM and CDMA) Adopt the circuit switching technology. Its basic feature is to adopt connection-oriented methods, before communication between the two parties, a communication circuit with fixed bandwidth needs to be allocated to both parties. The communication parties will occupy the allocated resources until the communication ends, related Signaling Protocols must be used during circuit establishment and release. The advantage of this method is that in the communication process, sufficient bandwidth can be provided for the user, and the real-time performance is strong, the latency is small, and the switching device cost is low, however, the disadvantage is that the network bandwidth utilization is not high. Once the circuit is established, no matter whether the communication parties are in the call status, the allocated circuit is always occupied. Connection establishment-data transmission-release link message exchange: Packet Exchange is similar to group exchange, and also uses the storage and forwarding mechanism. However, Packet Exchange uses packets as transmission units. Due to the large difference in packet length, long packets may cause great latency, and it is difficult to allocate the buffer for each node. In order to meet the needs of various long packets and achieve high efficiency, the node needs to allocate a buffer of different sizes. Otherwise, data transmission may fail. In practical applications, Packet Exchange is mainly used for communication services with short transmission packets and low real-time requirements, such as public telegraph networks and packet exchange groups, packet Exchange divides packets into groups for Transmission Based on Packet Exchange, balancing transmission latency and transmission efficiency. Another drawback is that when an error occurs, the entire message will be re-transmitted. Group switching: the circuit switching technology is mainly applicable to businesses related to voice transmission. This network switching method has great limitations for data businesses. First, data communication has a strong burstable nature. The peak bit rate and the average bit rate differ greatly. If circuit switching technology is used, allocating circuit bandwidth based on the Peak bit rate will cause a great waste of resources, if the bandwidth is allocated at the average bit rate, a large amount of data will be lost. Compared with the voice service, the data service has no strict requirements on latency, but must be transmitted without errors, however, voice signals may be distorted but real-time. The group exchange technology is a kind of exchange method based on the characteristics of data communication services. Its basic feature is to adopt the storage forwarding Method for connectionless services, divide the data to be transmitted into many small pieces of data according to a certain length, and add the corresponding header fields before the data for functions such as data routing and verification, as the basic unit of data transmission, that is, grouping. Using the group exchange technology, you do not need to establish a connection before communication. Each node first accepts the Group sent by the previous node and stores it in the buffer zone, then, select an appropriate link based on the address information in the group header and send it to the next node. In this way, the bandwidth can be dynamically allocated based on the user's requirements and network energy. Group switching is more efficient than circuit switching, but has a high latency. Problems brought about by group forwarding: queuing delay and overhead increase.

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.