Saturday, July 28, 2018

Configure rb metal 2shpn As Access Point

Turn On rb Metal 2shpn Router as like :


Connect rb metal 2shpn with your Laptop by winbox.


Open Winbox:
Click on Neighbors you will see rm metal 2shpn Device MAC address. Select and click connect. rb metal 2shpn interface will be open via winbox.



Click Interface---> Double Click on WLAN1---> Click Wireless. Change the below parameter.
Set Mode : AP Bridge
Set Frequency : Auto
Set SSID : Your NAME/Other
Apply and Ok



Click Wireless--->Click Security Profile--->Double Click on defaults.
Set Mode : Dynamic Keys
Check WPA2-PSK
Set Wifi Passwort to WPAR Pre-Shared Key : Your Wifi Password
Apply and Ok



Click Bridge---> Click + Sign to Add Bridge
Apply and OK



Click Bridge--->Click Ports--->Click + Sign to Add Ports
Set Interface : ether1
Apply and Ok



Click Bridge--->Click Ports--->Click + Sign to Add Ports
Set Interface :wlan1
Apply and Ok




Click IP--->DHCP Client---> Click + sign to add Client
Set Interface : Bridge1
Apply and Ok



Click System--> User--->Double Click on Admin--->Click Password
Set Password : Your Admin Console Password
Set Confirm Password : Your Admin Console Password
Apply and Ok

Thursday, September 29, 2016

SSH Configuration in CISCO Router

Use SSH in CISCO Router for remote login and avoid Telnet.

Configure SSH in R1:

R1#conf t
R1(config)#hostname dhaka
dhaka(config)#ip domain-name walton
dhaka(config)#username atik password secret Only4@tik
dhaka(config)#crypto key generate rsa modulus 2016
The name for the keys will be: dhaka.walton
% The key modulus size is 2016 bits
% Generating 2016 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 7 seconds)
dhaka(config)#
*Sep 29 21:35:26.255: %SSH-5-ENABLED: SSH 1.99 has been enabled

dhaka(config)#line vty 0 15
dhaka(config-line)#login local
dhaka(config-line)#transport input ssh
dhaka(config-line)#exit
dhaka(config)#do wr
dhaka(config)#enable sec
dhaka(config)#enable secret console
dhaka(config)#

Enable Routing Between R1 and R2 for Communication:
dhaka(config)#interface gigabitEthernet 1/0
dhaka(config-if)#no shutdown
dhaka(config-if)#ip address 172.16.12.1 255.255.255.0
dhaka(config-if)#exit
dhaka(config)#router rip
dhaka(config-router)#version 2
dhaka(config-router)#network 172.16.12.0
dhaka(config-router)#exit

Remote Login From R2:
R2(config)#interface gigabitEthernet 1/0
R2(config-if)#ip address 172.16.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#network 172.16.12.0
R2(config-router)#exit
R2(config)#do wr
R2(config)#hostname chittagong

Check Configuration:

chittagong#ssh -l atik 172.16.12.1
Password:
dhaka>enable
Password:
dhaka#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
dhaka(config)#sh
dhaka(config)#do sh run
Building configuration...

Current configuration : 1441 bytes
!
! Last configuration change at 21:37:06 UTC Thu Sep 29 2016
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
!
hostname dhaka
!
boot-start-marker
boot-end-marker
!
!
enable secret 4 YxW5H6m4wDm7DPsJlqLzcDnHEjSMqzNds6yAjUZR6kk
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
!
!
 --More--
*Sep 29 22:03:38.283: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down

Wednesday, September 14, 2016

Configure OSPF Routing, Virtual Link, OSPF Stub Area, Totally Stubby Area, NSSA, Totally NSSA and Redistribution between OSPF-RIPv2-EIGRP


OSPF Routing:

Configure Router R1 Interfaces fa0/0 (Area15) and fa0/1 (Area0):

R1#conf t
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 172.16.12.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 172.16.15.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 1
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#exit

