0% found this document useful (0 votes)
48 views5 pages

Commands I Used in CLI

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 5

Commands I used in CLI

OSPF:
R# show ip ospf database
R# show ip ospf interface[interface-id]
R# show ip ospf interface brief
R#clear ip ospf process
R# show ip ospf neighbor
R(config)# router ospf [process-id)
R(config-router)# no auto-summary
R(config-router)#network [network address] [wildcard mask] area[area-id]
R(config-router)# default-information originate
R(config-router)#maximum-paths [maximum path]
R(config-router)# auto-cost reference-bandwidth [in mgbps]
R(config-router)# distance
R(config-router)# passive-interface default
R(config-router)# shutdown
R(config)#router-id [router-id in IP form]
R(config-if)# ip ospf cost [cost]
R(config-if)# bandwidth [bandwidth in kbps]
R(config-if)# speed [10 | 100 | auto]
R(config-if)# ip ospf [process-id] area[area-id]
R(config-if)# ip ospf priority[priority number]
R(config-if)# ip ospf network [broadcast | non-broadcast |point-to-point]
R(config-if)# ip ospf hello-interval [<1-65535> seconds]
R(config-if)# ip ospf dead-interval
R(config-if)# ip ospf authentication-key [text]
R(config-if)# ip ospf authentication
R(config-if)# ip mtu [<68-1500> bytes]

HSRP:
R#show standby
R(config-if)# standby [group number <0-255>]
R(config-if)# standby version [1 | 2]
R(config-if)#standby [group number] IP [IP address]
R(config)#standby [group number] priority[priority number]
R(config-if)#standby [group number] preempt

IPV6:
R# show ipv6 interface brief
R# show ipv6 neighbor
R(config)# IPV6 unicast-routing
R(config-if)# IPv6 address [ipv6 address]/[prefix length]
R(config-if)# ipv6 address [ipv6 address network portion/prefix] eui-64
R(config-if)# ipv6 enable
R(confif-if)# ipv6 address [ipv6 address/prefix] anycast
R(config-if)# ipv6 address autoconfig

Switch basic commands:


S(config)# banner motd [delimiting character-message-delimiting character]
S(config)# enable password[password]
S(config)# service password-encryption
S(config)# enable secret

Standard numbered ACLs:


R# show ip access-list
R# show access-list
R(config)# access-list remark [description]
R(config)# access-list [number] {deny | permit} [ip] [wildcard-mask]
R(config-if)# ip access-group [number] {IN | OUT}
R(config)#ip access list standard [acl_number]
R(config)# ip acess-list resequence [acl-id] [starting number] [increment]

Standard names ACLs:


R(config)# ip acess-list resequence [acl-id] [starting number] [increment]
R(config)# ip access-list standard [acl_name]
R(config_std-nacl)#[entry number] [deny | permit] [ip] [wildcard-mask]
R(config_std-nacl)# no [entry number]
Extended numbered ACLs:
R(config)# acess-list [number] [permit | deny] [protocol] [src-ip] [dst-ip]
Extended names ACLs:
R(config)# ip access-list extended [number/name]
R(config_ext_nacl)# [number] [deny | permit] [protocol] [src-ip] [dst-ip]
R(config_ext_nacl)# {deny | permit} {tcp | udp} [src-ip] {eq|gt|lt|neq|range} [src-port-num]
[dst-ip] {eq|gt|lt|neq|range} [dst-port-num]

CDP:
R# show cdp
R# show cdp traffic
R#show cdp interface
R# show cdp neighbors
R# show cdp neighbors detail
R# show cdp entry [name]
R(config)# [no] cdp run
R(config-if)# [no] cdp enable
R(config)# cdp timer [seconds]
R(config)# cdp holdtime [seconds]
R(config)# [no] cdp advertise-v2

LLDP:
R# show lldp
R# show lldp traffic
R# show lldp interface
R# show lldp neighbors
R#show lldp neighbors detail
R# show lldp entry
R(config)# lldp run
R(config)# lldp timer [seconds]
R(config)# lldp holdtime [seconds]
R(config)# lldp reinit [seconds]
R(config-if)# lldp transmit
R(config-if)# lldp receive
NTP:
R# show clock
R# show clock detail
R# show calendar
R# clock set [hh/mm/ss] [day] [month] [year]
R# calendar set [hh/mm/ss/ [day] [month] [year]
R# clock update-calendar
R# clock read-calendar
R# show ntp associations
R# show ntp status
R(config)# clock timezone [timezone] [hh offset] [mm offset]
R(config)# clock summer-time edt recurring [start of DST: day/month/hour] [end of DST]
R(config)# ntp server [ip-address]
R(confog)# ntp update-calendar
R(config)# ntp source [loopback-int]
R(config)# ntp master [stratum]
R(config)# ntp peer [ip-address]

DNS:
R# show hosts
R(config)# ip dns server
R(config)# ip host [hostname] [ip address]
R(config)# ip name-server [ip address]
R(config)# ip domain lookup
R(config)# ip domain name [Kurdistan.com]

Windows CMD:
C:\users\sarkar> ipconfig
C:\users\sarkar> ipconfig /all
C:\users\sarkar> ipconfig /renew
C:\users\sarkar> nslookup
C:\users\sarkar> ipconfig /flushdns
C:\users\sarkar> ipconfig /displaydns
C:\users\sarkar> ssh –l [username] [ip address]
C:\users\sarkar> ssh username@ip addresss
DHCP:
R# show ip dhcp binding
R(config)# ip dhcp excluded-address [start] [end]
R(config)# ip dhcp pool [poolname]
R(dhcp-config)# network [network address]
R(dhcp-config)# dns-server [dns server address]
R(dhcp-config)# default router [router ip address]
R(dhcp-config)# lease {0 5 30 | infinite}
R(config-if)# ip helper-address [dhcp server address]
R(config-if)# ip address dhcp

SSH:
SW1# show version
SW# show ip ssh
SW(config)# crypto key generate rsa
SW(config)# crypto key generate rsa modulus
SW(config)# enable secret
SW(config)# username [sarkar] secret [cisco]
SW(config)#access-list 1 permit host [host ip]
SW(config)# ip ssh version 2
SW(config-line_# login local
SW(config-line)# exec time out 5 30
SW(config-line)# transport input {telnet | ssh | telnet ssh | all | none}
SW(config-line)# access-class 1 in

FTP and TFTP:


R# show version
R# show flash
#show file system
#copy ftp: flash:
R# copy tftp: flash:
R(config)# boot system flash: [file path]
R# write memory
R# reload
R# delete flash: [file name]
R(config)# ip ftp name [name]
R(config)# ip ftp password [name]

You might also like