Useful CCNA Configuration Commands





General Configuration

Hostname


R1(config)#hostname <hostname>

Console Password

R1(config)#line con 0
R1(config)#password <password>
R1(config)#login

VTY Password

R1(config)#line vty <range>
R1(config)#password <password>
R1(config)#login

Password Encryption

R1(config)#service password-encryption

Message of the Day

R1(config)#banner motd #message#

Login

R1(config)#banner login #message#

Disable IP Domain Lookup

R1(config)#no ip domain-lookup

Interface Configuration


Set IP Address

R1(config)#interface {s0/0/0 | fa 0/0 | g0/0}
R1(config-if)#ip address <ip address> <subnet>

Enable Clocking

R1(config-if)#clock rate <clock rate>

Description

R1(config-if)#description <description>

Enable Interface

R1(config-if)#no shutdown

Loopback Addresses

R1(config)#interface loopback <interface number>


Routing


Enable Static Routes

R1(config)#route <ip address> <subnet mask> <exit interface>

or

R1(config)#route <ip address> <subnet mask> <next hop address>

Default Routes

R1(config)# route 0.0.0.0 0.0.0.0 <next hop address> <exit interface>

Dynamic Routes Using Routing Protocols


RIPV1


Enable RIP

R1(config)#router rip

Set Networks

R1(config-rip)#network <network>

NOTE: Networks must be summarised according to class; if not RIP will do this automatically. Further note that only DIRECTLY CONNECTED networks need to be added.

Passive Interfaces

R1(config-if)#passive-interface

OSPF


Enable OSPF

R1(config)#router ospf <process id>

NOTE: Process ID is a number between 1 & 65535 and is chosen by the network administrator.

Set Networks

R1(config)#router ospf <process id>
R1(config-router)#network <network> <wildcard mask> area <area id>

Router ID

R1(config)#router ospf <process id>
R1(config-router)#router id <ip address>

NOTE:If Router ID is configured after network command, use following to clear default ID.


Clear Default Router ID

R1#clear ip ospf process

or

Reload router after entering new Router ID.

Modifying Cost

R1(config)#interface <interface>
R1(config-if)#bandwidth <bandwidth - kbps>

or

R1(config-if)#ip ospf cost <cost>

Interface Priority

R1(config-if)#ip ospf priority {0-255}

Redistributing Default Routes

R1(config-if)#default-information originate

Adjust Reference Bandwidth

R1(config-router)#auto-cost reference-bandwidth <reference>


ie
Mbps100
GB1000
10 GigE10000

Modifying Hello Intervals

R1(config-if)#ip ospf hello-interval <seconds>

Modifying Dead Intervals

R1(config-if)#ip aspf deaf-interval <seconds>

NOTE: Dead Interval should be 4 x Hello Interval.


Contributions to http://ccna-study.wikispaces.com/ are licensed under a Creative Commons Attribution Share-Alike 3.0 License. Creative Commons Attribution Share-Alike 3.0 License