Basic Interface Configuration

 

An interface is a connection from a Cisco device to a network medium. Each interface has underlying technologies that are used to transfer data across a physical medium, such as copper or fiber. Protocols found on the physical layer of the OSI reference model define the physical characteristics of the interface and the medium. The protocols we describe in this chapter, which all operate on the data link layer (Layer 2) of the OSI reference model, implement the technology to pass data between the network layer and the physical layer.

Each interface on a Cisco device is known as a port. Cisco devices label ports in multiple ways. For fixed-configuration Cisco devices, the interfaces are numbered sequentially without a slot designation. For example, on a 2500 series router with one Ethernet and two serial interfaces, the interfaces would be known as ethernet0, serial0, and serial1.

If the device is modular and has interchangeable interface cards, the interfaces are numbered using the syntax type slot/port . For example, an Ethernet interface in slot 1, port 2 would be known as ethernet 1/2. To configure interfaces, you must use the major command interface . This command, followed by the interface port number or slot/port combination, is used in configuration mode. The following example illustrates the configuration of a Token Ring interface on slot 1, port 0:

 San-Jose#  configure  Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CTRL+Z. San-Jose(config)#  interface tokenring 1/0  San-Jose(config-if)#  ^Z  

Note

The IOS changes the configuration mode prompt from config to config-if to signify that you are configuring an interface. The IOS often changes the configuration mode prompt to give you visual context cues during configuration.


Some Cisco routers have Versatile Interface Processor (VIP) cards. Each VIP card has one or two slots for port adapters. A port adapter is a circuit board with interfaces that inserts into a VIP. Each port adapter can have a number of interfaces. On these types of devices (currently only 7000, 7500, and 12000 series routers), the syntax type slot/port adapter/ port is used to specify the interface. For example, if you wanted to reference the second VIP card, first port adapter (number 0), first Token Ring interface, you would use the syntax token ring 2/0/1 .

The show interfaces Command

The EXEC command show interfaces enables you to see the status of all the interfaces on a Cisco device, as shown for an Ethernet interface in the following output:

 Ethernet0 is up, line protocol is up   Hardware is QUICC Ethernet, address is 0060.5cbc.0ef9 (bia 0060.5cbc.0ef9)   MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255   Encapsulation ARPA, loopback not set, keepalive set (10 sec)   ARP type: ARPA, ARP Timeout 04:00:00   Last input 00:00:00, output 00:00:01, output hang never   Last clearing of "show interface" counters never   Queueing strategy: fifo   Output queue 0/40, 0 drops; input queue 0/75, 0 drops   5 minute input rate 1000 bits/sec, 1 packets/sec   5 minute output rate 1000 bits/sec, 1 packets/sec      116547 packets input, 13397137 bytes, 0 no buffer      Received 3402 broadcasts, 0 runts, 0 giants      0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort      0 input packets with dribble condition detected      273769 packets output, 84816409 bytes, 0 underruns      0 output errors, 1 collisions, 1 interface resets      0 babbles, 0 late collision, 29 deferred      0 lost carrier, 0 no carrier      0 output buffer failures, 0 output buffers swapped out 

We discuss the various types of information in the show interfaces output throughout this book. To begin, notice that the first line of the output shows the interface medium type (Ethernet) and the interface number. The interface name is ethernet0, so we can conclude that this is a fixed configuration device; there are no slots, ports, or port adapters. An interface that is shown in the up state is electrically functioning normally and has the proper signaling from the cables connected into it. Other possible states for the interface are down and administratively down. A down interface is operational, but it is not communicating properly with the medium to which it is attached. An administratively down interface is configured to be shut down and is not operational. See the upcoming section "The shutdown Command" for information on changing the administrative state of an interface.

The physical hardware type of the interface is shown on the second line of the show interfaces command, as is the interface's data link layer address. The fourth line of this output shows the encapsulation type of the interface. The encapsulation of local-area network (LAN) interfaces normally does not require configuration, while the configuration of wide-area network (WAN) interfaces often does. The reason for this difference is that LAN interfaces typically perform a single data link layer protocol, and WAN interfaces can perform many different data link layer protocols.

The encapsulation Command

The encapsulation of an interface defines the format of the data sent and the data link protocol for the interface. You set the encapsulation of an interface with the encapsulation interface configuration subcommand. In the following output, we use the Help system to examine the interface encapsulations available for the WAN interface serial0 and then set the interface to use the High-Level Data Link Control (HDLC) protocol:

 Singapore#  configure  Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CTRL+Z. Singapore(config)#  interface serial 0  Singapore(config-if)#  encapsulation ?  atm-dxi      ATM-DXI encapsulation   frame-relay  Frame Relay networks   hdlc         Serial HDLC synchronous   lapb         LAPB (X.25 Level 2)   ppp          Point-to-Point protocol   smds         Switched Megabit Data Service (SMDS)   x25          X.25 Singapore(config-if)#  encapsulation hdlc  Singapore(config-if)#  ^Z  

