Merge branch 'master' into 'master'

更新第一章图片等

第一章部份:替换若干不清晰图片,序言后加了句备注,更改了图1.2-10标题,放大了一些不清晰图的尺寸(11cm->16cm),1.3多了两个流控实验程序附件。

See merge request !2
tmp/8df8116eed08eaf6b7661bcebda78ea3/head
夏竟 4 years ago
commit c5b3914f86

@ -7,3 +7,4 @@
掌握以太网、802.11、ARP、IP、ICMP和TCP等重要协议传输单元结构
深入理解相关网络命令和重要协议算法的工作原理,
从而培养网络故障检测、网络性能改进和网络安全分析的能力。
(备注第二版将增补实验1.4: IEEE 802.11协议分析。)

@ -137,7 +137,7 @@ IP地址长度为4字节。每个字段的含义如下
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-boot-ui}
\includegraphics[width=16cm]{c1_wireshark-boot-ui}
\caption{Wireshark软件启动界面}
\label{fig:c1_wireshark-boot-ui}
\end{figure}
@ -149,14 +149,14 @@ IP地址长度为4字节。每个字段的含义如下
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-main-ui}
\includegraphics[width=16cm]{c1_wireshark-main-ui}
\caption{Wireshark主窗口界面}
\label{fig:c1_wireshark-main-ui}
\end{figure}
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-setup-ui}
\includegraphics[width=16cm]{c1_wireshark-setup-ui}
\caption{Wireshark的设置界面}
\label{fig:c1_wireshark-setup-ui}
\end{figure}
@ -180,7 +180,7 @@ IP地址长度为4字节。每个字段的含义如下
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-filters}
\includegraphics[width=16cm]{c1_wireshark-filters}
\caption{显示过滤规则的示例}
\label{fig:c1_wireshark-filters}
\end{figure}
@ -190,7 +190,7 @@ IP地址长度为4字节。每个字段的含义如下
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-save}
\includegraphics[width=16cm]{c1_wireshark-save}
\caption{操作主菜单保存数据文件}
\label{fig:c1_wireshark-save}
\end{figure}
@ -205,7 +205,7 @@ IP地址长度为4字节。每个字段的含义如下
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-special-type}
\includegraphics[width=16cm]{c1_wireshark-special-type}
\caption{选中特定的捕获类型}
\label{fig:c1_wireshark-special-type}
\end{figure}
@ -217,7 +217,7 @@ IP地址长度为4字节。每个字段的含义如下
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-statistic}
\includegraphics[width=16cm]{c1_wireshark-statistic}
\caption{统计功能}
\label{fig:c1_wireshark-statistic}
\end{figure}
@ -232,7 +232,7 @@ IP地址长度为4字节。每个字段的含义如下
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_eth-frame-detail}
\includegraphics[width=16cm]{c1_eth-frame-detail}
\caption{以太网帧结构展开界面}
\label{fig:c1_eth-frame-detail}
\end{figure}

@ -113,7 +113,7 @@ ICMP询问报文有回送请求和应答、时间戳请求和应答、
\begin{figure}[!htp]
\centering
\includegraphics[width=10cm]{c1_icmp-structure}
\includegraphics[width=12cm]{c1_icmp-structure}
\caption{ICMP报文结构示意图}
\label{c1_icmp-structure}
\end{figure}
@ -235,7 +235,7 @@ tracert命令Linux格式和常用参数如图\ref{fig:tracert-cmd}所示
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-monitor}
\includegraphics[width=16cm]{c1_wireshark-monitor}
\caption{Wireshark监视器界面}
\label{fig:c1_wireshark-monitor}
\end{figure}
@ -245,7 +245,7 @@ tracert命令Linux格式和常用参数如图\ref{fig:tracert-cmd}所示
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_ip-view}
\includegraphics[width=16cm]{c1_ip-view}
\caption{查看IP数据报}
\label{fig:c1_ip-view}
\end{figure}
@ -255,7 +255,7 @@ tracert命令Linux格式和常用参数如图\ref{fig:tracert-cmd}所示
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_echo-request}
\includegraphics[width=16cm]{c1_echo-request}
\caption{Echo request示例}
\label{fig:c1_echo-request}
\end{figure}
@ -289,7 +289,7 @@ tracert命令Linux格式和常用参数如图\ref{fig:tracert-cmd}所示
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_wireshark-filter-setup}
\includegraphics[width=16cm]{c1_wireshark-filter-setup}
\caption{在Wireshark中设置过滤条件}
\label{fig:c1_wireshark-filter-setup}
\end{figure}
@ -299,8 +299,8 @@ tracert命令Linux格式和常用参数如图\ref{fig:tracert-cmd}所示
\begin{figure}[!htp]
\centering
\includegraphics[width=11cm]{c1_traceroute-exec}
\caption{Wireshark中设置过滤条件}
\includegraphics[width=16cm]{c1_traceroute-exec}
\caption{终端中执行traceroute命令示例}
\label{fig:c1_traceroute-exec}
\end{figure}

@ -358,7 +358,7 @@ CUBIC的关键特征是cwnd窗口的增长依赖两次丢包的时间。
\begin{enumerate}
\item 编写一对简单的TCP连接程序
也可以直接运行指导书提供的Python程序(见附件)
也可以直接运行指导书提供的Python程序(见附件)
在客户端快速发送数据给服务端,而服务端则有意缓慢地接收数据,
观察TCP如何用窗口大小值进行流量控制。虚拟机两端分别运行
\texttt{python3 server.py}\texttt{python3 client.py}
@ -467,3 +467,59 @@ CUBIC的关键特征是cwnd窗口的增长依赖两次丢包的时间。
\item (10分)完成任2道思考题。
\item (10分)记录自己在本次实验中所遇到的问题,以及心得感悟实验总结。
\end{enumerate}
\subsection{附件}
\label{subsec:c1_s3_additionalprg}
1 Python3 TCP socket通信程序。
\ 服务端 server.py
\lstset{language=python3}
\begin{lstlisting}
import socket
import time
def recv_data(sock,length):
data=b''
while len(data) < length:
more = sock.recv(length - len(data))
if not more:
pass
data += more
return data
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# 设置接收缓冲区大小为1024
s.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 1024)
s.bind(('0.0.0.0', 9999))
s.listen(1)
print("Sever listening on 9999...")
try:
sc, addr = s.accept()
while True:
rcvdata = recv_data(sc,16)
time.sleep(0.01)
pass
finally:
sc.close()
s.close()
\end{lstlisting}
\\
\ 客户端 client.py
\lstset{language=python3}
\begin{lstlisting}
import socket
import time
ip_port = ("192.168.100.144", 9999)
data = "0123456789\n"*100
c = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
c.connect(ip_port)
print("Connected.")
time.sleep(1)
i=0
while i<10:
print("Send:"+data)
c.send(data.encode())
i=i+1
finally:
print("Sent. Waiting....")
while True:
time.sleep(0.001)
\end{lstlisting}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Loading…
Cancel
Save