perintah router
TRANSCRIPT
Cisco Router Command
Daftar Perintah – Command pada Router Cisco
Command pada router cisco devices terdiri dari Router CommandsCISCO ROUTER COMMANDS :
Usermode Commands
1. disconnect, hapus sesi telnet dan logout 2. enable, masuk ke privilegemode 3. ping <host/ip> 4. traceroute <host/ip>
Privilegemode Commands
1. clear arp-cache, hapus cache arp 2. configure terminal, masuk ke global configuration mode 3. copy running-config startup-config, simpan konfigurasi sekarang 4. copy startup-config running-config, load konfigurasi yang tersimpan 5. debug ip packet, debug paket dari tcp/ip 6. disable, kembali ke privilegemode dari global configuration mode 7. disconnect <telnet id> 8. erase startup-config, hapus file konfigurasi dari router 9. logout, keluar dari privilegemode 10. ping <hostname/ip> 11. reload, load kembali startup-config 12. resume <telnet id>, konek kembali setelah diskonek 13. show access-list, memperlihatkan semua access-list dari semua protokol pada router 14. show banner, memperlihatkan banner 15. show cdp, memperlihatkan status CDP router 16. show cdp interface, memperlihatkan interface CDP 17. show cdp neighbor 18. show cdp traffic 19. show clock 20. show flash, memperlihatkan IOS image dan file yang tersimpan di flash memory
21. show frame-relay lmi, memperlihatkan statistik detail LMI 22. show frame-relay map 23. show frame-relay pvc <nomer dlci> 24. show history, memperlihatkan semua perintah yang telah dieksekusi 25. show hosts, memperlihatkan static host yang disimpan 26. show interfaces, memperlihatkan interface yang dimiliki (semua)
secara detail 27. show interfaces ethernet 0 28. show interfaces serial 0
29. show interfaces loopback 0 30. show ip arp 31. show ip eigrp neighbors 32. show ip eigrp neighbors detail 33. show ip eigrp topology 34. show ip eigrp traffic, memperlihatkan traffic statistik dari protokol eigrp 35. show ip interface 36. show ip interface brief, verify konfigurasi ip 37. show ip ospf database 38. show ip ospf interface 39. show ip ospf neighbor detail 40. show ip route, memperlihatkan konfigurasi routing 41. show protocols, memperlihatkan protokol routing yang telah dikonfigurasi dan sedang berjalan 42. show running-config, memperlihatkan konfigurasi global yang sedang berjalan 43. show sessions, memperlihatkan sesi yang ada sekarang 44. show startup-config, memperlihatkan konfigurasi yang tersimpan pada flash 45. show version, memperlihatkan informasi hardware dan firmware 46. telnet <host/ip> 47. traceroute <host/ip> 48. vlan database, mengakses vlan database atau masuk ke konfigurasi VTP 49. write erase 50. write memory 51. write terminal
Global configuration mode Commands
1. access-list <nomer> {permit|deny} <source ip address> 2. access-list <nomer> {permit|deny} <any> 3. access-list <nomer> {permit|deny} <ip address> <ip address> 4. access-list <nomer> {permit|deny} <hostname> <ip address> 5. banner motd <string bannernya> 6. cdp advertise-v2 7. cdp holdtime <detik>, mengubah nilai holdtime cdp 8. cdp run 9. cdp timer <detik>, mengubah nilai cdp timer 10. config-register <nilai> 11. dialer-list <nomer> protocol ip permit 12. enable password <passwordnya>, set password untuk masuk ke
mode privilege 13. enable secret <passwordnya>, set enkripsi untuk password yang disimpan 14. end, kembali ke mode privilege 15. hostname <namahost>, set nama host 16. interface ethernet 0, masuk ke subconfiguration interface ethernet 0 17. interface fastethernet 0, masuk ke subconfiguration interface fastethernet 0 18. interface serial 0, masuk ke subconfiguration interface serial 0
19. interface vlan <nomer vlan>, masuk ke subconfiguration vlan 20. ip default-gateway <ip address>, set default gateway 21. ip default-network <ip network> 22. ip host <nama host> <ip address>, set static hostname lain 23. ip name-server <ip address>, set DNS router 24. ip route <prefix> <mask> {next-hop-ip-addr|interface-type} 25. ip route 0.0.0.0 0.0.0.0 <ip gateway>, set defaut gateway / static route 26. ip route <ip network> <mask> <ip gateway>, set static route 27. ip routing 28. ipx routing 29. isdn switch-type <tipe switch> 30. line aux 31. line console 0, masuk ke konfigurasi console nomer 0 32. line vty 0 4, masuk ke konfigurasi vty untuk 5 buah vty 33. no banner motd, menghapus banner 34. no ip routing, menghapus ip routing 35. no router igrp, menghapus konfigurasi route igrp 36. no router ospf, menghapus konfigurasi route ospf 37. no router rip, menghapus konfigurasi route rip 38. no vlan <nomer>, menghapus vlan nomer ke sekian 39. router eigrp <auth_sys>, masuk ke konfigurasi routing menggunakan eigrp 40. router ospf <proses id>, masuk ke konfigurasi routing menggunakan ospf 41. router rip, masuk ke konfigurasi routing menggunakan rip 42. snmp-server enable traps vtp 43. username <nama user> password <passwordnya>, set username dan passwordnya
Interface subconfiguration mode Commands
1. bandwidth <kilobits>, set bandwidth yang akan dilalui interface ini dalam kilobits 2. cdp enable 3. clock rate <bits per detik>, set clock rate dalam bits/s 4. compress stac <nomer> in
Line subconfiguration mode Commands
1. exec-timeout <menit> [detik], pilihan detik opsional 2. login synchronous 3. password <passwordnya>, set passwordnya
Subinterface subconfiguration mode Commands
1. description <string deskripsi>, set deskripsi dari subinterface
IP Routing Protocol subconfiguration mode Commands
1. network <ip network>, set ip network Contoh :Lab_A>enableLab_A#configure terminal atau config tLab_A(router)#interface fast eth0/0 atau int f0/0Lab_A(router-config)#ip add 192.168.0.2 255.255.255.0 (misal)Lab_A(router-config)#no shut (mengaktifkan Network IP kayak servicenetwork restart kalo di linux)Lab_A(router-config)#endLab_A#show ip interface brief ( melihat configurasi IP yg telah diseting
In this section you will learn about the router commands, configurations, privileged mode commands, routing protocols, cisco labs and network configurations.
There are hundreds of basic and advance level commands of a router. It is not easy to remember all the commands. But some commands are frequently used and can be remembered with some practice. I have provided a list of the most commonly used commands based on their features and usage. You will find here some basic terminology of a router.
Routing: Routing is a process of moving the data (packets) through an inter network. Routing performs the two basic tasks. Define the paths for a packet and then forward the packets on the basis of defined paths. Routing can also be defined as the communication between two or more logically and physical networks and this communication (packet transfer) is brought by a router.
First of all you should remember the keyboard shortcuts of a router.
Keyboard ShortcutsCTRL-N - show next commandCTRL-P - show previous commandSHIFT-CTRL-6 – Break
Configuring the Router
You will be able to learn the basic commands for configuring a router.sh running-config - details the running configuration file (RAM)sh startup-config - displays the configuration stored in NVRAMsetup - Will start the the automatic setup; the same as when you first boot the routerconfig t - use to execute configuration commands from the terminalconfig mem - executes configuration commands stored in NVRAM; copies startup-config to running-config
config net - used to retrieve configuration info from a TFTP servercopy running-config startup-config - copies saved config in running config (RAM) to NVRAM or "write memory" for IOS under ver.11copy startup-config running-config - copies from non-volatile (NVRAM) to current running config (RAM)boot system flash - tells router which IOS file in flash to boot fromboot system tftp - tells router which IOS file on the tftp server to boot fromboot system rom - tell router to boot from ROM at next bootcopy flash tftp - Copies flash to tftp servercopy tftp flash - Restores flash from tftp servercopy run tftp - Copies the current running-config to tftp servercopy tftp run - Restores the running-config from tftp server
General Commands
Here is a list of the general commands. These are the basic level commands and most commonly usedno shutdown - (enables the interface)reload - restarts the routersh ver - Cisco IOS version, uptime of router, how the router started, where system was loaded from, the interfaces the POST found, and theconfiguration register sh clock - shows date and time on routersh history - shows the history of your commandssh debug - shows all debugging that is currently enabledno debug all - turns off all debuggingsh users - shows users connected to routersh protocols - shows which protocols are configuredbanner motd # Your customized message here # - Set/change bannerhostname - use to configure the hostname of the routerclear counters - clear interface counters
Privileged Mode commands of a router
Learn how to work in the privileged mode of a router.enable - get to privileged modedisable - get to user modeenable password - sets privileged mode passwordenable secret - sets encrypted privileged mode passwordSetting Passwords on routerHere you will be able to learn how to set the password on a router.enable secret - set encrypted password for privileged accessenable password - set password for privileged access (used when there is no enable secret and when using older software)Setting the password for console access:(config)#line console 0(config-line)#login
(config-line)#password Set password for virtual terminal (telnet) access (password must be set to access router through telnet):(config)#line vty 0 4(config-line)#login(config-line)#password Set password for auxiliary (modem) access:(config)#line aux 0(config-line)#login(config-line)#password
Router Processes & Statistics
By these command you can see the statistics and different processes of the router.sh processes - shows active processes running on routersh process cpu - shows cpu statisticssh mem - shows memory statisticssh flash - describes the flash memory and displays the size of files and the amount of free flash memorysh buffers - displays statistics for router buffer pools; shows the size of the Small, Middle, Big, Very Big, Large and Huge Bufferssh stacks - shows reason for last reboot, monitors the stack use of processes and interrupts routines
IP Commands
Here is a list of the IP CommandsConfigure IP on an interface:int serial 0ip address 157.89.1.3 255.255.0.0int eth 0ip address 2008.1.1.4 255.255.255.0
Other IP Commands:
sh ip route - view ip routing tableip route [administrative_distance] - configure a static IP routeip route 0.0.0.0 0.0.0.0 - sets default gatewayip classless - use with static routing to allow packets destined for unrecognized subnets to use the best possible routesh arp - view arp cache; shows MAC address of connected routersip address 2.2.2.2 255.255.255.0 secondary - configure a 2nd ip address on an interfacesh ip protocol
CDP Commands (Cisco Discovery Protocol uses layer 2 multicast over a SNAP-capable link to send data):
sh cdp neighbor - shows directly connected neighborssh cdp int - shows which interfaces are running CDPsh cdp int eth 0/0 - show CDP info for specific interfacesh cdp entry - shows CDP neighbor detailcdp timer 120 - change how often CDP info is sent (default cdp timer is 60)cp holdtime 240 - how long to wait before removing a CDP neighbor (default CDP holdtime is 180)sh cdp run - shows if CDP turned onno cdp run - turns off CDP for entire router (global config)no cdp enable - turns off CDP on specific interface
IPX Commands
Enable IPX on router:ipx routingConfigure IPX + IPX-RIP on an int:int ser 0ipx network 4A
Other Commands:
sh ipx route - shows IPX routing tablesh ipx int e0 - shows ipx address on intsh ipx servers - shows SAP tablesh ipx traffic - view traffic statisticsdebug ipx routing activity - debugs IPS RIP packetsdebug ipx sap - debugs SAP packets
Routing Protocols
RIP, IGPR and OSPF are the routing protocols and here is a list of the commands for the working on the routing protocols.Configure RIP:router ripnetwork 157.89.0.0network 208.1.1.0Other RIP Commands:debug ip rip - view RIP debugging infoConfigure IGRP:router IGRP 200network 157.89.0.0network 208.1.1.0Other IGRP Commands:debug ip igrp events - view IGRP debugging infodebug ip igrp transactions - view IGRP debugging infoAccess Lists
Here is a list of the Access list command of a router.sh ip int ser 0 - use to view which IP access lists are applies to which intsh ipx int ser 0 - use to view which IPX access lists are applies to which intsh appletalk int ser 0 - use to view which AppleTalk access lists are applies to which intView access lists:sh access-listssh ip access-listssh ipx access-listssh appletalk access-listsApply standard IP access list to int eth 0:access-list 1 deny 200.1.1.0 0.0.0.255access-list 1 permit anyint eth 0ip access-group 1 inApply Extended IP access list to int eth 0:access-list 100 deny tcp host 1.1.1.1 host 2.2.2.2 eq 23access-list 100 deny tcp 3.3.3.0 0.0.0.255 any eq 80int eth 0ip access-group 100 outApply Standard IPX access list to int eth 0:access-list 800 deny 7a 8000access-list 800 permit -1int eth 0ipx access-group 800 outApply Standard IPX access list to int eth 0:access-list 900 deny sap any 3378 -1access-list 900 permit sap any all -1int eth 0ipx access-group 900 out
WAN Configurations Commands
Networking over WAN is the main functionality of a router. The most common use of a router is for the WAN connectivity. Here is a list of the commands for the different methods of the WAN connectivity.
PPP Configuration
Point to point protocol is a method for the WAN connectivity and you will find here some commands of PPP.encapsulation pppppp authentication ppp chap hostname ppp pap sent-username sh int ser 0 - use to view encapsulation on the interface
Frame-Relay Configuration
One of the methods for the WAN connectivity is the Frame Relay. Find here some basic commands for the WAN connectivity through Frame Relay.encapsulation frame-relay ietf - use IETF when setting up a frame-relay network between a Ciscorouter and a non-Cisco routerframe-relay lmi-type ansi - LMI types are Cisco, ANSI, Q933A; Cisco is the default; LMI type is auto-sensed in IOS v11.2 and upframe-relay map ip 3.3.3.3 100 broadcast - if inverse ARP won't work, map Other IP to Your DLCI # (local)keep alive 10 - use to set keep alivesh int ser 0 - use to show DLCI, LMI, and encapsulation infosh frame-relay pvc - shows the configured DLCI's; shows PVC traffic statssh frame-relay map - shows route mapssh frame-relay lmi - shows LMI info
Miscellaneous Commands
In the last but not least here is a list of the some miscellaneous and useful commandssh controller t1 - shows status of T1 linessh controller serial 1 - use to determine if DCE or DTE device(config-if)#clock rate 6400 - set clock on DCE (bits per second)(config-if)#bandwidth 64 - set bandwidth (kilobits)