Cisco configuration

===============================
basic configuration on Router
===============================
Router(config)#hostname PNC-Router
PNC(config)#enable secret EncrypPASS
line con 0
password conPASS
login
line vty 0 4
password TelnetPASS
login
PNC(config)# interface Serial0/0/0
ip address 193.1.1.1 255.255.255.0
encapsulation ppp
clock rate 250000
PNC#copy run start

===================================
 How to configure DHCP 3 LAN in one router
===================================
Router(config)#ip dhcp pool LanA
 network 192.168.1.0 255.255.255.0
 default-router 192.168.1.1
 dns-server 192.168.1.2
Router(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.19

Router(config)#ip dhcp pool LanB
 network 192.168.2.0 255.255.255.0
 default-router 192.168.2.1
 dns-server 192.168.1.2
Router(config)#ip dhcp excluded-address 192.168.2.1 192.168.2.19

Router(config)#ip dhcp pool LanC
 network 192.168.3.0 255.255.255.0
 default-router 192.168.3.1
 dns-server 192.168.1.2
Router(config)#ip dhcp excluded-address 192.168.3.1 192.168.3.19

===========================

How to configure Telnet in switch

===========================

Switch(config)#int vlan 1
-ip address 172.1.2.254 255.255.255.0
-no shutdown
-line vty 0 4
-password 123
-login
-enable secret 123

========================
How to configure Port security
========================

###configure mac-address for fa0/1########
Switch(config)#int f0/1
-switchport mode access
-switchport port-security
-switchport port-security mac-address 1111.1111.1111

=============================================
How to configure Network security in Router and Switch
=============================================

########## Basic Network Security##################

On Router

Router>en
Router(config)#security passwords min-length 10
Router(config)#enable secret cisco12345
Router(config)#username user01 password user01pass
Router(config)#service password-encryption

Router(config)#line vty 0 4
Router(config-line)#password ciscolinevty
Router(config-line)#exec-timeout 5 0
Router(config-line)#login
Router(config-line)#exit

Router(config)#line console 0
Router(config-line)#password ciscoconsole
Router(config-line)#login

######Configure http/https######

Router(config)# ip http server
Router(config)# ip http secure-server (Only real IOS)

#####Configure SNMP is a network Monitoring###

Router(config)#snmp-server community public RO
Router(config)#snmp-server community private RW

###### on Switch ######

Switch(config)#enable secret class
Switch(config)#service password-encryption

Switch(config)#line console 0
Switch(config-line)#password cisco

Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.1.2 255.255.255.0
Switch(config)#ip default-gateway 192.168.1.1

===============

Static Router

===============

On Router 0

ip route 4.4.4.0 255.255.255.0 193.1.1.2
or ip route 4.4.4.0 255.255.255.0 s3/0
ip route 3.3.3.0 255.255.255.0 1.1.1.1
Or ip route 3.3.3.0 255.255.255.0 fa0/0

On Router 1

ip route 4.4.4.0 255.255.255.0 1.1.1.2
Or ip route 4.4.4.0 255.255.255.0 f0/0

On Router 2

ip route 3.3.3.0 255.255.255.0 s2/0
Or ip route 3.3.3.0 255.255.255.0 193.1.1.1

==============

Configure Inter-Vlan

==============

######################## On Switch ##########################

Ranet-SW>
Ranet-SW>en
Ranet-SW#cofn t
Ranet-SW(config)#vlan 10
Ranet-SW(config-vlan)#exit
Ranet-SW(config)#vlan 20
Ranet-SW(config-vlan)#exit
Ranet-SW(config)#int f0/1
Ranet-SW(config-if)#switchport access vlan 10
Ranet-SW(config-if)#int f0/2
Ranet-SW(config-if)#switchport access vlan 10
Ranet-SW(config-if)#int f0/3
Ranet-SW(config-if)#switchport access vlan 20
Ranet-SW(config-if)#int f0/4
Ranet-SW(config-if)#switchport access vlan 20

Ranet-SW(config)#int f0/1
Ranet-SW(config-if)#spanning-tree portfast
Ranet-SW(config-if)#no shutdown
Ranet-SW(config-if)#exit

Ranet-SW(config)#int f0/2
Ranet-SW(config-if)#spanning-tree portfast
Ranet-SW(config-if)#no shutdown
Ranet-SW(config-if)#exit

Ranet-SW(config)#int f0/3
Ranet-SW(config-if)#spanning-tree portfast
Ranet-SW(config-if)#no sh
Ranet-SW(config-if)#exit

Ranet-SW(config)#int f0/4
Ranet-SW(config-if)#spanning-tree portfast
Ranet-SW(config-if)#no shutdown
Ranet-SW(config-if)#

##################### ON router$####################
Ranet-GW>en
Ranet-GW#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Ranet-GW(config)#int f0/0
Ranet-GW(config-if)#no sh
Ranet-GW(config-if)#no shutdown

Ranet-GW(config)#int f0/0.1
Ranet-GW(config-subif)#encapsulation dot1Q 10
Ranet-GW(config-subif)#ip address 192.168.0.142 255.255.255.240

Ranet-GW(config)#int f0/0.2
Ranet-GW(config-subif)#encapsulation dot1Q 20
Ranet-GW(config-subif)#ip address 192.168.0.158 255.255.255.240

======================================

Configure VTP

======================================

############ON Sw1###########

Ranet-SW1>show vtp status
VTP Version                     : 2
Configuration Revision          : 1
Maximum VLANs supported locally : 255
Number of existing VLANs        : 7
VTP Operating Mode              : Server
VTP Domain Name                 : Ranet
VTP Pruning Mode                : Disabled
VTP V2 Mode                     : Enabled
VTP Traps Generation            : Disabled
MD5 digest                      : 0x30 0x94 0xC2 0x6A 0x32 0xCF 0x82 0xFF
Configuration last modified by 0.0.0.0 at 3-1-93 00:41:24
Local updater ID is 0.0.0.0 (no valid interface found)
Ranet-SW1>

############### ON SW2####################
Ranet-SW2>en
Ranet-SW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Ranet-SW2(config)#vtp mode transparent
Setting device to VTP TRANSPARENT mode.

Ranet-SW2(config)#vtp domain Ranet
Changing VTP domain name from NULL to Ranet
Ranet-SW2(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/2, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/2, changed state to up

    
Ranet-SW2(config)#int range Gig1/1-2
Ranet-SW2(config-if-range)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to up
Ranet-SW2(config-if-range)#exit

Ranet-SW2(config)#vtp version 2
Ranet-SW2(config)#

######### on SW3######################

Ranet-SW3>en
Ranet-SW3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Ranet-SW3(config)#vtp mode client
Setting device to VTP CLIENT mode.
Ranet-SW3(config)#vtp domain Ranet
Changing VTP domain name from NULL to Ranet

Ranet-SW3(config)#int f0/1
Ranet-SW3(config-if)#switchport access vlan 10
Ranet-SW3(config-if)#int f0/2

Ranet-SW3(config-if)#switchport access vlan 20
Ranet-SW3(config-if)#exit

=========================================

Configure VLAN and VTP

=========================================

VTP-SERVER>en
VTP-SERVER#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
VTP-SERVER(config)#vtp mode server
Device mode already VTP SERVER.
VTP-SERVER(config)#vtp domain TESTDOMAIN
Changing VTP domain name from NULL to TESTDOMAIN
VTP-SERVER(config)#VTp Password cisco
Setting device VLAN database password to cisco
VTP-SERVER(config)#vlan 10
VTP-SERVER(config-vlan)#name STUDENTS
VTP-SERVER(config-vlan)#EXI
VTP-SERVER(config)#VLan 50
VTP-SERVER(config-vlan)#NAme SERVERS
VTP-SERVER(config-vlan)#EXI
VTP-SERVER(config)#EXI
VTP-SERVER#
%SYS-5-CONFIG_I: Configured from console by console

VTP-SERVER#telnet 192.168.1.2
Trying 192.168.1.2 …Open
User Access Verification
Password: (cisco)
VTP-CLIENT1>en
Password: (cisco)
VTP-CLIENT1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

VTP-CLIENT1(config)#vtp domain TESTDOMAIN
Changing VTP domain name from NULL to TESTDOMAIN
VTP-CLIENT1(config)#VTp PAssword cisco
Setting device VLAN database password to cisco
VTP-CLIENT1(config)#vtp mode server
Setting device to VTP SERVER mode.
VTP-CLIENT1(config)#vlan 10
VTP-CLIENT1(config-vlan)#name STUDENTS
VTP-CLIENT1(config-vlan)#EXI
VTP-CLIENT1(config)#VLan 50
VTP-CLIENT1(config-vlan)#NAme SERVERS
VTP-CLIENT1(config-vlan)#EXI
VTP-CLIENT1(config)#VTp MOde CLient
Setting device to VTP CLIENT mode.
VTP-CLIENT1(config)#EXIT
VTP-CLIENT1#telnet 192.168.1.3
Trying 192.168.1.3 …Open

User Access Verification
Password: (Cisco)
VTP-CLIENT2>en
Password: (cisco)
VTP-CLIENT2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.

VTP-CLIENT2(config)#vtp domain TESTDOMAIN
Changing VTP domain name from NULL to TESTDOMAIN
VTP-CLIENT2(config)#VTp PASsword cisco
Setting device VLAN database password to cisco
VTP-CLIENT2(config)#vtp mode server
Device mode already VTP SERVER.
VTP-CLIENT2(config)#vlan 10
VTP-CLIENT2(config-vlan)#NAme STUDENTS
VTP-CLIENT2(config-vlan)#EXI
VTP-CLIENT2(config)#VLan 50
VTP-CLIENT2(config-vlan)#NAme SERVERS
VTP-CLIENT2(config-vlan)#EXI
VTP-CLIENT2(config)#VTp MOde CLient
Setting device to VTP CLIENT mode.
VTP-CLIENT2(config)#EXI
VTP-CLIENT2#telnet 192.168.1.4
Trying 192.168.1.4 …Open

User Access Verification
Password: (cisco)
VTP-CLIENT3>en
Password: (cisco)
VTP-CLIENT3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
VTP-CLIENT3(config)#vtp domain TESTDOMAIN
Changing VTP domain name from NULL to TESTDOMAIN
VTP-CLIENT3(config)#VTp PASsword cisco
Setting device VLAN database password to cisco
VTP-CLIENT3(config)#vtp mode server
Device mode already VTP SERVER.
VTP-CLIENT3(config)#vlan 10
VTP-CLIENT3(config-vlan)#name STUDENTS
VTP-CLIENT3(config-vlan)#EXI
VTP-CLIENT3(config)#VLan 50
VTP-CLIENT3(config-vlan)#NAme SERVERS
VTP-CLIENT3(config-vlan)#EXI
VTP-CLIENT3(config)#VTp MOde CLient
Setting device to VTP CLIENT mode.
=======================================

How to configure NAT

=======================================

Router(Ranet-GW)#int fa0/0
ip nat inside
int se0/0/0
ip nat outside
exit
access-list 1 permit 192.168.0.192 0.0.0.15
ip nat pool Ranet 25.5.5.65 25.5.5.70 netmask 255.255.255.224
ip nat inside source list 1 pool Ranet

==========================================

How to configure STP

==========================================

Ranet-SW3>en
Ranet-SW3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Ranet-SW3(config)#spanning-tree vlan 1 priority 61440


5 thoughts on “Cisco configuration

    Anonymous said:
    17/08/2013 at 11:45 am

    Good !!! these are in CCNA !!!!

    Like

    software said:
    29/09/2014 at 3:53 am

    Piece of writing writing is also a fun, if you know after that you can write
    if not it is complicated to write.

    Like

      Anonymous said:
      26/11/2014 at 10:35 pm

      Thank you

      Like

    bit.do said:
    05/10/2014 at 8:03 am

    Hi there mates, iits enormous piece of writing regarding
    teachingand entirely explained, keep it up all the time.

    Like

ចាកចេញ

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s