<style>
.lar {
font-size: 30px;
font-weight: bold;
}
.mid {
font-size: 24px;
}
.sml {
font-size: 18px;
}
</style>
<font class="lar"> 1a.What is the length of IPv4 internet address(in bits)?<br/>IPv4的地址長度為多少?(以bits表示)</font>
<u class="mid"> Ans : 32 bits</u>

<h1>IPv4與IPv6的相異處</h1>
<table border="1">
<tr>
<th>特徵</th>
<th>IPv4</th>
<th>IPv6</th>
</tr>
<tr>
<td>位址長度</td>
<td>32 bits</td>
<td>128 bits</td>
</tr>
<tr>
<td>地址表示</td>
<td>十進制數字表示,例如192.168.1.1</td>
<td>十六進制表示,例如2001:0db8:85a3:0000:0000:8a2e:0370:7334</td>
</tr>
<tr>
<td>地址數量</td>
<td>2^32個可用地址</td>
<td>2^128個可用地址</td>
</tr>
<tr>
<td>IP位址分配</td>
<td>靜態或動態(DHCP)</td>
<td>靜態、自動配置(SLAAC)或動態(DHCPv6)</td>
</tr>
<tr>
<td>區域連結</td>
<td>ARP(Address Resolution Protocol)用於解析MAC地址</td>
<td>NDP(Neighbor Discovery Protocol)用於解析IPv6地址</td>
</tr>
</table>
<font class="lar"> 1b.What is the length of Ethernet MAC address(in bits)?<br/>乙太網路中MAC的地址長度為多少?(以bits表示)</font>
<u class="mid"> Ans : 48 bits<br/></u>

<font class="mid"><b>2. A wireless Wifi router with a single assigned IPv4 address of 140.124.185.123. List the two major network protocols or functions that this router has to provide such that the mobile devices can obtain their temporary IPv4 addresses and surfing the net simultaneously?<br/> 有一台IPv4地址為140.124.185.123的無線wifi路由器,請列出兩個功能或協定,讓連接上裝置取得臨時IPv4地址及多個連線裝置同時上網</b></font>
<font class="mid"><u> Ans : DHCP(動態主機設定協定)、NAT(網路位址轉譯)</u><br/>符合題意的包含:Address Resolution Protocol (ARP)、Domain Name System (DNS)、Internet Control Message Protocol (ICMP)、Quality of Service (QoS)、Port Forwarding</font>
<font class="mid"><b>3.What is the main usage of the TTL(Time To Live) field in the Ipv4 packet?Will this value be changed along with the IP packet transmission from the source node to the destination node?<br/>Ipv4 數據包中的 TTL(Time To Live)字段的主要用途是什麽?這個值是否會隨著 IP 數據包從源節點向目的節點的傳輸而改變?</b></font>
<u class="mid"> Ans : (1) 避免IP packet在網絡中的無限循環和收發<br/>(2) 每經過一個節點(node)就會減1<br/></u>
<font class="mid"><b>4. The network layer functionality can be broadly divided into data plane functionality and control plane funcrtionality. Identify one main function of the data plane and one main function of control plane.<br/>網絡層功能大致可分為數據平面功能和控制平面功能。指出數據平面的一個主要功能和控制平面的一個主要功能</b></font>
<u class="mid"> Ans : data plane:處理資料傳輸,路由器內的傳輸處理<br/>control plane:路由器的路徑規劃<br/></u>
<font class="mid">5. Consider the following two categories of MAC protocols in the broadcast channel <b>channel partitioning protocols</b> and <b>random access protocols</b>.If there is only one node with data to send at any time, which category should we choose to achieve higher network efficiency?<b>State the reason</b></font>
<u class="mid"> Ans : random access protocols. Through this protocols, single node can fully utilize whole channel.<br/></u>
<h1>Channel Partitioning Protocols與Random Access Protocols的相異處</h1>
<table>
<thead>
<tr>
<th>不同處</th>
<th>Channel Partitioning Protocols</th>
<th>Random Access Protocols</th>
</tr>
</thead>
<tbody>
<tr>
<td>通道使用方式</td>
<td>通道被分割為固定部分,每部分分配給特定使用者或用途</td>
<td>通道在任何時間都可以被任何使用者存取</td>
</tr>
<tr>
<td>管理通道的方式</td>
<td>TDMA(時分多址)、FDMA(頻分多址)、CDMA(碼分多址)等</td>
<td>ALOHA、Slotted ALOHA、CSMA(載波感應多址)等</td>
</tr>
<tr>
<td>碰撞處理</td>
<td>無碰撞,每個部分是獨立的,不會發生碰撞</td>
<td>可能會發生碰撞,需要碰撞檢測和處理機制</td>
</tr>
<tr>
<td>效率</td>
<td>可能出現一些時間的閒置,低利用率</td>
<td>更具潛在的碰撞,但可以更有效地利用通道</td>
</tr>
<tr>
<td>協調需求</td>
<td>需要集中式或分散式的協調來分配通道</td>
<td>不需要預先分配通道,每個節點自主地競爭存取</td>
</tr>
</tbody>
</table>
<font class="lar">6. Assume the CRC(Cyclic Redundancy Check) coding scheme is used as the error-detection method. Assume the generator, G = 11001. The data bits to be sent is D = 1011010111. What is the encoded output bit pattern?<br/>假設使用 CRC(循環冗余校驗)編碼方案作為錯誤檢測方法。假設發生器 G = 11001。要發送的數據位為 D = 1011010111。編碼輸出比特模式是什麽?</font>
<span class="mid"> Ans : $10_2$<br/>$11001 \sqrt{10110101110000} \rightarrow0010_2$<br/></span>
<font class="mid"><b>7. Consider a broadcast channel with N nodes and a transmission rate of $R\, bps$Assume that the broadcast channel uses polling(with additional master polling node) for multiple access. The amount of time from when a node completes transmission until the subsequent node is permitted to transmit(polling delay) is $d_{poll}$. Within a polling round, a given node is allowed to transmit at most $L$ bits. What is the maximum throughput (in bps) of the broadcast?<br/>考慮一個有 N 個節點的廣播信道,其傳輸速率為$R\, bps$假設廣播信道使用輪詢(增加主輪詢節點)進行多路訪問。從一個節點完成傳輸到允許下一個節點傳輸的時間(輪詢延遲)為$d_{poll}$。在一輪輪詢中,給定節點最多允許傳輸$L$bits。廣播的最大吞吐量(以 bps 為單位)是多少?</b></font>
<span class="mid"> Ans : $\dfrac{RL}{L+R\times d_{poll}}$<br/></span>
<font class="mid"><b>8. In a switch-based Ethernet LAN, network nodes are connected by a Ethernet switch. Answer the folloing question<br/>a. Which MAC protocol is used in this network?<br/>b. Will there be possible packet collisions?<br/>c. Do we need to configure the switching table of Ethernet switch manually?</b></font>
<span class="mid"> Ans : <br/>1. CSMA/CD<br/>2. YES<br/>3. No need<br/></span>
<font class="mid"><b>9. Use the Dijkstra's link-state algorithm to find the least-cost paths from Node 1 to all other nodes of the folloing graph The number above each link is the associated cost of the link. Show your results step by step</b></font>

