How to evaluating a software engineer computer network knowledge and network programming skills?

First, the choice

1. TCP / IP network reference model layer is provided (A).

  A. connectionless unreliable datagram service  

  B. connectionless reliable datagram service

  C. There connection is not reliable virtual circuit services  
  D. reliable virtual circuit connecting service
  to resolve: the network layer up TCP / IP only provide simple, flexible, connectionless datagram service to do its utmost to deliver. Further investigation IP header, if it is connection-oriented, there should be a field for establishing a connection, but does not; if reliable service, and should have at least two fields and the check number, but not the IP packet header ( IP header checksum and only the header). Thus the network layer provides an unreliable connectionless data services. Reliable connection service provided by the TCP transport layer.

2. Complete path selection function of the OSI model (C)
  A, a physical layer B, and they link layer      
  C, the network layer D, the transport layer

  Analysis: The main functions of the physical layer are: data link layer provides the physical connection, transparent transmission of the bitstream using a transmission medium. The main function is the data link layer: a variety of control protocols, the physical channel errors become error-free, reliable data link capable of transmitting the data frame. The main function of the network layer are: The routing algorithm to select the most appropriate path for the packets or packet through subnetworks. Transport layer functions are: to provide a reliable end-user error and flow control to ensure the correct transmission of packets.

3. PDU addresses of the Ethernet switch forwarding decision is _______. [408]
A. The purpose physical address B. Destination IP address
C. Source physical address D. Source IP address

Analysis: works examine the switch.
Switch is essentially a multi-port bridge works at the data link layer, a data link layer using a physical address for forwarding, the forwarding port is usually determined according to the destination address.

4. The following network device, it is possible to suppress the broadcast storm is ______. [408]
Ⅰ repeater hub Ⅱ Ⅲ Ⅳ bridge router
A. Only Ⅰ and Ⅱ B. Only Ⅲ
C. Only Ⅲ and Ⅳ D. Only Ⅳ,

Analysis: test network equipment and network storm.
The physical layer repeater devices and hubs are neither isolated nor broadcast domain collision domain; bridge collision domains may be isolated, but without isolation broadcast domains; router in the network layer both collision domain isolation, but also a broadcast domain; i.e., the VLAN Virtual LAN It may also be isolated broadcast domain. For non-isolated broadcast domains equipment, interconnection of different networks they belong to the same broadcast domain, thus expanding the scope of broadcast domains, more prone to network storm.

5. The maximum number of hosts in a subnet 192.168.4.0/30, the destination address is capable of receiving the IP packet is 192.168.4.3 (C).
  A. 0

  B.1

  C.2

  D. 4
Analysis: First, this analysis 192.168.4.0/30 network. Two accounting host number, the address range 192.168.4.0/30~ 192.168.4.3/30, which can accommodate (4-2 = 2) hosts. Host bits are all 1, that is 192.168.4.3, the broadcast address, all hosts within the network can be received, so choose C.

6. tcp three-way handshake which takes place between two api calls (B)

  Between A. accept and listen

  Between B. accept and connect

  Between C.bind and accept

  Between D. bind and listen

Parsing: A option to accept and listen belong to the same server socket end of api used to initialize the server-side socket, while the three-way handshake occurs between the server and the client, obviously wrong. C, D option empathy

Second, the short answer questions

1. What is the difference between port and socket socket is?

Analysis: a socket comprising a port, because the socket = (IP address, port number). A socket is an endpoint of the TCP connection.

On the other hand, is also a socket socket API of the operating system. In this case, the socket can be seen as an abstract operating system, can also be seen as a file descriptor. The port, is an application layer service code, which is used to identify the application process layer.

Three-way handshake mechanism of the process outlined 2.TCP. Why three times instead of twice?

Analysis: Process TCP three-way handshake:

  1. The first handshake: client sends a server SYN = 1 indicates that the data packet requesting a connection, the initial sequence number (Sequence Number) field is X. At this time, the client side is SYN-SENT state.

  2. Second handshake: server transmits ACK = 1, SYN = 1 packet to confirm a connection request. ack sequence number X + 1, the sequence number field is set to Y. At this time, in the server SYN-RECEIVED state.

  3. Third handshake: client sends packets ACK = 1 represents the final confirmation to the server. ack sequence number Y + 1, with sequence number X + 1. So far the two sides were involved in the ESTABLISHED state, bringing the connection is successfully established.

  Three-way handshake is because we need to work on TCP unreliable channel. Consider two handshakes: assume that the first client sends a SYN stranded in the network, the client therefore retransmitted SYN and establish a connection until the release. At this time, the residence of the first SYN has finally arrived, according to the rules twice handshake, the server directly into the ESTABLISHEDstate, at a time when the client did not initiate a new connection, the server will not bother to send a message, wasted Service resource side. In fact, as long as the channel is not reliable, the two sides have no way to confirm that they never knew they were going to enter the connected state. Such as three-way handshake, the last ACK If you lose, then only the client into a connected state. Four, five, how many handshakes have a similar problem, in fact, three times a theoretical and practical trade-offs.

Third, the comprehensive title

1. A company network topology as shown below, the router R1 via the interface E1, E2 are connected to the LAN 1, LAN 2 is connected via an interface L0 router R2, and R2 is connected via a router to the Internet domain name server. R1 IP address of the interface L0 is 202.118.2.1; IP address R2 of the interface L0 is 202.118.2.2, IP address L1 of the interface is 130.11.120.1, IP address of the E0 interface is 202.118.3.1; IP address of the DNS server is 202.118.3.2.

R1 and R2 routing table structure is:

(1) the IP address of 202.118.1.0/24 is divided into two sub spaces, allocated to the LAN 1, LAN 2, the number of IP addresses allocated to each LAN is not less than 120. Please give subnetting result, the reasons or give the necessary calculations.

(2) Give R1 routing table to make it clear to the local area, including Route 1 and Route 2 LAN routing, routing host domain name server and the Internet.

(3) Please polymerization technique using route, route R2 is given to the LAN 1 and LAN 2.

Resolution:

(1)

Core classless IP address is to use variable length network number and host number, and to indicate (i.e., the network number part 1, the host part is zero) by the appropriate subnet mask. This problem is in the network 24 address bits, since the rules for IP addresses, each network has two addresses are not assigned; host whole number 0 indicates the network address, host number 1 indicates the whole broadcast address. Thus the host can host number 8 indicates the number is 2 ^ 8-2 = 254. The network to be divided into two subnets, each host 120 to the host of the number of bits X should satisfy the following two conditions: X <8,2 ^ X> 120. Solve for X = 7.

The subnet mask is 255.255.255.128

LAN 1: 202.118.1.0/25; the effective range of IP addresses 202.118.1.1 ~ 202.118.1.126, the network address is 202.118.1.0, the broadcast address 202.118.1.127.

LAN 2: 202.118.1.128/25; effective IP address range: 202.118.1.129 ~ 202.118.1.254, network address 202.118.1.128, broadcast address 202.118.1.255.

(2)

(3)

Guess you like

Origin www.cnblogs.com/smarxdray/p/12177813.html