I encountered a strange question, that this file cannot be exported by
org-mode's HTML exporter, which just return Wrong type argument:
stringp nil. But I cannot find out where the point is. (And, all the
other files can be outputed without any question.)
I attached this file for reproducing issue.
* 第一部份
** What is the IP address and TCP port number used by the client computer
(source) that is transferring the file to gaia.cs.umass.edu?
#+BEGIN_QUOTE
To answer this question, it ’ s probably easiest to select an HTTP message and
explore the details of the TCP packet used to carry this HTTP message, using
the “ details of the selected packet header window ” (refer to Figure 2 in the
“ Getting Started with Wireshark ” Lab if you ’ re uncertain about the
Wireshark windows.
#+END_QUOTE
Source: 192.168.0.103:54131
: Source: 192.168.0.103 (192.168.0.103)
: Destination: 128.119.245.12 (128.119.245.12)
: Transmission Control Protocol, Src Port: 54131 (54131), Dst Port: http (80),
Seq: 1, Ack: 1, Len: 633
** What is the IP address of gaia.cs.umass.edu? On what port number is it
sending and receiving TCP segments for this connection?
(輸出同上)
Distination: 128.119.245.12:80
** What is the IP address and TCP port number used by your client computer
(source) to transfer the file to gaia.cs.umass.edu?
Source: 192.168.0.103:54131
Destination: 128.119.245.12:80
(這題想問的跟第一題有什麼不同的地方?)
* 第二部份
** What is the sequence number of the TCP SYN segment that is used to initiate
the TCP connection between the client computer and gaia.cs.umass.edu? What is
it in the segment that identifies the segment as a SYN segment?
TCP SYN 的 SeqNum 為 0;上面寫著[SYN, ACK]。
#+BEGIN_EXAMPLE
12 0.48459 128.119.245.12 192.168.0.103 TCP 76 http
54131 [SYN, ACK] Seq=0 Ack=1 Win=5792 Len=0 MSS=1460 SACK_PERM=1
TSval=1687806537 TSecr=883895839 WS=128
...
Transmission Control Protocol, Src Port: 54131 (54131), Dst Port: http (80),
Seq: 0, Len: 0
Source port: 54131 (54131)
Destination port: http (80)
[Stream index: 0]
Sequence number: 0(relative sequence number)
Header length: 40 bytes
Flags: 0x002 (SYN) # SYN 的 Flag 底加
Window size value: 29200
[Calculated window size: 29200]
Checksum: 0x227d [validation disabled]
Options: (20 bytes), Maximum segment size, SACK permitted, Timestamps,
No-Operation (NOP), Window scale
#+END_EXAMPLE
** What is the sequence number of the SYNACK segment sent by gaia.cs.umass.edu
to the client computer in reply to the SYN?
Seq 為 0;
*** What is the value of the ACKnowledgement field in the SYNACK segment? How
did gaia.cs.umass.edu determine that value?
ACK 為 1。SYNACK = 前一個封包的 Seq +1
#+BEGIN_QUOTE
「第 3 個封包開始的 Seq = 前 1 個 received 封包的 ACK(「我已經收到『到 ACK num 為止的長度』的封包惹」)」?
「第 4 個封包開始的 ACK = 前 1 個 received 封包的 Seq + 長度」
#+END_QUOTE
| 序号 | 方向 | seq| ack | |
|--+--++---+--|
|1 | A-B | 1(隨機產生?[fn:4]) | 0 | SYN |
|2 | A-B | 2(隨機產生?) | 1+1=10001 | SYN, ACK |
|3 | A-B | 10001 | 2+1=20001 | ACK |
表格引用自[[http://hi.baidu.com/jialy1987/item/a4fe100f9bdef138f3eafca9][TCP 三次握手连接及
seq 和 ack 号的正确理解]]
| 序号 | 方向 | seq | ack | size |
|--+--+---+--+--|
| 23 | A-B | 4 | 7| 1514
|
| 24 | B-A | 7 | 4+1514-54=41460 # 等等要扣掉 54 嗎?![fn:5] | 54 |
| 25 | A-B | 41460 | 7+54-54=7| 1514
|
| 26 | B-A | 7 | 41460+1514-54=42920 | 54
|
表格引用自[[http://hi.baidu.com/jialy1987/item/a4fe100f9bdef138f3eafca9][TCP 三次握手连接及
seq 和 ack 号的正确理解]]
*** What is it in the segment that identifies the segment as a SYNACK segment?
封包中包含 SYN flag,如下:
#+BEGIN_EXAMPLE
Transmission Control Protocol, Src Port: 54131 (54131), Dst Port: http (80),
Seq: 0, Len: 0
Source port: 54131 (54131)
Destination port: http (80)
[Stream index: 0]
Sequence number: 0(relative sequence number)
Header length: 40 bytes
Flags: 0x002 (SYN)
000. = Reserved: Not set
...0 = Nonce: Not set
0... = Congestion Window Reduced (CWR): Not set
.0.. = ECN-Echo: Not set
..0. = Urgent: Not set
...0 = Acknowledgment: Not set
0... = Push: Not set
.0.. = Reset: Not set
..1. = Syn: Set
#+END_EXAMPLE
** What is the sequence number of the TCP segment containing the HTTP POST
command?
封包 No. 14,他的 sequence number 是 1。
封包 No. 168 也有包含 POST 一詞,sequence number 是 152050。
#+BEGIN_QUOTE
封包 No. 14 的 TCP segment data(633 bytes)內容是:
#+BEGIN_EXAMPLE
POST /wireshark-labs/lab3-1-reply.htm HTTP/1.1
Host: gaia.cs.umass.edu
Connection: keep-alive