Configure OSPF Network in Router R1:
R1(config)#router ospf 5
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 172.16.12.0 0.0.0.255 area 0
R1(config-router)#network 172.16.15.0 0.0.0.255 area 15
R1(config-router)#end
R1#clear ip ospf process
Reset ALL OSPF processes? [no]: yes

 
Configure Router R2 Interfaces fa0/1 (Area0) and fa1/0 (Area23):

R2#conf t
R2(config)#interface fastEthernet 0/1
R2(config-if)#ip address 172.16.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 1/0
R2(config-if)#ip address 172.16.23.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 2
R2(config-if)#ip address 2.2.2.2 255.255.255.255
R2(config-if)#exit

Configure OSPF Network in Router R2:
R2(config)#router ospf 5
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 172.16.23.0 0.0.0.255 area 0
R2(config-router)#network 172.16.23.0 0.0.0.255 area 23
R2(config-router)#end
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: yes



Configure Router R3 Interfaces fa1/0 (Area23), fa0/0 and loopback4 (Area34):

R3#conf t
R3(config)#interface fastEthernet 1/0
R3(config-if)#ip address 172.16.23.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 172.16.34.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 3
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#no shutdown
R3(config-if)#exit

Configure OSPF Network in Router R3:
R3(config)#router ospf 5
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 172.16.23.0 0.0.0.255 area 23
R3(config-router)#network 172.16.34.0 0.0.0.255 area 34
R3(config-router)#end
R3#clear ip ospf process
Reset ALL OSPF processes? [no]: yes


Configure Router R4 Interfaces fa0/0 (Area34) and loopback4 (Area34):

R4#conf t
R4(config)#interface fastEthernet 0/0
R4(config-if)#ip address 172.16.34.3 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#interface fastEthernet 0/0
R4(config-if)#ip address 172.16.34.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#interface loopback 4
R4(config-if)#ip address 4.4.4.4  255.255.255.255
R4(config-if)#no shutdown

Configure OSPF Network in Router R4:
R4(config)#router ospf 5
R4(config-router)#router-id 4.4.4.4
R4(config-router)#network 172.16.34.0 0.0.0.255 area 34
R4(config-router)#end
R4#clear ip ospf process
Reset ALL OSPF processes? [no]: yes

R1, R2, R3 and R4 Routing Table:
R1#show ip route
1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback1
     172.16.0.0/24 is subnetted, 3 subnets
O IA    172.16.23.0 [110/11] via 172.16.12.2, 01:57:51, FastEthernet0/1
C       172.16.12.0 is directly connected, FastEthernet0/1
C       172.16.15.0 is directly connected, FastEthernet0/0

R2#show ip route
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
     172.16.0.0/24 is subnetted, 3 subnets
C       172.16.23.
0 is directly connected, FastEthernet1/0
C       172.16.12.0 is directly connected, FastEthernet0/1
O IA    172.16.15.0 [110/20] via 172.16.12.1, 01:56:54, FastEthernet0/1

R3#show ip route
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback3
     172.16.0.0/24 is subnetted, 4 subnets
C       172.16.34.0 is directly connected, FastEthernet0/0
C       172.16.23.0 is directly connected, FastEthernet1/0
O IA    172.16.12.0 [110/11] via 172.16.23.2, 00:01:14, FastEthernet1/0
O IA    172.16.15.0 [110/21] via 172.16.23.2, 00:01:14, FastEthernet1/0

R4#show ip route
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback4
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.34.0 is directly connected, FastEthernet0/0



OSPF Virtual Link:
Router R2 and R1 missing 172.16.34.0/24, 3.0.0.0/24 and 4.0.0.0/24 network. And R4 missing R1, R2 networks. Because Area34 not Directly connect with backbone Area (Area0). Now we Need to configure Virtual Link Between R3 and R2 via Area23. So that Area34 Logically connect with Area0. (After virtual link configure R4 comes on R3 place. not replace, logically come.)

Configuration: Virtual Link Between R2 and R3 for Area 34(R4). "show ip ospf database" Show you Router-id.
R2(config)#router ospf 5
R2(config-router)#area 23 virtual-link 3.3.3.3
R2(config-router)#

