📄 staticroutes.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Rip Lab</title>
</head>
<body>
<script language="Javascript">
<!--
function printpage() {
if (window.print)
window.print()
else
alert("Sorry, your browser doesn't support this feature.");
}
//-->
</script>
<FORM>
<INPUT TYPE="button" VALUE="Print this page" onClick="printpage()">
</FORM>
<font face="Arial, Helvetica">
<p><b><font color="#008000" size="4">Static Routes</font></b></p>
<p><i>Objective</i>:<b> </b>We will configure eRouters 1, 2, and 4
with IP addresses and then add static routes for all routers.</p>
<p><i>Goals</i>: </p>
<p>1) Set our hostname and get our interfaces up.</p>
<p>2) Ping our directly connected interfaces</p>
<p>3) Configure static routes for our topology</p>
<p>4) View our routing table</p>
<p>5) Verify that we can ping all routers</p>
<p> </p>
</font>
<p>IP Addresses: Please set these IP addresses on the interfaces of your
routers.</p>
<table border="0" width="80%" height="53">
<tr>
<td width="20%" height="18" bgcolor="#00FF00"></td>
<td width="32%" height="18" bgcolor="#00FF00">eRouter1</td>
<td width="23%" height="18" bgcolor="#00FF00">eRouter2</td>
<td width="25%" height="18" bgcolor="#00FF00">eRouter4</td>
</tr>
<tr>
<td width="20%" height="8" bgcolor="#00FFFF">Interface Ethernet 0</td>
<td width="32%" height="8" bgcolor="#00FFFF">10.1.1.1 255.255.255.0</td>
<td width="23%" height="8" bgcolor="#00FFFF">10.1.1.2 255.255.255.0</td>
<td width="25%" height="8" bgcolor="#00FFFF"> </td>
</tr>
<tr>
<td width="20%" height="15" bgcolor="#00FFFF">Interface Serial 0</td>
<td width="32%" height="15" bgcolor="#00FFFF">12.5.10.1 255.255.255.0</td>
<td width="23%" height="15" bgcolor="#00FFFF"> </td>
<td width="25%" height="15" bgcolor="#00FFFF">12.5.10.2 255.255.255.0</td>
</tr>
</table>
<p> </p>
<p> </p>
<p><b><font color="#FF00FF">1.</font></b> Configure the eRouters 1, 2, and 4 to the specifications outlined in the
table above.</p>
<p><b><font color="#FF00FF">2. </font></b>After you have configured your IP address on each interface verify that
you can ping your directly connected neighbors. That means when you are on
eRouter 1 you should be able to ping eRouter 2's Ethernet 0 interface and Router
4's Serial 0 interface. </p>
<p><b><font color="#FF00FF">3.</font></b> Now that we have our IP addressing setup correctly lets get into
configuring our static routes on each router. First connect to eRouter 1.
Lets think about what we are doing. We will need to establish static
routes to any location that is not directly connected. eRouter 1 is
directly connected to both eRouter 2 and eRouter 4 so it will not need any static routes.
Next connect to eRouter 4.</p>
<p><font color="#FF00FF"><b>4.</b></font> Now enter configuration mode and think about what the static route command
will be. We know we currently cannot get to eRouter 2 because it is not
directly connected. So now lets think about eRouter 4 and the network it is
connected to. Off of its Serial interface is network 12.5.10.0 that is
connected to eRouter 1. eRouter 1 is also connected to network 10.1.1.0 that
we would also like to access. In this case we will need a static route for
network 10.1.1.0. On eRouter 4 what command would you use to establish a
static route to network 10.1.1.0?</p>
<p><select size="1" name="ff">
<option>- Click Here to View Answer -</option>
<option>eRouter4(config)#ip route 10.1.1.0 255.255.255.0 12.5.10.1</option>
</select></p>
<p>We established a route to network 10.1.1.0 on our router. Now whenever
a packet of information is destined for network 10.1.1.0 it will be sent to the
router with IP address 12.5.10.1 which in this case is eRouter 1.</p>
<p><b><font color="#FF00FF">5.</font></b> Lets see what we accomplished. When we are on eRouter 4 and we
know we can ping eRouter1's Serial interface but we could not ping eRouter1's
Ethernet interface. Now that we have established a route to network 10.1.1.0
lets see if we can ping eRouter 2's Ethernet 0. </p>
<p><select size="1" name="ff">
<option>- Click Here to View Answer -</option>
<option>eRouter4#ping 10.1.1.2</option>
</select></p>
<p><b><font color="#FF00FF">6.</font></b> Why couldn't we ping? If you think about a packet going through the
network it leaves eRouter 4's S0 interface destined for 10.1.1.2. The packet knows this
is on the 10.1.1.0 network so it is going to first go to 12.5.10.1 because of
our static route. When it gets to 10.1.1.1 (eRouter 1) the Router looks at
its Routing table and knows that it is directly connected to network 10.1.1.0 off
its Ethernet interface, so it sends the packet out there. eRouter 2 picks
up that packet and wants to respond back with a "Hey, You found me". It looks
at the Source IP address and it is 12.5.10.2 (eRouter 4's Serial 0 interface).
When it goes to send the packet it does not have a route to network 12.5.10.0 so
it drops the packet. This is why you did not get the
<font face="Terminal" size="2">!!!!!</font> as a successful
response. </p>
<p><font color="#FF00FF"><b>7.</b></font> Just to make sure our static route worked view your routing table to see
if it is in there.</p>
<p><select size="1" name="ff">
<option>- Click Here to View Answer -</option>
<option>eRouter1#show ip route</option>
</select></p>
<p><font color="#FF00FF"><b>8.</b></font> To get the static routes to work we need to connect to eRouter 2 and give a
static route back to eRouter 4's network. What command will set a static
route on eRouter 2 for the network 12.5.10.0?</p>
<p><select size="1" name="ff">
<option>- Click Here to View Answer -</option>
<option>eRouter2(config)#ip route 12.5.10.0 255.255.255.0 10.1.1.1</option>
</select></p>
<p>That means anything we are sending to network 12.5.10.0 will go to 10.1.1.1
first.</p>
<p><b><font color="#FF00FF">9.</font></b> Now you should be able to ping all of the interfaces we have working. </p>
<p>eRouter1 Ethernet 0 : 10.1.1.1<br>
eRouter1 Serial 0 : 12.5.10.1<br>
eRouter4 Serial 0: 12.5.10.2</p>
<p><b><font color="#FF00FF">10. </font></b> Lets look at the routing table on eRouter 2 and talk about its
entry.</p>
<p><font face="Terminal" size="2">eRouter2#show ip route<br>
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP<br>
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area<br>
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP<br>
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default<br>
U - per-user static route<br>
<br>
Gateway of last resort is not set</font></p>
<p><font face="Terminal" size="2">C 10.1.1.0/24 is directly connected, 10.1.1.2<br>
S 12.5.10.0/24 [1/0] via 10.1.1.1</font></p>
<p>Looking at the second line we see the "<font face="Terminal" size="2">S</font>" denoting the Static route.
Next we see the destination network and its subnet info. The
<font face="Terminal" size="2">[1/0]</font> is
showing the administrative distance (by default "1") and the metric
(in this case hop count) which is 0. Via just says the address to go to which in this case is 10.1.1.1.</p>
<p> </p>
<p><font face="Arial" size="2"><span class="724482219-24092001">Copyright (c)
1998-2003 Boson Software, Inc. All Rights Reserved.</span></font></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -