Computer software engineers to test network level

 计算机网络的测试题目题目非常多,408就是非常好的资料,其次我觉的软件工程师应聘,别人面试经验的一些题目也很能够体现计算机网络水平。所以主要选取这两方面

Part I: Multiple Choice

1 . (408, 2011) 33. Network layer TCP / IP Reference Model is provided

A. Connectionless unreliable datagram service

C. There service virtual circuit connection unreliable

B. Connectionless reliable datagram service

D. Reliable virtual circuit connection service

Answer: A. TCP / IP network layer up only provide simple, flexible, connectionless, best effort delivery of the datagram service. 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 . (408, 2011) a network topology as shown below, only the route to the subnet router R1 to 192.168.1.0/24. For the IP packet R1 may be correctly routed to all subnets in FIG, then R1 is a need to increase the route (the destination network, subnet mask, next hop) is

A.192.168.2.0 255.255.255.128 192.168.1.1

B.192.168.2.0 255.255.255.0 192.168.1.1

C.192.168.2.0 255.255.255.128 192.168.1.2

D.192.168.2.0 255.255.255.0 192.168.1.2

Answer: D. This problem mainly on the route aggregation. For R1 can correctly route the packet to all subnets, the need to route R1 and 192.168.2.128/25 of 192.168.2.0/25. 24 observed before the number of network and network 192.168.2.0/25 192.168.2.128/25 are the same, so can be grouped into super-network 192.168.2.0/24. As can be seen from the figure should be the next hop address 192.168.1.2.

3 . (408, 2011) Host A B transmits to the host a (SYN = 1, seq = 11220 ) of the TCP segments, the desired host B to establish a TCP connection, if the host B accepts the connection request, the host B sends the host A the correct TCP segment may be

A.(SYN=0,ACK=0,seq=11221,ack=11221)

B.(SYN=1,ACK=1,seq=11220,ack=11220)

C. (SYN = 1, ACK = 1, SEQ = 11221, ack = 11221)

D. (SYN = 0, ACK = 0, seq = 11220, ack = 11220)

Answer: C. Host B receives the connection request packet, such as to permit connection, it sends an acknowledgment to A. In the acknowledgment segment should SYN bit and ACK bits are set, the TCP acknowledgment number of the initial segment A transmission sequence number seq = 11220 plus 1, i.e. ack = 11221, but also select and consume an initial sequence number seq , seq b value is determined by the host's TCP process, taking this problem seq = 11221 and acknowledgment number, segment number a request without any relationship.

The second part of the Short answer:

4 . Process (interview questions) TCP three-way handshake links established need, and why?

Answers : Why can not two-way handshake?

If only two-way handshake to establish a connection, when there is network congestion or other circumstances, to establish a connection packet loss clinet sent, but after the loss of packets and sent to clinet, this time server will establish a connection with clinet, and this connection is not what we expected (because of the client by the retransmission mechanism, this connection may be long over, or have been re-established). In this case clinet waited in vain for the arrival of data, resulting in a waste of resources. Examples of three-way handshake:

A: "Hey, you hear me?" A-> SYN_SEND

B: "? I hear it, you hear me now" response to the request also issued B-> SYN_RCVD | A-> ESTABLISHED

A: "I can hear you, today balabala ......" B-> ESTABLISHED

5 . (Interview questions) in the TCP link, there is a state of time_wait, the state can delete it? why?

Reference answer : Imagine, what if there is no time_wait state will occur?

It will have two problems

1. If the client sends the ACK, does not receive server, server retransmits this time, ensure that the connection can be disconnected

2. The cause channeling chain, data reception chaos

Part III: comprehensive title

6 . (408, 2011) (9 minutes) the MAC address of a host of 00-15-C5-C1-5E-28, IP address 10.2.128.100 (private address). FIG title 6-a is a network topology, FIG. 6-b is a problem before the host requests a Web Ethernet data frame 80 byte hexadecimal and ASCII code content.

6-a of FIG.


6-b in FIG.

Data refer to the diagram to answer the following questions.

What IP address (1) Web server is? What MAC address of the default gateway of the host is?

(2) When the host issues the data frame structure of FIG. 6-b, what protocol to use to determine the destination MAC address? What encapsulates the protocol request packet destination MAC address of the Ethernet frame is?

(3) assuming HTTP / 1.1 protocol to a non-pipelined manner sustained work, a request - response time RTT, rfc.html page references five small JPEG images sent from the title 6-b in FIG Web requests to start Until the browser receives the entire contents, the number of RTT need?