R3(config)#router ospf 5
R3(config-router)#area 23 virtual-link 2.2.2.2
R3(config-router)#

R4 and R1 Routing Table: R4 missing network comes in its routing table And R1 missing network comes in its Routing table.
R4#show ip route
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback4
     172.16.0.0/24 is subnetted, 4 subnets
C       172.16.34.0 is directly connected, FastEthernet0/0
O IA    172.16.23.0 [110/11] via 172.16.34.3, 00:03:30, FastEthernet0/0
O IA    172.16.12.0 [110/21] via 172.16.34.3, 00:02:43, FastEthernet0/0
O IA    172.16.15.0 [110/31] via 172.16.34.3, 00:02:43, FastEthernet0/0


R1#show ip route
    1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback1
     172.16.0.0/24 is subnetted, 4 subnets
O IA    172.16.34.0 [110/21] via 172.16.12.2, 00:03:13, FastEthernet0/1
O IA    172.16.23.0 [110/11] via 172.16.12.2, 00:16:07, FastEthernet0/1
C       172.16.12.0 is directly connected, FastEthernet0/1
C       172.16.15.0 is directly connected, FastEthernet0/0


Stub Area:
When we Redistribute OSPF Domian and other EIGRP Domain. OSPF Domian all router receive Redistributed (EIGRP) Route. In this case, If have any low configuration router in OSPF Domain. It will be face trouble to process all routes. So need to configure Stub Area to avoid Redistributed/External Route from ASBR.

R5 Routing Table Before Redistribution in R4: No Redistributed Route available in R5.

R5#show ip route
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 4 subnets
O IA    172.16.34.0 [110/31] via 172.16.15.1, 00:00:29, FastEthernet0/0
O IA    172.16.23.0 [110/21] via 172.16.15.1, 00:01:48, FastEthernet0/0
O IA    172.16.12.0 [110/20] via 172.16.15.1, 00:06:59, FastEthernet0/0
C       172.16.15.0 is directly connected, FastEthernet0/0

Configuration: OSPF and EIGRP Redistribution
R4(config)#router eigrp 10
R4(config-router)#network 192.168.4.0 0.0.0.255
 

R4(config-router)#redistribute ospf 5
R4(config-router)#default-metric 1 1 1 1 1
 


R4(config)#router ospf 5
R4(config-router)#redistribute eigrp 10 subnets metric 50 


R5 Routing Table After Redistribution in R4: Redistributed/External Route comes in its routing table. If thousand Redistributed route comes in R5 and R5 is low configuration router. What happen? R5 gone.

R5#show ip route
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 4 subnets
O IA    172.16.34.0 [110/31] via 172.16.15.1, 00:08:36, FastEthernet0/0
O IA    172.16.23.0 [110/21] via 172.16.15.1, 00:09:55, FastEthernet0/0
O IA    172.16.12.0 [110/20] via 172.16.15.1, 00:15:07, FastEthernet0/0
C       172.16.15.0 is directly connected, FastEthernet0/0
O E2 192.168.4.0/24 [110/50] via 172.16.15.1, 00:01:37, FastEthernet0/0

Configuration: Stub Area in area 15 Router.
R1(config)#router ospf 5
R1(config-router)#area 15 stub

R5(config)#router ospf 5
R5(config-router)#area 15 stub

R5 Routing Table After Configure Stub in Area 15 router: External/Redistributed Route Removed and a default route generated. Actually Stub Area Ignore LSA 5.

R5#show ip route
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 4 subnets
O IA    172.16.34.0 [110/31] via 172.16.15.1, 00:01:07, FastEthernet0/0
O IA    172.16.23.0 [110/21] via 172.16.15.1, 00:01:07, FastEthernet0/0
O IA    172.16.12.0 [110/20] via 172.16.15.1, 00:01:07, FastEthernet0/0
C       172.16.15.0 is directly connected, FastEthernet0/0
O*IA 0.0.0.0/0 [110/11] via 172.16.15.1, 00:01:07, FastEthernet0/0


