Difference between revisions of "Cisco: Perintah yang perlu dikuasai"

From OnnoWiki
Jump to navigation Jump to search
(New page: 10 commands you should master when working with the Cisco IOS By David Davis in Data Center, June 12, 2008, 11:33 PM PST Email Alert RSS Comments Save Facebook 0 ...)
 
Line 1: Line 1:
10 commands you should master when working with the Cisco IOS
+
10 perintah yang perlu dikuasai jika kita bekerja dengan Cisco IOS.
  
By David Davis in Data Center, June 12, 2008, 11:33 PM PST
+
==?==
  
    Email Alert
+
Ini mungkin tampak terlalu jelas bahwa Anda harus tahu bagaimana untuk mengetik? untuk meminta bantuan ketika menggunakan Cisco IOS. Namun, Cisco IOS benar-benar berbeda dari sistem operasi lain ketika datang untuk menggunakan tanda tanya (help key). Karena IOS adalah sistem operasi dengan command line dengan ribuan kemungkinan perintah dan parameter, menggunakan "?" dapat menolong anda.Ini mungkin tampak terlalu jelas bahwa Anda harus tahu bagaimana untuk mengetik? untuk meminta bantuan ketika menggunakan Cisco IOS. Namun, Cisco IOS benar-benar berbeda dari sistem operasi lain ketika datang untuk menggunakan tanda tanya (help key). Karena IOS adalah sistem operasi dengan command line dengan ribuan kemungkinan perintah dan parameter, menggunakan "?" dapat menolong anda.
    RSS
 
  
    Comments
+
Anda dapat menggunakan perintah dalam banyak cara. Pertama, gunakan ketika anda tidak tahu apa perintah yang perlu diketik. Misalnya,  type ? pada baris perintah untuk daftar semua perintah yang mungkin. Anda juga dapat menggunakan? ketika Anda tidak tahu apa perintah itu parameter berikutnya harus. Sebagai contoh, Anda mungkin ketik show ip? Jika router tidak memerlukan parameter lain untuk perintah, router akan menawarkan CR sebagai satu-satunya pilihan. Akhirnya, digunakan? untuk melihat semua perintah yang dimulai dengan huruf tertentu. Misalnya, show c? akan mengeluarkan daftar perintah yang dimulai dengan huruf c.
    Save
 
    Facebook 0
 
    Twitter 8
 
    Linkedin 0
 
    More
 
  
Becoming proficient with the Cisco IOS means learning some essential commands. This quick reference describes 10 commands you'll need to rely on when handling various configuration and troubleshooting tasks.
 
  
Editor's Note: This article was originally published on TechRepublic July 25, 2006. For your convenience, I'm republishing it in the blog to be part of the Cisco Routers and Switches archive. It is also available as a PDF download.
+
==show running-configuration==
  