<span class="mid"> Ans : <br/></span>
| Steps | N' | D(2),P(2) | D(3),P(3) | D(4),P(4) | D(5),P(5) | D(6),P(6) |
|:-----:|:---------------:|:---------:|:---------:|:---------:|:---------:|:---------:|
| 1 | 1 | 5,1 | 7,1 | 3,1 | **1,1** | $\infty$ |
| 2 | 1,**5** | 5,1 | **2,5** | 3,1 | | 9,5 |
| 3 | 1,5,**3** | 4,3 | | **3,1** | | 6,3 |
| 4 | 1,5,3,**4** | **4,3** | | | | 6,3 |
| 5 | 1,5,3,4,**2** | | | | | **6,3** |
| 6 | 1,5,3,4,2,**6** | | | | | |
---
<h1 class="lar">NAT網路位址轉譯(Network Address Translation)</h1>
<font class="mid">優點:<br/>1. 透過內部設定虛擬私用IP以減少公用IP所需數量。<br/>2. 提供安全防護,不會真實IP位置暴露於網路上。<br/></font>
<font class="mid">缺點:<br/>1. 外部傳輸資料到內部特定IP會因為在外統一使用公用IP導致傳輸有問題,如:ftp</font>
---
<h2 class="lar">BGP 和 OSPF 比較</h2>
<table>
<tr>
<th></th>
<th>BGP</th>
<th>OSPF</th>
</tr>
<tr>
<td>路徑選擇</td>
<td>基於 AS-PATH 和最佳路徑算法</td>
<td>基於成本和最短路徑算法</td>
</tr>
<tr>
<td>擴展性</td>
<td>適用於大型網絡,能處理較多路由器和路由器連接</td>
<td>通常用於中小型網絡,區域內路由器連接</td>
</tr>
<tr>
<td>擴散方式</td>
<td>使用路由器之間的 eBGP 和 iBGP</td>
<td>使用區域內的 LSAs(Link State Advertisements)</td>
</tr>
<tr>
<td>收斂速度</td>
<td>收斂速度較慢,適用於不需要快速變化的路由狀態</td>
<td>收斂速度較快,適用於需要快速變化的網絡</td>
</tr>
<tr>
<td>用途</td>
<td>用於跨越不同自治系統(AS)的路由器之間的路由</td>
<td>用於在同一自治系統(AS)內的路由器之間的路由</td>
</tr>
</table>
---
<h2 class="lar"> eBGP 和 iBGP 的比較</h2>
<table>
<thead>
<tr>
<th></th>
<th>eBGP</th>
<th>iBGP</th>
</tr>
</thead>
<tbody>
<tr>
<td>使用</td>
<td>用於連接不同自治系統 (AS)</td>
<td>用於在同一自治系統 (AS) 內部連接不同的路由器</td>
</tr>
<tr>
<td>傳播路由</td>
<td>傳播來自不同AS的路由</td>
<td>傳播在同一AS內部的路由</td>
</tr>
<tr>
<td>TTL值</td>
<td>TTL (Time-to-Live)值預設為1</td>
<td>TTL值預設為255</td>
</tr>
<tr>
<td>穩定性</td>
<td>不太容易產生路由循環</td>
<td>可能產生路由循環,需要使用防止循環的方法(例如,IBGP全連接或者Route Reflector)</td>
</tr>
<tr>
<td>策略</td>
<td>更容易設定外部策略</td>
<td>更常用於設定內部策略</td>
</tr>
</tbody>
</table>