Totally Stubby Area:
By configuring Stub Area we can ignore LSA 5 (ASBR Routing). But if my router is extremely low end router. We need to Ignore LSA 3 (Inter Area Route).

R5 Routing Table Before Configure Totally Stubby Area: Inter Area and a default route available in R5. By Configuring Totally Stubby Area we remove LSA 3 and LSA 5 (Inter Area Route and External Route).

R5#show ip route
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 4 subnets
O IA    172.16.34.0 [110/31] via 172.16.15.1, 00:01:07, FastEthernet0/0
O IA    172.16.23.0 [110/21] via 172.16.15.1, 00:01:07, FastEthernet0/0
O IA    172.16.12.0 [110/20] via 172.16.15.1, 00:01:07, FastEthernet0/0
C       172.16.15.0 is directly connected, FastEthernet0/0
O*IA 0.0.0.0/0 [110/11] via 172.16.15.1, 00:01:07, FastEthernet0/0

Configuration: Totally Stubby Area configuration in Area 15
R1(config)#router ospf 5
R1(config-router)#no area 15 stub
R1(config-router)#area 15 stub no-summary

R5(config)#router ospf 5
R5(config-router)#no area 15 stub
R5(config-router)#area 15 stub no-summary

R5 Routing Table After Configure Area15 as Totally Stubby Area: Inter Area and a default route removed from R5. By Configuring Totally Stubby Area we remove LSA 3 and LSA 5 (Inter Area Route and External Route).

R5(config-router)#do sh ip ro
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.15.0 is directly connected, FastEthernet0/0
O*IA 0.0.0.0/0 [110/11] via 172.16.15.1, 00:00:10, FastEthernet0/0
R5(config-router)#



