# Ciscoコマンドの命名規則 ###### tags: `network` `ccna` `cisco` Cisco機器のコマンドは階層構造となっています。 `ip`に続くものはip関連です。 さらに、`ip dhcp`に続くものはdhcp関連です。 他にも、`logging`に続くものはlog関連です。 この階層構造を意識すると、コマンドを覚えるのが楽になると思います。 ## 例 `?`を入力して候補を確認することで、階層構造をある程度確認できます。 ``` (config)#ip ? access-list Named access-list cef Cisco Express Forwarding default-network Flags networks as candidates for default routes dhcp Configure DHCP server and relay parameters domain IP DNS Resolver domain-lookup Enable IP Domain Name System hostname translation domain-name Define the default domain name flow-export Specify host/port to send flow statistics forward-protocol Controls forwarding of physical and directed IP broadcasts ftp FTP configuration commands host Add an entry to the ip hostname table name-server Specify address of name server to use nat NAT configuration commands route Establish static routes scp Scp commands ssh Configure ssh options tcp Global TCP parameters ``` `ip dhcp`の場合 ``` (config)#ip dhcp ? excluded-address Prevent DHCP from assigning certain addresses pool Configure DHCP address pools relay DHCP relay agent parameters ``` `logging`の場合 ``` (config)#logging ? A.B.C.D IP address of the logging host buffered Set buffered logging parameters console Set console logging parameters host Set syslog server IP address and parameters on Enable logging to all enabled destinations trap Set syslog server logging level userinfo Enable logging of user info on privileged mode enabling ``` ## 例外 この法則に当てはまらないものも多々あります。 標準アクセスリストは ``` access-list ... ``` であるのに対し、 拡張アクセスリストは ``` ip access-list ... ``` だったりします。 推測ですが、歴史的経緯とかでそうなってるんじゃないかなと考えています。 ## まとめ - Cisco機器のコマンドは階層構造になっている。 - 例外もある。 - 階層構造を意識すると覚えやすいはず。 ## 環境 - packet tracer 7.3.1 - PTというルータを使用、version 12.2