




已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter five第五章习题38. Convert the IP address whose hexadecimal representation is C22F1582 to dotted decimal notation.(38.如果一个IP地址的十六进制表示C22F1582,请将它转换成点分十进制标记.)Solution:The address is 30.解答:先写成二进制:11000010,0010101111,0001010,10000010所以,它的点分十进制为:3039. A network on the Internet has a subnet mask of . What is the maximum number of hosts it can handle?(39.Interent上一个网络的子网掩码为.请问它最多能够处理多少台主机?)Solution:The mask is 20 bits long, so the network part is 20 bits. The remaining 12bits are for the host, so 4096 host addresses exist. Normally, the host address is 4096-2=4094. Because the first address be used for network and the last one for broadcast. 解答:从子网掩码可知,它还有12位用于作主机号。故它的容量有2的12次方,也即有4096地址。除去全0和全1地址,它最多能够处理4094台主机40. A large number of consecutive IP address are available starting at . Suppose that four organizations, A, B, C, and D, request 4000, 2000, 4000, and 8000 addresses, respectively, and in that order. For each of these, give the first IP address assigned, the last IP address assigned, and the mask in the w.x.y.z/s notation.(40.假定从开始有大量连续的IP地址可以使用.现在4个组织A,B,C和D按照顺序依次申请4000,2000,4000和8000个地址.对于每一个申请,请利用w.x.y.z/s的形式写出所分配的第一个IP地址,以及掩码.) Solution:To start with, all the requests are rounded up to a power of two. The startingaddress, ending address, and mask are as follows: A: 55 written as /20B: 55 written as /21C: 198.16. 47.255 written as /20D: 55 written as /19解答:因为只能是2的整数次方的,故应分别借4096,2048,4096,8192个IP地址。它们分别为2的12次方,2的11次方,2的11次方,2的13次方.故可有如下分配方案:组织首地址末地址w.x.y.z/s的形式A55/20B55/21C55/20D55/191111 1111 1111 1111 1111 0000 0000 0000 128+64+32+16=240 1111 1000 0000 0000 248 1110 0000 0000 0000 224 41. A router has just received the following new IP addresses: /21, /21, /21, and /21. If all of them use the same outgoing line, can they be aggregated? If so, to what? If not, why not?(41.一台路由器刚刚接收到一下新的IP地址:/27,/21,/21和/21.如果所有这些地址都使用同一条输出线路,那么,它们可以被聚集起来吗?如果可以的话,它们被聚集到那个地址上?如果不可以的话,请问为什么?)Solution:They can be aggregated to 57.6.96/19.解答:96=(0110 0000)2104=(0110 0100)2112=(0110 1000)2120=(0110 1110)2可以看出,四个IP地址前19位都是相同的(前面57的8位以及6的8位和后面011这3位,共19位)故得聚合到地址 /19 上。42. The set of IP addresses from to 55 has been aggregated to /17. However, there is a gap of 1024 unassigned addresses from to 55 that are now suddenly assigned to a host using a different outgoing line. Is it now necessary to split up the aggregate address into its constituent blocks, add the new block to the table, and then see if any reaggregation is possible? If not, what can be done instead?(42.从到55之间的IP地址集合已经被聚集到/17.然而,这里有一段空隙地址,即从到55之间的1024个地址还没有被分配.现在这段空隙地址突然要被分配给一台使用不同输出线路的主机.请问是否有必要将聚集地址分割成几块,然后把新的地址块加入到路由表中,再看一看是否可以重新聚集?如果没有必要的话,那该怎么办?)Solution:It is sufficient to add one new table entry: /22 for the new block. If an incoming packet matches both /17 and ./22, the longest one wins. This rule makes it possible to assign a large block to one outgoing line but make an exception for one or more small blocks within its range.解答:没有必要。只要在路由表中添加一项:/22 就可以了。当有一个分组到来时,如果它既匹配/17,又匹配/22,那么它将被发送到掩码位数较大的目标地址,即/22。这样做的好处是使得一个大段的地址能够被指定到一个目标,但又允许其中少量的地址出现例外的情况。43. A router has the following (CIDR) entries in its routing table:Address/maskNext hop/22Interface 0/22Interface 1/23Router 1defaultRouter 2For each of the following IP addresses, what does the router do if a packet with that address arrives?a. (a) 0b. (b) 4c. (c) d. (d) e. (e) 43. 一台路由器的路由表中有以下的(CIDR)表项:地址/掩码下一跳/22接口0/22接口1/23路由器1默认路由器2对于下面的每一个IP地址,请问,如果一个到达分组的目标地址为该IP地址,那么路由器该怎么办?(a)135466310(b)135465714(c)13546522(d)19253407(e)19253567Solution:The packets are routed as follows:(a) Interface 1(b) Interface 0(c) Router 2(d) Router 1解答:(a)0和做与运算得到,故发送给接口1;(b)4和做与运算得到,故发送给接口0;(c)和做与运算得到,故发送给路由器2;(d)和做与运算得到,故发送给路由器1;(e)和做与运算得到,故发送给路由器2。第四章习题17 Sketch the Manchester encoding for the bit stream: 0001110101.(17画出位流0001110101 的曼彻施特编码。)Solution:17. The signal is a square wave with two values, high (H) and low (L). The patternis LHLHLHHLHLHLLHHLLHHL.解答:设H 为高电压,L 为低电压,则曼彻施特编码为LHLHLHHLHLHLLHHLLHHL22.An IP packet to be transmitted by Ethernet is 60 bytes long, including all its headers. If LLC is not in use, is padding needed in the Ethernet frame, and if so, how many bytes?Solution:22. The minimum Ethernet frame is 64 bytes, including both addresses in the Ethernetframe header, the type/length field, and the checksum. Since the headerfields occupy 18 bytes and the packet is 60 bytes, the total frame size is 78bytes, which exceeds the 64-byte minimum. Therefore, no padding is used.24.Some books quote the maximum size of an Ethernet frame as 1518 bytes instead of 1500 bytes. Are they wrong? Explain your answer.(24有些书将以太网帧的最大长度说成是1518 字节,而不是1500 字节,这些书错了吗?请说明你的理由。)Solution:The payload is 1500 bytes, but when the destination address, source address,type/length, and checksum fields are counted too, the total is indeed 1518.解答:没错,以太网帧的最大净荷为 1500 字节,算上目标地址6 字节、源地址6 字节、类型2 字节、校验和4 字节,则为1518 字节。不同的书常可能出现题目中的两种不同的表述,但它们的实质是一样的。42Briefly describe the difference between store-and-forward and cut-through switches.(简略地描述一下存储-转发型交换机和直通型交换机之间的区别。)Solution:A store-and-forward switch stores each incoming frame in its entirety, thenexamines it and forwards it. A cut-through switch starts to forward incomingframes before they have arrived completely. As soon as the destinationaddress is in, the forwarding can begin.解答:存储转发:整个帧完整接收并存储到缓冲区,对整个帧进行差错检验,然后再查表找出目的端口并转发。优点是进行差错校验,错误不会扩散到目的网段,缺点是交换延迟比较大。直通式:因为转发仅依赖于目的地址目标地址,所以只要收到帧的前6 个字节(目标地址字段),就可查表找出目的端口并转发。优点是交换延迟小,缺点是无法进行差错校验,帧错误会扩散到目的网段。43Store-and-forward switches have an advantage over cut-through switches with respect to damaged frames. Explain what it is.(从损坏帧的角度而言,存储-转发型交换机比起直通型交换机更有优势。请说明这种优势是什么。)Solution:43. Store-and-forward switches store entire frames before forwarding them. After a frame comes in, the checksum can be verified. If the frame is damaged, it is discarded immediately. With cut=through, damaged f
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 打造书香家庭课件结语
- 慢性肠炎的护理
- 慢性咳嗽知识课件
- 情系你我安全大家培训课件
- 陕建入职考试真题及答案
- 恶性心律失常护理查房
- 医院专业考试题目及答案
- 急救知识培训结构化课件
- 刑事诉法学考试题及答案
- 养老护理员考试题及答案
- 2024-2025学年广东省汕头市金平区七年级(下)期末数学试卷
- 景区拥挤踩踏知识培训课件
- Ⅲ类射线装置辐射工作人员培训考试题(附答案)
- 居家养老安全培训内容
- 素描不锈钢茶壶画法课件
- 2025-2026学年人教版(2024)初中体育与健康七年级全一册教学计划及进度表(第一学期)
- 2025-2026学年济南版(2024)初中生物八年级上册教学计划及进度表
- “一带一路”倡议下的企业出海战略研究
- 辽宁沈阳地铁有限公司所属公司招聘笔试题库完整参考答案详解
- 2025年教科版新教材科学三年级上册教学计划(含进度表)
- 军队骨干岗位申请书
评论
0/150
提交评论