---
# System prepended metadata

title: '贏戰區域網路 ─ 2020 期中考古題詳解<br>[![](https://img.shields.io/badge/dynamic/json?color=blue&label=%E7%B8%BD%E8%A7%80%E7%9C%8B%E6%95%B8&query=%24.viewcount&suffix=%E4%BA%BA%E6%AC%A1&url=https%3A%2F%2Fhackmd.io%2FzLoKpsyPT6q_T1lEmHcJig%2Finfo)](https://hackmd.io/MAjWU1W0RRue0yl3HkKGRQ/info) ![](https://img.shields.io/badge/%E5%91%BD%E4%B8%AD%E7%8E%87-0.00%25-green)'
tags: [大四]

---

---
tags: 大四
---
# 贏戰區域網路 ─ 2020 期中考古題詳解<br>[![](https://img.shields.io/badge/dynamic/json?color=blue&label=%E7%B8%BD%E8%A7%80%E7%9C%8B%E6%95%B8&query=%24.viewcount&suffix=%E4%BA%BA%E6%AC%A1&url=https%3A%2F%2Fhackmd.io%2FzLoKpsyPT6q_T1lEmHcJig%2Finfo)](https://hackmd.io/MAjWU1W0RRue0yl3HkKGRQ/info) ![](https://img.shields.io/badge/%E5%91%BD%E4%B8%AD%E7%8E%87-0.00%25-green)

筆記傳送門：https://hackmd.io/@NCHU-CSE-111/r1ABNjFXF

[TOC]

## 2021 考試重點

