Sunday, August 21, 2016

Redirect Switch and Router command output in txt or doc file.

Redirect Switch/Router Command Output to txt or doc file:

If you want your command output store in a doc file like running configuration. You can use redirect command to store your command output in doc. Also need tftp server (download link:http://tftpd32.jounin.net/tftpd32_download.html) open. After this command you search output file on directory.

Switch>enable

Switch#show version | redirect tftp://1.1.1.1/ver.doc
Switch#exit

NTP Client Configue in Switch and Router




Configure NTP Client:

To keep switch and router time same with network. Need to configure the router and switches as NTP Clients.  If not use this command service timestamps log datetime localtime then switch generated log time show its internal clock time.

SW#conf t
SW(config)# ntp server 1.1.1.1                                                                        //NTP Server IP Address
SW(config)# clock timezone UTC +6                                                              //Set Timezone.
SW(config)# service timestamps log datetime localtime                 //Use NTP time during log generate.
SW(config)# do wr                                                                                          //save
SW(config)# end                                                                                              //exit
Switch#show ntp status                                                                                    //Check NTP Clients details
Clock is synchronized, stratum 4, reference is 1.1.1.1
nominal freq is 119.2092 Hz, actual freq is 119.2073 Hz, precision is 2**18
reference time is DB63F174.195C7E08 (15:23:00.099 UTC Sun Aug 21 2016)
clock offset is 11.9068 msec, root delay is 63.71 msec
root dispersion is 99.37 msec, peer dispersion is 9.66 msec

Switch#show clock detail
15:28:59.782 UTC Sun Aug 21 2016
Time source is NTP
Switch#
ail

Prevent router to Translating "conft"...domain server (255.255.255.255) or disable resolving Unknown/Invalid Command




Prevent Translating "conft"...domain server (255.255.255.255) or disable resolving Unknown/Invalid Command:

During work, when we entry invalid command. Routers try to resolve this and take time. This is a router default behavior.
ASW1#conft                                       //invalid command
Translating "conft"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address

Stop this default behavior of router by entering below command in global configuration mode.

ASW1#conf t
ASW1(config)# no ip domain-lookup
ASW1(config)#do wr
ASW1(config)#end
OR use keyboard shortcut during this translating
Press shift + Ctrl + 6

Saturday, August 20, 2016

Redistribution Routing Protocol (RIP, IGRP, EIGRP, OSPF and Static)




Redistribution:

Redistribution need for more than one routing protocols communication. If my network runs RIP and your network run OSPF. And we want to communication between our networks. Then we need redistribution. Redistribution must do that router, where both protocols are running. 

During Redistribution metric is important, because each protocol use different metric. Like RIP use hop count (maximum 15 hop count. after 15 hops the network will be infinity) and IGRP and EIGRP use composite metric based on bandwidth, delay, reliability, load and MTU.

Now we see the Redistribution between RIP and other Protocols.

RIP configured in R1, R2, R3, R4 and R5. OSPF configured in R5, R6, R7, R8. So after redistribution we see the RIP and OSPF route combination. Now we Configure Router R5 for redistribution. Because RIP and OSPF both run in this router.

Redistribute OSPF into RIP:
R5#conf t
R5(config)#router rip
R5(config-router)#redistribute ospf 5 metric 3

Similarly we can configure other routing protocol (EIGRP, ISIS, IGRP and Static) in RIP.

R5(config-router)#redistribute eigrp 5 metric 3

R5(config-router)#redistribute isis metric 3

R5(config-router)#redistribute igrp 5 metric 3

R5(config-router)#redistribute static  metric 3

Note: Above we define metric value 3. But Cisco recommended using lowest metric value (1). So this route will be available after maximum (14) hop. We can use default metric during redistribution.


Specially see in Image, we use metric value 3 in redistribution. So this network will be valid after next 12 hop (RIP maximum hop count 15). We configured metric value 3 in router R5. So in Router R4 metric value will be 4. Again In router R3 metric value will be 5. Check for network 172.16.78.0. In image.


Again see the below image, we configure metric value with 14, then this network will be traverse next 1 hop. And we can see network 172.16.78.0 is not available in router R2.

R5#conf t
R5(config)#router rip
R5(config-router)#redistribute ospf 5 metric 14


Define Metric Value:Two ways we can define metric value one is above way another is default-metric.

First Way is defining metric value:

R5(config-router)#redistribute eigrp 5 metric 3

2nd way is default-metric value:

R5(config-router)#redistribute eigrp 5

R5(config-router)#default-metric 1




Redistribute RIP into EIGRP:
EIGRP need five metrics when redistributing other protocols: Bandwidth, delay, reliability, load, MTU.

R5#conf t
R5(config)#router eigrp 5
R5(config-router)#redistribute rip metric 10000 100 255 1 1500     //metric bandwidth delay 
                                                                                                        reliability load MTU


Similarly we can configure other routing protocol (OSPF, ISIS, IGRP and Static) in EIGRP.

R5(config-router)#redistribute ospf 5 metric 10000 100 255 1 1500

R5(config-router)#redistribute isis metric 10000 100 255 1 1500

R5(config-router)#redistribute igrp 5 metric 10000 100 255 1 1500

R5(config-router)#redistribute static  metric 10000 100 255 1 1500


Again We can Define Metric in another way.
First Way is defining metric with parameter:
R5(config-router)#redistribute rip metric 10000 100 255 1 1500
2nd way is default-metric value:
R5(config-router)#redistribute rip
R5(config-router)#default-metric 10000 100 255 1 1500

After Redistribution, when you enter Router#show ip route . Redistributed route will be show as D EX.



Redistribute RIP into OSPF:
During redistribute other routing protocol in OSPF need to define subnet. Otherwise it redistribute only major network not subnets.

R5#conf t
R5(config)#router ospf 5
R5(config-router)#redistribute rip metric 200 subnets


Similarly we can configure other routing protocol (EIGRP, ISIS, IGRP and Static) in OSPF.

R5(config-router)#redistribute eigrp 5 metric 200 subnets

R5(config-router)#redistribute isis metric 200 subnets

R5(config-router)#redistribute igrp 5 metric200 subnets

R5(config-router)#redistribute static  metric 200 subnets



Redistribute RIP into IGRP:
IGRP also need five metrics when redistributing other protocols: Bandwidth, delay, reliability, load, MTU.

R5#conf t
R5(config)#router igrp 5
R5(config-router)#redistribute rip metric 10000 100 255 1 1500     //metric bandwidth delay 
                                                                                                        reliability load MTU


Similarly we can configure other routing protocol (OSPF, ISIS, EIGRP and Static) in IGRP.

R5(config-router)#redistribute ospf 5 metric 10000 100 255 1 1500

R5(config-router)#redistribute isis metric 10000 100 255 1 1500

R5(config-router)#redistribute eigrp 5 metric 10000 100 255 1 1500

R5(config-router)#redistribute static  metric 10000 100 255 1 1500





During Redistribution one domain all route come to another domain. But sometimes all route are not necessary for other domain or sometimes need to control a specific route path. So we need Policy Based Routing (PBR).


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...