RIP Redistribution to OSPF

adeel32adeel32 Member Posts: 27 ■□□□□□□□□□
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

Comments

  • AldurAldur Member Posts: 1,460
    Without looking at the case study I can tell you that only rip routes will be advertised and nothing else.

    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.
    "Bribe is such an ugly word. I prefer extortion. The X makes it sound cool."

    -Bender
  • adeel32adeel32 Member Posts: 27 ■□□□□□□□□□
    Thanks for your reply in JNCIP book page 202 you can see the topology. Yes you are saying the same thing which i was thinking that excluding reject statement will not affect any redistribution.

    Can you please confirm that excluding this statement in JNCIP exam can affect the points in exam?

    Regards
    Adeel Ahmed
  • hoogen82hoogen82 Member Posts: 272
    Here you are being very specific about what is being redistributed and what protocol you are redistributing it from.. So yes term 2 is not required.

    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.
    IS-IS Sleeps.
    BGP peers are quiet.
    Something must be wrong.
  • adeel32adeel32 Member Posts: 27 ■□□□□□□□□□
    I am redistributing RIP to OSPF and OSPF to RIP but having below mentioned problem. Consider the topology on page 202 and output at page 213

    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;
    }
    }
    }
  • AldurAldur Member Posts: 1,460
    I wouldn't worry to much about R7 having both the RIP route and the OSPF route. If you look at page 213 it shows the RIP route as the active route and only route. You have the RIP and ospf route but the RIP route is the active route. There's really not much of a difference there.

    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? ;)
    "Bribe is such an ugly word. I prefer extortion. The X makes it sound cool."

    -Bender
  • hoogen82hoogen82 Member Posts: 272
    Just to make things clearer, just make sure you are not receiving 10.0.5/24 from the rip router.

    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.
    IS-IS Sleeps.
    BGP peers are quiet.
    Something must be wrong.
  • adeel32adeel32 Member Posts: 27 ■□□□□□□□□□
    Just to practice more i have deleted my configuration on all routers and then reconfigure all OSPF routers.

    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;
    }
    }
    }
  • hoogen82hoogen82 Member Posts: 272
    rip-internal is applied as an export which is wrong...

    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;
    }
    }
    }
    IS-IS Sleeps.
    BGP peers are quiet.
    Something must be wrong.
  • adeel32adeel32 Member Posts: 27 ■□□□□□□□□□
    I want to redistribute RIP to OSPF and OSPF to RIP as in case study of OSPF. I have already done below mentioned configuration but I cannot able to see the two possibilities to reach R6 and R7. Your help is required to solve it

    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
  • hoogen82hoogen82 Member Posts: 272
    Your are missing requirement to specifically get 192.168/22 routes from the rip router..

    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
    IS-IS Sleeps.
    BGP peers are quiet.
    Something must be wrong.
Sign In or Register to comment.