このページで解説している内容は、以下の YouTube 動画の解説で見ることができます。
description コマンド
「description」コマンドを使用すると各インターフェイスに説明文を追加することができます。説明文を追加することで、後からコンフィグを確認する際に理解が容易となります。これは、プログラムにコメント分を追加することと同様です。
「description」コマンドは、次のコマンドをインターフェイスコンフィグレーションモードで入力します。
Switch(config-if)#description {コメント}
例えば、次のように「f0/1」にコメントを追加してみます。
Switch(config)#int f0/1
Switch(config-if)#description Connected to Sales-LAN
コメントがちゃんと追加されているかどうか確認してみます。
Switch#show runnning-config
●「show runnning-config」の出力
Switch#show running-config
Building configuration...
Current configuration : 1116 bytes
!
version 15.0
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
description Connected to Sales-LAN
!
interface FastEthernet0/2
!
interface FastEthernet0/3
「show interfaces」コマンドでも、コメントが追加させれていることを確認できます。
Switch#show interfaces
●「show interfaces」の出力
Switch#show interfaces fastEthernet 0/1
FastEthernet0/1 is down, line protocol is down (disabled)
Hardware is Lance, address is 0002.16dd.1a01 (bia 0002.16dd.1a01)
Description: Connected to Sales-LAN
BW 100000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Half-duplex, 100Mb/s
input flow-control is off, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
956 packets input, 193351 bytes, 0 no buffer
Received 956 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
2357 packets output, 263570 bytes, 0 underruns
0 output errors, 0 collisions, 10 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out