(4) of the frame the encapsulated IP packet passes through a router R forwarding, which modify the IP packet header fields?

NOTE: Ethernet data frame structure of an IP packet header and the structure of the title, respectively, as in FIG. 6-c, 6-d shown in FIG title.
6-c in FIG.

6-d in FIG.

Answers

(1)64.170.98.32 00-21-27-21-51-ee 以太网帧头部 6+6+2=14 字节,IP 数据报首部目的 IP 地址字段前有 4*4=16 字节,从以 太网数据帧第一字节开始数 14+16=30 字节,得目的 IP 地址 40 aa 62 20(十六进制),转换 为十进制得 64.170.98.32。以太网帧的前六字节 00-21-27-21-51-ee 是目的 MAC 地址,本 题中即为主机的默认网关 10.2.128.1 端口的 MAC 地址。

(2)ARP FF-FF-FF-FF-FF-FF

ARP 协议解决 IP 地址到 MAC 地址的映射问题。主机的 ARP 进程在本以太网以广播的形 式发送 ARP 请求分组, 在以太网上广播时, 以太网帧的目的地址为全 1 , 即 FF-FF -FF-FF-FF-FF。

(3)6

HTTP/1.1 协议以持续的非流水线方式工作时,服务器在发送响应后仍然在一段时间内 保持这段连接,客户机在收到前一个响应后才能发送下一个请求。第一个 RTT 用于请求 web 页面,客户机收到第一个请求的响应后(还有五个请求未发送),每访问一次对象就用去一个 RTT。故共 1+5=6 个 RTT 后浏览器收到全部内容。

(4)

源 IP 地址 0a 02 80 64 改为 65 0c 7b 0f

生存时间(TTL)减 1

校验和字段重新计算

私有地址和 Internet 上的主机通信时,须有 NAT 路由器进行网络地址转换,把 IP 数据 报的源 IP 地址(本题为私有地址 10.2.128.100)转换为 NAT 路由器的一个全球 IP 地址(本题 为 101.12.123.15)。因此,源 IP 地址字段 0a 02 80 64 变为 65 0c 7b 0f。IP 数据报每经 过一个路由器,生存时间 TTL 值就减 1,并重新计算首部校验和。若 IP 分组的长度超过输 出链路的 MTU,则总长度字段、标志字段、片偏移字段也要发生变化。

注意,图 6-b 中每行前 4bit 是数据帧的字节计数,不属于以太网数据帧的内容。

7(408 2015) 某网络拓扑如题7图所示,其中路由器内网接口、DHCP服务器、WWW服务器与主机1均采用静 态 地址配置,相关地址信息见图中标注;主机2~主机N通过DHCP服务器动态获取IP地址等配置信息。

请回答下列问题。

(1)DHCP服务器可为主机2~主机N动态分配IP地址的最大范围是什么?主机2使用DHCP协议获取IP地址的 过程中,发送的封装DHCP Discover报文的IP分组的源IP地址和目的IP地址分别是什么?

(2)若主机2的ARP表为空,则该主机访问Internet时,发出的第一个以太网帧的目的M&C地址是什么?封装 主机2发往Internet的IP分组的以太网帧的目的MAC地址是什么?

(3)若主机1的子网掩码和默认网关分别配置为255.255.255.0和111.123.15.2,则该主机是否能访问WWW服 务器?是否能访问Internet?请说明理由。

参考答案

(1)DHCP服务器可为主机2~主机N动态分配IP地址的最大范围是:111.123.15.5~111.123.15.254;主机2 发送的封装DHCPDiscover报文的IP分组的源IP地址和目的IP地址分别是0.0.0.0和255.255.255.255。

(2)主机2发出的第一个以太网帧的目的MAC地址是ff-ff-ff-ff-ff-ff;封装主机2发往Internet的IP分组的以太 网帧的目的MAC地址是00-al-al-al-al-al。

(3)主机1能访问WWW服务器,但不能访问Internet。由于主机1的子网掩码配置正确而默认网关IP地址被 错误地配置为111.123.15.2(正确IP地址是111.123.15.1),所以主机1可以访问在同一个子网内的WWW服务器, 但当主机1访问Internet时,生机1发出的IP分组会被路由到错误的默认网关(111.123.15.2),从而无法到达目的主 机。

Guess you like

Origin www.cnblogs.com/HMYaa/p/12169369.html