The Cisco IOS provides thousands of commands, and configuring it can be challenging. Here are 10 commands you need to know, inside and out, when using the Cisco IOS.
+
Perintah show running-config akan memperlihatkan konfigurasi saat ini dari  router, switch, atau firewall. running-configuration adalah konfigurasi yang ada di memori router. Anda mengubah konfigurasi ini ketika anda membuat perubahan ke router. Perlu diingat bahwa konfigurasi tidak disimpan sampai anda melakukan copy running-konfigurasi startup-konfigurasi. Perintah ini dapat disingkat menjadi sh run.
#1: The "?"
 
  
It may seem entirely too obvious that you should know how to type ? to ask for help when using the Cisco IOS. However, the Cisco IOS is completely different from other operating systems when it comes to using the question mark (help key). As the IOS is a command-line operating system with thousands of possible commands and parameters, using the ? can save your day.
 
  
You can use the command in many ways. First, use it when you don't know what command to type. For example, type ? at the command line for a list of all possible commands. You can also use ? when you don't know what a command's next parameter should be. For example, you might type show ip ? If the router requires no other parameters for the command, the router will offer CR as the only option. Finally, use ? to see all commands that start with a particular letter. For example, show c? will return a list of commands that start with the letter c.
+
==copy running-configuration startup-configuration==
#2: show running-configuration
 
  
The show running-config command shows the router, switch, or firewall's current configuration. The running-configuration is the config that is in the router's memory. You change this config when you make changes to the router. Keep in mind that config is not saved until you do a copy running-configuration startup-configuration. This command can be abbreviated sh run.
+
Perintah ini akan menyimpan konfigurasi yang sedang dimodifikasi (di RAM), juga dikenal sebagai running-konfigurasi, ke RAM nonvolatile (NVRAM). Jika daya hilang, NVRAM akan menjaga konfigurasi ini. Dengan kata lain, jika Anda mengedit konfigurasi router, tidak menggunakan perintah ini dan reboot router  - perubahan tersebut akan hilang. Perintah ini dapat disingkat copy run start. Perintah copy juga dapat digunakan untuk menyalin berjalan atau konfigurasi startup dari router ke server TFTP jika sesuatu terjadi pada router.Perintah ini akan menyimpan konfigurasi yang sedang dimodifikasi (di RAM), juga dikenal sebagai running-konfigurasi, ke RAM nonvolatile (NVRAM). Jika daya hilang, NVRAM akan menjaga konfigurasi ini. Dengan kata lain, jika Anda mengedit konfigurasi router, tidak menggunakan perintah ini dan reboot router  - perubahan tersebut akan hilang. Perintah ini dapat disingkat copy run start. Perintah copy juga dapat digunakan untuk menyalin berjalan atau konfigurasi startup dari router ke server TFTP jika sesuatu terjadi pada router.
#3: copy running-configuration startup-configuration
 
  
This command will save the configuration that is currently being modified (in RAM), also known as the running-configuration, to the nonvolatile RAM (NVRAM). If the power is lost, the NVRAM will preserve this configuration. In other words, if you edit the router's configuration, don't use this command and reboot the router--those changes will be lost. This command can be abbreviated copy run start. The copy command can also be used to copy the running or startup configuration from the router to a TFTP server in case something happens to the router.
+
==show interface==
#4: show interface
 
  
 
The show interface command displays the status of the router's interfaces. Among other things, this output provides the following:
 
The show interface command displays the status of the router's interfaces. Among other things, this output provides the following:
  
    Interface status (up/down)
+
Interface status (up/down)
    Protocol status on the interface
+
Protocol status on the interface
    Utilization
+
Utilization
    Errors
+
Errors
    MTU
+
MTU
  
 
This command is essential for troubleshooting a router or switch. It can also be used by specifying a certain interface, like shint fa0/0.
 
This command is essential for troubleshooting a router or switch. It can also be used by specifying a certain interface, like shint fa0/0.
#5: show ip interface
+
 
 +
==show ip interface==
  
 
Even more popular than show interface are show ip interface and show ip interface brief. The show ip interface command provides tons of useful information about the configuration and status of the IP protocol and its services, on all interfaces. The show ip interface brief command provides a quick status of the interfaces on the router, including their IP address, Layer 2 status, and Layer 3 status.
 
Even more popular than show interface are show ip interface and show ip interface brief. The show ip interface command provides tons of useful information about the configuration and status of the IP protocol and its services, on all interfaces. The show ip interface brief command provides a quick status of the interfaces on the router, including their IP address, Layer 2 status, and Layer 3 status.
#6: config terminal, enable, interface, and router
+
 
 +
==config terminal, enable, interface, dan router==
  
 
Cisco routers have different modes where only certain things can be shown or certain things can be changed. Being able to move between these modes is critical to successfully configuring the router.
 
