juniper jncia – juniper floating static route configuration

13
ASM EDUCATIONAL CENTER INC. (ASM) WHERE TRAINING, TECHNOLOGY & SERVICE CONVERGE CHECK OUT OUR JUNIPER TRAINING VIDEOS: WWW.ASMED.COM/J1

Upload: hamed-moghaddam

Post on 12-Jan-2017

166 views

Category:

Education


16 download

TRANSCRIPT

Page 1: Juniper JNCIA – Juniper Floating Static Route Configuration

A S M E D U C A T I O N A L C E N T E R I N C . ( A S M )WHERE TRAINING, TECHNOLOGY & SERVICE CONVERGECHECK OUT OUR JUNIPER TRAINING VIDEOS: WWW.ASMED.COM/J1

Page 2: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATION

Page 3: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATION

In here R1 and R2 are connected via two cablese1 to e1 is 10.10.10.1/24 10.10.10.2/24e3 to e3 is 40.40.40.1/24 40.40.40.2/24 Goal is to that R1 will be able go to Loopback address of R2=2.2.2.2 via Link e1=10.10.10.1 Here I will give IP address to R1 em1 , em3 and Lo0 root@R1# set interfaces em1 unit 0 family inet address 10.10.10.1/24root@R1# set interfaces em3 unit 0 family inet address 40.40.40.1/24root@R1# set interfaces lo0 unit 0 family inet address 1.1.1.1/24 Here are R1 Configuration

Page 4: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATION

root@R1> show configuration em1 { unit 0 { family inet { address 10.10.10.1/24; } } } em3 { unit 0 { family inet { address 40.40.40.1/24; } } } lo0 { unit 0 { family inet { address 1.1.1.1/24; } } }}

Page 5: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATION Here I will give IP address to R2 em1 ,em2 , em3 and Lo0 root@R2# set interfaces em1 unit 0 family inet address 10.10.10.2/24root@R2# set interfaces em3 unit 0 family inet address 40.40.40.2/24root@R2# set interfaces lo0 unit 0 family inet address 2.2.2.2/24 root@R2# show interfacesem1 { unit 0 { family inet { address 10.10.10.2/24; } }}em2 { unit 0 { family inet { address 20.20.20.2/24; } }}

Page 6: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATIONem3 { unit 0 { family inet { address 40.40.40.2/24; } }}lo0 { unit 0 { family inet { address 2.2.2.2/24; } }} [edit]root@R2# Now In order R1 be able to Ping 2.2.2.2 using the Link e1 (that is next hop is 10.10.10.2) we need to use the commands: qualified-next-hop 10.10.10.2 preference 25 (remember the default preference for Static route=5) so I want other link to have a higher Preference

Page 7: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATIONHere I will do the Static Route On R1 root@R1# set routing-options static route 2.2.2.0/24 next-hop 10.10.10.2root@R1# set routing-options static route 2.2.2.0/24 qualified-next-hop 40.40.40.2 preference 25 so above line means I go to Loopback 2.2.2.2 via next hop=10.10.10.1 ( as main route , since the default preference =5, and it is lower than 25) Here is another show commands on R1 root@R1# show routing-optionsstatic { route 2.2.2.0/24 { next-hop 10.10.10.2; qualified-next-hop 40.40.40.2 { preference 25; } }}

Page 8: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATIONHere is my routing table for R1 root@R1> show route protocol static inet.0: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both 2.2.2.0/24 *[Static/5] 00:01:45 > to 10.10.10.2 via em1.0 [Static/25] 00:09:07 > to 40.40.40.2 via em3.0 The asterisks (*) in the routing tables show the active routes. The backup routes are listed next. Since R2 has a static back to R1 ; I will be able ping 2.2.2.2 Now I will do the Static Route on R2 root@R2# set routing-options static route 1.1.1.0/24 next-hop 10.10.10.1

Page 9: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATIONHere is R2 information: root@R2# show routing-optionsstatic { route 1.1.1.0/24 next-hop 10.10.10.1; Now I can ping from R1 to 2.2.2.2 root@R1> ping 2.2.2.2PING 2.2.2.2 (2.2.2.2): 56 data bytes64 bytes from 2.2.2.2: icmp_seq=0 ttl=64 time=0.440 ms64 bytes from 2.2.2.2: icmp_seq=1 ttl=64 time=0.454 ms64 bytes from 2.2.2.2: icmp_seq=2 ttl=64 time=0.895 ms64 bytes from 2.2.2.2: icmp_seq=3 ttl=64 time=0.832 ms64 bytes from 2.2.2.2: icmp_seq=4 ttl=64 time=0.768 msMaking Sure That the Backup Route Becomes the Active Route

Page 10: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATIONIf the primary route becomes not available, I need to make sure that the backup secondary route becomes active.So Now what I will do , I will disable the active route by deactivating the em1 interface on R1, and test it with ping root@R1# deactivate interfaces em1 unit 0 family inet address 10.10.10.1/24So here is my show interface on R1 now root@R1# show interfacesem1 { unit 0 { family inet { inactive: address 10.10.10.1/24; } }}em3 { unit 0 { family inet { address 40.40.40.1/24; } }}lo0 { unit 0 { family inet { address 1.1.1.1/24; } }}

Page 11: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATIONAs we see from above this has been deactivated for em1 , now according this commands I should be able ping 2.2.2.2 via 40.40.40.2 root@R1# show routing-optionsstatic { route 2.2.2.0/24 { next-hop 10.10.10.2; qualified-next-hop 40.40.40.2 { preference 25; } }} But let’s look at routing table in R1#root@R1> show route protocol static inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both 2.2.2.0/24 *[Static/25] 01:10:58 > to 40.40.40.2 via em3.0 root@R1>

Page 12: Juniper JNCIA – Juniper Floating Static Route Configuration

JUNIPER FLOATING STATIC ROUTE CONFIGURATIONHere in above we see that R1 will go to 2.2.2.2 via 40.40.40.2 root@R1> ping 2.2.2.2PING 2.2.2.2 (2.2.2.2): 56 data bytes64 bytes from 2.2.2.2: icmp_seq=0 ttl=64 time=0.583 ms64 bytes from 2.2.2.2: icmp_seq=1 ttl=64 time=0.530 ms64 bytes from 2.2.2.2: icmp_seq=2 ttl=64 time=0.576 ms64 bytes from 2.2.2.2: icmp_seq=3 ttl=64 time=0.499 ms So in Summary; for the Floating static route you need to have these commands: root@R1# set routing-options static route 2.2.2.0/24 next-hop 10.10.10.2root@R1# set routing-options static route 2.2.2.0/24 qualified-next-hop 40.40.40.2 preference 25 lets activate the interface em1root@R1# activate interfaces em1 unit 0 family inet address 10.10.10.1/24 Here is my routing table which is back to normal; root@R1> show route protocol staticinet.0: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden)+ = Active Route, - = Last Active, * = Both 2.2.2.0/24 *[Static/5] 00:00:37 > to 10.10.10.2 via em1.0 [Static/25] 01:15:31 > to 40.40.40.2 via em3.0

Page 13: Juniper JNCIA – Juniper Floating Static Route Configuration

A S M E D U C A T I O N A L C E N T E R I N C . ( A S M )WHERE TRAINING, TECHNOLOGY & SERVICE CONVERGEW W W. A S M E D . C O M