We explore the other WAN protocol encapsulations later in this chapter.

The shutdown Command

If you want to change the administrative state of an interface from up to down or down to up, use the configuration command shutdown or no shutdown. A Cisco device does not pass data on an interface that is administratively down. In the following show interfaces output, the first line shows that interface serial0 is administratively down:

 Serial0 is administratively down, line protocol is down   Hardware is 4T/MC68360   MTU 1500 bytes, BW 512 Kbit, DLY 20000 usec, rely 137/255, load 1/255   Encapsulation HDLC, loopback not set, keepalive set (10 sec)   Last input never, output never, output hang never   Last clearing of "show interface" counters never   Input queue: 0/75/0 (size/max/drops); Total output drops: 0   Queueing strategy: weighted fair   Output queue: 0/64/0 (size/threshold/drops)      Conversations  0/1 (active/max active)      Reserved Conversations 0/0 (allocated/max allocated)   5 minute input rate 0 bits/sec, 0 packets/sec   5 minute output rate 0 bits/sec, 0 packets/sec      0 packets input, 0 bytes, 0 no buffer      Received 0 broadcasts, 0 runts, 0 giants      0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort      0 packets output, 0 bytes, 0 underruns      0 output errors, 0 collisions, 0 interface resets      0 output buffer failures, 0 output buffers swapped out      0 carrier transitions      DCD=down  DSR=down DTR=down RTS=down CTS=down 

Next, we use the no shutdown configuration command to configure the interface to be operational:

 Singapore  #configure  Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CTRL+Z. Singapore(config)  #interface serial 0  Singapore(config-if)  #no shutdown  Singapore(config-if)  #^Z  

Note

The IOS configuration command no shutdown is often confusing for users. You are telling the device not to shut down the interface, but by using a double negative, you imply that it should be turned on. This is an awkward use of the English language, and it is kept in the Cisco IOS for purely historical (or hysterical) reasons.


Now, if the cables to this interface are providing the proper electrical inputs, the interface is administratively and operationally up. You can use the shutdown configuration com-mand to administratively down an interface, as follows :

 Singapore  #configure  Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CTRL+Z. Singapore(config)  #interface serial 0  Singapore(config-if)  #shutdown  Singapore(config-if)  #^Z  

The description Command

You can use the interface subcommand description to add a text description to the output of the show interfaces command. This text description can be up to 255 characters long.

Tip

We recommend that you add a description to each of your interfaces to document its use. For example, you can add a descriptive name to a LAN interface for the building, floor, or department that is reachable through the interface. On WAN interfaces, you may want to describe the endpoints of the connection and document the circuit identifiers used by the circuit provider.


In the following example, we add a description to interface serial0, the WAN interface from Singapore to Malaysia on the ZIP network. The description shows the encapsulation of the link and the circuit identifier:

 Singapore  #configure  Configuring from terminal, memory, or network [terminal]? Enter configuration commands, one per line. End with CTRL+Z. Singapore(config)  #interface serial 0  Singapore(config-if)  #description IETF frame relay PVCs on Circuit Z-234987-12-MS-01  Singapore(config-if)  #^Z  

The description appears in the third line of the show interfaces serial 0 command:

 Serial0 is administratively down, line protocol is down   Hardware is 4T/MC68360   Description: IETF frame relay PVCs on Circuit Z-234987-12-MS-01   MTU 1500 bytes, BW 512 Kbit, DLY 20000 usec, rely 137/255, load 1/255   Encapsulation HDLC, loopback not set, keepalive set (10 sec)   Last input never, output never, output hang never   Last clearing of "show interface" counters never   Input queue: 0/75/0 (size/max/drops); Total output drops: 0   Queueing strategy: weighted fair   Output queue: 0/64/0 (size/threshold/drops)     Conversations  0/1 (active/max active)     Reserved Conversations 0/0 (allocated/max allocated)   5 minute input rate 0 bits/sec, 0 packets/sec   5 minute output rate 0 bits/sec, 0 packets/sec     0 packets input, 0 bytes, 0 no buffer     Received 0 broadcasts, 0 runts, 0 giants     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort     0 packets output, 0 bytes, 0 underruns     0 output errors, 0 collisions, 0 interface resets     0 output buffer failures, 0 output buffers swapped out     0 carrier transitions     DCD=down  DSR=down  DTR=down  RTS=down CTS=down 


Cisco Router Configuration
Cisco Router Configuration (2nd Edition)
ISBN: 1578702410
EAN: 2147483647
Year: 1999
Pages: 116

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net