ネットワークエンジニアになろう! > IOS Tips > do show - 設定中にshow コマンドを実行する

do show - 設定中にshow コマンドを実行する

「このインターフェイス、今Up してる?」

ルータを設定している最中に、show コマンドを確認したくなることだってあります。
ちょっと気になって確認したいんだけど、いちいちconfiguration mode を抜けるのも面倒です。

そんな時は、do コマンドを使いましょう。
実行したいshow コマンドの前にdo をつけてやると、Configuration Mode の中からshow コマンドを実行することができます。

Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#
R3(config)#interface ethernet 0/0
R3(config-if)#
R3(config-if)#ip address 192.168.1.1 255.255.255.0
R3(config-if)#
R3(config-if)#do show interface ethernet 0/0
Ethernet0/0 is up, line protocol is up
Hardware is Lance, address is 0000.0c11.1111 (bia 0000.0c11.1111)
Internet address is 192.168.1.1/24
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 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
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
2168 packets input, 318383 bytes, 0 no buffer
Received 1169 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
4432 packets output, 484826 bytes, 0 underruns
0 output errors, 0 collisions, 14 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Router(config-if)#



注:show interface ethernet 0/0 出力中のMAC アドレスは架空のものです。


ネットワークエンジニアになろう!のトップページへ戻る
サイト内検索
無料メールマガジン「英語でネットワークエンジニア」
マニュアルやRFCを読むのに必要なのは、高度な文法知識ではなく語彙力です。毎回一単語、例文と解説に技術情報を併せてお届けします. (マガジンID:0000181633)
メールアドレス:
Powered by
This website is powered by Movable Type 3.2 Smartnetworks.jp.