📄 interfaces_theory.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>Interfaces - Theory</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><font size="4" color="#008000"><b>Overview: Configuring and Examining Interfaces</b></font></p>
<p><b><font size="4" color="#008000">Examining the Interfaces</font></b></p>
<p>Routers can have many types of interfaces, such as token ring, FDDI, Ethernet,
Serial, ISDN etc. We often want to view the status and settings.
There are a few important commands that we need to know.</p>
</font>
<font face="Terminal">
<p>
</font>
<font face="Terminal" size="2">
show interfaces</font><b><font face="Arial, Helvetica">
</font>
</b>
<font face="Arial, Helvetica">
is one of the more important commands. </p>
</font>
<font face="Terminal" size="2">
<p>
eRouter#show interfaces<br>
Ethernet0 is administratively down, line protocol is down<br>
Hardware is Lance, address is 0060.5cc4.f445 (bia 0060.5cc4.f445)<br>
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255<br>
Encapsulation ARPA, loopback not set, keepalive set (10 sec) </font><font face="Arial, Helvetica"><font face="Times New Roman"><br>
[ OUTPUT OMITTED]</font></p>
<p>This command will produce output about each interface. In this
case we see that Ethernet 0 is
</font><font face="Terminal" size="2">administratively down.</font><b><font face="Arial, Helvetica">
</font> </b><font face="Arial, Helvetica">That means
that it is turned off with the <b>shutdown</b> command. </p>
<table cellSpacing="0" cellPadding="0" border="0">
<tbody>
<tr>
<td bgColor="#008000"><font color="#FFFFFF"><b>Ethernet 0 is </b>
</font></td>
<td bgColor="#008000"><font color="#FFFFFF"><b>Line protocol is </b>
</font></td>
<td bgColor="#008000"><font color="#FFFFFF"><b>Meaning</b></font></td>
</tr>
</font><font face="Terminal">
<tr>
<td><font size="2">administratively down
</font> </td>
<td><font size="2">down</font></td>
</font><font face="Arial, Helvetica">
<td>The interface is turned off with the <b>shutdown </b>command</td>
</tr>
<font face="Terminal">
<tr>
<td><font size="2">up</font></td>
<td><font size="2">down</font></td>
</font><font face="Arial, Helvetica">
<td>Cable is connected but keep alives are not being received.</td>
</tr>
<font face="Terminal">
<tr>
<td><font size="2">down</font></td>
<td><font size="2">down</font></td>
</font><font face="Arial, Helvetica">
<td>Cabling problem or no clock rate set on DCE. Or other router interface
is shutdown.</td>
</tr>
<font face="Terminal">
<tr>
<td><font size="2">up</font></td>
<td><font size="2">up</font></td>
</font><font face="Arial, Helvetica">
<td>connected and receiving keep alives. This is what we want!!!</td>
</tr>
</tbody>
</table>
<p>You can view particular interfaces with the command: </font></font></font></font>
<font face="Terminal" size="2">
show interface serial
0</font><b><font face="Arial, Helvetica">. </font> </b><font face="Arial, Helvetica">
<font face="Arial, Helvetica">
<font face="Arial, Helvetica">
<font face="Arial, Helvetica">
Or any other interface. A handy command is </font></font></font></font>
<font face="Terminal" size="2">
show ip
interface brief</font><b><font face="Arial, Helvetica">.</font></b><font face="Arial, Helvetica"><font face="Arial, Helvetica"><font face="Arial, Helvetica"><font face="Arial, Helvetica"></p>
<p><font face="Terminal" size="2">eRouter#show ip int brief<br>
Interface IP-Address OK? Method Status Protocol<br>
Ethernet0 unassigned YES not set administratively down down<br>
PCbus0 unassigned YES not set administratively down down<br>
Serial0 unassigned YES not set up down<br>
eRouter# </font></p>
<p>This allows you to rapidly see the status of all the interfaces.</p>
<p><b><font size="4" color="#008000">Examining the Controllers</font></b></p>
<p>Controllers are the part of the interface that makes the physical connection.
The most important to us is what kind of cable is attached to a Serial
interface.</p>
<p>A <b>DTE</b> (data terminating equipment) cable is the normal cable you
should use. Being DTE means you expect the other end to providing <b>clocking. </b></p>
<p>A <b>DCE </b>(data circuit-terminating equipment) means that this device must
provide the clocking on the wire.</p>
<p>The </font></font></font></font><font face="Terminal" size="2">
show controllers</font><font face="Arial, Helvetica">
command will allow you to see if you are DCE or
DTE.<br>
eRouter#show controllers serial 0</p>
<p>
<font size="2" face="Terminal">HD unit 0, idb = 0xA2B58, driver
structure at 0xA7020<br>
buffer size 1524 HD unit 0, V.35 </font><font size="2"><b><font face="Terminal">DCE</font></b></font></font><font size="2" face="Terminal">
cable<br>
cpb = 0x42, eda = 0x2140, cda = 0x2000</font><font face="Arial, Helvetica"><font face="Times New Roman"> </font></p>
<p><b><font size="4" color="#008000">Configuring the Interfaces</font></b></p>
<p>If an interface is administratively down. You must enter configuration
mode, then enter interface configuration mode, and lastly, issue the command
</font>
<font face="Terminal" size="2">no
shutdown</font><font face="Arial, Helvetica">.</p>
<p><font face="Terminal" size="2">eRouter#conf t<br>
Enter configuration commands, one per line. End with CNTL/Z.<br>
eRouter(config)#interface ethernet 0<br>
eRouter(config-if)#no shutdown<br>
eRouter(config-if)#<br>
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up<br>
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up<br>
eRouter(config-if)#end<br>
eRouter# </font></p>
<p>If your interface is the DCE, you must provide clocking using the
</font>
<font face="Terminal" size="2">clock
rate</font><font face="Arial, Helvetica"> command.</p>
<p><font face="Terminal" size="2">eRouter#config t<br>
Enter configuration commands, one per line. End with CNTL/Z.<br>
eRouter(config)#interface serial 0<br>
eRouter(config-if)#clock rate 56000<br>
eRouter(config-if)#end<br>
eRouter#</font></p>
<p>It is often useful to put a description of what the interface is used for
using the
</font>
<font face="Terminal" size="2">description</font><font face="Arial, Helvetica"> command.</p>
<p><font face="Terminal" size="2">eRouter#conf t<br>
Enter configuration commands, one per line. End with CNTL/Z.<br>
eRouter(config)#int e0<br>
eRouter(config-if)#description My Connection to the Engineering Hub<br>
eRouter(config-if)#end<br>
eRouter# </font></p>
<p>You can view your changes using
</font>
<font face="Terminal" size="2">show running-config</font><font face="Arial, Helvetica"> or
</font>
<font face="Terminal" size="2">show
interfaces</font><font face="Arial, Helvetica"> or
</font>
<font face="Terminal" size="2">show controllers</p>
</font>
<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 + -