Josh Gentry, jgentry@swcp.com
v.1, 02 January, 2007
Disclaimer
This document carries no explicit or implied warranty. Nor is there any guarantee that the information contained in this document is accurate.
It is offered in the hopes of helping others, but you use it at your own risk.
The author will not be liable for any damages that occur as a result of using
this document.
Conventions
Important terms and concepts, when they are introduced, may be displayed in bold. Commands included in the body of the text will be displayed in this font. All names and addresses used in examples are just that, examples, and should not be used on your network. Do not type them in verbatim when configuring your system. Finally, in some examples where the command rquires an IP address as an argument, the IP address may be represented in this way, xx.xx.xx.xx, or aa.bb.cc.dd. You will never actually use these strings when
configuring your system. They are mearly a convention of this document to specify that you should substitute the appropriate IP address at that point.
This document covers configuring and troubleshooting Cisco networking equipment at the datalink layer. Today this document covers ethernet, and will in the future cover ATM, frame relay, and wireless. It does not cover the physical layer (i.e. cabling), the details of frame formats, or layered networking models. This document is for the person trying to configure network equipment today. It is assumed that you are familiar with logging into Cisco equipment and with the different command modes of IOS. If not, look at Cisco Router Configuration Tutorial
The concept of layered network models is fundimental to computer networking. Explaining this concept is beyond the scope of this document. There are many references on this topic on the web and in books. I will link to some at the end of this document. You do not have to understand this concept to begin configuring Cisco networking equipment, but I recommend you learn it.
The datalink layer is the second layer in the Open Systems Interconnection (OSI) networking model. This layer deals with protocols that communicate data to directly connected devices. This is how devices that are connected by the same cable talk to each other. Examples of layer 2 protocols are ethernet, ATM and frame relay.
In the abstract, all datalink layer protocols define a similar set of things, such as access to physical media, addressing, error detection and correction, collision detection and retransmission. In this document I will talk about datalink layer protcols in the context of Cisco networking.>
Ethernet is th emost common datalink layer used for local area networks (LAN), and is growing in popularity for metro networks. Many Cisco routers have ethernet interfaces, and Cisco makes a popular line of Ethernet switches.
Ethernet is a broadcast protocol, in contrast to a point-to-point protocol. The practical implication of this for configuring Cisco ethernet interfaces is that you do not reference the address of any other device when configuring an interface. You configure characteristics of the interface, such as speed, duplex or not, and whether to auto negotiate these values with the connected device.
To display the interfaces available on a Cisco device:
router>show interfaces
The amount of output you get from that command will depend on how many interfaces the device has.
An ethernet interface will have "ethernet" in the name of the interface, plus a number. Some examples are: ethernet0, fastethernet1, GigabitEthernet0/1. These interface names are descriptive. An interface named "ethernet" is a 10Mb/s interface. Fastethernet isa 10/100 Mb/s interface, meaning it can operate at either 10 Mb/s or 100 Mb/s. The number part of the name helps you identify interfaces if there is more than one of that type. For example, a 24 port ethernet switch will have interfaces FastEthernet0, FastEthernet1, FastEthernet2, ..., FasterEthernet23. Notice that numbering starts at 0, not 1.
Look at the output of "show interface" for a single ethernet interface.
router# show interface FastEthernet5/0
FastEthernet5/0 is up, line protocol is up
Hardware is DEC21140A, address is xxxx.xxxx.xxxx (bia xxxx.xxxx.xxxx)
Description: Ethernet between router and the tiara
Internet address is xxx.xxx.xxx.xxx/29
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:27, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/16 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 5000 bits/sec, 1 packets/sec
5 minute output rate 1000 bits/sec, 2 packets/sec
40944881 packets input, 2008140251 bytes
Received 0 broadcasts, 0 runts, 0 giants, 11 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
140383312 packets output, 2412257084 bytes, 0 underruns
20 output errors, 0 collisions, 7 interface resets
0 babbles, 0 late collision, 0 deferred
30 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
There is a lot of information in this output. Some of it you will be important everytime you configure an ethernet interface, and some of it you will rarely notice unless you are troubleshooting a problem.
The first thing you want to know about any interface, is whether it is up or down. The first line of output from show interfaces tells you the state of the interface. Lets look at that information from the above example.
router# show interface FastEthernet5/0 FastEthernet5/0 is up, line protocol is up
One line, 2 pieces of information. The interface, FastEthernet5/0, is up, and so is the line protocol. This interface is ready to pass traffic.
Lets compare that to the default state of an interface in a Cisco router or switch. This is the state of all the interfaces of a Cisco device when you receive it from the vendor, or after you reset to defaults.
Router>show int Ethernet0 is administratively down, line protocol is down
The interface has to be up before the protocol can be up. This interface is administratively down. What does that mean? It means its down because it has been told to be down. To see this another way, we will look at some output from the show run command. I'm going to just show the part of that output that is important here.
interface Ethernet0 no ip address shutdown
The line of config, shutdown, is what causes the interface to be administratively down.
Router>enable Password: Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#int ethernet 0 Router(config-if)#no shutdown Router(config-if)#exit