欢迎使用CSDN-markdown编辑器

来源:互联网 发布:华讯网络系统有限公司 编辑:程序博客网 时间:2024/04/29 06:28

Computer Network — FAQ

链路层上的MTU为何而存在?

MTU 全名叫 maximum transmission rate ,是链路层上的最大的 frame 的大小, 例如以太网的 MTU 的典型值为 1500IP 层要根据这个值来对将要传输的数据进行分段。
MTU 之所以存在,是因为一条链路上可能会传输两类数据。一类是 bulk data ,这类数据量大,但是没有时间的限制;另一类是 interactive data ,这类数据一般有一个明显的时延要求。假设某个时刻 interactive data 数据到来的时候,链路层正好开始传输一个数据包,如果没有 MTU ,我们可以把数据包设置的很大,比如(1500000000)。这样,为了传输这个interactive data, 它就要等待这个巨型数据包传输完成,但是这个包太大了,交互的数据包要等很久很久才能传输出去,造成不能接收的时延,如果能够把数据包大小限制住,如限制到1500,那么interactive data的时延要求就有了保证。
MTU 的大小是由链路的传输速度决定的,假设人可容忍的实验不超过 t ms,那么传输速度 c 越快,根据MTU = t * c, MTU也就越大。

what happen if ARP to a nonexistent host ?

in order to send a IP datagram to next-hop, a host needs to know what the next-hop’s hardware address is. a host obtain the hardware address by broadcasting a arp-request specifying the corresponding IP address, the target next-hop reply with its hardware address.
if the next-hop does not exist, the host simply keep retry until upper layer give up.

what are the source IP in arp-requests used for ?

It seems that in order to request a hardware address, the reply should only know senders’ hardware address, and it makes no sense to include the source IP address in the request.
Source IP is used to update the arp cache . when a host receive a arp-request , it update the arp-cache using the (source hardware address, source IP address) pair to update the cache entry.

check sum in different layer

IP layer only checks the correctness for the IP header, it is up to the upper layer for the whole packet’s correctness. For example, ICMP provide the checksum field for the whole ICMP datagram.

how does host response to ICMP error message

a ICMP error message is used by many upper layer protocol and even user application. some to notice are:

  • network unreachable (section 9.3)
  • host unreachable(section 9.3)
  • port unreachable(section 6.5)
  • source route failed(section 8.5)
  • network unreachable for TOS(section 9.3)
  • host unreachable for TOS(section 9.3)
  • time-to-live equals 0 during transit(Traceroute, Chapter 8)
  • time-to-live 0 during reassembly(section 11.5)
0 0
原创粉丝点击