Friday, June 17, 2011

How to configure Frame-Relay on GNS3

How to configure Multipoint and Point-To-Point Frame Relay topology on GNS3
MULTIPOINT TOPOLOGY
Here is the topology I am going to use in GNS3:

1.       Configure the FR1 switch as on the following screen:

2.       Now, it is time to configure R1,R2,R3 serial interfaces:
R1(config)#int s0/0
R1(config-if)#no shut
R1(config-if)#encapsulation frame-relay
R1(config)#int s0/0.1 multipoint
R1(config-subif)#ip address 192.168.1.1 255.255.255.248
R1(config-subif)#frame-relay map ip 192.168.1.2 101 broadcast
R1(config-subif)#frame-relay map ip 192.168.1.3 102 broadcast


3.       R2(config)#int s0/0
R2(config-if)#no shut
R2(config-if)#encapsulation frame-relay
R2(config)#int s0/0.1 multipoint
R2(config-subif)#ip address 192.168.1.2 255.255.255.248
R2(config-subif)#frame-relay map ip 192.168.1.1 201 broadcast

4.       R3(config)#int s0/0
R3(config-if)#no shut
R3(config-if)#encapsulation frame-relay
R3(config)#int s0/0.1 multipoint
R3(config-subif)#ip address 192.168.1.3 255.255.255.248
R3(config-subif)#frame-relay map ip 192.168.1.1 203 broadcast

Note: Remember when configuring maps, make sure your destination DLCI is your local DLCI and not the remote one!
5.       Ping your neighbors to verify connectivity.

POINT-TO-POINT TOPOLOGY
Note: With Point-To-Point we will assign two different /30 subnets, one per each PVC.


Let’s configure the Routers.
1.       R1(config)#int s0/0
R1(config-if)#no shut
R1(config-if)#encapsulation frame-relay
R1(config)#int s0/0.1 point-to-point
R1(config-subif)#ip address 192.168.1.1 255.255.255.252
R1(config-subif)#frame-relay interface-dlci 101

2.       R1(config)#int s0/0
R1(config-if)#no shut
R1(config-if)#encapsulation frame-relay
R1(config)#int s0/0.2 point-to-point
R1(config-subif)#ip address 192.168.1.5 255.255.255.252
R1(config-subif)#frame-relay interface-dlci 102

3.       R2(config)#int s0/0
R2(config-if)#no shut
R2(config-if)#encapsulation frame-relay
R2(config)#int s0/0.1 point-to-point
R2(config-subif)#ip address 192.168.1.2 255.255.255.252
R3(config-subif)#frame-relay interface-dlci 201

4.       R3(config)#int s0/0
R3(config-if)#no shut
R3(config-if)#encapsulation frame-relay
R3(config)#int s0/0.1 point-to-point
R3(config-subif)#ip address 192.168.1.6 255.255.255.252
R1(config-subif)#frame-relay interface-dlci 202

5.       Ping your neighbors to verify the connectivity.
6.       ENJOY!

Thursday, January 13, 2011

How to install LAMP and Cacti on Ubuntu 10.10 - few easy steps!

This tutorial will show you how to install Cacti on Ubuntu 10.10 workstation. This tutorial assumes you know how to install Ubuntu 10.10. If you have never installed it, it is really easy, just download the .ISO file, from Ubuntu.com, burn it to CD, boot the PC and follow the installation.
LAMP and Cacti on Ubuntu 10.10
1.       After installing Ubuntu Workstation 10.10 do the following:
2.       Go to the terminal and install tasksel (debian installation software)
                sudo apt-get install tasksel
3.       install LAMP, type the taskel command in terminal
4.       sudo tasksel
5.       Select LAMP Server and click Ok


6.       During the installation  you  will be  asked  to insert the  mysql root  password

7.       After the LAMP installation type the following command:
8.       sudo apt-get install php5 php5-gd php5-mysql
9.       Now, you will start installing cacti, type the following command:
10.   sudo apt-get install cacti-spine
11.   This will start installing cacti and prompt for some questions.

12.   Configuring libphp-adodb option select Ok Enter to Continue.
13.   Select your webserver in this example we are using apache2 select Ok Enter to Continue
14.   Configure database for cacti select Yes Enter to Continue
15.   Enter the root password for your mysql server select Ok Enter to Continue
16.   Enter the password (cacti) for the cacti database,select Ok Enter to Continue

