Showing posts with label CCNA. Show all posts
Showing posts with label CCNA. Show all posts

Friday, January 6, 2012

How to create a frame relay switch

Here I am going to demonstrate how to configure cisco router as a frame relay switch. The configuration is very simple. So check the figure below carefully and understand the configuration.
frame relay switch
Connect the routers as in the figure.Here I am creating two PVCs – first one between R1 & R2, and second one between  R1 & R3

Wednesday, January 4, 2012

Routing vs. Routed Protocols

Before talking about the routing and routed protocols, look at the screen shot from Google map. How many way to reach from point A to Point B?
image
Okay, you don’t need to count. There are plenty of ways. isn’t it? how will you select the right path from point A to Point B? We may consider different aspects for this - fast way, way with low transportation charge, etc.

Wednesday, December 28, 2011

Difference between Protocol number and Port number

Protocol number is the value contained in the “protocol” field of an IPv4 header. It is used to identify the protocol. This is an 8 bit filed. In IPv6 this field is called “Next header” field. Some of the protocol numbers of commonly used routing protocols are given below:
Protocol Protocol Number
EIGRP 88
OSPF 89

Monday, December 26, 2011

Different types of communication systems

Simplexsimplex half duplex and full duplex communicaitons

In this type of communication, first device send data and second device receive it. Second device never send  any information to first device. Broadcast systems like FM radio work in this way.

Half Duplex

In this type of communication, when first device send data, second device receives it and when second devices send data, first device receives it. But both devices can’t send or receive data at the same time. This type of communication is using in "walkie-talkie".

Full Duplex

In this type of communication, first and second device can send and receive data simultaneously. Phones and mobile phones are using this type of communication.

Note: In Ethernet communication we can set both end half or full duplex depending up on the requirements. That is Ethernet can work on both mode.

Sunday, December 25, 2011

Basic Switch Configuration

Before begin configuration we need to see the current status of switch. This can be don using verity of ‘show’ commands. Some of them are given below

  • SW1#Show int status  ;shows description of ports, status, VLAN in which port is connected to, duplex, speed of each interface  etc.
  • SW1#show int fa0/1 ;This command shows interface specific details like Transmission rate, error state, etc.
  • SW1#show run int fa0/1 ;This command shows the commands entered under the interface fa0/1, in the running configuration
  • SW1#show power inline : This command shows the power settings of each port. Used for VoIP devices. If you don’t know about inline power, please check here

Now, lets set the interface attributesCisco switch port

Setting interface attributes

The syntax is as follows:

interface type mod/port

speed {10 | 100 | 1000 | auto}  ;This command tells transmission speed. It can be set depending on Speed of Interface. Normally Switch detects the speed correctly. Default configuration is “auto” ie. automatically detect the speed

duplex {half | full | auto} ;set the duplex of interface. Default is auto. But it is better to hardcode by command on both side.  If you set duplex to auto then make it on both side. Also, if you set duplex make sure that it is typed on both side, otherwise mismatch will happen. If you don’t know about duplex, please check here

mdix auto ;This is the default setting. . This permit switch to automatically discover if a crossover connection is needed. we can change the setting by “no mdix auto” command

media-type {sfp | rj45} ;detects automatically. sfp used for fiber optic ports

Sample configuration is given below:

SW1(config)#interface fa0/1

SW1(config-if)#speed 100

SW1(config-if)#duplex full

SW1(config-if)#no shut (to enable the interface)

Ok. That’s enough. But the problem is, we have to type it on all interface. Hmm… It has an easy way – use the ‘range’ command

SW1(config)#int range fa 0/1 - 4 , fa0/15 ;comma is surrounded by space. This will select the specified range of interfaces i.e. from fa0/1 to fa0/4 and fa0/15 at the same time. Now we can set any attributes to that interface.

SW1(config-if-range)#shut

Setting inline power

SW(config-if)#power inline {auto|never} :to automatically discover power need by port or disable power

SW(config-if)#power inline {consumption mw | static max mw} : to give power specifically

Friday, December 23, 2011

VTP

VTP stands for VLAN Trunking Protocol. Unlike the name implies, VTP is used for replication of VLAN information. That means, we just need to create VLANs or edit VLAN information only on one switch. Then VTP will transfer that information through the trunk link to all other switches which make the administration centralized.

