Thursday, March 22, 2012

How to configure frame relay

 
hostname r1
interface Serial0
ip address 172.16.17.1 255.255.255.0
encapsulation frame-relay
frame-relay map ip 172.16.17.2 112 broadcast
frame-relay map ip 172.16.17.3 113 broadcast

 
hostname r2
interface Serial0
ip address 172.16.17.2 255.255.255.0
no ip directed-broadcast
encapsulation frame-relay
no ip mroute-cache
frame-relay map ip 172.16.17.1 21 broadcast
frame-relay map ip 172.16.17.3 23 broadcast

hostname r3
interface Serial0
ip address 172.16.17.3 255.255.255.0
no ip directed-broadcast
encapsulation frame-relay
no ip mroute-cache
frame-relay map ip 172.16.17.1 31 broadcast
frame-relay map ip 172.16.17.2 32 broadcast
frame-relay lmi-type ansi

How to configure SSH on router

Router(config)#int fastEthernet 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#username neeraj password cisco
Router(config)#ip domain-name cisco.com
Router(config)#crypto key generate rsa
% Please define a hostname other than Router.
Router(config)#hostname bob
bob(config)#crypto key generate rsa
The name for the keys will be: bob.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for

your
General Purpose Keys. Choosing a key modulus greater than 512 may

take
a few minutes.

How many bits in the modulus [512]:
% Generating 512 bit RSA keys, keys will be non-exportable...[OK]

bob(config)#ip ssh ver
*Mar 1 0:3:33.415: RSA key size needs to be at least 768 bits for ssh

version 2
*Mar 1 0:3:33.415: %SSH-5-ENABLED: SSH 1.5 has been enabled
bob(config)#ip ssh version ?
<1-2> Protocol version
bob(config)#ip ssh version 2
Please create RSA keys (of at least 768 bits size) to enable SSH v2.
bob(config)#crypto key generate rsa
% You already have RSA keys defined named bob.cisco.com .
% Do you really want to replace them? [yes/no]: y
The name for the keys will be: bob.cisco.com
Choose the size of the key modulus in the range of 360 to 2048 for

your
General Purpose Keys. Choosing a key modulus greater than 512 may

take
a few minutes.

How many bits in the modulus [512]: 786
% Generating 786 bit RSA keys, keys will be non-exportable...[OK]

*Mar 1 0:4:18.822: %SSH-5-ENABLED: SSH 1.99 has been enabled
bob(config)#ip ssh version 2
bob(config)#line vty 0 15
bob(config-line)#login local
bob(config-line)#transport input ssh
bob(config-line)#^Z
bob#wr
Building configuration...
[OK]

bob#sh ip ssh
SSH Enabled - version 2.0
Authentication timeout: 120 secs; Authentication retries: 3


bob(config)#enable password cisco
bob(config)#^Z
bob#

USES:

bob#ssh -v 2 -l neeraj 192.168.1.1
Open
Password:



bob>en
Password:

bob#sh ip int brief
Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down
Vlan1 unassigned YES unset administratively down
bob#exit

2950 Router password recovery procedure

1. Unplug the power cable
2. Hold down the mode button while replugging the power cable
3. Type flash_init over the console
4. Type load_helper
5. Type Dir flash :
6. Type rename flash:config.txt flash:config.old
7. Type boot
8. Type n to skip the initial setup configuration
9. Type enable
10. Type rename flash:config.old flash:config.txt
11. Save config.txt to system
#copy flash:config.txt system:running-config
12. Enter config mode and change the password
# config t
# no enable secret
13. Finally, write the changes to memory
# write memory

How to configure Router as a DHCP server


hostname Router
ip dhcp excluded-address 192.168.1.2 192.168.1.7
ip dhcp excluded-address 192.168.1.5 192.168.1.9
ip dhcp pool neeraj
 network 192.168.1.0 255.255.255.0
 default-router 192.168.1.1

Wednesday, March 21, 2012

How to set up VOIP(voice over internet protocol) to call router to router



Router(config)#interface serial 1/0

Router(config-if)#ip address 11.0.0.1 255.0.0.0
Router(config-if)#clock rate 125000
Router(config-if)#no shutdown
Router(config)#dial-peer voice 11 voip
Router(config-dial-peer)#destination-pattern 11
Router(config-dial-peer)#session target ipv4:11.0.0.2
Router(config-dial-peer)#exit
Router(config)#dial-peer voice 12 pots
Router(config-dial-peer)#destination-pattern 11
Router(config-dial-peer)#port 3/0
Router(config-dial-peer)#dial-peer voice 11 voip
Router(config-dial-peer)#destination-pattern 12
Router(config-dial-peer)#exit