ccna


Password policy of router

To set password on privilege mode
Router(config)#enable pass 123
To set secret password
Router(config)#enable secret 125
To set password on console (user mode)
Router(config)#line c 0
Router(config-line)# login
Router(config-line)#pass 126
To enable telnet  (by default terminals are 0-4 but we can extend it to 16)
Router(config)#line vty 0
Router(config-line)#login
Router(config-line)#pass 126
To enable telnet on multiple terminals
Router(config)#line vty 1 5
Router(config-line)# login
Router(config-line)#pass 124
To encrypt all password
Router(config)#service password-encryption
To remove password
Remove password from user mode
Router(config)#no enable pass  
Router(config)#no enable secret
Remove password from usermode
Router(config)#line c 0
Router(config-line)#no login
Router(config-line)#no pass
To set user authentication
Router(config)#username test pri  1 pass 123
Router(config)#line c 0
Router(config-line)#login local
Router(config-line)#exit
To recover password
Press Ctrl+Pause Break key on keyboard at booting time
rommon 1 > confreg 0x2142  ( this will bypass the configuration )
rommon 2 > reset  (to restart router)
        --- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]: no
Router>en
Router#copy start run ( copy nvram configuration )
R0#
R0#conf t
R0(config)#line c 0
R0(config-line)#no login (this will disable password authentication)
R0(config-line)#no pass (this will remove the password)
R0(config-line)#end
R0#
R0#copy run start (copy the changes int nv-ram)
R0#reload
Press Ctrl+Pause Break key on keyboard at booting time ( this will interrupt the booting )
rommon 1 > confreg 0x2102 (restore configuration register value )

rommon 2 > reset

IP configuration of router



R0
Router>
Router>en
Router#conf t
Router(config)#hostname R0 (to set the name of router to R0)
R0(config)#int f0/0
R0(config-if)#ip add 172.16.0.1 255.255.0.0 (to set ip address on interface)
R0(config-if)#no shut (to enable interface)
R0(config-if)#exit
R0(config)#int s0/0
R0(config-if)#ip add 10.0.0.1 255.0.0.0
R0(config-if)#no shut
R0(config-if)#clock rate 64000 (to set execution speed and this can be from 1200 - 4000000)
R0(config-if)#end
R0#sh ip int brief (to check the status of interface and ip addresses of interface)


To configure dhcp on router
R0(config)#ip dhcp pool test
R0(dhcp-config)#net 172.16.0.0 255.255.0.0
R0(dhcp-config)#default-router 172.16.0.1
R0(dhcp-config)#dns-server 8.8.8.8
R0(dhcp-config)#lease 5
R0(dhcp-config)#exit

To check ip address provides by router to PC
R0#sh ip dhcp binding
To check controllers of interface (like which interface is DCE OR DTE)
R0#sh controllers s0/0
To check interface status and ip configuration of interfaces
R0#sh ip int brief

R0#

R1
Router>
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#int s0/0
R1(config-if)#ip add 10.0.0.2 255.0.0.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int f0/0
R1(config-if)#ip add 172.17.0.1 255.255.0.0
R1(config-if)#no shut
R1(config-if)#end



Static Routing

On Router0
Router>en
Router#conf t
Router(config)#hostname R0
R0(config)#int s0/0
R0(config-if)#ip add 17.0.0.1 255.255.255.252
R0(config-if)#no shut
R0(config-if)#clock rate 64000
R0(config-if)#exit
R0(config)#int f0/0
R0(config-if)#ip add 172.95.0.1 255.255.255.0
R0(config-if)#no shut
R0(config-if)#exit
R0(config)#ip dhcp pool t
R0(dhcp-config)#net 172.95.0.0 255.255.255.0
R0(dhcp-config)#default-router 172.95.0.1
R0(dhcp-config)#exit
R0(config)#ip route 172.95.1.0 255.255.255.0 17.0.0.2
R0(config)#ip route 17.0.0.4 255.255.255.252 17.0.0.2
R0(config)#ip route 17.0.0.16 255.255.255.240 17.0.0.2
R0(config)#exit
R0# sh ip route
On Router1
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#int s0/0
R1(config-if)#ip add 17.0.0.2 255.255.255.252
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int f0/0
R1(config-if)#ip add 172.95.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int s0/1
R1(config-if)#ip add 17.0.0.5 255.255.255.252
R1(config-if)#no shut
R1(config-if)#clock rate 64000
R1(config-if)#exit
R1(config)#ip dhcp pool t
R1(dhcp-config)#net 172.95.1.0 255.255.255.0
R1(dhcp-config)#default-router 172.95.1.1
R1(dhcp-config)#
R1(config)#ip route 172.95.0.0 255.255.255.0 17.0.0.1 (to define router for R0)
R1(config)#ip route 17.0.0.16 255.255.255.240 17.0.0.6 (to define router for R2)
R1(config)#end
R1#sh ip route
On Router 2
Router>en
Router#conf t
Router(config)#hostname R2
R2(config)#int s0/0
R2(config-if)#ip add 17.0.0.6 255.255.255.252
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int f0/0
R2(config-if)#ip add 17.0.0.17 255.255.255.240
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#ip dhcp pool t
R2(dhcp-config)#net 17.0.0.16 255.255.255.240
R2(dhcp-config)#default-router 17.0.0.17
R2(dhcp-config)#exit
R2(config)#ip route 17.0.0.0 255.255.255.252 17.0.0.5
R2(config)#ip route 172.95.0.0 255.255.255.0 17.0.0.5