VTP works based on the revision number. By default, VTP revision number is 0 on all switches. If we change any VLAN information on a switch, like… adding VLAN, deleting VLAN, renaming VLAN, etc.. the revision number increases. When other switches get the VTP update, it check the VTP revision number contained in the update with its on VTP revision number. If the local revision number is lower than the one it received, it replace the whole VLAN database with the currently received database.

VTP has three modes – Server, Client and Transparent. Depending upon VTP mode in which the switch operates, it gets the features as follows:

  • Server(default)
    • Power to change VLAN information
    • Sends and receives VTP updates
    • Saves VLAN configuration
  • Client
    • Cannot change VLAN information
    • Sends and receives VTP updates
    • Does not save VLAN configuration
  • Transparent
    • Forwards(passes through) VTP updates
    • Does not listen to VTP advertisements i.e.. it does not update its VLAN information using the VTP updates from other switches
    • Power to change local VLAN information
    • Saves VTP configuration (local)

By default cisco switches comes with VTP server mode. Because of there is no VTP Domain name applied to new switches, they act as server for themselves. Also, switches doesn’t participate in VTP until they hear VTP advertisement from another switch.

To see the current VTP status, use the following command

SW1#show vtp statusVTP Modes

Now lets make VTP run on every switch as in the figure.

Set VTP management domain name on all switches

SW1# vtp domain TestDomain

SW2# vtp domain TestDomain

SW3# vtp domain TestDomain

Note: If there is no domain name exist in all switches, then if we configure domain name on SW1, all switches get it automatically.

Set VTP mode of each switch

SW1# vtp mode server

SW2# vtp mdoe transparent

SW3# vtp mode client

Set VTP password (optional)

eg: SW1# vtp password P1ssw0rd

Note: if we want to set the password, set it on all switches

Set VTP version

Default VTP version is 1. if we want to change it to version 2, then do the following command on all switches

eg: SW1# vtp version 2

 

VTP synchronization issues

If we accidently connect a switch with higher revision number and same domain name to the network, all the switches will replace their database to it’s database. Then network connection may not available to users.

Solution:

Before attaching the switch to the network, reset its revision number to zero. Do one of the following to reset revision number to 0

  • Change VTP mode to transparent, then back to server
  • Change VTP domain to a bogus name, then back

Wednesday, December 21, 2011

Commonly Using Port Numbers

Port TCP UDP Description
20 x   FTP-Data
21 x   FTP (login access)
22 x x SSH
23 x   Telent
25 x   SMTP (Mail, MTA)
49 x   TACACS+
53 x x DNS
69   x TFTP
80 x x HTTP (Web)
110 x x POP3 (email); generally uses TCP)
119 x   NNTP (Usenet News)
123   x NTP
139 x x NetBIOS (Microsoft)
143 x x IMAP
161 x x SNMP (Network Monitor)
179 x   BGP
443 x x HTTPS
465 x   SMTPS (Secure Mail over SSL)
993 x x IMAP (Secure IMAP over SSL)
995 x x POP3S (Secure POP3 over SSL)
1645,1812   x RADIUS Authentication
1646,1813   x RADIUS Accounting

Friday, November 4, 2011

Installing GNS3 on CentOS 6.x/RHEL 6.x/Fedora 15


  1. Login as root then do the following steps:
    yum install python python-devel xorg-x11-proto-devel libXext-devel gcc-c++ libXrender*

  2. Download and install Qt
    #wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz
    #tar -xzf qt-everywhere-opensource-src-4.7.4.tar.gz
    #cd qt-everywhere-opensource-src-4.7.4
    #./configure -nomake examples -nomake demos -qt-gif -no-exceptions -debug -qt3support
    #gmake
    #gmake install
    #PATH=/usr/local/Trolltech/Qt-4.7.4/bin:$PATH
    #export PATH

  3. Download and install sip
    #wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.13.tar.gz
    #tar -xvf sip-4.13.tar.gz
    #cd sip-4.13.tar
    #python configure.py
    #make
    #make install

  4. Download and install PyQt
    #wget http://ftp.pardus.org.tr/pub/source/2009/PyQt-x11-gpl-4.8.4.tar.gz
    #tar xvf PyQt-x11-gpl-4.8.4.tar.gz
    #cd PyQt-x11-gpl-4.8.4
    #python configure.py -q /usr/local/Trolltech/Qt-4.7.4/bin/qmake
    #make
    #make install

  5. Download GNS3
    #wget http://downloads.sourceforge.net/project/gns-3/GNS3/0.7.4/GNS3-0.7.4-src.tar.gz
    #tar -xvf GNS3*.tar.gz && rm GNS3*.tar.gz
    #cd GNS3-0.7.4-src
    #mkdir Dynamips IOS Project Cache Temp

  6. Download Dynamips depending up on OS (64-bit/32-bit)
    #cd dynamips
    #wget http://downloads.sourceforge.net/gns-3/dynamips-0.2.8-RC2-amd64.bin?download (for 64-bit OS)
    #wget http://downloads.sourceforge.net/gns-3/dynamips-0.2.8-RC3-community-x86.bin?download (for 32-bit OS)
    #chmod +x dynamips-0.2.8-RC2-amd64.bin (if we use 32-bit version, use the name of that file)

  7. Creating Quick launch with gns3 icon
    #wget http://www.noahbeach.com/wp-content/uploads/2011/08/gns3.png
    Now right click on the panel and select add to panel > custom launcher > select the gns3 location and press on the icon button to locate the icon just downloaded. ok
    Now if we press that icon in the panel, gns3 will run...!!!