Cisco routers have different modes where only certain things can be shown or certain things can be changed. Being able to move between these modes is critical to successfully configuring the router.
  
 
For example, when logging in, you start off at the user mode (where the prompt looks like >). From there, you type enable to move to privileged mode (where the prompt looks like #). In privileged mode, you can show anything but not make changes. Next, type config terminal (or config t) to go to global configuration mode (where the prompt looks like router(config)# ). From here, you can change global parameters. To change a parameter on an interface (like the IP address), go to interface configuration mode with the interface command (where the prompt looks like router(config-if)#). Also from the global configuration mode, you can go into router configuration using the router {protocol} command. To exit from a mode, type exit.
 
For example, when logging in, you start off at the user mode (where the prompt looks like >). From there, you type enable to move to privileged mode (where the prompt looks like #). In privileged mode, you can show anything but not make changes. Next, type config terminal (or config t) to go to global configuration mode (where the prompt looks like router(config)# ). From here, you can change global parameters. To change a parameter on an interface (like the IP address), go to interface configuration mode with the interface command (where the prompt looks like router(config-if)#). Also from the global configuration mode, you can go into router configuration using the router {protocol} command. To exit from a mode, type exit.
#7: no shutdown
+
 
 +
==no shutdown==
  
 
The no shutdown command enables an interface (brings it up). This command must be used in interface configuration mode. It is useful for new interfaces and for troubleshooting. When you're having trouble with an interface, you may want to try a shut and no shut. Of course, to bring the interface down, reverse the command and just say shutdown. This command can be abbreviated no shut.
 
The no shutdown command enables an interface (brings it up). This command must be used in interface configuration mode. It is useful for new interfaces and for troubleshooting. When you're having trouble with an interface, you may want to try a shut and no shut. Of course, to bring the interface down, reverse the command and just say shutdown. This command can be abbreviated no shut.
#8: show ip route
+
 
 +
==show ip route==
  
 
The show ip route command is used to show the router's routing table. This is the list of all networks that the router can reach, their metric (the router's preference for them), and how to get there. This command can be abbreviated shipro and can have parameters after it, like shiproospf for all OSPF routers. To clear the routing table of all routes, you do clear ip route *. To clear it of just one route, do clear ip route 1.1.1.1 for clearing out that particular network.
 
The show ip route command is used to show the router's routing table. This is the list of all networks that the router can reach, their metric (the router's preference for them), and how to get there. This command can be abbreviated shipro and can have parameters after it, like shiproospf for all OSPF routers. To clear the routing table of all routes, you do clear ip route *. To clear it of just one route, do clear ip route 1.1.1.1 for clearing out that particular network.
#9: show version
+
 
 +
==show version==
  
 
The show version command gives you the router's configuration register (essentially, the router's firmware settings for booting up), the last time the router was booted, the version of the IOS, the name of the IOS file, the model of the router, and the router's amount of RAM and Flash. This command can be abbreviated shver.
 
The show version command gives you the router's configuration register (essentially, the router's firmware settings for booting up), the last time the router was booted, the version of the IOS, the name of the IOS file, the model of the router, and the router's amount of RAM and Flash. This command can be abbreviated shver.
#10: debug
+
 
 +
==debug==
  
 
The debug command has many options and does not work by itself. It provides detailed debugging output on a certain application, protocol, or service. For example, debug ip route will tell you every time a router is added to or removed from the router.
 
The debug command has many options and does not work by itself. It provides detailed debugging output on a certain application, protocol, or service. For example, debug ip route will tell you every time a router is added to or removed from the router.

Revision as of 16:09, 24 July 2015

10 perintah yang perlu dikuasai jika kita bekerja dengan Cisco IOS.

?

Ini mungkin tampak terlalu jelas bahwa Anda harus tahu bagaimana untuk mengetik? untuk meminta bantuan ketika menggunakan Cisco IOS. Namun, Cisco IOS benar-benar berbeda dari sistem operasi lain ketika datang untuk menggunakan tanda tanya (help key). Karena IOS adalah sistem operasi dengan command line dengan ribuan kemungkinan perintah dan parameter, menggunakan "?" dapat menolong anda.Ini mungkin tampak terlalu jelas bahwa Anda harus tahu bagaimana untuk mengetik? untuk meminta bantuan ketika menggunakan Cisco IOS. Namun, Cisco IOS benar-benar berbeda dari sistem operasi lain ketika datang untuk menggunakan tanda tanya (help key). Karena IOS adalah sistem operasi dengan command line dengan ribuan kemungkinan perintah dan parameter, menggunakan "?" dapat menolong anda.

Anda dapat menggunakan perintah dalam banyak cara. Pertama, gunakan ketika anda tidak tahu apa perintah yang perlu diketik. Misalnya, type ? pada baris perintah untuk daftar semua perintah yang mungkin. Anda juga dapat menggunakan? ketika Anda tidak tahu apa perintah itu parameter berikutnya harus. Sebagai contoh, Anda mungkin ketik show ip? Jika router tidak memerlukan parameter lain untuk perintah, router akan menawarkan CR sebagai satu-satunya pilihan. Akhirnya, digunakan? untuk melihat semua perintah yang dimulai dengan huruf tertentu. Misalnya, show c? akan mengeluarkan daftar perintah yang dimulai dengan huruf c.


