diff --git a/config/main.tex b/config/main.tex index 367e10f..85617bf 100644 --- a/config/main.tex +++ b/config/main.tex @@ -35,7 +35,6 @@ % \setCJKsansfont{FZHei-B01} % 中文无衬线字体 % \setCJKmonofont{FZHei-B01} % 中文等宽字体 - %============================================================================ % 配制列表环境 \usepackage{enumitem} @@ -62,7 +61,7 @@ % minted style=colorful, minted options={ %自动移除前置空白、制表为4字符、mathhe和||内的不处理 fontfamily=tt, - breaksymbol=, + % breaksymbol=, autogobble, tabsize=4, startinline, diff --git a/data/appendix/cheat_sheet.tex b/data/appendix/cheat_sheet.tex index aa8c7d5..d7e3d66 100644 --- a/data/appendix/cheat_sheet.tex +++ b/data/appendix/cheat_sheet.tex @@ -170,7 +170,6 @@ \multicolumn{1}{c|}{\heiti 任务} & \multicolumn{1}{c|}{\heiti 要求} \\ \hline \endhead - \hline \endfoot \endlastfoot diff --git a/data/appendix/fast.tex b/data/appendix/fast.tex index 284dd95..82476cd 100644 --- a/data/appendix/fast.tex +++ b/data/appendix/fast.tex @@ -73,14 +73,14 @@ OpenBox-S4设备是一款严格遵照FAST原理与架构设计的通用多核CPU \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f01} +\includegraphics[width=10cm]{f01} \caption{OpenBox-S4设备前端图} \label{fig:a:ob_f01} \end{figure} \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f02} +\includegraphics[width=10cm]{f02} \caption{OpenBox-S4设备后端图} \label{fig:a:ob_f02} \end{figure} @@ -99,7 +99,7 @@ OpenBox-S4设备是一款严格遵照FAST原理与架构设计的通用多核CPU 在用户操作设备上打开串口工具,配置好相应串口参数后打开串口,即可通过串口管理设备。以putty为例,其配置参数如图\ref{fig:a:ob_f11}所示: \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f11} +\includegraphics[width=7cm]{f11} \caption{串口工具参数配置图} \label{fig:a:ob_f11} \end{figure} @@ -115,7 +115,7 @@ OpenBox-S4设备是一款严格遵照FAST原理与架构设计的通用多核CPU 通过网连接连接设备,必须确保用户操作主机与设备管理网口在相同的网段,如不记得管理网口的IP,可以通过串口方式查看。设备默认网段为192.168.50.0网段,故用户操作主机的IP地址配置信息参考如图\ref{fig:a:ob_f12}所示: \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f12} +\includegraphics[width=10cm]{f12} \caption{网口连接的主机IP配置图} \label{fig:a:ob_f12} \end{figure} @@ -135,7 +135,7 @@ OpenBox-S4设备是一款严格遵照FAST原理与架构设计的通用多核CPU \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f16} +\includegraphics[width=10cm]{f16} \caption{二层交换命令启动输出图} \label{fig:a:ob_f16} \end{figure} @@ -146,7 +146,7 @@ OpenBox-S4设备是一款严格遵照FAST原理与架构设计的通用多核CPU \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f17} +\includegraphics[width=10cm]{f17} \caption{二端主机PING通结果图(二层交换)} \label{fig:a:ob_f17} \end{figure} @@ -167,7 +167,7 @@ OpenBox-S4设备是一款严格遵照FAST原理与架构设计的通用多核CPU \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f19} +\includegraphics[width=10cm]{f19} \caption{运行三层路由程序} \label{fig:a:ob_f19} \end{figure} @@ -178,7 +178,7 @@ OpenBox-S4设备是一款严格遵照FAST原理与架构设计的通用多核CPU \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f20} +\includegraphics[width=9cm]{f20} \caption{端主机PING通结果图(三层路由)} \label{fig:a:ob_f20} \end{figure} @@ -199,7 +199,7 @@ SDN交换实验的两台测试主机可以随意连接到设备的数据接口 \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f22} +\includegraphics[width=8cm]{f22} \caption{启动floodlight控制器} \label{fig:a:ob_f22} \end{figure} @@ -210,7 +210,7 @@ SDN交换实验的两台测试主机可以随意连接到设备的数据接口 \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f23} +\includegraphics[width=8cm]{f23} \caption{运行SDN交换程序} \label{fig:a:ob_f23} \end{figure} @@ -221,7 +221,7 @@ SDN交换实验的两台测试主机可以随意连接到设备的数据接口 \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f24} +\includegraphics[width=10cm]{f24} \caption{访问floodlight控制器首页} \label{fig:a:ob_f24} \end{figure} @@ -232,7 +232,7 @@ SDN交换实验的两台测试主机可以随意连接到设备的数据接口 \begin{figure}[!ht] \centering -\includegraphics[width=11cm]{f25} +\includegraphics[width=7cm]{f25} \caption{端主机PING通结果图(SDN交换)} \label{fig:a:ob_f25} \end{figure} @@ -240,11 +240,10 @@ SDN交换实验的两台测试主机可以随意连接到设备的数据接口 \end{enumerate} \subsection{FAST开源社区} -由于FAST架构设计的独特优势,用户无需关心平台的分组网络IO、存储和加速方法,只专注于创新架构的设计和核心技术研究,极大的加快网络创新技术的落地与应用。来自全国的近100家的高校、科研院所和设备厂商单位都加入的FAST开源社区。FAST开源社区致力于网络领域的基础网络技术分析与实现,热门网络技术跟踪研究与原型实现和未来网络技术探索与研究。更多的网络前沿技术及FAST的实现方法以及FAST的编程开发方法请关注FAST社区公众号及相关服务网站。 +由于FAST架构设计的独特优势,用户无需关心平台的分组网络IO、存储和加速方法,只专注于创新架构的设计和核心技术研究,极大的加快网络创新技术的落地与应用。来自全国的近100家的高校、科研院所和设备厂商单位都加入的FAST开源社区。FAST开源社区致力于网络领域的基础网络技术分析与实现,热门网络技术跟踪研究与原型实现和未来网络技术探索与研究。更多的网络前沿技术及FAST的实现方法以及FAST的编程开发方法请关注FAST社区公众号及\href{http://www.fastswitch.org}{FAST官方网站}。 \begin{figure}[ht!] \centering -\includegraphics[width=5cm]{fast-w} -\caption{FAST公众号} +\includegraphics[width=4cm]{fast-w} +% \caption{FAST公众号} \label{fig:a:ob_fast-w} \end{figure} -FAST官网:http://www.fastswitch.org diff --git a/data/ch_ensp/sec_ospf.tex b/data/ch_ensp/sec_ospf.tex index 475baa8..0ebd2c6 100644 --- a/data/ch_ensp/sec_ospf.tex +++ b/data/ch_ensp/sec_ospf.tex @@ -33,7 +33,7 @@ \begin{figure}[!htp] \centering - \includegraphics[width=8cm]{OSPF-topo} + \includegraphics[width=10cm]{OSPF-topo} \caption{选中特定的捕获类型} \label{fig:c:ensp_OSPF-topo} \end{figure} diff --git a/data/ch_ensp/sec_rip.tex b/data/ch_ensp/sec_rip.tex index d762724..cffe5a0 100644 --- a/data/ch_ensp/sec_rip.tex +++ b/data/ch_ensp/sec_rip.tex @@ -31,7 +31,7 @@ \begin{figure}[!htp] \centering - \includegraphics[width=8cm]{RIP-topo} + \includegraphics[width=10cm]{RIP-topo} \caption{实验拓扑图} \label{fig:c:ensp_RIP-topo} \end{figure} diff --git a/data/ch_ensp/sec_static.tex b/data/ch_ensp/sec_static.tex index 90db957..a6f273c 100644 --- a/data/ch_ensp/sec_static.tex +++ b/data/ch_ensp/sec_static.tex @@ -26,7 +26,7 @@ \begin{figure}[!htp] \centering - \includegraphics[width=8cm]{static-topo} + \includegraphics[width=10cm]{static-topo} \caption{实验拓扑图} \label{fig:c:ensp_static-topo} \end{figure} diff --git a/data/ch_router-openbox/preface.tex b/data/ch_router-openbox/preface.tex index 81eb2eb..aa7e684 100644 --- a/data/ch_router-openbox/preface.tex +++ b/data/ch_router-openbox/preface.tex @@ -3,8 +3,14 @@ \chapter{路由器实现} \label{chap:router-ob} -本单元实验使学生能初步使用可编程网络设备开发平台进行路由器基本功能的设计与实现,通过程序来实现路由器中最基本的三个功能:包括二层交换功能、三层路由功能及组网功能。深入理解路由器的基本工作原理与分组处理流程,从而培养学生对网络设备使用和研发的能力。 +本单元实验使学生能初步使用可编程网络设备开发平台进行路由器基本功能的设计与实现, +通过程序来实现路由器中最基本的三个功能:包括二层交换功能、三层路由功能及组网功能。 +深入理解路由器的基本工作原理与分组处理流程,从而培养学生对网络设备使用和研发的能力。 -可编程网络设备开发平台是一款基于FAST架构的软硬件(软件在CPU上使用C语言编程,硬件在FPGA芯片上使用Verilog语言编程)全可编程的网络实验教学平台,平台的软硬件逻辑代码开源免费,支持用户二次开发。其基本使用方法见附录\ref{app:openbox}:《FAST平台介绍与操作说明手册》。 -基于FAST架构的可编程网络设备开发平台的具体设备型号为OpenBox-S4,在案例文档中简称为“可编程网络平台”,在实验图中的图标LOGO为FAST,节点名称为OpenBox-S4。 +可编程网络设备开发平台是一款基于FAST架构的软硬件 +(软件在CPU上使用C语言编程,硬件在FPGA芯片上使用Verilog语言编程)全可编程的网络实验教学平台, +平台的软硬件逻辑代码开源免费,支持用户二次开发。 +其基本使用方法见附录\ref{app:openbox}:《FAST平台介绍与操作说明手册》。 +本实验指导书中选择了OpenBox-S4作为可编程网络设备实例,文档中简称为“可编程网络平台”, +在实验图中的图标记为为“FAST”,节点名称记为“OpenBox-S4”。 diff --git a/data/ch_router-openbox/sec_router.tex b/data/ch_router-openbox/sec_router.tex index 5e8f64e..b62bfba 100644 --- a/data/ch_router-openbox/sec_router.tex +++ b/data/ch_router-openbox/sec_router.tex @@ -92,23 +92,19 @@ \begin{itemize} \item 加载路由器接口地址信息 \begin{code}[text] - Port[0]->obx0,MAC->00:0A:35:01:00:5B,IPv4->192.168.0.1, - IPv6->0000:0000:0000:0000:0000:0000:0000:0000 - Port[1]->obx1,MAC->00:0A:35:00:00:02,IPv4->192.168.1.1, - IPv6->0000:0000:0000:0000:0000:0000:0000:0000 - Port[2]->obx2,MAC->00:0A:35:00:00:03,IPv4->192.168.2.1, - IPv6->0000:0000:0000:0000:0000:0000:0000:0000 - Port[3]->obx3,MAC->00:0A:35:00:00:04,IPv4->192.168.3.1, - IPv6->0000:0000:0000:0000:0000:0000:0000:0000 + Port[0]->obx0,MAC->00:0A:35:01:00:5B,IPv4->192.168.0.1, IPv6->0000:0000:0000:0000:0000:0000:0000:0000 + Port[1]->obx1,MAC->00:0A:35:00:00:02,IPv4->192.168.1.1, IPv6->0000:0000:0000:0000:0000:0000:0000:0000 + Port[2]->obx2,MAC->00:0A:35:00:00:03,IPv4->192.168.2.1, IPv6->0000:0000:0000:0000:0000:0000:0000:0000 + Port[3]->obx3,MAC->00:0A:35:00:00:04,IPv4->192.168.3.1, IPv6->0000:0000:0000:0000:0000:0000:0000:0000 \end{code} \item 同步内核FIB表 \begin{code}[text] - Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT Port - obx0 0000A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 0 - obx1 0001A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 1 - obx2 0002A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 2 - obx3 0003A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 3 + Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT Port + obx0 0000A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 0 + obx1 0001A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 1 + obx2 0002A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 2 + obx3 0003A8C0 00000000 0001 0 0 0 00FFFFFF 0 0 0 3 \end{code} \item 启动端口输出队列线程 diff --git a/data/ch_router-openbox/sec_switch.tex b/data/ch_router-openbox/sec_switch.tex index f0b120c..8edf06b 100644 --- a/data/ch_router-openbox/sec_switch.tex +++ b/data/ch_router-openbox/sec_switch.tex @@ -154,8 +154,7 @@ Create nm08_mac_aging thread OK! aging[0]->invalid mac:0 fastU->fast_ua_recv...... - inport:0,dstmid:129,len:102,dmac:33:33:00:00:00:02, - smac:B8:27:EB:04:FC:F0 + inport:0,dstmid:129,len:102,dmac:33:33:00:00:00:02, smac:B8:27:EB:04:FC:F0 learn_smac-> update_mac_time->port:0,index:0 learn_smac->add new MAC,port:0,index:0 @@ -171,8 +170,7 @@ \begin{itemize} \item 其中,端口接收到报文时,终端会显示输入端口及源目的MAC地址内容; \begin{code}[text] - inport:0,dstmid:129,len:102,dmac:33:33:00:00:00:02, - smac:B8:27:EB:04:FC:F0 + inport:0,dstmid:129,len:102,dmac:33:33:00:00:00:02, smac:B8:27:EB:04:FC:F0 \end{code} \item 然后进入源MAC学习阶段,并更新MAC时间; \begin{code}[text] diff --git a/data/ch_sdn-openbox/sec_sdn.tex b/data/ch_sdn-openbox/sec_sdn.tex index 9146482..d738c3e 100644 --- a/data/ch_sdn-openbox/sec_sdn.tex +++ b/data/ch_sdn-openbox/sec_sdn.tex @@ -53,7 +53,8 @@ SDN将传统的紧耦合网络设备拆分成了应用、控制和转发三层 并发送OFP\_HELLO消息用以确认双方都支持的OFP协议版本信息; \item \textbf{查询或设置数据:} 控制器通过OpenFlow的具体消息协议查询或设置交换机其他相关功能的数据, - 如OFPT\_HELLO、OFPT\_ECHO\_REQUEST、OFPT\_PACKET\_IN、OFPMP\_DESC、OFPT\_PACKET\_OUT、OFPT\_FLOW\_MOD、OFPT\_PORT\_MOD、OFPMP\_FLOW、OFPMP\_PORT\_STATS等; + 如OFPT\_HELLO、OFPT\_ECHO\_REQUEST、OFPT\_PACKET\_IN、OFPMP\_DESC、 + OFPT\_PACKET\_OUT、OFPT\_FLOW\_MOD、OFPT\_PORT\_MOD、OFPMP\_FLOW、OFPMP\_ PORT\_STATS等; \item \textbf{处理转发分组:}当交换机接收到一个数据转发分组时, 提取分组数据中的相关字段组成查表关键字,然后在本地进行流表匹配。 如果匹配成功,则根据流表的动作处理该分组,如从其他端口转发出去; @@ -165,39 +166,39 @@ SDN将传统的紧耦合网络设备拆分成了应用、控制和转发三层 \item 查看控制器界面基本信息,在浏览器打开控制器WEB网站http://192.168.1.3/ui/index.html,控制界面如图\ref{fig:c:sdn-ob_sdn-main}所示: \begin{figure}[ht!] \centering - \includegraphics[width=12cm]{sdn-main} + \includegraphics[width=9cm]{sdn-main} \caption{SDN主界面信息} \label{fig:c:sdn-ob_sdn-main} \end{figure} \item 查看连接交换机信息,如图\ref{fig:c:sdn-ob_sdn-switch}所示: - \begin{figure}[ht!] + \begin{figure}[htp!] \centering - \includegraphics[width=12cm]{sdn-switch} + \includegraphics[width=9cm]{sdn-switch} \caption{SDN交换机信息} \label{fig:c:sdn-ob_sdn-switch} \end{figure} \item 查看连接测试主机信息,SDN主机及连接信息如图\ref{fig:c:sdn-ob_sdn-host}所示: - \begin{figure}[ht!] + \begin{figure}[htp!] \centering - \includegraphics[width=12cm]{sdn-host} + \includegraphics[width=9cm]{sdn-host} \caption{SDN主机信息} \label{fig:c:sdn-ob_sdn-host} \end{figure} \item 查看端口状态与计数信息与流表信息,端口与流表信息如图\ref{fig:c:sdn-ob_port-flowtable}所示: - \begin{figure}[ht!] + \begin{figure}[htp!] \centering - \includegraphics[width=12cm]{port-flowtable} + \includegraphics[width=9cm]{port-flowtable} \caption{端口状态与流表计数信息} \label{fig:c:sdn-ob_port-flowtable} \end{figure} \item 查看网络拓扑信息,网络拓扑信息如图\ref{fig:c:sdn-ob_sdn-test-topo}所示: - \begin{figure}[ht!] + \begin{figure}[htp!] \centering - \includegraphics[width=12cm]{sdn-test-topo} + \includegraphics[width=9cm]{sdn-test-topo} \caption{SDN网络拓扑信息} \label{fig:c:sdn-ob_sdn-test-topo} \end{figure} @@ -206,17 +207,17 @@ SDN将传统的紧耦合网络设备拆分成了应用、控制和转发三层 \subsubsection{在测试主机ping的前后,分别观察流表变化;} \begin{enumerate} \item ping之前的流表信息为空,如图\ref{fig:c:sdn-ob_empty-flowtable}所示: - \begin{figure}[ht!] + \begin{figure}[htp!] \centering - \includegraphics[width=12cm]{empty-flowtable} + \includegraphics[width=9cm]{empty-flowtable} \caption{空流表信息} \label{fig:c:sdn-ob_empty-flowtable} \end{figure} \item ping之后的流表信息,如图\ref{fig:c:sdn-ob_flowtable-ping}所示: - \begin{figure}[ht!] + \begin{figure}[htp!] \centering - \includegraphics[width=12cm]{flowtable-ping} + \includegraphics[width=9cm]{flowtable-ping} \caption{ping通后流表信息} \label{fig:c:sdn-ob_flowtable-ping} \end{figure} diff --git a/data/ch_wireshark/sec_ip.tex b/data/ch_wireshark/sec_ip.tex index d304c87..a22fe2e 100644 --- a/data/ch_wireshark/sec_ip.tex +++ b/data/ch_wireshark/sec_ip.tex @@ -162,7 +162,8 @@ ICMP询问报文有回送请求和应答、时间戳请求和应答、 -a 将地址解析为计算机名。 -n count 发送 count 指定的 ECHO 数据包数。默认值为 4。 - -l length 发送包含由 length 指定的数据量的 ECHO 数据包。默认为 32 字节;最大值是65,527。 + -l length 发送包含由 length 指定的数据量的 ECHO 数据包。默认为 32 字节; + 最大值是65,527。 -f 在数据包中发送"不要分片"标志。数据包就不会被路由上的网关分片。 -i ttl 将"生存时间"字段设置为 ttl 指定的值。 \end{code} diff --git a/data/ch_wireshark/sec_tcp.tex b/data/ch_wireshark/sec_tcp.tex index 252c612..92f1030 100644 --- a/data/ch_wireshark/sec_tcp.tex +++ b/data/ch_wireshark/sec_tcp.tex @@ -381,14 +381,14 @@ BBR\footnote{\href{https://queue.acm.org/detail.cfm?id=3022184}{BBR: Congestion- 物理机可使用wondershaper命令进行限速。 再启动应用(可以是http wget,也可以ftp下载/上传)传输大文件观察。 \item Wireshark抓取全部传输过程数据,找出该网络活动的拥塞点, - 并结合Analyze$\rightarrow$Expert Information、Statistic$\rightarrow$IO Graphs、 + 并结合Analyze$\rightarrow$Expert Information、Statistic$\rightarrow$I/O Graphs、 Statistic$\rightarrow$TCP Stream Graphs(如图\ref{fig:c:wireshark_io-graphs}), 分析此传输过程中的慢启动、拥塞避免、快速恢复等阶段。 \begin{figure}[!ht] \centering \includegraphics[width=8cm]{io-graphs} - \caption{IO Graphs} + \caption{I/O Graphs} \label{fig:c:wireshark_io-graphs} \end{figure} diff --git a/data/copyright.tex b/data/copyright.tex index f202516..68c3273 100644 --- a/data/copyright.tex +++ b/data/copyright.tex @@ -3,7 +3,7 @@ % 版本声明 \clearpage \begin{center} - \Large{Version 1.0$\alpha$} \\ \vspace{2em} + \Large{Version 2.0} \\ \vspace{2em} \Large{发布日期: \today}%{\number\year 年 \number\month 月 \number\day 日}} % \\ \vspace{1em} \end{center} diff --git a/data/cover.tex b/data/cover.tex index e8859bb..cdd9f6d 100644 --- a/data/cover.tex +++ b/data/cover.tex @@ -3,17 +3,18 @@ \begin{tikzpicture}[overlay,remember picture,font=\sffamily\bfseries] -\begin{scope} - \path[clip,postaction={fill=c2}] - ([xshift=2cm,yshift=2cm]current page.center) rectangle ++ (4.2,7.7); -\end{scope} +% \begin{scope} +% \path[clip,postaction={fill=c2}] +% ([xshift=2cm,yshift=2cm]current page.center) rectangle ++ (4.2,7.7); +% \end{scope} +\fill[c2] ([xshift=2cm,yshift=2cm]current page.center) rectangle ++ (2.2,7.7); \fill[c1] ([xshift=2cm,yshift=2cm]current page.center) rectangle ++ (-13.7,7.7); +\node[text=white,anchor=west,scale=3,inner sep=0pt] at +([xshift=-5.3cm,yshift=7cm]current page.center) {计算机网络}; \node[text=white,anchor=west,scale=4,inner sep=0pt] at -([xshift=-8.3cm,yshift=7cm]current page.center) {计算机网络}; -\node[text=white,anchor=west,scale=2,inner sep=0pt] at -([xshift=-4.2cm,yshift=4.2cm]current page.center) {实验指导书}; +([xshift=-7.3cm,yshift=4.8cm]current page.center) {实验指导书}; \node[text=gray,anchor=west,scale=1.5,inner sep=0pt] at ([xshift=-3cm,yshift=-10.5cm]current page.center) {计算机网络教案社区};