メインコンテンツへスキップ
  1. Router および Switch 関連記事一覧/
  2. IOS-XE/

IOS XE インタフェース設定(閉塞/開放)および確認方法

目次

Cisco IOS XE インタフェースの shutdown / no shutdown 設定方法

Cisco IOS XE でインタフェースを無効化・有効化するコマンドです。 インタフェースコンフィグレーションモードで実行します。

Cisco IOS XE インタフェース shutdown設定
interface [インタフェース名]
 shutdown
Cisco IOS XE インタフェース no shutdown設定
interface [インタフェース名]
 no shutdown
入力箇所入力内容
[インタフェース名]対象のインタフェース名を指定(例: GigabitEthernet1)

インタフェース shutdown 設定の実行例

GigabitEthernet1shutdown する実行例になります。コマンド実行と同時に設定が反映されます。

インタフェース 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 設定の実行例

GigabitEthernet1no shutdown する実行例になります。

インタフェース 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 コマンドで確認します。

Cisco IOS XE show interfaces コマンド
show interfaces [インタフェース名]
入力箇所入力内容
[インタフェース名]状態を確認する対象のインタフェース名を指定(省略時は全インタフェースを表示)

shutdown 状態の確認例

shutdown 設定時は administratively down と表示されます。

show interfaces 実行例(shutdown 状態)
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 と表示されます。

show interfaces 実行例(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 downdownshutdown 設定により無効化されている
upupno shutdown 設定かつリンクも正常に確立している

show ip interface brief コマンドを使うと、全インタフェースの状態を1行ずつ簡潔に確認できます。なお、show interfaces briefというコマンドはIOS XEには存在しない点に注意してください。

show ip interface brief 実行例
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#

GigabitEthernet24は未設定のためshutdownされており、Status / Protocolともにadministratively downと表示されています。GigabitEthernet1no shutdown設定かつリンクが確立しているためup / upです。

show running-config での shutdown / no shutdown の見え方の違い

show running-config でコンフィグを確認する際、shutdownno shutdown では表示のされ方が異なる点に注意してください。

  • shutdown 設定時:インタフェース設定の中に shutdown の行が 表示される
  • no shutdown 設定時:no shutdown という行は 表示されない(設定が無い状態=有効化されている状態として扱われる)

shutdown 状態の show running-config 実行例

show running-config 実行例(shutdown 状態)
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 実行例

show running-config 実行例(no shutdown 状態)
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-configshutdown の記載があるかどうかをチェックすると良いでしょう。

関連記事