show running-configuration

Perintah show running-config akan memperlihatkan konfigurasi saat ini dari router, switch, atau firewall. running-configuration adalah konfigurasi yang ada di memori router. Anda mengubah konfigurasi ini ketika anda membuat perubahan ke router. Perlu diingat bahwa konfigurasi tidak disimpan sampai anda melakukan copy running-konfigurasi startup-konfigurasi. Perintah ini dapat disingkat menjadi sh run.


copy running-configuration startup-configuration

Perintah ini akan menyimpan konfigurasi yang sedang dimodifikasi (di RAM), juga dikenal sebagai running-konfigurasi, ke RAM nonvolatile (NVRAM). Jika daya hilang, NVRAM akan menjaga konfigurasi ini. Dengan kata lain, jika Anda mengedit konfigurasi router, tidak menggunakan perintah ini dan reboot router - perubahan tersebut akan hilang. Perintah ini dapat disingkat copy run start. Perintah copy juga dapat digunakan untuk menyalin berjalan atau konfigurasi startup dari router ke server TFTP jika sesuatu terjadi pada router.Perintah ini akan menyimpan konfigurasi yang sedang dimodifikasi (di RAM), juga dikenal sebagai running-konfigurasi, ke RAM nonvolatile (NVRAM). Jika daya hilang, NVRAM akan menjaga konfigurasi ini. Dengan kata lain, jika Anda mengedit konfigurasi router, tidak menggunakan perintah ini dan reboot router - perubahan tersebut akan hilang. Perintah ini dapat disingkat copy run start. Perintah copy juga dapat digunakan untuk menyalin berjalan atau konfigurasi startup dari router ke server TFTP jika sesuatu terjadi pada router.

show interface

The show interface command displays the status of the router's interfaces. Among other things, this output provides the following:

Interface status (up/down)
Protocol status on the interface
Utilization
Errors
MTU

This command is essential for troubleshooting a router or switch. It can also be used by specifying a certain interface, like shint fa0/0.

show ip interface

Even more popular than show interface are show ip interface and show ip interface brief. The show ip interface command provides tons of useful information about the configuration and status of the IP protocol and its services, on all interfaces. The show ip interface brief command provides a quick status of the interfaces on the router, including their IP address, Layer 2 status, and Layer 3 status.

config terminal, enable, interface, dan router

Cisco routers have different modes where only certain things can be shown or certain things can be changed. Being able to move between these modes is critical to successfully configuring the router.

For example, when logging in, you start off at the user mode (where the prompt looks like >). From there, you type enable to move to privileged mode (where the prompt looks like #). In privileged mode, you can show anything but not make changes. Next, type config terminal (or config t) to go to global configuration mode (where the prompt looks like router(config)# ). From here, you can change global parameters. To change a parameter on an interface (like the IP address), go to interface configuration mode with the interface command (where the prompt looks like router(config-if)#). Also from the global configuration mode, you can go into router configuration using the router {protocol} command. To exit from a mode, type exit.

no shutdown

The no shutdown command enables an interface (brings it up). This command must be used in interface configuration mode. It is useful for new interfaces and for troubleshooting. When you're having trouble with an interface, you may want to try a shut and no shut. Of course, to bring the interface down, reverse the command and just say shutdown. This command can be abbreviated no shut.

show ip route

The show ip route command is used to show the router's routing table. This is the list of all networks that the router can reach, their metric (the router's preference for them), and how to get there. This command can be abbreviated shipro and can have parameters after it, like shiproospf for all OSPF routers. To clear the routing table of all routes, you do clear ip route *. To clear it of just one route, do clear ip route 1.1.1.1 for clearing out that particular network.

show version

The show version command gives you the router's configuration register (essentially, the router's firmware settings for booting up), the last time the router was booted, the version of the IOS, the name of the IOS file, the model of the router, and the router's amount of RAM and Flash. This command can be abbreviated shver.

debug

The debug command has many options and does not work by itself. It provides detailed debugging output on a certain application, protocol, or service. For example, debug ip route will tell you every time a router is added to or removed from the router.



Referensi