RIP Redistribution to OSPF
Hello All,
I am Adeel Ahmed preparing for JNCIP-M/T in December 2009 and i am these days preparing for OSPF example and case study. Can anyone answer to my query?
I am doing RIP redistribution to OSPF as i have applied the policy as
set term 1 from protocol rip
set term 1 then accept
set term 2 then reject
Can you anyone tell me that why we have to apply set term2 then reject statement? Thanks
Regards
Adeel Ahmed
I am Adeel Ahmed preparing for JNCIP-M/T in December 2009 and i am these days preparing for OSPF example and case study. Can anyone answer to my query?
I am doing RIP redistribution to OSPF as i have applied the policy as
set term 1 from protocol rip
set term 1 then accept
set term 2 then reject
Can you anyone tell me that why we have to apply set term2 then reject statement? Thanks
Regards
Adeel Ahmed
Comments
I can see your were confusion comes from, the second term really isn't needed at all. If the second term wasn't there then the results of the policy would be the same.
I think the second term was just added in there for emphasis to the fact that other routes, besides the rip routes, won't be advertised into ospf.
-Bender
Can you please confirm that excluding this statement in JNCIP exam can affect the points in exam?
Regards
Adeel Ahmed
Most of the OSPF redistribution policies are described with term 2 which reject which I think isn't required. But just to be on the safer side.. It's not bad to have them.
The test is graded by result. As long as your solution works, and does not break any restrictions, then you are good to go.
BGP peers are quiet.
Something must be wrong.
According to the book on page 213 i must have only RIP route on R7 but i have below mentioned. Please help to rectify
root@R7# run show route 10.0.5.0/24
inet.0: 26 destinations, 34 routes (26 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.5.0/24 *[RIP/100] 00:04:24, metric 2, tag 420
> to 172.16.40.1 via em0.0
[OSPF/150] 00:04:04, metric 0, tag 420
> to 10.0.8.9 via em1.0
root@R6# show
## Last changed: 2009-09-25 17:13:27 UTC
version 8.5R1.14;
system {
host-name R6;
root-authentication {
encrypted-password "$1$Y1dz6BzN$enOHND.ngjCdNx5ph/g9y/"; ## SECRET-DATA
}
}
interfaces {
em0 {
unit 0 {
family inet {
address 172.16.40.1/24;
}
}
}
em2 {
unit 0 {
family inet {
address 10.0.8.2/30;
}
}
}
em3 {
unit 0 {
family inet {
address 10.0.8.5/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.0.9.6/32;
}
}
}
}
protocols {
ospf {
export rip-ospf;
area 0.0.0.1 {
interface em3.0;
interface em2.0;
interface lo0.0 {
passive;
}
}
}
rip {
group rip {
export [ connected rip-routes ospf-rip ];
neighbor em0.0;
}
}
}
policy-options {
policy-statement connected {
term 1 {
from protocol direct;
then accept;
}
}
policy-statement ospf-rip {
term 1 {
from {
protocol ospf;
route-filter 10.0.5.0/24 exact;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement rip-ospf {
term 1 {
from protocol [ rip direct ];
then accept;
}
term 2 {
then reject;
}
}
policy-statement rip-routes {
term 1 {
from protocol rip;
then accept;
}
}
}
[edit]
root@R7# show
## Last changed: 2009-09-25 20:26:51 UTC
version 8.5R1.14;
system {
host-name R7;
root-authentication {
encrypted-password "$1$qWae5F9L$td9WKR.ijZvR79qNz3oqE."; ## SECRET-DATA
}
}
interfaces {
em0 {
unit 0 {
family inet {
address 172.16.40.2/30;
}
}
}
em1 {
unit 0 {
family inet {
address 10.0.8.10/30;
}
}
}
em2 {
unit 0 {
family inet {
address 10.0.8.1/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.0.9.7/32;
}
}
}
}
routing-options {
static {
route 200.0.0.0/24 reject;
}
}
protocols {
ospf {
traceoptions {
file osp;
flag hello detail;
flag error detail;
flag database-description detail;
}
export rip-ospf;
area 0.0.0.1 {
interface em1.0;
interface em2.0;
interface lo0.0 {
passive;
}
}
}
rip {
group rip {
export [ connected rip ospf-rip ];
neighbor em0.0;
}
}
}
policy-options {
policy-statement connected {
term 1 {
from protocol direct;
then accept;
}
}
policy-statement ospf-rip {
term 1 {
from {
protocol ospf;
route-filter 10.0.5.0/24 exact;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement rip {
term 1 {
from protocol rip;
then accept;
}
}
policy-statement rip-ospf {
term 1 {
from protocol [ rip direct ];
then accept;
}
term 2 {
then reject;
}
}
}
Now the problem that your facing, one that the book sets up for you, is that on R7 you're forwarding traffic destined for the 10.0.5/24 network through the RIP router, to R6, and then the rest of the way home. This sure seems like sub optimal routing to me, can you fix it?
-Bender
Also I would be apprehensive about redistributing connected networks via rip... It doesn't matter here, but the tasks haven't asked for it. They present it to you in a different way.
Rip-routes export is not required..You are only peering directly connected anyway... no new subnets are going to be learned.
BGP peers are quiet.
Something must be wrong.
I can able to redistribute RIP routes to OSPF routers and has been confirmed by checking show route 192.168.0.0/22 command
But i cannot able to redistribute OSPF route 10.0.5/24 to RIP router from R6.
Please provide your valuable commend on this and command line to trouble this issue quickly as exam point of view
root@R6# show
## Last changed: 2009-09-26 16:51:41 UTC
version 8.5R1.14;
system {
host-name R6;
root-authentication {
encrypted-password "$1$Y1dz6BzN$enOHND.ngjCdNx5ph/g9y/"; ## SECRET-DATA
}
}
interfaces {
em0 {
unit 0 {
family inet {
address 172.16.40.1/24;
}
}
}
em2 {
unit 0 {
family inet {
address 10.0.8.2/30;
}
}
}
em3 {
unit 0 {
family inet {
address 10.0.8.5/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.0.9.6/32;
}
}
}
}
protocols {
ospf {
export rip-ospf-ospf;
area 0.0.0.1 {
interface em3.0;
interface em2.0;
interface lo0.0 {
passive;
}
}
}
rip {
group rip1 {
export [ rip-internal ospf-rip ];
neighbor em0.0;
}
}
}
policy-options {
policy-statement ospf-rip {
term 1 {
from {
protocol ospf;
route-filter 10.0.5.0/24 exact;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement rip-internal {
term 1 {
from protocol [ direct rip ];
then accept;
}
term 2 {
then reject;
}
}
policy-statement rip-ospf-ospf {
term 1 {
from protocol rip;
then accept;
}
term 2 {
then reject;
}
}
}
This should help
protocols {
ospf {
export rip-ospf;
area 0.0.0.1 {
interface em3.0;
interface em2.0;
interface lo0.0 {
passive;
}
}
}
rip {
group rip1 {
export ospf-rip;
neighbor em0.0;
{ import rip-in;
}
}
}
}
policy-options {
policy-statement ospf-rip {
term 1 {
from {
protocol ospf;
route-filter 10.0.5.0/24 exact;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement rip-in {
term 1 {
from protocol rip
from route-filter 192.168.0.0/22 orlonger;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement rip-ospf {
term 1 {
from protocol rip;
then accept;
}
term 2 {
then reject;
}
}
}
BGP peers are quiet.
Something must be wrong.
root@R6# show
## Last changed: 2009-09-27 19:30:04 UTC
version 8.5R1.14;
system {
host-name R6;
root-authentication {
encrypted-password "$1$Y1dz6BzN$enOHND.ngjCdNx5ph/g9y/"; ## SECRET-DATA
}
}
interfaces {
em0 {
unit 0 {
family inet {
address 172.16.40.2/30;
}
}
}
em2 {
unit 0 {
family inet {
address 10.0.8.2/30;
}
}
}
em3 {
unit 0 {
family inet {
address 10.0.8.5/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.0.9.6/32;
}
}
}
}
routing-options {
aggregate {
route 192.168.0.0/22;
}
}
protocols {
ospf {
export ospf-out;
area 0.0.0.20 {
interface em3.0;
interface em2.0;
interface lo0.0 {
passive;
}
interface em0.0 {
passive;
}
}
}
rip {
group rip1 {
export ospf-rip;
neighbor em0.0;
}
}
}
policy-options {
policy-statement ospf-out {
term 1 {
from {
protocol aggregate;
route-filter 192.168.0.0/22 exact;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement ospf-rip {
term 1 {
from {
protocol ospf;
route-filter 10.0.5.0/24 exact;
}
then accept;
}
term 2 {
then reject;
}
}
}
[edit]
root@R7# show
## Last changed: 2009-09-27 18:09:57 UTC
version 8.5R1.14;
system {
host-name R7;
root-authentication {
encrypted-password "$1$qWae5F9L$td9WKR.ijZvR79qNz3oqE."; ## SECRET-DATA
}
}
interfaces {
em1 {
unit 0 {
family inet {
address 10.0.8.10/30;
}
}
}
em2 {
unit 0 {
family inet {
address 10.0.8.1/30;
}
}
}
em3 {
unit 0 {
family inet {
address 172.16.40.6/30;
}
}
}
lo0 {
unit 0 {
family inet {
address 10.0.9.7/32;
}
}
}
}
routing-options {
aggregate {
route 192.168.0.0/22;
}
}
protocols {
ospf {
export ospf-out;
area 0.0.0.20 {
interface em2.0;
interface em1.0;
interface lo0.0 {
passive;
}
interface em3.0 {
passive;
}
}
}
rip {
group rip1 {
export rip-out;
neighbor em3.0;
}
}
}
policy-options {
policy-statement ospf-out {
term 1 {
from {
protocol aggregate;
route-filter 192.168.0.0/22 exact;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement rip-out {
term 1 {
from {
protocol ospf;
route-filter 10.0.5.0/24 exact;
}
then accept;
}
term 2 {
then reject;
}
}
}
[edit]
root@RIP# run show route 10.0.5.0/24
inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.0.5.0/24 *[RIP/100] 03:18:45, metric 2, tag 420
> to 172.16.40.2 via em0.0
rip {
group rip1 {
export ospf-rip;
neighbor em0.0;
}
You need apply an import policy at the neighbor level to only get 192.168/22 orlonger routes from the RIP router
BGP peers are quiet.
Something must be wrong.