R2(config)#ip route 172.95.1.0 255.255.255.0 17.0.0.5

EIGRP Configuration


R0 configuration
Router>
Router>en
Router#conf t
Router(config)#hostname R0
R0(config)#int f0/0
R0(config-if)#ip add 172.16.0.1 255.255.255.128
R0(config-if)#no shut
R0(config-if)#exit
R0(config)#int s0/0
R0(config-if)#ip add 10.0.0.1 255.255.255.252
R0(config-if)#no shut
R0(config-if)#clock rate 64000
R0(config-if)#exit
To enable eigrp
R0(config)#router eigrp 100 (to enable eigrp with autonomous system number 100 )
R0(config-router)#net 10.0.0.0 255.255.255.252
R0(config-router)#net 172.16.0.0 255.255.255.128
R0(config-router)#no auto-summary (to disable auto summary of routing table )
R0(config-router)#passive-interface f0/0 (to define interface as passive eigrp will not send any update of msg from this interface but can accept)
R0(config-router)#end
R0#
R0#sh ip eigrp neighbors (to check neighbout table)
R0#sh ip route                  (to check routing table)
R0#sh ip eigrp topology   (to check topology table)
R0#conf t
R0(config)#router eigrp 100
R0(config-router)#distance eigrp 10 100 (to change Internal and External AD)
R0(config-router)#metric max 255     (to change number hope from default to 255)
R0#sh ip protocoles
R0#
R0#conf t
R0(config-if)#int s0/0
R0(config-if)#ip hello-interval eigrp 100 15  (to change the hello timer)
R0(config-if)#
R0#
R1 configuration
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#int s0/0
R1(config-if)#ip add 10.0.0.2       255.255.255.252
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int s0/1
R1(config-if)#ip add 10.0.0.5 255.255.255.252
R1(config-if)#no shut
R1(config-if)#clock rate 64000
R1(config-if)#exit
R1(config)#int f0/0
R1(config-if)#ip add 172.16.0.129 255.255.255.128
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
R1(config)#router eigrp 100
R1(config-router)#net 10.0.0.0 255.255.255.252
R1(config-router)#net 10.0.0.4 255.255.255.252
R1(config-router)#net 10.0.0.128 255.255.255.128
R1(config-router)#no auto-summary
R1(config-router)#passive-interface f0/0
R1(config-router)#
R2 configuration
Router>
Router>en
Router#conf t
Router(config)#hostname R2
R2(config)#int s0/0
R2(config-if)#ip add 10.0.0.6 255.255.255.252
R2(config-if)#no shut
R2(config-if)#exit
R2(config#int f0/0
R2(config-if)#ip add 172.16.1.1 255.255.255.128
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#router eigrp 100
R2(config-router)#net 10.0.0.4 255.255.255.252
R2(config-router)#net 172.16.1.0 255.255.255.128
R1(config-router)#no auto-summary
R1(config-router)#passive-interface f0/0
R1(config-router)#

OSPF Configuration

On Router 0
R0>en
R0#conf t
R0(config)#router ospf 2 (To enable ospf on R0)
R0(config-router)#net 170.19.0.0 0.0.0.3 area 1
R0(config-router)#net 170.19.0.32 0.0.0.31 area 1
R0(config-router)#net 170.19.0.64 0.0.0.63 area 1
R0(config-router)#passive-interface f0/0
R0(config-router)#passive-interface f0/1
R0(config-router)#exit
R0(config)#int s0/0
R0(config-if)#ip ospf hello-interval 15 (to change hello timer default to 15 sec)
R0(config-if)#ip ospf dead-interval 45 (to change Dead timer default to 45 sec)

R0(config-if)#
ON Router 1
R1>en
R1#conf t
R1(config)#router ospf 5
R1(config-router)#net 170.19.0.0 255.255.255.252 area 1
R1(config-router)#net 170.19.0.128 255.255.255.128 area 1
R1(config-router)#net 170.19.0.4 255.255.255.252 area 2
R1(config-router)#passive-interface f0/0
R1(config-router)#exit
R1(config)#
On Router 2
R2>en
R2#conf t
R2(config)#router ospf 5
R2(config-router)#net 170.19.0.4 0.0.0.3 area 2
R2(config-router)#net 170.19.1.0 0.0.0.31 area 2
R2(config-router)#passive-interface f0/0
R2(config-router)#^Z
R2#
R2#sh ip ospf neighbor  (To check neighbour ship)
R2#sh ip ospf database (To check ospf data base this will show the router ID, Process ID, LSA)
R2#sh ip route (To check routing table)
R2#sh ip ospf border-routers (To check ABR)

For inter area connection
ON router 1
R1#conf t
R1(config)#int s0/2
R1(config-if)#no shut
R1(config-if)#ip add 170.19.0.9 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#exit
R1(config)#router ospf 5
R1(config-router)#net 170.19.0.8 255.255.255.252 area 0
R1(config-router)#^Z
R1#
ON Router 3
Router>en
Router#conf t
Router(config)#int s0/0
Router(config-if)#ip add 170.19.0.10 255.255.255.252
Router(config-if)#no shut
Router(config-if)#clock rate 64000
Router(config-if)#exit
Router(config)#router ospf 5
Router(config-router)#net 170.19.0.8 255.255.255.252 area 0
Router(config-router)#end
Router#

No comments:

Post a Comment

how to set time for internet use

this will allow internet access for a particular time interval. R4(config)#int f0/0 R4(config-if)#ip nat inside R4(config-...