一.四種時延哪些是常量溺健,哪些會變化?
- 傳播時延(propagation delay)和傳輸時延(transmission delay)是常量镐依。
- 排隊時延(queue delay)隨著時間會一直變化。
- 處理時延(process delay)由線路的performance決定到旦,因此可能發(fā)生改變柬祠。
二.TCP和UDP的header中包含什么重要field淤毛,沒有這些field,這些協(xié)議不會工作消别。
- TCP: ports #s, seq/ack #s, checksum, and windows size.
TCP包含端口號抛蚤,seq/ack號,校驗和寻狂,窗口大小岁经。
- UDP: port #s, checksum
UDP包含端口號和校驗和。 - IP: addresses, checksum for header
IP包含地址蛇券, 數(shù)據(jù)頭的校驗和缀壤。
三.Sketch the TCP connection initiation and connection termination packet flows using a timing diagram.
Initiation connection && connection termination
1.png
四.有關(guān)慢啟動和不同時刻對應(yīng)區(qū)間問題
![)7QRAXNX39KS1O_$7]%%_1Q.jpg](http://upload-images.jianshu.io/upload_images/134818-db293aaf47f7ce83.jpg)
1.給出兩個使用慢啟動的原因并解釋慢啟動比阻塞控制(congestion avoidance)好的原因.
- TCP建立初期需要發(fā)送大量報文,慢啟動可以防止建立連接初期單個TCP連接發(fā)送太多報文占用太大帶寬纠亚。
- 慢啟動有利于TCP從故障中恢復(fù)塘慕,并快速回到高效穩(wěn)定的傳輸階段。
- 慢啟動更好的原因是慢啟動在帶寬空閑的時候可以快速增長TCP的窗口大小蒂胞,TCP傳輸可以快速達(dá)到高效图呢。
2.Identify the intervals of time when TCP slow start is operating.
- [1, 6], [7, 11], [23, 26]
3.Identify the intervals of time when TCP congestion avoidance is operating.
- [11, 15], [26, 32]
這些階段TCP的窗口大小超過了設(shè)定的閥值,繼續(xù)慢啟動可能導(dǎo)致帶寬占滿、丟包蛤织、超時等不良結(jié)果赴叹。
4.Identify the intervals of time when TCP fast retransmission(快速重傳) is operating.
- [15, 16]
快速重傳發(fā)生在收到三個冗余的ACK之后,采取的動作為:- 1.把ssthresh設(shè)置為cwnd的一半
- 2.把cwnd再設(shè)置為ssthresh的值(具體實現(xiàn)有些為ssthresh+3)
- 3.重新進(jìn)入快速恢復(fù)階段指蚜。
5.Identify the intervals of time when TCP fast recovery is operating.
- [16, 22]
快速恢復(fù)發(fā)生在快速重傳之后乞巧,主要的動作為:- 1.當(dāng)收到3個重復(fù)ACK時,把ssthresh設(shè)置為cwnd的一半摊鸡,把cwnd設(shè)置為ssthresh摊欠,然后重傳丟失的報文段。
- 2.再收到重復(fù)的ACK時柱宦,擁塞窗口增加1些椒。
- 3.當(dāng)收到新的數(shù)據(jù)包的ACK時,把cwnd設(shè)置為第一步中的ssthresh的值掸刊。原因是因為該ACK確認(rèn)了新的數(shù)據(jù)免糕,說明從重復(fù)ACK時的數(shù)據(jù)都已收到,該恢復(fù)過程已經(jīng)結(jié)束忧侧,可以回到恢復(fù)之前的狀態(tài)了石窑,也即再次進(jìn)入擁塞避免狀態(tài)。
當(dāng)窗口大小不變時蚓炬,網(wǎng)絡(luò)中發(fā)送的包的數(shù)量是不變的松逊。每次收到一個冗余的ACK,就說明沒有新的數(shù)據(jù)包進(jìn)入網(wǎng)絡(luò)肯夏,所以此時應(yīng)該將窗口大小加1经宏,以給新的數(shù)據(jù)包留一個位置;當(dāng)收到新的數(shù)據(jù)包的ACK時驯击,說明當(dāng)前窗口大小可以傳輸新的數(shù)據(jù)烁兰,窗口的大小就無需增加。
快速重傳和快速恢復(fù)機(jī)制順序產(chǎn)生徊都。
6.Identify the intervals of time when TCP fast recovery could have happened, but did not.
- [22, 23]
快速恢復(fù)的結(jié)果是沪斟,當(dāng)收到新的ACK之后,窗口大小恢復(fù)到快速恢復(fù)開始時的大小暇矫,即Round16時的大小10主之。因為收到新的ACK表示老的數(shù)據(jù)已經(jīng)全部被接受,TCP的傳輸進(jìn)入了穩(wěn)定階段李根,此時快速恢復(fù)算法已經(jīng)完成了他的使命槽奕,應(yīng)該恢復(fù)到重復(fù)的ACK之前的狀態(tài)。- 而圖中23的窗口大小沒有變成10朱巨,而是回到了0(或者1)史翘,說明此時發(fā)生了丟包或超時事件,TCP傳輸重新進(jìn)入了慢啟動狀態(tài)。
五.An application layer protocol typically defines four things. What are these four things.
應(yīng)用層協(xié)議定義了:
- 1.交換的報文類型琼讽,如請求報文和響應(yīng)報文必峰。
- 2.各種報文類型的語法,如報文中的各個字段公共詳細(xì)描述钻蹬。
- 3.字段的語義吼蚁,即包含在字段中信息的含義。
- 4.進(jìn)程何時问欠、如何發(fā)送及對報文進(jìn)行響應(yīng)肝匆。
六.What is a web cache cache used for? Where can a web cache be located or placed.
- Web cache is used to improve how fast data loads while browsing the Internet. In most cases, each time you open a web page, the page and all its files are sent to the browser's temporary cache on the hard drive(硬盤驅(qū)動器). If that page or file contained on that page (e.g. a picture) needs to load again and has not been modified, the browser opens the page from your cache instead of downloading the page again. Cache saves you lots of time, especially if you use a modem, and can also help save the website owner on bandwidth.
簡單地說,當(dāng)你打開一個網(wǎng)頁的時候顺献,網(wǎng)頁和其中的內(nèi)容被發(fā)送到在硬盤驅(qū)動器下的瀏覽器臨時緩存中旗国,如果已經(jīng)被打開過的網(wǎng)頁需要重新加載且內(nèi)容沒有被修改,此時瀏覽器會從緩存中打開網(wǎng)頁而不會再次下載網(wǎng)頁注整。web緩存可以節(jié)約大量時間能曾,尤其當(dāng)你使用一個modem(調(diào)制解調(diào)器)的時候。- 補(bǔ)充:
web緩存肿轨,也叫代理服務(wù)器寿冕,是能夠代表初始Web服務(wù)器來滿足HTTP請求的網(wǎng)絡(luò)實體。在網(wǎng)絡(luò)上部署web緩存的主要原因:1.web緩存可以大大減少對客戶機(jī)請求的響應(yīng)時間椒袍。
2.web緩存可以減少一個機(jī)構(gòu)內(nèi)部網(wǎng)與因特網(wǎng)接入鏈路的通信量驼唱。
七.What is DNS and what is it used for? If all DNS servers could be "crashed", what would happen to the Internet.
- Domain Name Servers (DNS) are the Internet's equivalent of a phone book. They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses. This is necessary because, although domain names are easy for people to remember, computers or machines, access websites based on IP addresses.
- 解釋:DNS相當(dāng)于一個網(wǎng)絡(luò)的電話本,他儲存了域名的目錄并且將其轉(zhuǎn)化成Internet Protocol(IP) addresses驹暑。這相當(dāng)重要玫恳,因為盡管對于人來說域名很容易記憶,但是電腦或其他機(jī)器通過IP地址訪問網(wǎng)站岗钩。
八.What is the fundamental difference between virtual circuit and datagram service.
- 主要區(qū)別是一個基于連接的(虛電路)纽窟,另一個(數(shù)據(jù)電報)不是肖油。