Not-So-Stubby Areas:
By Configuring Stub Area we ignore ASBR routing (LSA 5) to R5. So what happen if we try to configure redistribution in R5. (R5 slap me and said you don't know i ignore LSA 5)

R5(config-router)#redistribute rip subnets
*Mar  1 10:28:45.585: %OSPF-4-ASBR_WITHOUT_VALID_AREA: Router is currently an ASBR while having only one area which is a stub area
R5(config-router)#

Similarly If I want Area 34 as stub. R4 will ignore. Because R4 we already configured redistribution (Allow LSA 5). So R4 not allow me to configure Area 34 as stub.

R4(config-router)#area 34 stub
*Mar  1 11:58:22.985: %OSPF-4-ASBR_WITHOUT_VALID_AREA: Router is currently an ASBR while having only one area                                                                    which is a stub area
R4(config-router)#


So what is solution to allow Redistribution in Stub Area and Stub Area allow Redistribution. Solution is make Stub Area as NSSA. NSSA allow own area redistribution and other area external route block.

Configuration: RIPv2 and OSPF Redistribution.

R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 192.168.1.0
R1(config-router)#redistribute ospf 5 metric 2

R1(config)#router ospf 5
R1(config-router)#redistribute rip subnets metric 5
R1(config-router)#

R5 Routing Table Before Configure NSSA in Area 15:
R5(config-router)#do sh ip ro
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 4 subnets
O IA    172.16.34.0 [110/31] via 172.16.15.1, 00:00:01, FastEthernet0/0
O IA    172.16.23.0 [110/21] via 172.16.15.1, 00:00:01, FastEthernet0/0
O IA    172.16.12.0 [110/20] via 172.16.15.1, 00:00:01, FastEthernet0/0
C       172.16.15.0 is directly connected, FastEthernet0/0
O E2 192.168.4.0/24 [110/50] via 172.16.15.1, 00:00:01, FastEthernet0/0
O E2 192.168.1.0/24 [110/5] via 172.16.15.1, 00:00:09, FastEthernet0/0

Configuration: Not-So-Stubby Area Configure in Area 15.
R1(config)#router ospf 5
R1(config-router)#no area 15 stub no-summary

R1(config-router)#area 15 nssa

R5(config)#router ospf 5
R5(config-router)#no area 15 stub no-summary

R5(config-router)#area 15 nssa


R5 Routing Table After Configure NSSA in Area 15: Other Area Redistribution/External Route ignored.
R5(config-router)#do sh ip ro
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 4 subnets
O IA    172.16.34.0 [110/31] via 172.16.15.1, 00:00:02, FastEthernet0/0
O IA    172.16.23.0 [110/21] via 172.16.15.1, 00:00:02, FastEthernet0/0
O IA    172.16.12.0 [110/20] via 172.16.15.1, 00:00:02, FastEthernet0/0
C       172.16.15.0 is directly connected, FastEthernet0/0
O N2 192.168.1.0/24 [110/5] via 172.16.15.1, 00:00:02, FastEthernet0/0
R5(config-router)#


Totally Not-So-Stubby Area:
By Not-So-Stubby Area we can ignore other area external route (LSA 5). Allow only own area redistribution route by generate LSA 7. If want to ignore Inter Area Route (LSA 3). Need to configure Totally NSSA.

R5 Routing Table Before Configure Totally Not-So-Stubby in Area 15: Inter Area route and own area external route available.
R5(config-router)#do sh ip ro
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 4 subnets
O IA    172.16.34.0 [110/31] via 172.16.15.1, 00:00:02, FastEthernet0/0
O IA    172.16.23.0 [110/21] via 172.16.15.1, 00:00:02, FastEthernet0/0
O IA    172.16.12.0 [110/20] via 172.16.15.1, 00:00:02, FastEthernet0/0
C       172.16.15.0 is directly connected, FastEthernet0/0
O N2 192.168.1.0/24 [110/5] via 172.16.15.1, 00:00:02, FastEthernet0/0
R5(config-router)#

Configuration: Totally Not-So-Stubby Area
R1(config)#router ospf 5
R1(config-router)#no area 15 nssa
R1(config-router)#area 15 nssa no-summary
R1(config-router)#area 15 nssa default-information-originate

R5(config)#router ospf 5
R5(config-router)#no area 15 nssa
R5(config-router)#area 15 nssa no-summary
R5(config-router)#area 15 nssa default-information-originate

R5 Routing Table After Configure Totally Not-So-Stubby Area 15: Other Area Redistribution/External Route and Inter Area Route ignored.
R5(config-router)#do sh ip ro
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback5
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.15.0 is directly connected, FastEthernet0/0
O N2 192.168.1.0/24 [110/5] via 172.16.15.1, 00:00:06, FastEthernet0/0
O*IA 0.0.0.0/0 [110/11] via 172.16.15.1, 00:00:06, FastEthernet0/0


Link State Advertisement: OSPF uses Link state Advertisements (LSA) to share information of each network. By sharing LSA OSPF update Link State Database.



Router LSA: LSA type 1 generated by all routers in OSPF, and flooded inside the router’s area not cross ABR. LSA 1 describes routers active interfaces, IP Addresses, Neighbors and cost to each.
Network LSA: LSA type 2 generated by Designated Router (DR). LSA type 2 describes all routers list attached to DR. LSA type 2 flooded only it’s area not cross ABR.
Network Summary: LSA 3 generated by ABR. LSA 3 sent own area summary (LSA 1 and LSA 2) to another area and receive other area summary (LSA 1 and LSA 2).
Summary ASBR: LSA 4 generate by ABR. LSA 4 (route) describe how reach ASBR to other area router. ABR sent LSA 4 to local area routers. So Internal area routers know how to get external route through ASBR.
External Link LSA: LSA 5 Generate by ASBR to describe redistributed routes into the area. LSA 5 describes how OSPF network reach external network over ASBR. This route appears in routing table as O E1 and O E2.
NSSA External LSA: Type 7 LSA generate by ASBR, when ASBR is inside NSSA. So that during leaving NSSA LSA 7 translated in LSA5. This route appears in routing table as N1 and N2.


 

Configure rb metal 2shpn As Access Point

Turn On rb Metal 2shpn Router as like : Connect rb metal 2shpn with your Laptop by winbox. Open Winbox: Click on Neighbors you w...