Anda di halaman 1dari 13

Router Config Commands

accept-lifetime hh:mm:ss <1-31> MONTH <1993-2035> infinite accept-lifetime hh:mm:ss MONTH <1-31> <1993-2035> infinite accept-lifetime start-time infinite no accept-lifetime start-time infinite no accept-lifetime access-class {<1-199> | name} {in | out} no access-class {<1-199> | name} {in | out} access-list <1-99> {deny | permit} { any | {a.b.c.d m.m.m.m | hostname m.m.m.m} } no access-list <1-99> access-list {<1-99> | <100-199>} remark text access-list <100-199> {deny | permit} {ip | icmp | } { a.b.c.d m.m.m.m | any | host hostname} { a.b.c.d m.m.m.m | any | host hostname} access-list <100-199> {deny | permit} {tcp | udp} { a.b.c.d m.m.m.m | any | host hostname} [{eq | neq} [port no | keyword]] { a.b.c.d m.m.m.m| any | host hostname} [{eq | neq} [port no | keyword]] no access-list <100-199> auto-cost reference-bandwidth value no auto-cost reference-bandwidth value auto-summary no auto-summary bandwidth <1-10000000> no bandwidth boot system flash no boot system flash boot system flash WORD no boot system flash WORD boot system ftp WORD no boot system ftp WORD boot system ftp WORD A.B.C.D no boot system ftp WORD A.B.C.D boot system rcp WORD no boot system rcp WORD boot system rcp WORD A.B.C.D no boot system rcp WORD A.B.C.D boot system rom no boot system rom boot system tftp WORD no boot system tftp WORD boot system tftp WORD A.B.C.D no boot system tftp WORD A.B.C.D clock rate <1200-2000000> no clock rate config-register <0x0000-0xFFFF> no config-register <0x0000-0xFFFF> crypto key generate rsa no crypto key generate rsa {deny | permit} { any | {a.b.c.d | hostname } [a.b.c.d]} no {deny | permit} { any | {a.b.c.d | hostname } [a.b.c.d]} {deny | permit} {icmp | ip} { a.b.c.d m.m.m.m | any | host hostname} { a.b.c.d a.b.c.d | any | host hostname} {deny | permit} {tcp | udp} { a.b.c.d m.m.m.m | any | host hostname} [{eq | neq} [port]] { a.b.c.d m.m.m.m | any | host hostname} [{eq | neq} [port] no {deny | permit} {icmp | ip | tcp | udp} { a.b.c.d m.m.m.m | any | host hostname} { a.b.c.d a.b.c.d | any | host hostname} description LINE no description

Router Config Commands


duplex auto duplex full duplex half no duplex enable password WORD no enable password enable secret WORD no enable secret encapsulation frame-relay [ietf] no encapsulation frame-relay [ietf] encapsulation hdlc encapsulation ppp no encapsulation ppp end exit frame-relay interface-dlci dlci-number [ietf] no frame-relay interface-dlci dlci-number [ietf] frame-relay lmi-type {ansi | q933a | cisco} no frame-relay lmi-type {ansi | q933a | cisco} frame-relay map ip ip-address dlci-number {[broadcast] | [ietf | cisco]} no frame-relay map ip ip-address dlci-number {[broadcast] | [ietf | cisco]} history size <0-256> hostname WORD no hostname interface fastEthernet 0/0 interface loopback <0-2147483647> no interface loopback <0-2147483647> interface serial 0/0/0 ip access-group {<1-199> | name} {in | out} no ip access-group {<1-199> | name} {in | out} ip access-list extended name ip access-list standard name ip address <address A.B.C.D> <mask A.B.C.D> [secondary] no ip address <address A.B.C.D> <mask A.B.C.D> [secondary] no ip address ip address A.B.C.D m.m.m.m ip address A.B.C.D m.m.m.m secondary ip address dhcp no ip address dhcp ip authentication key-chain eigrp asn chain-name no ip authentication key-chain eigrp asn chain-name ip authentication mode eigrp asn md5 no ip authentication mode eigrp asn md5 ip classless no ip classless ip default-network A.B.C.D no ip default-network A.B.C.D ip domain-lookup no ip domain-lookup ip domain-name WORD no ip domain-name

Router Config Commands


ip hello-interval eigrp autonomous-system-number timer-value no ip hello-interval eigrp autonomous-system-number timer-value ip hold-time eigrp as-number timer-value no ip hold-time eigrp as-number timer-value ip host WORD A.B.C.D no ip host WORD ip nat {inside | outside} no ip nat {inside | outside} ip nat inside source {list {access-list-number | access-list-name}} {interface type number | pool pool-name} [overload] no ip nat inside source {list {access-list-number | access-list-name}} {interface type number | pool pool-name} [overload] ip nat inside source list <1-199> interface Serial 0/0/0 overload no ip nat inside source list <1-199> interface Serial 0/0/0 overload ip nat inside source list <1-199> pool WORD no ip nat inside source list <1-199> pool WORD ip nat inside source list <1-199> pool WORD overload no ip nat inside source list <1-199> pool WORD overload ip nat inside source list WORD interface Serial 0/0/0 no ip nat inside source list WORD interface Serial 0/0/0 ip nat inside source list WORD interface Serial 0/0/0 overload no ip nat inside source list WORD interface Serial 0/0/0 overload ip nat inside source list WORD pool WORD no ip nat inside source list WORD pool WORD ip nat inside source list WORD pool WORD overload no ip nat inside source list WORD pool WORD overload ip nat inside source static A.B.C.D A.B.C.D no ip nat inside source static A.B.C.D A.B.C.D ip nat inside source static source-local-ipAddress inside-global-ipAddress no ip nat inside source static source-local-ipAddress inside-global-ipAddress ip nat outside no ip nat outside ip nat pool pool-name start-ip end-ip {netmask netmask | prefix-length prefix-length} no ip nat pool pool-name start-ip end-ip {netmask netmask | prefix-length prefix-length} ip nat pool WORD A.B.C.D A.B.C.D netmask A.B.C.D no ip nat pool WORD A.B.C.D A.B.C.D netmask A.B.C.D ip nat pool WORD A.B.C.D A.B.C.D prefix-length <1-32> no ip nat pool WORD A.B.C.D A.B.C.D prefix-length <1-32> ip ospf authentication no ip ospf authentication ip ospf authentication-key key-value no ip ospf authentication-key key-value ip ospf authentication message-digest no ip ospf authentication message-digest ip ospf authentication null no ip ospf authentication null ip ospf cost interface-cost no ip ospf cost no ip ospf cost interface-cost ip ospf dead-interval interval-number no ip ospf dead-interval interval-number ip ospf hello-interval interval-number no ip ospf hello-interval interval-number

Router Config Commands


ip ospf message-digest-key key md5 key-value no ip ospf message-digest-key key md5 key-value ip ospf priority [0 - 255] no ip ospf priority [0 - 255] ip route A.B.C.D m.m.m.m A.B.C.D no ip route A.B.C.D m.m.m.m A.B.C.D no ip route A.B.C.D m.m.m.m ip route A.B.C.D m.m.m.m A.B.C.D [1-255] [distance] [permanent] ip route A.B.C.D m.m.m.m interface-type interface-number [1-255] [distance] [permanent] no ip route A.B.C.D m.m.m.m interface-type interface-number ip subnet-zero no ip subnet-zero ipv6 address X:X:X:X::X/<0-128> [eui-64] no ipv6 address X:X:X:X::X/<0-128> [eui-64] ipv6 host name ipv6-address1 [ipv6-address2...ipv6-address4] no ipv6 host name ipv6-address1 [ipv6-address2...ipv6-address4] ipv6 rip name enable ipv6 router rip word no ipv6 router rip word ipv6 unicast-routing no ipv6 unicast-routing keepalive <0-32767> no keepalive key <0-2147483647> no key <0-2147483647> key chain name no key chain name key chain WORD no key chain WORD key Key-identifier no key Key-identifier key-string LINE no key-string LINE key-string text no key-string text line console <0-0> line vty <0-4> line vty <0-4> <0-4> login no login login local no login local maximum-paths <1-16> no maximum-paths <1-16> network A.B.C.D m.m.m.m area <0-4294967295> no network A.B.C.D m.m.m.m area <0-4294967295> no number network network-number [wildcard-mask] no network network-number [wildcard-mask] passive-interface [default] {interface-type interface-number} no passive-interface [default] {interface-type interface-number} passive-interface default passive-interface interface-type interface-number no passive-interface interface-type interface-number

Router Config Commands


password WORD no password ppp authentication chap no ppp authentication chap no ppp authentication remark text router eigrp autonomous-system no router eigrp autonomous-system router-id id router ospf <process id> no router ospf <process id> no router ospf process-id router rip no router rip router-id A.B.C.D send-lifetime hh:mm:ss <1-31> MONTH <1993-2035> infinite send-lifetime hh:mm:ss MONTH <1-31> <1993-2035> infinite send-lifetime start-time infinite no send-lifetime start-time infinite no send-lifetime service timestamps no service timestamps shutdown no shutdown speed 10 speed 100 speed 1000 speed auto no speed transport input ssh transport input ssh telnet transport input telnet transport input telnet ssh no transport input username< hostname> password <word> no username< hostname> password <word> no username hostname no username WORD variance <1-128> no variance version <1-2> no version <1-2>

Router Exec Commands


clear ip nat translation * configure configure terminal copy running-config startup-config copy startup-config running-config copy tftp flash debug frame-relay lmi no debug frame-relay lmi debug ip rip no debug ip rip debug ppp authentication no debug ppp authentication no debug all disable disconnect [WORD] enable erase startup-config ping { a.b.c.d | hostname } reload resume [WORD] setup show access-lists [access-list-number | access-list-name] show arp show cdp show cdp entry WORD show cdp interface show cdp interface interface-type interface-number show cdp neighbors show cdp neighbors detail show cdp neighbors interface-type interface-number show cdp traffic show controllers show controllers serial 0/0/0 show flash show frame-relay lmi [type number] show frame-relay map show frame-relay pvc [interface interface][dlci] show history show hosts show interfaces <interface type> show interfaces [interface-type interface-number] [description] show interfaces description show ip access-list show ip access-lists [access-list-number | access-list-name] show ip arp show ip interface show ip interface <interface type> show ip interface [interface-type interface-number] show ip interface brief show ip nat statistics show ip nat translations show ip ospf interface brief

Router Exec Commands


show ip ospf neighbor [neighbor-RID] show ip protocols show ip route show ip route [rip | static | connected | eigrp | ospf] show ip route a.b.c.d [m.m.m.m] show ip route ospf [prcessId] show ipv6 interface [interface-type number] show ipv6 interface brief show ipv6 route {[prefix/prefix-length] | [ipv6-address]} show ipv6 route prefix-list WORD show process show protocols fastEthernet 0/0 show protocols loopback <0-2147483647> show protocols serial 0/0/0 show running-config show sessions show startup-config show users show version ssh -l WORD WORD telnet WORD terminal history size <0-256> terminal ip netmask-format bitcount no terminal ip netmask-format bitcount terminal ip netmask-format decimal no terminal ip netmask-format decimal terminal ip netmask-format hexadecimal no terminal ip netmask-format hexadecimal terminal monitor terminal no monitor traceroute { a.b.c.d | hostname } undebug all write erase

Switch Config Commands


bandwidth <1-10000000> no bandwidth cdp enable no cdp enable cdp run no cdp run channel-group <1-6> mode on no channel-group <1-6> mode on crypto key generate rsa no crypto key generate rsa description LINE no description duplex no duplex duplex auto no duplex auto duplex full no duplex full duplex half no duplex half enable password WORD no enable password enable secret WORD no enable secret end exit history size <0-256> hostname WORD no hostname interface fastEthernet 0/1 interface gigabitEthernet 0/1 interface range LINE interface vlan WORD no interface vlan WORD ip address a.b.c.d m.m.m.m no ip address ip default-gateway A.B.C.D no ip default-gateway ip domain-name WORD no ip domain-name line console <0-0> line vty <0-15> line vty <0-15> login no login login local no login local name vlan-name no name vlan-name name WORD password WORD no password shutdown no shutdown

Switch Config Commands


spanning-tree [vlan vlan-number] cost <cost value 1 - 200000000> no spanning-tree [vlan vlan-number] cost <cost value 1 - 200000000> spanning-tree cost <cost value 1 - 200000000> no spanning-tree cost <cost value 1 - 200000000> spanning-tree vlan vlan-number root {primary | secondary} spanning-tree portfast no spanning-tree portfast spanning-tree vlan vlan-id no spanning-tree vlan vlan-id spanning-tree vlan vlan-id priority priority no spanning-tree vlan vlan-id priority priority speed 10 speed 100 speed 1000 no speed speed auto switchport access vlan <1-4094> no switchport access vlan switchport mode access no switchport mode switchport mode dynamic auto switchport mode dynamic desirable switchport mode trunk no switchport nonegotiate switchport nonegotiate switchport port-security no switchport port-security switchport port-security mac-address H.H.H no switchport port-security mac-address H.H.H switchport port-security mac-address sticky no switchport port-security mac-address sticky switchport port-security maximum <1-8192> switchport port-security violation protect no switchport port-security violation protect switchport port-security violation restrict no switchport port-security violation restrict switchport port-security violation shutdown no switchport port-security violation shutdown switchport trunk allowed vlan add WORD no switchport trunk allowed vlan add WORD switchport trunk allowed vlan all no switchport trunk allowed vlan all switchport trunk allowed vlan except WORD no switchport trunk allowed vlan except WORD switchport trunk allowed vlan remove WORD no switchport trunk allowed vlan remove WORD switchport voice vlan <1-4094> no switchport voice vlan <1-4094> transport input ssh telnet transport input telnet ssh no transport input username WORD password LINE no username WORD

Switch Config Commands


vlan <1-4094> no vlan <1-4094> no vlan vlan-id vtp domain <domain-name> vtp domain WORD no vtp domain vtp mode {server | client | transparent} no vtp mode {server | client | transparent} vtp mode client no vtp mode client vtp mode server no vtp mode server vtp mode transparent no vtp mode transparent vtp password <password> no vtp password <password> no vtp password no vtp password WORD vtp pruning no vtp pruning no vtp pruning

10

Switch Exec Commands


configure configure terminal copy running-config startup-config copy startup-config running-config disable disconnect disconnect WORD enable erase startup-config ping a.b.c.d reload resume resume WORD show cdp show cdp entry WORD show cdp interface show cdp interface interface-type interface-number show cdp neighbors show cdp neighbors detail show cdp neighbors interface-type interface-number show cdp traffic show controllers show crypto key mypubkey rsa show flash show history show interfaces [type number] trunk show interfaces show interfaces description show interfaces fastEthernet 0/1 show interfaces fastEthernet 0/1 status show interfaces fastEthernet 0/1 switchport show interfaces fastEthernet 0/1 trunk show interfaces gigabitEthernet 0/1 show interfaces gigabitEthernet 0/1 status show interfaces gigabitEthernet 0/1 switchport show interfaces gigabitEthernet 0/1 trunk show interfaces status show interfaces vlan 1 show interfaces vlan WORD status show ip arp show mac address-table show mac address-table dynamic show mac address-table dynamic address hhhh.hhhh.hhhh show mac address-table dynamic address hhhh.hhhh.hhhh [interface interface-type interface-number] [vlan WORD] show mac address-table dynamic interface fastEthernet 0/0 show mac address-table dynamic interface fastEthernet 0/0 address hhhh.hhhh.hhhh [vlan WORD] show mac address-table dynamic interface fastEthernet 0/0 vlan WORD address hhhh.hhhh.hhhh show mac address-table dynamic vlan WORD show mac address-table static show mac address-table static address hhhh.hhhh.hhhh show mac address-table static address hhhh.hhhh.hhhh [interface interface-type interface-number] [vlan WORD] show mac address-table static [interface interface-type interface-number] [vlan WORD]

11

Switch Exec Commands


show mac address-table vlan WORD show port-security show port-security [interface interface-type interface-number] show port-security interface gigabitEthernet 0/0 show port-security interface serial 0/0/0 show running-config show sessions show spanning-tree show spanning-tree [vlan vlan-id] bridge show spanning-tree vlan vlan-ID show startup-config show users show version show vlan show vlan brief show vlan id WORD show vlan name WORD show vlan summary show vtp status ssh -l WORD WORD telnet WORD write erase

12

PC Commands
arp -a arp -d * arp -d A.B.C.D gateway A.B.C.D ip address A.B.C.D A.B.C.D ipconfig /all ping a.b.c.d tracert a.b.c.d

13