The document describes configuring OSPF routing between routers R1, R2, and R3, and exporting OSPF routes into RIP to advertise them to router R4. R2 is configured with OSPF to neighbors R1 and R3, and with RIP to neighbor R4. The routing policy on R2 is updated to export OSPF routes into RIP. This allows R4 to now see the loopback routes of R1 and R3 in its routing table via RIP.
Juniper JNCIA – Juniper RIP and OSPF Route Configuration
1. Juniper JNCIA
ASM Educational Center Inc. (ASM)
Where Training,Technology& Service Converge
CheckoutourJuniperTrainingVideos:www.asmed.com/j1
Juniper RIP and OSPF Route Configuration
3. Juniper RIP and OSPF Route Configuration
The Goal is when I configure OSPF on the left side ( between R1,R2,R3) ; R4
be able to ping 1.1.1.1 and 3.3.3.3 after I export from OSPF to RIP.
Up to now R2 has loopback address 2.2.2.2/32 and 2.2.2.3/32 that will be
seen on R4 Routing tables since I have done RIP on R2 and R4
4. Juniper RIP and OSPF Route Configuration
Here what we have on R4:
root@R4> show configuration
em2 {
unit 0 {
family inet {
address 20.20.20.4/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 4.4.4.4/32;
}
}
}
}
5. Juniper RIP and OSPF Route Configuration
protocols {
rip {
group RIPGROUP4 {
export RIPPOLICY;
neighbor em2.0;
}
}
}
policy-options {
policy-statement RIPPOLICY {
term 1 {
from protocol [ rip direct ];
then accept;
}
}
}
6. Juniper RIP and OSPF Route Configuration
Here what I have on R2#
root@R2> show configuration
interfaces {
em1 {
unit 0 {
family inet {
address 10.10.10.2/24;
}
}
}
em2 {
unit 0 {
family inet {
address 20.20.20.2/24;
}
}
}
7. Juniper RIP and OSPF Route Configuration
em3 {
unit 0 {
family inet {
address 30.30.30.2/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 2.2.2.2/32;
address 2.2.2.3/32;
}
}
}
}
8. Juniper RIP and OSPF Route Configuration
protocols {
rip {
group RIPGROUP {
export RIPPOLICY2;
neighbor em2.0;
}
}
}
policy-options {
policy-statement RIPPOLICY2 {
term 1 {
from protocol [ rip direct ];
then accept;
}
}
}
9. Juniper RIP and OSPF Route Configuration
Now remember from last lab R4 can ping loopback address 2.2.2.2 and 2.2.2.3
root@R4> show route
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10. Juniper RIP and OSPF Route Configuration
2.2.2.2/32 *[RIP/100] 00:01:48, metric 2, tag 0
> to 20.20.20.2 via em2.0
2.2.2.3/32 *[RIP/100] 00:01:48, metric 2, tag 0
> to 20.20.20.2 via em2.0
4.4.4.4/32 *[Direct/0] 00:02:59
> via lo0.0
10.10.10.0/24 *[RIP/100] 00:01:52, metric 2, tag 0
> to 20.20.20.2 via em2.0
20.20.20.0/24 *[Direct/0] 00:03:00
> via em2.0
20.20.20.4/32 *[Local/0] 00:03:00
Local via em2.0
30.30.30.0/24 *[RIP/100] 00:01:48, metric 2, tag 0
> to 20.20.20.2 via em2.0
224.0.0.9/32 *[RIP/100] 00:03:01, metric 1
MultiRecv
11. Juniper RIP and OSPF Route Configuration
root@R4> ping 2.2.2.2
PING 2.2.2.2 (2.2.2.2): 56 data bytes
64 bytes from 2.2.2.2: icmp_seq=0 ttl=64 time=0.462 ms
64 bytes from 2.2.2.2: icmp_seq=1 ttl=64 time=0.587 ms
64 bytes from 2.2.2.2: icmp_seq=2 ttl=64 time=1.029 ms
^C
--- 2.2.2.2 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.462/0.693/1.029/0.243 ms
12. Juniper RIP and OSPF Route Configuration
root@R4> ping 2.2.2.3
PING 2.2.2.3 (2.2.2.3): 56 data bytes
64 bytes from 2.2.2.3: icmp_seq=0 ttl=64 time=0.522 ms
64 bytes from 2.2.2.3: icmp_seq=1 ttl=64 time=0.910 ms
64 bytes from 2.2.2.3: icmp_seq=2 ttl=64 time=0.948 ms
64 bytes from 2.2.2.3: icmp_seq=3 ttl=64 time=0.^C
--- 2.2.2.3 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.522/0.825/0.948/0.175 ms
•
13. Juniper RIP and OSPF Route Configuration
Now I go to R1 and R3 and create all my interface and loopback address :
Here is R1 configuration:
root@R1# set interfaces em1 unit 0 family inet address 10.10.10.1/24
set interfaces lo0 unit 0 family inet address 1.1.1.1/32
Now I will do on R3:
root@R3#set interfaces em3 unit 0 family inet address 30.30.30.1/24
set interfaces lo0 unit 0 family inet address 3.3.3.3/32
14. Juniper RIP and OSPF Route Configuration
Now I will go configure OPPF on R1#
root@R1#set protocols ospf area 0.0.0.0 interface em1.0
set protocols ospf area 0.0.0.0 interface lo0.0
Now I will go configure OPSF on R2#
root@R2# set protocols ospf area 0.0.0.0 interface em1.0
set protocols ospf area 0.0.0.0 interface em3.0
set protocols ospf area 0.0.0.0 interface lo0.0
15. Juniper RIP and OSPF Route Configuration
Now we see R2 is neighbor with R1
root@R2> show ospf neighbor
Address Interface State ID Pri Dead
10.10.10.1 em1.0 Full 1.1.1.1 128 35
Lets look at R1 , routing table : I can see the loopback of R2 , not Loopback
of R3 =3.3.3.3 since I need to finish my OSPF configuration on R3
16. Juniper RIP and OSPF Route Configuration
root@R1> show route
inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[Direct/0] 00:23:25
> via lo0.0
2.2.2.2/32 *[OSPF/10] 00:09:04, metric 1
> to 10.10.10.2 via em1.0
2.2.2.3/32 *[OSPF/10] 00:09:04, metric 1
> to 10.10.10.2 via em1.0
10.10.10.0/24 *[Direct/0] 00:31:53
> via em1.0
10.10.10.1/32 *[Local/0] 00:31:53
Local via em1.0
30.30.30.0/24 *[OSPF/10] 00:09:04, metric 2
> to 10.10.10.2 via em1.0
224.0.0.5/32 *[OSPF/10] 00:13:11, metric 1
MultiRecv
17. Juniper RIP and OSPF Route Configuration
Now I will configure OSPF on R3#
root@R3# set protocols ospf area 0.0.0.0 interface em3.0
set protocols ospf area 0.0.0.0 interface lo0.0
Now when I go to R3 and I should have two neighbors on R3
root@R2> show ospf neighbor
Address Interface State ID Pri Dead
10.10.10.1 em1.0 Full 1.1.1.1 128 34
30.30.30.1 em3.0 Full 3.3.3.3 128 39
Lets look at R1 routing table I should see the loopback of R2=2.2.2.2 , 2.2.2.3 and Loopback
of R3=3.3.3.3
18. Juniper RIP and OSPF Route Configuration
root@R1> show route
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[Direct/0] 00:30:12
> via lo0.0
2.2.2.2/32 *[OSPF/10] 00:15:51, metric 1
> to 10.10.10.2 via em1.0
2.2.2.3/32 *[OSPF/10] 00:15:51, metric 1
> to 10.10.10.2 via em1.0
3.3.3.3/32 *[OSPF/10] 00:03:03, metric 2
> to 10.10.10.2 via em1.0
10.10.10.0/24 *[Direct/0] 00:38:40
> via em1.0
10.10.10.1/32 *[Local/0] 00:38:40
Local via em1.0
30.30.30.0/24 *[OSPF/10] 00:15:51, metric 2
> to 10.10.10.2 via em1.0
224.0.0.5/32 *[OSPF/10] 00:19:58, metric 1
MultiRecv
19. Juniper RIP and OSPF Route Configuration
So up to now R1, R2, R3 are talking via OPSF and R2 and R4 are
talking via RIP ; now when I go to R4 routing table I do not see the
loopback of R1=1.1.1.1 and R3=3.3.3.3 inside R4
Lets go to R4#
root@R4> show route
20. Juniper RIP and OSPF Route Configuration
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2.2.2.2/32 *[RIP/100] 00:48:21, metric 2, tag 0
> to 20.20.20.2 via em2.0
2.2.2.3/32 *[RIP/100] 00:48:21, metric 2, tag 0
> to 20.20.20.2 via em2.0
4.4.4.4/32 *[Direct/0] 00:49:32
> via lo0.0
10.10.10.0/24 *[RIP/100] 00:48:25, metric 2, tag 0
> to 20.20.20.2 via em2.0
20.20.20.0/24 *[Direct/0] 00:49:33
> via em2.0
20.20.20.4/32 *[Local/0] 00:49:33
Local via em2.0
30.30.30.0/24 *[RIP/100] 00:48:21, metric 2, tag 0
> to 20.20.20.2 via em2.0
224.0.0.9/32 *[RIP/100] 00:49:34, metric 1
MultiRecv
21. Juniper RIP and OSPF Route Configuration
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2.2.2.2/32 *[RIP/100] 00:48:21, metric 2, tag 0
> to 20.20.20.2 via em2.0
2.2.2.3/32 *[RIP/100] 00:48:21, metric 2, tag 0
> to 20.20.20.2 via em2.0
4.4.4.4/32 *[Direct/0] 00:49:32
> via lo0.0
10.10.10.0/24 *[RIP/100] 00:48:25, metric 2, tag 0
> to 20.20.20.2 via em2.0
20.20.20.0/24 *[Direct/0] 00:49:33
> via em2.0
20.20.20.4/32 *[Local/0] 00:49:33
Local via em2.0
30.30.30.0/24 *[RIP/100] 00:48:21, metric 2, tag 0
> to 20.20.20.2 via em2.0
224.0.0.9/32 *[RIP/100] 00:49:34, metric 1
MultiRecv
22. Juniper RIP and OSPF Route Configuration
In order R4 be able to see loopback 1.1.1.1 and 3.3.3.3 I need to go to Middle router R2 and export the
OSPF into RIP ( the same way we did on RIP and connected) let’s look at R2 , what we have so far:
root@R2> show configuration
protocols {
ospf {
area 0.0.0.0 {
interface em1.0;
interface em3.0;
interface lo0.0;
}
}
23. Juniper RIP and OSPF Route Configuration
rip {
group RIPGROUP {
export RIPPOLICY2;
neighbor em2.0;
}
}
}
policy-options {
policy-statement RIPPOLICY2 {
term 1 {
from protocol [ rip direct ];
then accept;
}
}
}
•
24. Juniper RIP and OSPF Route Configuration
Now in above Policy-option I need to Add OSFF that is :
root@R2#set policy-options policy-statement RIPPOLICY2 term 1 from protocol ospf
Now let’s look at show configuration on R2 again and make sure OSPF has been added :
root@R2> show configuration
protocols {
ospf {
area 0.0.0.0 {
interface em1.0;
interface em3.0;
interface lo0.0;
}
}
rip {
group RIPGROUP {
export RIPPOLICY2;
neighbor em2.0;
}
}
}
25. Juniper RIP and OSPF Route Configuration
policy-statement RIPPOLICY2 {
term 1 {
from protocol [ rip direct ospf ];
then accept;
}
}
}
Now when I go to R4 routing tables I see all the Loopback address of R1=1.1.1.1 and R3=3.3.3.3
root@R4> show route
26. Juniper RIP and OSPF Route Configuration
inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[RIP/100] 00:03:11, metric 2, tag 0
> to 20.20.20.2 via em2.0
2.2.2.2/32 *[RIP/100] 00:59:32, metric 2, tag 0
> to 20.20.20.2 via em2.0
2.2.2.3/32 *[RIP/100] 00:59:32, metric 2, tag 0
> to 20.20.20.2 via em2.0
3.3.3.3/32 *[RIP/100] 00:03:11, metric 2, tag 0
> to 20.20.20.2 via em2.0
4.4.4.4/32 *[Direct/0] 01:00:43
> via lo0.0
27. Juniper RIP and OSPF Route Configuration
10.10.10.0/24 *[RIP/100] 00:59:36, metric 2, tag 0
> to 20.20.20.2 via em2.0
20.20.20.0/24 *[Direct/0] 01:00:44
> via em2.0
20.20.20.4/32 *[Local/0] 01:00:44
Local via em2.0
30.30.30.0/24 *[RIP/100] 00:59:32, metric 2, tag 0
> to 20.20.20.2 via em2.0
224.0.0.9/32 *[RIP/100] 01:00:45, metric 1
MultiRecv
28. Juniper RIP and OSPF Route Configuration
Now ; if I Go to R4 I will see all the loopback but I can not ping 1.1.1.1 and 3.3.3.3 ? why ?
Since remember Ping is Echo and Echo-reply and also when I go to R1 and look at Routing
table I do not see
The loopback address of R4=4.4.4.4 (since I need to export RIP into OSPF) , lets look at R1
routing table
root@R1> show route
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
29. Juniper RIP and OSPF Route Configuration
1.1.1.1/32 *[Direct/0] 00:50:22
> via lo0.0
2.2.2.2/32 *[OSPF/10] 00:36:01, metric 1
> to 10.10.10.2 via em1.0
2.2.2.3/32 *[OSPF/10] 00:36:01, metric 1
> to 10.10.10.2 via em1.0
3.3.3.3/32 *[OSPF/10] 00:23:13, metric 2
> to 10.10.10.2 via em1.0
10.10.10.0/24 *[Direct/0] 00:58:50
> via em1.0
10.10.10.1/32 *[Local/0] 00:58:50
Local via em1.0
30.30.30.0/24 *[OSPF/10] 00:36:01, metric 2
> to 10.10.10.2 via em1.0
224.0.0.5/32 *[OSPF/10] 00:40:08, metric 1
MultiRecv
30. Juniper RIP and OSPF Route Configuration
So how do you solve the problem ; I must go to Middle Router R2 and do same concept as
before ; but in this case I need to export RIP into OSPF , before we did export OSPF into
RIP.
The above concept is called redistribution that is cover in Cisco CCNP class.
Let’s look at what I have on R2 so far :
root@R2> show configuration
protocols {
ospf {
area 0.0.0.0 {
interface em1.0;
interface em3.0;
interface lo0.0;
}
}
31. Juniper RIP and OSPF Route Configuration
rip {
group RIPGROUP {
export RIPPOLICY2;
neighbor em2.0;
}
}
}
policy-options {
policy-statement RIPPOLICY2 {
term 1 {
from protocol [ rip direct ospf ];
then accept;
}
}
}
32. Juniper RIP and OSPF Route Configuration
So what I need to do create another Policy-option and lets called it OSPFPOLICY and then export it
(apply) it under Protocol ospf
root@R2# set policy-options policy-statement OSPFPOLICY term 1 from protocol rip
set policy-options policy-statement OSPFPOLICY term 1 then accept
now I need to Export it under OSPF (apply this policy) , lets see what we have so far :
33. Juniper RIP and OSPF Route Configuration
So what I need to do create another Policy-option and lets called it OSPFPOLICY and then export it
(apply) it under Protocol ospf
root@R2# set policy-options policy-statement OSPFPOLICY term 1 from protocol rip
set policy-options policy-statement OSPFPOLICY term 1 then accept
now I need to Export it under OSPF (apply this policy) , lets see what we have so far :
34. Juniper RIP and OSPF Route Configuration
root@R2> show configuration
protocols {
ospf {
area 0.0.0.0 {
interface em1.0;
interface em3.0;
interface lo0.0;
}
}
rip {
group RIPGROUP {
export RIPPOLICY2;
neighbor em2.0;
}
}
}
35. Juniper RIP and OSPF Route Configuration
policy-options {
policy-statement OSPFPOLICY {
term 1 {
from protocol ospf;
then accept;
}
}
policy-statement RIPPOLICY2 {
term 1 {
from protocol [ rip direct ospf ];
then accept;
}
}
}
36. Juniper RIP and OSPF Route Configuration
Now all I have to do Export ( apply OSPFPOLICY) under protocol ospf same as RIP.
root@R2# set protocols ospf export OSPFPOLICY
let’s see what we have on R2 now :
root@R2# run show configuration
protocols {
ospf {
export OSPFPOLICY;
area 0.0.0.0 {
interface em1.0;
interface em3.0;
interface lo0.0;
}
}
37. Juniper RIP and OSPF Route Configuration
rip {
group RIPGROUP {
export RIPPOLICY2;
neighbor em2.0;
}
}
}
policy-options {
policy-statement OSPFPOLICY {
term 1 {
from protocol rip;
then accept;
}
}
38. Juniper RIP and OSPF Route Configuration
policy-statement RIPPOLICY2 {
term 1 {
from protocol [ rip direct ospf ];
then accept;
}
}
}
Now If I go to R1 and look at Routing table I will see the loopback of R4 as OSPF with tag 2 (
similar to Cisco which is called OE2 =means external ) and here the prefarcane for external
is 150 instead of 10
39. Juniper RIP and OSPF Route Configuration
root@R1> show route
inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[Direct/0] 01:21:26
> via lo0.0
2.2.2.2/32 *[OSPF/10] 01:07:05, metric 1
> to 10.10.10.2 via em1.0
2.2.2.3/32 *[OSPF/10] 01:07:05, metric 1
> to 10.10.10.2 via em1.0
3.3.3.3/32 *[OSPF/10] 00:54:17, metric 2
> to 10.10.10.2 via em1.0
40. Juniper RIP and OSPF Route Configuration
4.4.4.4/32 *[OSPF/150] 00:00:54, metric 2, tag 0
> to 10.10.10.2 via em1.0
10.10.10.0/24 *[Direct/0] 01:29:54
> via em1.0
10.10.10.1/32 *[Local/0] 01:29:54
Local via em1.0
30.30.30.0/24 *[OSPF/10] 01:07:05, metric 2
> to 10.10.10.2 via em1.0
224.0.0.5/32 *[OSPF/10] 01:11:12, metric 1
MultiRecv
41. Juniper RIP and OSPF Route Configuration
root@R1> ping 4.4.4.4
PING 4.4.4.4 (4.4.4.4): 56 data bytes
64 bytes from 4.4.4.4: icmp_seq=0 ttl=63 time=0.860 ms
64 bytes from 4.4.4.4: icmp_seq=1 ttl=63 time=2.033 ms
64 bytes from 4.4.4.4: icmp_seq=2 ttl=63 time=1.631 ms
^C
--- 4.4.4.4 ping statistics ---
Now even R3 can see loopback of R4=4.4.4.4 and can ping it : (With Preference of 150 and
metric 2 instead of default Preference of 10 and metric 1)
42. Juniper RIP and OSPF Route Configuration
root@R3> show route
inet.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[OSPF/10] 01:04:56, metric 2
> to 30.30.30.2 via em3.0
2.2.2.2/32 *[OSPF/10] 01:04:56, metric 1
> to 30.30.30.2 via em3.0
2.2.2.3/32 *[OSPF/10] 01:04:56, metric 1
> to 30.30.30.2 via em3.0
3.3.3.3/32 *[Direct/0] 01:28:34
> via lo0.0
43. Juniper RIP and OSPF Route Configuration
4.4.4.4/32 *[OSPF/150] 00:10:14, metric 2, tag 0
> to 30.30.30.2 via em3.0
10.10.10.0/24 *[OSPF/10] 01:04:56, metric 2
> to 30.30.30.2 via em3.0
30.30.30.0/24 *[Direct/0] 01:30:19
> via em3.0
30.30.30.1/32 *[Local/0] 01:30:19
Local via em3.0
224.0.0.5/32 *[OSPF/10] 01:05:01, metric 1
MultiRecv
44. Juniper RIP and OSPF Route Configuration
root@R3> ping 4.4.4.4
PING 4.4.4.4 (4.4.4.4): 56 data bytes
64 bytes from 4.4.4.4: icmp_seq=0 ttl=63 time=1.017 ms
64 bytes from 4.4.4.4: icmp_seq=1 ttl=63 time=1.556 ms
^C
Now If I go to R4 and look at Routing table of R4 I see the loopback 1.1.1.1 and 3.3.3.3 but
still can not ping it ? Since I need under OSPF also export direct connection on R2
Here what we had before on R2#
45. Juniper RIP and OSPF Route Configuration
root@R2> run show configuration
protocols {
ospf {
export OSPFPOLICY;
area 0.0.0.0 {
interface em1.0;
interface em3.0;
interface lo0.0;
}
}
rip {
group RIPGROUP {
export RIPPOLICY2;
neighbor em2.0;
}
}
}
46. Juniper RIP and OSPF Route Configuration
policy-options {
policy-statement OSPFPOLICY {
term 1 {
from protocol rip;
then accept;
}
}
policy-statement RIPPOLICY2 {
term 1 {
from protocol [ rip direct ospf ];
then accept;
}
}
}
47. Juniper RIP and OSPF Route Configuration
As we see I have this on R2:
policy-options {
policy-statement OSPFPOLICY {
term 1 {
from protocol rip;
then accept;
The above means redistribute or export RIP into ospf that is what R1 can ping 4.4.4.4 but
R1 can not ping the link 20.20.20.2 or 20.20.20.4
48. Juniper RIP and OSPF Route Configuration
So If I add the export Direct in above , then It means I am also exporting RIP and direct
connection to OSPF then R1 can ping 20.20.20.2 and 20.20.20.4 , and then R4 will be able
to ping 1.1.1.1 and 3.3.3.3
So I go to R2#
root@R2# set policy-options policy-statement OSPFPOLICY term 1 from protocol
Now here what I have in R2 compare in above :
49. Juniper RIP and OSPF Route Configuration
policy-options {
policy-statement OSPFPOLICY {
term 1 {
from protocol [ rip direct ];
then accept;
Now above means export RIP and directed connection into OSPF
Now R1 should be able ping directly connection link 20.20.20.2 and 20.20.20.4 and R4 be
able to ping 1.1.1.1 and 3.3.3.3
50. Juniper RIP and OSPF Route Configuration
root@R1> ping 20.20.20.2
PING 20.20.20.2 (20.20.20.2): 56 data bytes
64 bytes from 20.20.20.2: icmp_seq=0 ttl=64 time=0.462 ms
64 bytes from 20.20.20.2: icmp_seq=1 ttl=64 time=1.097 ms
64 bytes from 20.20.20.2: icmp_seq=2 ttl=64 time=0.752 ms
64 bytes from 20.20.20.2: icmp_seq=3 ttl=64 time=0.978 ms
^C
--- 20.20.20.2 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.462/0.822/1.097/0.242 ms
51. Juniper RIP and OSPF Route Configuration
root@R1>
root@R1> ping 20.20.20.4
PING 20.20.20.4 (20.20.20.4): 56 data bytes
64 bytes from 20.20.20.4: icmp_seq=0 ttl=63 time=0.774 ms
64 bytes from 20.20.20.4: icmp_seq=1 ttl=63 time=1.569 ms
64 bytes from 20.20.20.4: icmp_seq=2 ttl=63 time=1.646 ms
^C
--- 20.20.20.4 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.774/1.330/1.646/0.394 ms
52. Juniper RIP and OSPF Route Configuration
Now R4 should be able to ping 3.3.3.3 and 1.1.1.1 of R3 and R1
root@R4> ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: icmp_seq=0 ttl=63 time=1.257 ms
64 bytes from 1.1.1.1: icmp_seq=1 ttl=63 time=1.804 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=63 time=1.885 ms
^C
--- 1.1.1.1 ping statistics ---
53. Juniper RIP and OSPF Route Configuration
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.257/1.649/1.885/0.279 ms
root@R4> ping 3.3.3.3
PING 3.3.3.3 (3.3.3.3): 56 data bytes
64 bytes from 3.3.3.3: icmp_seq=0 ttl=63 time=0.882 ms
64 bytes from 3.3.3.3: icmp_seq=1 ttl=63 time=1.520 ms
64 bytes from 3.3.3.3: icmp_seq=2 ttl=63 time=1.733 ms
64 bytes from 3.3.3.3: icmp_seq=3 ttl=63 time=1.495 ms
^C
--- 3.3.3.3 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.882/1.407/1.733/0.317 ms
54. Juniper RIP and OSPF Route Configuration
So summary on R2 we had this :
root@R2# run show configuration
protocols {
ospf {
export OSPFPOLICY;
area 0.0.0.0 {
interface em1.0;
interface em3.0;
interface lo0.0;
}
}
55. Juniper RIP and OSPF Route Configuration
rip {
group RIPGROUP {
export RIPPOLICY2;
neighbor em2.0;
}
}
}
policy-options {
policy-statement OSPFPOLICY {
term 1 {
from protocol [ rip direct ]; ( This means export Rip and directed connection to
OSPF)
then accept;
}
}
56. Juniper RIP and OSPF Route Configuration
policy-statement RIPPOLICY2 {
term 1 {
from protocol [ rip direct ospf ]; ( this means Export RIP, Directed connection and
OSPF
into RIP)
then accept;
}
}
}
57. ASM Educational Center Inc. (ASM)
WhereTraining,Technology&ServiceConverge
www.asmed.com