Tuesday 3 February 2015

CIsco Device Administrative Configuration

Below are some basic but important configurations commands, even they aren't critical(1-4) to make router and switches work but help you administer your network.

1. Hostname : you can set the identity of the router and switch by yhis command


Router>enable
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hos
Router(config)#hostname ?
  WORD  This system's network name
Router(config)#hostname xyz
xyz(config)#

2. Setting Password : Five password are used to secure your cisco router, console, auxiliary, telnet(vty), enable password and enable secret.

a. xyz(config)#enable password cisco
xyz(config)#enable secret admin

note: both password should not be same

b. Console Password
 xyz(config)#line console 0
xyz(config-line)#password console
xyz(config-line)#login

xyz(config-line)#exec-timeout ?
  <0-35791>  Timeout in minutes
xyz(config-line)#exec-timeout 0 ?
  <0-2147483>  Timeout in seconds
  <cr>
xyz(config-line)#exec-timeout 0 30
xyz(config-line)#logging
xyz(config-line)#logging synchronous

note: logging synchronous is very cool command and it should be default command, but its not. It stops annoying console messages from popping up and disrupting the input you're trying to type.


c. Telnet Password 
xyz(config)#line vty 0 4
xyz(config-line)#password telnet
xyz(config-line)#login


3. SSH
Router(config)#hostname xyz
xyz(config)#ip domain-name xyz.com
xyz(config)#username xyz password cisco
xyz(config)#crypto key generate rsa general-keys modules 1024
xyz(config)#ssh version 2
xyz(config)#line vty 0 15
xyz(config-line)#transport input ssh telnet

4. Service password-encryption: This will encrypt all the passwords in the router
xyz(config)#service password-encryption

5. Router Interface:
 xyz(config)#interface ?
  Dot11Radio        Dot11 interface
  Ethernet          IEEE 802.3
  FastEthernet      FastEthernet IEEE 802.3
  GigabitEthernet   GigabitEthernet IEEE 802.3z
  Loopback          Loopback interface
  Serial            Serial
  Tunnel            Tunnel interface
  Virtual-Template  Virtual Template interface
  Vlan              Catalyst Vlans
  range             interface range command

a. bring up the interface:

xyz(config)#interface fastEthernet ?
  <0-9>  FastEthernet interface number
xyz(config)#interface fastEthernet 0/0
xyz(config-if)#no shut
xyz(config-if)#no shutdown

xyz(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

b. Configure ip address:

xyz(config-if)#interface fastEthernet 0/0
xyz(config-if)#no shutdown
xyz(config-if)#ip address 192.168.1.1 255.255.255.0


c. Serial Interface
Router(config-if)#interface serial 1/0
Router(config-if)#no shut
Router(config-if)#ip address 111.111.111.1 255.255.255.252
Router(config-if)#clock rate 64000
Router(config-if)#bandwidth 102400

6. Viewing, saving and erasing configuration:
a. Saving
Router#copy running-config startup-config 
Destination filename [startup-config]? 
Building configuration...
[OK]

b. Viewing
Router#show running-config
Router#show startup-config 

c.Erasing
Router#erase startup-config 
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
Router#reload

No comments:

Post a Comment