千家论坛_智能建筑与智能家居技术交流社区

标题: 静态路由以及静态路由的配置 [打印本页]

作者: 等待寒冷    时间: 2011-12-31 18:40
标题: 静态路由以及静态路由的配置
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">实验目的:了解为何要在路由器上增设静态路由以及静态路由的配置</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">Router&gt;en</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">Router#conf&nbsp;t</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">Router(config)#host&nbsp;A</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config)#</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config)#int&nbsp;e0</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;进入<font face="Times New="New"  Roman">e0</font><font face="宋体">端口</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config-if)#ip&nbsp;add&nbsp;192.168.1.1&nbsp;255.255.255.0</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;添加<font face="Times New="New"  Roman">e0</font><font face="宋体">口的</font><font face="Times New="New"  Roman">IP</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config-if)#no&nbsp;shut</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;打开<font face="Times New="New"  Roman">e0</font><font face="宋体">口</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config-if)#exit</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config)#int&nbsp;s0</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;进入<font face="Times New="New"  Roman">s0</font><font face="宋体">端口</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config-if)#ip&nbsp;add&nbsp;192.168.2.1&nbsp;255.255.255.0</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;添加<font face="Times New="New"  Roman">s0</font><font face="宋体">口的</font><font face="Times New="New"  Roman">IP</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config-if)#clock&nbsp;rate&nbsp;56000</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置时钟</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config-if)#no&nbsp;shut</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;打开<font face="Times New="New"  Roman">s0</font><font face="宋体">口</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config-if)#exit</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">A(config)#ip&nbsp;route&nbsp;192.168.3.0&nbsp;255.255.255.0&nbsp;192.168.2.2</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;添加静态路由</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">Router&gt;en</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">Router#conf&nbsp;t</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">Router(config)#host&nbsp;B</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config)#int&nbsp;e0</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;进入<font face="Times New="New"  Roman">e0</font><font face="宋体">端口</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config-if)#ip&nbsp;add&nbsp;192.168.3.1&nbsp;255.255.255.0</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;添加<font face="Times New="New"  Roman">e0</font><font face="宋体">口的</font><font face="Times New="New"  Roman">IP</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config-if)#no&nbsp;shut</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;打开<font face="Times New="New"  Roman">e0</font><font face="宋体">口</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config-if)#exit</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config)#int&nbsp;s1</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;进入<font face="Times New="New"  Roman">s1</font><font face="宋体">端口</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config-if)#ip&nbsp;add&nbsp;192.168.2.2&nbsp;255.255.255.0</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;添加<font face="Times New="New"  Roman">s1</font><font face="宋体">口的</font><font face="Times New="New"  Roman">IP</font></span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config-if)#no&nbsp;shu</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;打开<font face="Times New="New"  Roman">s1</font><font face="宋体">口</font></span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">t</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config-if)#exit</span><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p style="MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0pt" class="p0"><span style="FONT-FAMILY: 'Times New="New"  Roman'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">B(config)#ip&nbsp;route&nbsp;192.168.1.0&nbsp;255.255.255.0&nbsp;192.168.2.1</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;添加静态路由</span><span style="FONT-FAMILY: '宋体'; FONT-SIZE: 10.5pt; mso-spacerun: 'yes'"><o:p></o:p></span></p><!--EndFragment-->




欢迎光临 千家论坛_智能建筑与智能家居技术交流社区 (http://bbs.qianjia.com:8020/) Powered by Discuz! X3.2