1. Codomain 說會考 DHCP 取得 IP 的過程
2. Check sum 和 CRC 計算應該會考 (筆記有)
3. [第一次作業](#Homework-1) 4G和5G差別，wifi和5G是否有共存必要性
4. [2019期中試卷 by VJ](https://hackmd.io/omXZRXqJQ7WYat9MA2X3XA)
5. 其他請大家補充

## 2020 期中試卷

大家一起幫忙哦

### True or False

1. As compared with packet switching, circuit switching has better bandwidth usage efficiency. **(F) circuit switching 在沒人時還是只能用固定頻寬有 idle 的情況**

2. With packet forwarding in Internet, both routers and receivers may suffer from buffer space shortage, which may cause packet loss. **(T)<!--應該是對的吧？-->**

3. Using the store-and-forward mechanism, when a packet arrives at a switch, no matter how big is the packet size, all bits of the packet must be received correctly before forwarding the packet. **(T)收完檢查完才會送**

4. Unshielded twisted pairs are of unguided medium type. **(F) 這題應該滿明顯的，雙絞線不是 unguided medium type (非導引式媒介 eg 無線lan or 數位衛星)**

5. Packets sent to the loopback address will pass through the local interface to Internet.  **(F) loopback不會進到網路，會在網路卡就折返**

6. Documents of Internet standards, which are organized by RFCs, are managed by Internet Engineering Research Force (IERF). **(F) Internet Engineering Task Force 應該是 IETF**

*[RFCs]: Requests For Comments

7. In general, the operating management for packet switching is easier than circuit switching. **(T) 電路交換 dial up 的過程挺複雜的<!--所以應該是對的-->**

8. Considering the total nodal delay in a packet transformation, propagation delay depends on the physical medium characteristics and has nothing to do with the packet size. **(T)**

9. Layered approach of network protocol design benefits from the advantage that the functions of current layer can be provided by the services from layer above. **(F)是 current layer 是可以被底下一層(from layer *below*)提供服務**

10. Parallel Transmission used for long distance communication whereas, the Serial Transmission used for shorter distance.**(F)寫反了**

11. Parallel Transmission requires all bits in a byte being sent simultaneously with one bit per channel, not require synchronization.**(T) 去年答案給 True**
    :::spoiler Lan_brief_1.pdf-Page.20
    ![](https://i.imgur.com/syXj76A.png)
    :::

12. VLAN can span over one or more switches and contain broadcast traffic.**(T)**

*[VLAN]: 虛擬區域網路 -- Virtual Local Area Network

13. With MPLS forwarding, when a packet arrives, the router adds the label it advertises for the destination and forwards the packet to the next hop. **(F) 去年給 false <!--原因不明-->**
    > 不是每個 packet 都加，這樣標籤不就爆幹多? 是要針對目的端來加標籤，先檢查，沒有該目的的標籤再加
    > [name=VJ][time=Thu, Nov 11, 2021 7:27 AM]

14. According to the specification of 802.1Q, the length of VLAN ID is 12 bytes. **(F)12bits**
> ![](https://i.imgur.com/8MZvZkV.png)

15. 802.1Q encapsulate 4 bytes header in the front of destination address of the Ethernet header. **(F) 802.1Q adds a 4bytes field between the source MAC address and the EtherType fields of the original frame.**
> ![](https://i.imgur.com/1Mbxvqk.png)

16. With CSMA/CD, when a collision occurs, both participants backoff for a random number of slot time before resending a packet. **(F)**
    :::spoiler Lan_brief_2.pdf-Page16
    ![](https://i.imgur.com/7A3wAre.png)
    :::

17. Ethernet frames must be compensated by the Pad fields, so that the length of a frame must have at least 48 bytes. **(F) 至少要 64 Bytes**

18. DHCP can be used as an effective substitute for RARP **(T) 都是去要IP來用，而且DHCP比較好用**

19. Fast Ethernet has transmission rate 1 Giga bit per second. **(F) 100Mbps**

20. The maximum length in an Ethernet frame guarantees the minimum waiting time for emitting the frame. **(F) Ethernet 沒有保證最小的等待時間，當有封包碰撞時，雙方會等待一個 random 的時間重送，丕中和高北北都有教**

### Answer the following questions briefly.

1. Describe the operation of gratuitous ARP, and state what is the purpose of using gratuitous ARP.
**gratuitous ARP 將sender IP和target IP都設為自己的IP，可以偵測是否有IP衝突，以及更新網路中其他裝置對於此IP的MAC對應表**

2. What fields are included in an Ethernet frame header? There is a minimum length requirement for the payload of Ethernet frames. What to do if a to-be-delivered IP datagram can’t meet the minimum length requirement?

    >+ Preamble: 8bytes
    >+ Destination MAC Address: 6bytes
    >+ Source MAC address: 6bytes
    >+ Type/Length: 2bytes
    >+ CRC: 4bytes 
    >
    >![](https://i.imgur.com/ZL0yADY.png)
    >
    > **Using *Payload* field to compensate the length**

3. What are the two main services provided by interface layer (to Internet layer)?
    1. **Mapping IP addresses to Interface specific addresses**
    2. **Encapsulating IP datagrams for transmission over a specific medium**
    
    
4. What are the full names in English for the following abbreviations:<br>(i) MPLS (ii) RARP (iii) TTL (iv) CRC (v) CSMA/CD
    1. **MPLS: Multi-Protocol Label Switching**
    2. **RARP: Reverse Address Resolution Protocol**
    3. **TTL: Time To Live**
    4. **CRC: Cyclic Redundancy Check**
    5. **CSMA/CD: Carrier Sense Multiple Access with Collision Detection**

*[MPLS]:多協定標籤交換 -- Multi-Protocol Label Switching
*[RARP]:Reverse Address Resolution Protocol
*[TTL]:Time To Live
*[CRC]:Cyclic Redundancy Check
*[CSMA/CD]:Carrier Sense Multiple Access with Collision Detection

### Answer the following questions explicitly.

1. Suppose that the generator function is $x^4+x^2+x+1$ in the application of applying CRC for data integrity check. What is the bit string to be sent if the original message is 1010101001?

    **在要傳送的資料後面填generator function最高次方項的次方數個0(這題是$x^4$所以填4個)，然候用填完的資料(1010101001 0000)除以generator function(10111)，餘數(1110)代換掉一開始填的0，最後結果(1010101001 1110)**
![](https://i.imgur.com/ZeqBylI.jpg =250x)

2. With MPLS, assume there are 4 label switched routers, A,B,C,D, they are connected sequentially, that is, A is connected to B, B is connected to C, and so on, and let the network y is associated with C and the network x is associated with D. In case that the router B has already advertised a label, say 22, for network x. Suppose that a packet without labeling is initially received by the ingress router A and is destined for network x. What is the action taken at router A for this incoming packet? Contiguously, what operation is performed at router B, if router C has not advertised its label for network x? (14 pts)

    1. 因為從非 MPLS 的網路送進來，所以第一部要先為 A 添加 MPLS 標籤 (22*對應的輸入標籤*)
    2. 封包送到 B 後，我就不知道了，應該是跟 C 做交換
        > 在 B 連結 packet 生成的 22 對應輸入標籤後，通知 C 為標籤 22 連結 D 上的輸入標籤記錄起來，(C\)沒有的話就生給它(D)。
        > [name=VJ][time=Thu, Nov 11, 2021 6:06 AM]

![](https://i.imgur.com/OO09L4e.jpg)

> ![](https://i.imgur.com/Rk9mpp8.png =550x)
> [name=VJ][time=Thu, Nov 11, 2021 5:57 AM]

<!--
```graphviz
digraph{
node[shape=box]
packet [style=filled, fillcolor=red]
x,y [style=filled, fillcolor=cyan]
{rank=same;A B C D}{rank=same;packet 22 x y}
packet->A
A->B->C->D
C->y D->x B->22
22->x[style=dashed]
packet->x[style=dashed]
}
```
-->

## Homework #1
1. What are the major changes of the telecommunication mobile network from 4G to 5G? Is the co-existence of WiFi and 5G necessary? Why?

2. Up to 2020, please list 10 most popular (electric) social networks, including when they were released, who invented, and the number of active users recently?


## Homework #2

1. Examine the data format of DHCP message and check what are the addresses filled for the request and response

*[DHCP]:動態主機設定協定 -- Dynamic Host Configuration Protocol

2. Examine the data format of DNS message and check where the DNS server can by deployed?
3. How can an IPv4 device support IPv6 addressing?


## DHCP 取得 IP 方法

1. DHCP discover (client「廣播」尋找DHCP)
2. DHCP offer (DHCP server「廣播」回傳其提供的網址)
3. DHCP request (因為 client 可能會收到 1 台以上 DHCP 所以「廣播」回去再次確認)
4. DHCP ack (DHCP server 「廣播」表示 ok)

![](https://i.imgur.com/hgNeqUT.jpg)

## 縮寫集中串

+ ARP: Address Resolution Protocol (位址解析協定)
+ CIDR: Classless Inter-Domain Routing (無類別域間路由)
+ CRC: Cyclic Redundancy Check (循環冗餘校驗)
+ CSMA/CD: Carrier Sense Multiple Access with Collision Detection (載波偵聽多路存取/碰撞偵測)
+ DHCP: Dynamic Host Configuration Protocol (動態主機設定協定)
+ IP: Internet protocol (網際網路協定)
+ MAC: Media Access Control address (媒體存取控制位址)
+ MPLS: Multi-Protocol Label Switching (多協定標籤交換)
+ RARP: Reverse Address Resolution Protocol (逆位址解析協定)
+ TCP: Transmission Control Protocol 傳輸控制協定
+ TTL: Time To Live (存活時間)

<!-- 太閒我們還有2019 -->

→ [LLCP集中討論串](https://hackmd.io/@NCHU-CSE-111/B14x61TuY)