Professional Documents
Culture Documents
com/ahmedclipearth
Cisco CLI command line for cisco Router
Command(s)
Description
Router>ping
mode.
Router#configure terminal
configuration
Router(config)#hostname RouterName
line)#logging synchronous
typing commands.
CNTRL+SHIFT+6
Exit process
DHCP Configuration
Router(config)#ip dhcp pool {name}
Router(dhcp-config)#network {net address}
{submask}
Router(config)#ip dhcp excluded-address {start
IP} {end IP}
Router(dhcp-config)#dns-server {net address}
www.clipearth.com - www.facebook.com/ahmedclipearth
address}
pool {MY-NAT-POOL}
Security Configuration
Router(config)#no cdp run
Router(config-line)#exec-timeout {minutes}
[seconds]
www.clipearth.com - www.facebook.com/ahmedclipearth
like # or &
Router(config)#no ip domain-lookup
Router(config)#service password-encryption
Router(config-line)#exit
Router(config)#line vty 0 4 Router(configline)#password cisco Router(config-line)#login
Router(config-line)#exit
Router(config-line)#no transport
inputRouter(config-line)#transport input {telnet
| ssh | etc}
Set the VTY lines to deny any input but the methods
specified.
Standard ACLs
Router(config)#access-list {access-list-number}
www.clipearth.com - www.facebook.com/ahmedclipearth
Extended ACLs
Configure an Extended ACL that allows for much greater
granularity of control i.e. Protocols, Port#s, Source addresses
& Destination addresses. (Extended IP ACL numbers range
Router(config)#access-list {access-list-number}
(greater than), eq (equal to), neq (not equal to) and range
number/name] [established]
TCP sessions and means that the rule will allow only TCP
communications that have the ACK bit set i.e. already
established. This rule could be used inbound, to prevent TCP
sessions being initiated from outside the network.
R2(config-if)#ip access-group
Interface Configuration
Router#show interfaces {interface name}
www.clipearth.com - www.facebook.com/ahmedclipearth
{subnet mask}
Router-on-a-stick
Configures a logical sub-interface on a physical interface.
Router(config)#interface {interface-ID.xxxx}
Router(config-if)#encapsulation {type}
Point-to-Point Protocol
Router#debug ppp [packet | negotiation | error
sub-processes.
Router(config-if)#encapsulation ppp
www.clipearth.com - www.facebook.com/ahmedclipearth
Router(config-if)#ppp multilink
PPP authentication
Router(config)#aaa new-model
none
configured credentials.
Configuration parameters for PPP authentication. CHAP PAP
performs CHAP before PAP.[if-needed] should not be
{cisco}
authentication protocols.
Set a PAP username and password for use with PPP coms
password {password}
Frame Relay
Router#show frame-relay lmi
www.clipearth.com - www.facebook.com/ahmedclipearth
Router(config)#frame-relay switching
{outgoing DLCI}
Changes the data-link layer protocol to be used on the
Router(config-if)#encapsulation frame-relay
[encapType]
dte}
Router(config-if)#frame-relay interface-dlci
{number}
Router(config-if)#frame-relay inverse-arp
Frame-Relay Sub-interfaces
7
www.clipearth.com - www.facebook.com/ahmedclipearth
Router(config)#interface
{PhyIntName}.{subNumber} {point-to-point |
multipoint}
Router(config-subif)#frame-relay interface-dlci
{number}
Router#debug ip routing
Router#show ip protocols
Router(config)#router ?
Router(config-router)#no auto-summary
Router(config-router)#default-information
originate
dynamic updates.
RIPv1 & v2
Router(config)#router rip
Router(config-router)#passive-interface
interface name
Router#debug ip rip
classful network
Router(config-router)#default-information
originate
dynamic updates.
RIPv2
8
www.clipearth.com - www.facebook.com/ahmedclipearth
EIGRP
Router(config)#router eigrp [A.S. number]
Router(config-router)#network network address
Router#show ip eigrp topology Router#show ip
eigrp topology [network address]
router)#redistribute static
OSPF
Router(config)#router ospf [process-ID]
Router(config-router)#network [network
address] [wildcard mask] area [area ID]
Router#show ip ospf
Router#show ip ospf interface
Router#show ip ospf neighbor
Router(config)#interface [OSPF interface]
Router(config-if)#ip ospf message-digest-key
[key #] md5 [key value] Router(config-if)#exit
Router(config)#router ospf [process ID]
www.clipearth.com - www.facebook.com/ahmedclipearth
Router(config-router)#router-id [network
Manually sets the router ID for the local router. (Will require
address]
Change the hello interval from the default value: (multiaccess is 10 seconds, or 30 seconds for NBMA segments).
Change the dead interval from the default value: (40
seconds).
Change the priority of an OSPF interface. This can alter
Router#undebug all
Router#undebug {process-name}
Router(config-if)#description R1 LAN
Router#reload
10
www.clipearth.com - www.facebook.com/ahmedclipearth
interface.
Provides a description of the version of IOS loaded and the
Router#show version
Register Configuration
Set the configuration register to a value. Standard is usually
Router(config)#config-register [registerValue]
classless
11
www.clipearth.com - www.facebook.com/ahmedclipearth
Cisco CLI command line for cisco Switch
Command
Description
File Management
General Configuration
Switch# terminal history
Switch# terminal history size {value}
www.clipearth.com - www.facebook.com/ahmedclipearth
Security Configuration
Enable anti-DHCP spoofing measures on catalyst
switches.
Switch-port Security
Switch# show port-security interface {value}
SSH Configuration
Switch(config)# ip domain-name {domainname}
www.clipearth.com - www.facebook.com/ahmedclipearth
Interface Configuration
Switch(config)# interface range {interface
prefix / number range}
14
www.clipearth.com - www.facebook.com/ahmedclipearth
Switch(config-if)#spanning-tree portfast
VTP
Troubleshooting
Switch# show history
www.clipearth.com - www.facebook.com/ahmedclipearth
16