Cisco IOS XE インタフェースの shutdown / no shutdown 設定方法
Cisco IOS XE でインタフェースを無効化・有効化するコマンドです。 インタフェースコンフィグレーションモードで実行します。
interface [インタフェース名]
shutdowninterface [インタフェース名]
no shutdown| 入力箇所 | 入力内容 |
|---|---|
| [インタフェース名] | 対象のインタフェース名を指定(例: GigabitEthernet1) |
インタフェース shutdown 設定の実行例
GigabitEthernet1 を shutdown する実行例になります。コマンド実行と同時に設定が反映されます。
XE1#config term
Enter configuration commands, one per line. End with CNTL/Z.
XE1(config)#interface GigabitEthernet1
XE1(config-if)#shutdown
XE1(config-if)#end
XE1#インタフェース no shutdown 設定の実行例
GigabitEthernet1 を no shutdown する実行例になります。
XE1#config term
Enter configuration commands, one per line. End with CNTL/Z.
XE1(config)#interface GigabitEthernet1
XE1(config-if)#no shutdown
XE1(config-if)#end
XE1#show interface による状態確認方法
インタフェースの状態は show interfaces コマンドで確認します。
show interfaces [インタフェース名]| 入力箇所 | 入力内容 |
|---|---|
| [インタフェース名] | 状態を確認する対象のインタフェース名を指定(省略時は全インタフェースを表示) |
shutdown 状態の確認例
shutdown 設定時は administratively down と表示されます。
XE1#show interfaces GigabitEthernet1
GigabitEthernet1 is administratively down, line protocol is down
Hardware is CSR vNIC, address is 5254.007c.c4bc (bia 5254.007c.c4bc)
Description: to GigabitEthernet1.XE2
Internet address is 192.168.0.1/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
-- snip --
XE1#no shutdown(正常稼働)状態の確認例
no shutdown 設定後、リンクが接続されていれば up / up と表示されます。
XE1#show interfaces GigabitEthernet1
GigabitEthernet1 is up, line protocol is up
Hardware is CSR vNIC, address is 5254.007c.c4bc (bia 5254.007c.c4bc)
Description: to GigabitEthernet1.XE2
Internet address is 192.168.0.1/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
-- snip --
XE1#is up, line protocol is up の1行目には、以下の2つの状態が表示されます。
| 表示位置 | 意味 |
|---|---|
| 1つ目(is up / is administratively down) | レイヤ1(物理)の状態。shutdown/no shutdown の設定状態を反映 |
| 2つ目(line protocol is up / down) | レイヤ2(データリンク)の状態。1つ目が administratively down の場合は連動して down になる |
この2つの組み合わせにより、状態の切り分けが可能です。
| 1つ目の状態 | 2つ目の状態 | 意味 |
|---|---|---|
| administratively down | down | shutdown 設定により無効化されている |
| up | up | no shutdown 設定かつリンクも正常に確立している |
show ip interface brief コマンドを使うと、全インタフェースの状態を1行ずつ簡潔に確認できます。なお、show interfaces briefというコマンドはIOS XEには存在しない点に注意してください。
XE1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet1 192.168.0.1 YES manual up up
GigabitEthernet2 unassigned YES unset administratively down down
GigabitEthernet3 unassigned YES unset administratively down down
GigabitEthernet4 unassigned YES unset administratively down down
Loopback0 unassigned YES unset administratively down down
XE1#GigabitEthernet2〜4は未設定のためshutdownされており、Status / Protocolともにadministratively downと表示されています。GigabitEthernet1はno shutdown設定かつリンクが確立しているためup / upです。
show running-config での shutdown / no shutdown の見え方の違い
show running-config でコンフィグを確認する際、shutdown と no shutdown では表示のされ方が異なる点に注意してください。
shutdown設定時:インタフェース設定の中にshutdownの行が 表示されるno shutdown設定時:no shutdownという行は 表示されない(設定が無い状態=有効化されている状態として扱われる)
shutdown 状態の show running-config 実行例
XE1#show running-config interface GigabitEthernet1
Building configuration...
Current configuration : 167 bytes
!
interface GigabitEthernet1
description to GigabitEthernet1.XE2
ip address 192.168.0.1 255.255.255.0
shutdown
negotiation auto
no mop enabled
no mop sysid
end
XE1#no shutdown 状態の show running-config 実行例
XE1#show running-config interface GigabitEthernet1
Building configuration...
Current configuration : 157 bytes
!
interface GigabitEthernet1
description to GigabitEthernet1.XE2
ip address 192.168.0.1 255.255.255.0
negotiation auto
no mop enabled
no mop sysid
end
XE1#no shutdown 状態では shutdown の行自体が存在しないため、show running-config 上ではその他の設定のみが表示されます。
インタフェースが意図せず shutdown されていないかを確認する際は、show running-config に shutdown の記載があるかどうかをチェックすると良いでしょう。