Monday, October 24, 2011

Configuring router for SDM

Cisco SDM
SDM configuration steps:
  1. Create user accounts
  2. Enable http and/or https server
  3. Configure http to use local user database
R1(config)#username binoy privilege 15 secret cisco sdm launcher
R1(config)#ip http server
R1(config)#ip http secure-server (allows encrypted access)
R1(config)#ip http authentication local
Now download SDM from www.cisco.com/go/sdm and install it in the computer (requires java runtime environment) and launch the SDM by giving IP address in SDM launcher

Wednesday, October 19, 2011

Cisco router password recovery process

  1. Connect to console port
  2. Use the power switch to power cycle the router.Password Recovery
  3. Issue the break sequence within 60 seconds of power up to put the router into ROMmon.
  4. Type “confreg 0x2142” at the rommon 1> prompt.  (This changes the default configuration register and causes the router to bypass the startup configuration where the forgotten enable password is stored.The configuration register is usually set to 0x2102 or 0x102)
  5. Type no after each setup question, or press Ctrl-C to skip the initial setup procedure.
  6. Router> enable
  7. Router#copy start run
  8. Now, change the passwords and give no shutdown commands to interfaces
  9. R1(config)# config-register 0x2102 (To make the startup configuration effective while next booting)

Sunday, October 9, 2011

Administrative Distance of Routing protocols

Connected interface     0
Static route 1
Enhanced Interior Gateway Routing Protocol (EIGRP) summary route 5
External Border Gateway Protocol (BGP) 20
Internal EIGRP 90
IGRP 100
OSPF 110
Intermediate System-to-Intermediate System (IS-IS) 115
Routing Information Protocol (RIP) 120
Exterior Gateway Protocol (EGP) 140
On Demand Routing (ODR) 160
External EIGRP 170
Internal BGP 200
unknown 255

Saturday, August 15, 2009

Connection to cisco Switch/Router

1.      Get console cable
2.      Plug the serial end into the back of pc
3.      Plug the rj-45 end into console port on switch
4.      Get a terminal program
  • Hyperterm
  • tera term
  • minicom
  • securecrt
5.      Set it to connect via COM port with:

  • baud rate : 9600
  • data bits : 8
  • parity       : none
  • stop bits : 1
  • flow control : none

note: which is the default in most of the terminal programs

6.      After connecting press enter copule of times

Wednesday, August 5, 2009

Initial configuration of cisco router

Setting console password

 Router(config)#line console 0

Router(conifg-line)#password cisco

Router(conifg-line)# login

note : This command sets the console password as 'cisco'

Setting telnet password

Router(config)#line vty 0 4

Router(conifg-line)#password cisco

Router(conifg-line)# login

note: In this case the 5 user can login to router at the same time using the vty line 0 through 4

Setting AUX port password

Router(config)#line aux 0

Router(conifg-line)#password cisco

Router(conifg-line)# login

To set privillege mode password

 There are two types of privillege mode passwords. Old method uses clear text format (we can see the password in running coniguration) and the new method uses MD5 hashed password. We can set both passwords if both set, the new method will get precedence and it will be the privillege mode password.

Old method:

Router(config)#enable password cisco

New method:

Router(config)#enable secret cisco

note: both command set passaword as 'cisco'

How to hide password using level 7 encryption

Router(config)#service password-encryption

To change the hostname of a router

Router(config)#hostname LABROUTER

This command will change the hostname of router and the prompt will look like the following

LABROUTER(config)#

We can change the host name back to default using "no hostname' command or we can change the name using the same command with different hostname