忘れた時に思い出そう! 頻度の高いCISCOコマンド集
2018/04/12
2019/12/30
タグ: Cisco, Linux, Ubuntu
【routing】
1 2 3 4 5 6 7 8 9 |
static routing (config)# ip route destination mask gateway routing table check # show ip route catalyst switch routing(router機種は必要ない) (config)# ip routing (config)# no ip routing (IPv4はルーティング停止) |
【dhcp】
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
(config)# ip dhcp pool 名前 (config)# ip dhcp excluded-address (dhcp-config)# (dhcp-config)# network dhcp配布の対象ネットワーク マスク (dhcp-config)# default-router デフォルトゲートウェイ (dhcp-config)# dns-server 192.168.1.1 192.168.1.2 (dhcp-config)# domain-name cisco.com (dhcp-config)# lease 7 ← 7日の場合 (dhcp-config)# lease 0 8 ← 8時間の場合 (dhcp-config)# lease 0 0 30 ← 30分の場合 (dhcp-config)# lease infinite ← 無期限の場合 (dhcp-config)# no ip dhcp conflict logging |
■show ip dhcp binding
配布したIPアドレスとクライアントのMACアドレスのマッピング一覧。
1 |
clear ip dhcp binding * |
■show ip dhcp conflict
競合アドレスの一覧。
no ip dhcp conflict logging」を設定していない場合によく使用する。
1 |
clear ip dhcp conflict * |
■show ip dhcp pool
DHCPプールの設定内容詳細表示。
【管理VLAN】
1 2 3 |
(config)# interface vlan vlan-id (config-if)# ip address ip-address subnet-mask (config-if)# no shutdown |