17.   Re-enter your password
18.   This will complete the cacti installation.
19.   At this point you should be able to access cacti by typing http://serverIP/cacti in your browser.
There are plenty of tutorials for Cacti configuration, hopefully I will be able to provide one in the near future. Enjoy!


Wednesday, December 22, 2010

How to reset a password on cisco switch?

This is a general guideline for Catalyst switches and may very on particular models. Here are the basic steps:
1.       Unplug the power from the switch, press and hold the Mode button on the front panel until you see:
flash_init
load_helper
boot
switch:
2.       Issue the flash_init command, wait until it loads and then issue load_helper command.
Type
Switch: dir flash:
This command will show the switch files system, one of the files is called config.text. You need to rename this file to be able to log in to the switch, type the following:
Switch:rename flash:config.text flash:confing.old
At this point you can boot the switch with the following command:
Switch:boot
3.       Once booted enter n at the prompt and go to the global configuration mode:
Switch>enable
Switch#
4.       Now rename config.old back to config.text:
Switch#rename flash:config.old flash:config.text
And
copy config.text to running config
Switch#copy flash:config.text system:running-config
5.       At this point change secret or enable passwords
Switch(config)#enable  password ‘password’
or
Switch(config)#enable secret  ‘your password’
6.       Change vty and line passwords
Switch(config)#line vty 0 15
Switch(config-line)#password ‘your password’
7.       Finally copy your running-config to startup config
Switch# copy running-config startu-config
or
Switch#wr memory

Monday, December 20, 2010

How to create Etherchanel between two switches?

How to create etherchannel between two switches?
First, lets see what mode each protocol supports:

PAgP
LACP
Notes:
On
On
All ports channeling, no negotiation packets send
Auto
Passive
Waits to channel until asked
Desirable
Active
Actively asks to form a channel


Switch1:
1.       Add two interfaces, Fa0/3 and Fa0/4 to the etherchannel on Switch1:
Switch1#config t
Switch1(config)#interface range Fa0/3 – 4
2.       Choose protocol:
Switch1(config-if-range)# channel-protocol LACP
3.       Choose group and mode based on the protocol, see above table:
Switch1(config-if-range)#channel-group 1 mode active
Creating a port-channel interface Port-channel 1
Switch2:
1.       Add two interfaces, Fa0/3 and Fa0/4 to the etherchannel on Switch2:
Switch2#config t
Switch2(config)#interface range Fa0/3 – 4
2.       Choose protocol:
Switch2(config-if-range)# channel-protocol LACP
3.       Choose group and mode based on the protocol, see above table:
Switch1(config-if-range)#channel-group 1 mode passive (make sure mode is not Active)
Creating a port-channel interface Port-channel 1
Here are some basic commands to check the etherchannel status:
show etherchannel summary   shows etherchannel status on each member port
show etherchannel port             shows etherchannel status on each member port
show etherchannel detail          shows detailed status of each component
show <pagp|lacp> neighbor     shows Etherchannel neighbor on each port

How to enable SSH on Cisco switch or router?

This quick tutorial will show you how to enable SSH on cisco switches or routers. Make sure your IOS supports Crypto otherwise SSH will not be available. The easy way to find that out is to check if your IOS name contains k9 value, ex. c3560-advipservicesk9-mz.122-46.se.bin.
1. Go to global configuration mode and configure a Hostname and Domain name:
 Switch#config t
 Switch(config)#hostname MyHostname
 Switch(config)#ip domain-name MyDomainName
2. Generate RSA key pair:
 Switch(config)#crypto key generate rsa
 The name for the keys will be: MyHostname.MyDomainName
 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]: 1024
Generating RSA keys ...
[OK]
01:43:17: %SSH-5-ENABLED: SSH 1.99 has been enabled
3. At this point SSH has been enabled and is ready to use. Now you need to allow SSH connections to be accepted by a switch or a router:
 Switch(config)#line vty 0 15
 Switch(config-line)#transport input ssh
4. Save the configurations, SSH is the only way to connect remotely to your switch or router.
 Switch# copy running-config  startup-config
 Here are some other usefull commands for SSH:
This command will set the time-out period (in seconds) after which the SSH session will be terminated:
Switch(config)#ip ssh time-out 120
This command sets the maximum number of login attempts to 5:
Switch(config)#ip ssh authentication-retries 5